Skip to content

fix: preserve marker ownership in canonical Markdown tables - #111

Merged
Patrick-Erichsen merged 1 commit into
mainfrom
fix-solaris-marker-ownership
Oct 28, 2026
Merged

Patrick-Erichsen merged 1 commit into
mainfrom
fix-solaris-marker-ownership

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator

Summary

  • A Markdown table containing delete+insert followed by another code span can be marked incompletely inspected: declared-marker reconstruction mistakes a closing code delimiter for a new removal marker.
  • Prove each complete canonical table row maps verbatim, cell by cell, to raw source before recognizing its closing backticks. Enable this proof only for declared-marker reconstruction; existing callers retain their current contract.

Scope

  • CLI behavior
  • Scanner adapter
  • Judge/profile/benchmark behavior
  • ClawHub profile proposal at proposals/<GHSA-ID>/clawscan.yml
  • Docs only
  • Release/CI/repo automation

Security / Trust Impact

  • Security/trust impact explained

Instruction bodies remain available to every analyzer. Explicit removal instructions still reconstruct inside table code spans. Escaped pipes, extra or padded cells, cross-cell and cross-row delimiter pairs, uncertain mappings, and budget exhaustion retain conservative fallback behavior. Source offsets remain bound through normalized views. Existing shell projection uses the default table-ownership setting, and its excluded ranges remain enforced. No resource, finding, severity or verdict limits change.

Verification

  • Focused scanner/manual proof:
    • Paired table regression: four LF/CRLF and indentation cases fail before the fix and pass afterward.
    • Fourteen transported controls cover exact mapping, positive instruction reconstruction, uncertain cells, excluded ranges and explicit caller opt-in.
    • Actual consumer patch applies to pinned upstream; all 118 source/dependency files are byte-identical to the reviewed producer. All 275 native runtime adoption tests pass.
    • Six retained original inputs, 18 analyzer replays: every finding signature is identical before/after. Solaris data-engineer rules change from false obfuscated-instruction incompleteness to completed inspection. Magneta, BETAP original and closed-fence reproduction, and Whetstone schematic JSON cases retain their previous findings and completeness states.
    • Broader related suite: 1,561 passed; one inherited nested-list fence projection failure reproduces on the unchanged base and has a separate repair in progress.
    • Ruff and git diff --check pass.
  • Go tests/vet: inherited evidence on the unchanged Go tree; CI reruns tests for this PR.
  • Docs site proof: N/A.

Notes

Independent P0–P3 producer review is scoped-clean. Integrated consumer review and current-head runtime CI are required before landing. Full Solaris scan and production recovery remain open until every required stage completes and retained artifacts are verified in production.

@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.

@Patrick-Erichsen
Patrick-Erichsen changed the base branch from main to pe/clawscan-go-foundation October 28, 2026 04:22
@Patrick-Erichsen
Patrick-Erichsen removed this pull request from stack #113 October 28, 2026 04:23
@Patrick-Erichsen
Patrick-Erichsen changed the base branch from pe/clawscan-go-foundation to main October 28, 2026 04:23
@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

This PR recognizes proven closing backticks in canonical Markdown table cells during declared-marker reconstruction.

Example: A Markdown table contains delete+insert followed by an insert_overwrite code span.

  • Before: A closing backtick can be mistaken for a removal-marker opener, producing obfuscated_instruction_text incompleteness.
  • After: Exactly mapped table cells establish delimiter ownership while instruction bodies remain available for scanning.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with meaningful fixture coverage and passing runtime checks; supplied behavior evidence stops at analyzer replays.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; its body reports original-input analyzer replays with unchanged finding signatures and corrected Solaris completeness, while explicitly leaving full-scan and production recovery unproven.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Ordinary Markdown table documentation can leave a skill incompletely inspected and prevent downstream processing.
Reason: The collaborator-authored direction repairs a demonstrated completeness failure without changing public options, evidence policy, or analyzer access to instruction text.

Merge readiness

✅ Ready for maintainer review

Keep open: this collaborator-authored PR fixes a concrete scanner completeness failure still present on main; no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 0bf7a13a32faef2f6082b33be529681d08b7dae8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied analyzer replay reports do not show the original Solaris table input completing through the shipped scanner CLI.
Agent review details

How this fits together

The Docker runtime patches pinned SkillSpector source; Markdown delimiter ownership feeds declared-marker reconstruction, whose findings and completeness evidence enter ClawScan report validation.

flowchart LR
  A[Markdown source] --> B[Bounded canonical parser]
  B --> C[Exact table cell mapping]
  C --> D[Declared marker reconstruction]
  D --> E[Static analyzers]
  E --> F[Findings and inspection ledger]
  F --> G[ClawScan report validation]
Loading

Technical review

Best possible solution:

Use the existing bounded Markdown ownership helper to prove exact table-cell closers only for declared-marker reconstruction.

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

Main explicitly rejects table delimiter ownership, and the supplied table fixture reaches declared-marker reconstruction; the author reports paired before/after failures, but no target code was executed during this review.

Is this the best way to solve the issue?

The repair addresses missing source provenance directly, reuses the existing parser and resource bounds, and preserves shell projection's default contract.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Table delimiter ownership changes intended behavior with a stated reason (0929eca: Whole-row substring matching could not establish exact cell origins, especially with escaped pipes and shared row maps.)
  • Shell projection exclusions and default behavior keeps the original intent (1aedf7b: Canonical ownership must preserve stricter shell-table boundaries and raw CRLF coordinates.)
  • Runtime adoption tests keeps the original intent (d7376d4: The Docker build validates the patched scanner with runtime adoption fixtures.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit 1aedf7b adds docker/clawscan-runtime/patches/skillspector-responses.patch:1171 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1aedf7b86ddc; files: docker/clawscan-runtime/patches/skillspector-responses.patch)

Labels

Label changes:

  • add P2: A supported Markdown input can falsely fail complete inspection, with a focused scanner repair and limited scope.
  • 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: A supported Markdown input can falsely fail complete inspection, with a focused scanner repair and limited scope.
  • 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted scanner CLI output for the original Solaris table input showing completed inspection and retained findings.

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, 12:27 AM ET / 04:27 UTC.

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Additional CLI proof on the unchanged original Solaris employees/data/data-engineer/rules.md (SHA-256 48f778919dd56327b60cbbc0e53865a1c47bfa0971ac09e6b5cd921b73626c37):

Actual SkillSpector CLI, static mode Before (d7376d4) After (runtime patch at 66fa64d)
Completeness partial, 0/1 file complete, 1/1 file
Exceptions obfuscated_instruction_text none
Findings 1 MEDIUM, EA2 at line137 same finding and source evidence

All finding fields except the per-run random finding ID are identical, including the match fingerprint. This uses scan <original-file> --no-llm --format json through the actual CLI with the applied runtime patch, whose118source/dependency files match the reviewed producer. Full original Solaris semantic/prod qualification remains separate and is not claimed complete here.

@Patrick-Erichsen
Patrick-Erichsen merged commit 1656d33 into main Oct 28, 2026
20 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the fix-solaris-marker-ownership branch October 28, 2026 04:30
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