Skip to content

fix: inspect canonical Markdown prose without swallowing shell operands - #124

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
fix-markdown-prose-ownership
Oct 28, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
fix-markdown-prose-ownership

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator

Summary

Fixes false parser incompleteness when ordinary Markdown possessives cross inline-code, table-cell, list or heading boundaries. Transports the reviewed source into the pinned runtime patch and adds 69 installed adapter controls.

- canonical prose can consume later text as an unterminated shell quote
+ prove exact original Markdown text ownership before masking punctuation
+ retain raw shell continuations and shell-word precedence

Related: ClawHub #4046. WAV consumer compatibility remains required before recovering that original upload.

Scope

  • Scanner adapter
  • Release/CI/repo automation

Security / Trust Impact

  • Security/trust impact explained

Findings still inspect original bytes. Unknown mappings, executable expansions, raw HTML and continued shell operands retain their conservative treatment. Existing models, reasoning, service tiers, budgets, source/dependency pins and lock bytes remain unchanged. No finding suppression or publication override is added.

Evidence

  • Before: unchanged PixelLab 3.0.0 is 123/126 fully inspected text files; three possessive-containing Markdown files remain partial.
    After: 126/126 text files; only 11 generated incomplete-reference rows disappear. All 58 other raw finding payloads and 147 reference payloads remain unchanged. The original WAV exclusion remains explicit.
  • All 30 retained input inventories and suppression payloads/counts match. Other 29 uploads preserve complete findings and analysis/reference payloads.
  • Exact reported continuation control ($CMD followed by a continued Markdown list) stays partial and retains destructive operands after the repair.
  • Ordinary upstream patch application reconstructs all 135 installed source/resource files plus pyproject/uv.lock byte-for-byte against reviewed producer bda4f884f6c59fd206b5e4477fa5c278ac6ce43f.
  • 1,170 installed adapter controls pass. Source validation: 1,649 passed; 3 native-shfmt comment expectations fail identically on the previous 826 source and are retained. Independent source cumulative-plus-repair and current integration reviews qualify P0–P3; the repair review completed all 5 passes.

Verification

  • go test -count=1 ./...
  • go vet ./...
  • go run ./cmd/clawscan --help
  • Installed adapter controls, source reconstruction and 30-original paired proof above
  • Docs site: N/A

Merge Danger

Door: two-way; revert this transport commit to restore the prior source.

Blast Radius: scanner. Native runtime publication and production consumer activation require their normal separate gates.

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

The PR extends canonical Markdown ownership to recognize prose apostrophes without masking continued shell operands.

Example: A Markdown guide contains Observe last_response's completed result. followed by substantial ordinary prose.

  • Before: The possessive can open a shell quote and leave static inspection incomplete.
  • After: The parser recognizes the apostrophe as prose punctuation while retaining original bytes for findings.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, useful repair with meaningful controls and no identified defect; supplied runtime results are summarized rather than directly inspectable.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; its body reports PixelLab improving from 123/126 to 126/126 inspected text files with other finding payloads retained, while inspectable coverage comes from the installed-package harness.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Benign possessives crossing Markdown syntax boundaries can prevent complete static inspection.
Reason: The collaborator-authored repair addresses the stated parser defect within the existing ownership mechanism and does not claim complete publication recovery.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a current scanner completeness defect, preserves conservative shell handling, and has collaborator-approved direction; no introduced defect was identified.

Priority: P2
Reviewed head: a1aed5d25b8b344b30a0972b90b145b35ef6165c

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The PR reports installed before/after scans, but supplies no inspectable CLI trace showing the changed path; ordinary contributor proof is exempt for this collaborator-authored PR.
Agent review details

How this fits together

ClawScan installs a patched SkillSpector inside its scanner runtime; Markdown source enters bounded ownership and shell inspection, which produce raw findings and inspection completeness records.

flowchart TD
  A[Original Markdown] --> B[Bounded canonical parser]
  B --> C[Exact punctuation ownership]
  C --> D[Shell continuation and word precedence]
  D --> E[Inspection completeness]
  A --> F[Raw finding production]
  E --> G[ClawScan scanner result]
  F --> G
Loading

Technical review

Best possible solution:

Land the bounded ownership refinement while keeping runtime activation and PixelLab's WAV compatibility repair separate.

Do we have a high-confidence way to reproduce the issue?

Current-main source excludes several composed prose cases from punctuation ownership, and the added fixtures exercise those paths; this review did not execute target code.

Is this the best way to solve the issue?

Extending the existing canonical ownership parser is appropriate because it retains exact source mappings, shell-word precedence, conservative fallback, and raw finding production.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against aff544dc623c.

Provenance checked

  • Canonical Markdown ownership keeps the original intent (0929eca: Use original-document canonical parsing to distinguish Markdown delimiters while retaining uncertain mappings and raw findings.)
  • Container shell projection keeps the original intent (1aedf7b: Refine container delimiter handling without consuming command contents or granting ownership to reconstructed executable text.)
  • Raw-line continuation guard keeps the original intent (unknown: The pinned upstream source explicitly prevents runtime-selected commands from consuming later text through prose masking; this PR reuses the condition for canonical ownership.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Labels

Label changes:

  • add P2: Ordinary Markdown punctuation can leave otherwise inspectable files partial, with the reported impact limited to scanner completeness.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Ordinary Markdown punctuation can leave otherwise inspectable files partial, with the reported impact limited to scanner completeness.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 28, 2026, 6:40 AM ET / 10:40 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant