Skip to content

perf: retain bounded scanner projections and defer unused native proof - #117

Merged
Patrick-Erichsen merged 2 commits into
mainfrom
perf-retain-security-view-proofs
Oct 28, 2026
Merged

Patrick-Erichsen merged 2 commits into
mainfrom
perf-retain-security-view-proofs

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator

Solaris repeatedly builds large security projections and parses native string boundaries that most marker scans never query. Retain private offset maps as exact compressed snapshots under the existing 32 MiB cache budget, and construct the same native closer proof when a fallback actually queries it. Public views, findings, source offsets, parser eligibility, and runtime limits remain unchanged.

On the original Solaris artifact, the actual no-model CLI improved from 394.83 to 332.48 seconds on the same isolated four-core VM. Every field of all 914 issues except random finding IDs, the complete analysis-completeness object, and risk/suppression results are identical. This is static performance proof; Solaris still has parser and semantic-deadline blockers.

Validation: 1,458 related producer controls, 307 native adoption controls, exact equality of all 119 adopted source/dependency files, Ruff and diff checks. Independent producer and adoption P0–P3 reviews completed without findings (GPT-6.1 Sol, high, Standard). Both new native suites are included in image builds.

@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 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. 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 compresses retained scanner offset maps and delays native delimiter proof until a scan queries it.

Example: The author’s no-model CLI scan of the original Solaris artifact on an isolated four-core VM.

  • Before: Large projection maps repeatedly exceeded useful cache retention, and Markdown delimiter proof was constructed eagerly.
  • After: The author reports approximately 16% faster static scanning, preserving all 914 issues except random IDs and identical completeness, risk, and suppression results.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch appears correct and useful; inspectable evidence supports its invariants, while the real CLI performance result remains author-reported.
Proof confidence 🦐 gold shrimp (3/6) Collaborator authorship exempts this PR from the ordinary contributor proof gate; the body reports a shipped no-model CLI comparison, while inspectable coverage comes from cache/parser tests and exact-head native image checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Large skill scans spend avoidable time rebuilding projections and parsing unused delimiter ownership.
Reason: The existing feature owner proposes a measured static performance improvement without new configuration, changed acceptance policy, or broader recovery claims.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides a useful performance improvement absent from main; no actionable correctness or security defect was found.

Priority: P2
Reviewed head: cf09e661894ca2b915c1eb45027b926cb3121082

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported Solaris CLI comparison has no attached terminal output or comparison artifact; ordinary contributor proof is not enforced for this maintainer-authored PR.
Agent review details

How this fits together

ClawScan’s Docker runtime applies an owned patch to pinned SkillSpector; original artifact text enters its projection and marker scanners, which emit source-mapped findings and completeness records.

flowchart LR
A[Original artifact text] --> B[Security view cache]
B --> C[Independent offset arrays]
C --> D[Static and marker scanners]
D --> E[Lazy native delimiter proof]
D --> F[Findings and completeness]
E --> D
Loading

Technical review

Best possible solution:

Land these focused optimizations within the existing cache and parser owners while preserving scanner evidence and conservative completeness behavior.

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

Main visibly retains uncompressed offset arrays and eagerly constructs Markdown delimiter proof; the reported runtime improvement was not independently reproduced because this review executes no target code.

Is this the best way to solve the issue?

The approach is appropriately scoped: it improves retention inside the existing bounded cache and moves identical parser construction to the existing query boundary.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bounded security-view cache keeps the original intent (a9c5bf0: Reuse deterministic projections across analyzers while bounding retention, isolating mutable offsets, honoring caller deadlines, and keeping live locks outside checkpoint state.)
  • Native delimiter ownership keeps the original intent (0929eca: Use exact original-document parser ownership to prevent closing Markdown delimiters from opening false removal markers, preserving payload inspection and conservative fallback.)
  • CSV delimiter ownership keeps the original intent (b85942d: Prove structural closing quotes against bounded canonical CSV parsing without hiding field contents or explicit removal instructions.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Labels

Label changes:

  • add P2: A bounded scanner performance improvement has concrete value without evidence of an urgent regression or complete workflow unblock.
  • 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 bounded scanner performance improvement has concrete value without evidence of an urgent regression or complete workflow unblock.
  • 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, 1:22 AM ET / 05:22 UTC.

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Captured actual Solaris CLI comparison, with timing instrumentation and no model calls. Same retained original archive SHA-256: be62057b059fa024e9153f7389030220bb9415571e5c358c8929c70c38f7c852. Runs used the same isolated four-core/8 GiB VM, workflow limit 600 seconds, concurrency 10.

The CLI path was skillspector scan /original --no-llm --format json --output <report> with PYTHONPATH selecting each exact applied runtime snapshot. Final composed source includes the pinned shfmt v3.14.1 parser.

[
  {
    "source": "before b85942d",
    "wall_seconds": 394.825,
    "process_cpu_seconds": 395.977,
    "issues": 914,
    "issue_sha256_excluding_random_finding_id": "874e68cadae827699c062946eab37515c357e398556331d7da79d585d66ab2b7",
    "completeness_sha256": "891eb531a9ddf864b9a395022ead2fd34e9f30e68fdd142fb315bb7bc6505331",
    "report_sha256": "e4c0dbc8028c1ac57b85d25b8e4470a0c5a1e1df163724cfc94a15f604ff3723"
  },
  {
    "source": "candidate 6244514 / producer8c2587f",
    "wall_seconds": 332.483,
    "process_cpu_seconds": 335.009,
    "issues": 914,
    "issue_sha256_excluding_random_finding_id": "874e68cadae827699c062946eab37515c357e398556331d7da79d585d66ab2b7",
    "completeness_sha256": "891eb531a9ddf864b9a395022ead2fd34e9f30e68fdd142fb315bb7bc6505331",
    "report_sha256": "049278f16ffb686906f21af53f7cffcd39347dde98ddbfd8ffa1302ce205fb7f"
  },
  {
    "source": "composed8a58465 including Bash predecessor",
    "wall_seconds": 335.898,
    "process_cpu_seconds": 338.271,
    "issues": 914,
    "issue_sha256_excluding_random_finding_id": "874e68cadae827699c062946eab37515c357e398556331d7da79d585d66ab2b7",
    "completeness_sha256": "891eb531a9ddf864b9a395022ead2fd34e9f30e68fdd142fb315bb7bc6505331",
    "report_sha256": "5dfb0f611c9c442bf7e02a73975eab751021d297a3fa30aa2e59eea46699aae1"
  }
]

All fields of all 914 issues except the random per-run finding ID are equal. The entire analysis-completeness object is equal, including each exception and analyzer status. Risk and suppression results are equal. The full composed run still has 30 partial files; this verifies the performance change and evidence preservation, not a user unblock. The two changed source modules in 6244514 are byte-identical at reviewed head cf09e66; the final 134-file composition was also checked against the exact reviewed predecessor.

@Patrick-Erichsen
Patrick-Erichsen merged commit 594cd32 into main Oct 28, 2026
15 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the perf-retain-security-view-proofs branch October 28, 2026 05:24
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