Skip to content

fix: preserve proven quote boundaries during shell inspection - #130

Merged
Patrick-Erichsen merged 3 commits into
mainfrom
repair-quoted-prose-boundaries
Oct 31, 2026
Merged

Patrick-Erichsen merged 3 commits into
mainfrom
repair-quoted-prose-boundaries

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator

Quoted prose and nested command words can make SkillSpector treat a proven closing quote as a new operand opener, producing false static_parse_limit gaps. Preserve literal quote endpoints while continuing to inspect destructive commands inside them. Reconstructed words and adjacent shell segments retain conservative operand boundaries and honest partial reporting.

For the unchanged 128-file MySkool original, supporting static inspection improves from 105/127 to 119/127 fully inspected components; all 26 finding payloads remain unchanged. Eight gaps remain: five JavaScript, two HTML and an offline OSV limitation. Both sources still report partial. Exact Second Read and SmartGate are unchanged by this repair and retain their separate parser investigations.

Validation:

  • 47 focused quoted-operand/fragment controls, including nested destructive commands, reconstructed words and adjacent segments. No shell security fixture is executed.
  • 1,427 SkillSpector adapter tests, 259 A.I.G tests, full Go tests and vet pass. All 123 reconstructed Python modules match the tested source; dependency lock and existing bounds remain unchanged.
  • Existing 93-case adversarial finding payloads and all 26 MySkool findings are preserved.
  • Independent P0–P3 review completed five passes and reported nine findings. Each is reproduced/dispositioned and fixed with exact regressions; final source/finding closure was verified by the coordinator. The original helper status remains findings; no fresh automated clean report is claimed.

Existing upstream correspondence: NVIDIA/SkillSpector#948 reproduction. Keep this compatibility patch until equivalent upstream behavior is adopted and verified.

These are static supporting results. Full-original real-Codex validation, runtime release/adoption and any cause-qualified publisher recovery remain separate acceptance stages. Retained originals, security findings, partial-scan policy and immutable releases are preserved.

@clawsweeper

clawsweeper Bot commented Oct 31, 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. P1 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR preserves proven closing-quote boundaries while retaining destructive-command inspection and conservative reporting for reconstructed shell words.

Example: SkillSpector inspects example.sh containing echo "a del b".

  • Before: Balanced harmless text produces a partial inspection with static_parse_limit.
  • After: Inspection completes without findings.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and the previous blocker is addressed; confidence rests on source inspection and reported in-process comparisons rather than a shipped-entry-point demonstration.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor proof gate is exempt for this collaborator-authored PR; supplied static-runner comparisons cover the changed parser and ledger behavior without claiming runtime adoption or publisher recovery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Harmless balanced quoted text is reported as incompletely inspected, adding false scanner gaps.
Reason: The maintainer-authored direction repairs defined parser behavior while retaining conservative handling of unresolved execution.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a parser defect still present on main; the previous P1 finding is addressed, and no new actionable defect was found.

Priority: P2
Reviewed head: 5f354544ac51e5b5a52799758daa39e3a8103556

Before merge

None.

Findings

None.

Agent review details

How this fits together

ClawScan patches its pinned SkillSpector runtime, which consumes skill source text and emits raw findings and an inspection ledger for scanner and judge consumers.

flowchart LR
  A[Skill source files] --> B[SkillSpector static runner]
  B --> C[Command and quote parsing]
  C --> D[Destructive operand inspection]
  D --> E[Raw findings and inspection ledger]
  E --> F[ClawScan scanner adapter]
  F --> G[Independent judge]
Loading

Technical review

Best possible solution:

Land the focused parser repair while preserving destructive findings, unresolved-word uncertainty, and the existing partial-report contract.

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

The pinned parser source and credited upstream reproduction establish the harmless balanced-quote failure; no target code or tests were executed during this review.

Is this the best way to solve the issue?

The change uses the existing command-word parser, operand tokenizer, and completeness owner, with a narrow fallback restoring uncertainty for the previously missed suffix case.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Existing shell ownership integration keeps the original intent (3df9345: The merged Bash ownership repair distinguishes proven source roles while keeping unknown secondary evaluation incomplete.)
  • Runtime build verification keeps the original intent (c0b813f: The existing Docker build runs adapter regressions against the patched installed dependency; this PR extends that same verification list.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

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

Labels

Label changes:

  • add P2: This fixes false incomplete-inspection results with a bounded scanner-only change; the existing partial-report path limits downstream disruption.
  • 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.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 security-boundary: Current PR review selected no merge-risk labels.
  • remove P1: Current review triage priority is P2, so this older priority label is no longer current.

Label justifications:

  • P2: This fixes false incomplete-inspection results with a bounded scanner-only change; the existing partial-report path limits downstream disruption.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-31T22:55:48.202Z sha 81eceab :: blocked before merge. :: [P1] Retain operand inspection across an unquoted suffix

Reviewed October 31, 2026, 7:06 PM ET / 23:06 UTC (Revision 2).

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Reproduced and fixed the P1 on the new head5f35454. The input is only inert text passed to the actual static runner; no shell payload executes.

Same input / boundary a530 baseline 81ece candidate 5f35454
Unquoted destructive suffix from the review partial completed/noTM1 (regression) partial
12new shell/Markdown suffix controls not used as a new-clean claim 10fail/2pass 12pass
47existing focused quote controls historical known defects retained 47pass 47pass
93adversarial raw finding payloads prior baseline retained reference all exact except generated IDs
MySkool original static inspection 105/127full 119full/8partial/26findings 119full/8partial/26findings

The smallest fix removes the adjacent-quote-only restriction from the existing bounded reconstructed-word fallback. Unquoted suffixes now retain conservative uncertainty too. Nine destructive-text corpus rows acquire explicit partial gaps; all raw findings are preserved. A broader endpoint rewrite was tested and rejected because it altered existing finding output; it is absent from this commit.

Final verification:1,439SkillSpector adapter tests,59focused quote controls, fullGo tests/vet, unchanged production dependencies/budgets and123decoded-source module matches. MySkool's full raw/post-filter/ledger metadata and128original-file hashes are unchanged. Existing A.I.G code/dependencies are unchanged; prior259checks remain retained. These are static/supporting results, not original model, publication or recovery proof. Runtime preparation for the old81ece candidate remains held and cannot be adopted as this revision.

The earlier five-pass independent helper review remains a findings report with all nine findings verified fixed; no fresh helper-clean result is claimed. This revision also repairs the newly reproduced hosted P1. CI, current-head hosted review and runtime adoption remain pending.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@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 rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P1 Urgent regression or broken agent/channel workflow affecting real users now. 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 31, 2026
@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. labels Oct 31, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit fdc2116 into main Oct 31, 2026
25 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the repair-quoted-prose-boundaries branch October 31, 2026 23:10
@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Merged-source delivery proof:

  • Merge: fdc21167c146b6ca5c74bfefd90c06b03013765a; all 265 tracked blobs match reviewed/tested 5f354544ac51e5b5a52799758daa39e3a8103556.
  • Exact merged-main CI passed.
  • Runtime publication passed both native architectures and published the complete OCI index on attempt 1.
  • Immutable index: ghcr.io/openclaw/clawscan-runtime@sha256:b363d0f0eae5ce4f786eece6c1ec19e63825f50a955bc8456970f72de771af95.
  • Anonymous registry reads verified the index bytes/digest, source annotation and both platform-manifest digests. No image layers were pulled locally.

The following ClawHub worker adoption PR #4189 runs both quote suites before exposing the installed scanner. Its CI/review and actual production worker adoption remain pending. Protected local original scans and exact-package production recovery remain separate acceptance; no new retry or recovery is claimed from this runtime publication.

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant