Skip to content

chore(security): trace fixed Solaris model exceptions safely - #4147

Merged
Patrick-Erichsen merged 2 commits into
mainfrom
trace-solaris-model-typeerror
Oct 30, 2026
Merged

Patrick-Erichsen merged 2 commits into
mainfrom
trace-solaris-model-typeerror

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

The protected Solaris 0.69 replay 41036730169 completes 28/62 roots, then skills/fleet-dispatcher exits 2 with five semantic TypeErrors despite 523.8 seconds remaining. Existing safe metadata cannot locate the exception. Add a fixed nonpublishing diagnostic that scans this unchanged root first, then all 62 roots only after a complete successful first job, and exports allowlisted trusted module IDs/line numbers and bounded exception classes/status codes.

The observer invokes the installed CLI with the same source/model/budgets and wraps only its failure classifier, preserving returns, exceptions, retries and scan decisions. Original bytes and inventory verify before/after. Lifecycle/count validation prevents missing observer evidence from being reported as success. No dispatch inputs, arbitrary target/source/provider selectors, queue/claim/publication writes, raw messages, provider bodies, findings or publisher code execution. Default diagnostic scope and normal workers are unchanged.

Paired native control: with the same simulated model TypeError and network disabled, both before/after exit 2, make eight simulated calls, retain five TypeErrors and identical report facts, and preserve all 1,335 original hashes. After adds ten safe observer records, with private canaries absent. This proves observer behavior, not the actual hosted TypeError origin. The actual observed hosted run and causal repair remain follow-up work; this PR does not recover or unblock Solaris.

Validation: 94 focused tests; all 8,377 full tests pass with five configured skips and four workers, coverage thresholds pass; bun run ci:static; bun run ci:types-build; schema and CLI package tsc --noEmit. Independent restricted Sol/high P0–P3 review: scoped-clean, zero findings. Privacy, provenance, admission, symlink, bounds and observer-preservation controls pass.

The existing security-moderation spec records this diagnostic’s admission/export/provenance/bounds/lifecycle/cleanup and non-recovery contract. Refreshed seven-file independent P0–P3 review is scoped-clean with zero findings; documentation-only follow-up preserves all six implementation files. Inspectable paired native control output and limitations. First CI attempt’s generated-card browser capacity/fixture failure is retained; one bounded failed-job rerun passed on unchanged implementation.

@Patrick-Erichsen
Patrick-Erichsen requested a review from a team as a code owner October 30, 2026 10:47
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
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.

@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clawhub Ready Ready Preview Oct 30, 2026 11:07am UTC

Request Review

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Adds a fixed Solaris scan workflow that records bounded exception locations without exporting raw errors or changing publication decisions.

Example: Solaris 0.69.0 fails scanning skills/fleet-dispatcher with TypeError.

  • Before: Operators receive exception classes and scan status without the originating module or line.
  • After: The diagnostic scans that root first and projects allowlisted module IDs and line numbers while preserving the scanner result.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and narrowly bounded diagnostic machinery with supporting unit coverage; native behavior preservation is described rather than demonstrated in inspectable evidence.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor proof gate is waived for this collaborator-authored PR; the body describes a network-disabled native CLI control, but supplies no inspectable trace, and the baseline artifact download was blocked by review infrastructure.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Operators cannot identify the code location behind the retained Solaris scan's TypeErrors without exposing private scanner output.
Reason: The collaborator-authored direction adds bounded observability for a documented incident and explicitly leaves causal repair and publication recovery to follow-up work.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: this maintainer-authored PR adds useful diagnostic capability absent from main; one required security-contract documentation change remains.

Priority: P2
Reviewed head: a5f92ca74b003dcbbdb0a155c8b5372d6e41b122

Before merge

  • [P3] Record the exception-export contract in specs (P3) - This introduces a security-sensitive diagnostic boundary that exports qualified module locations and validates observer lifecycle evidence, but no spec records its intended limits. AGENTS.md lines 18–20 explicitly require durable intent for such subsystem changes. Add a focused spec note covering fixed workflow admission, allowed fields and bounds, behavior preservation, cleanup, and the prohibition on treating diagnostic output as publication or recovery evidence.
  • Await maintainer action - Obtain current-head workflow review from @openclaw/openclaw-secops as required by CODEOWNERS.

Findings

  • [P3] [P3] Record the exception-export contract in specs — scripts/security/skillspector_exception_diagnostic.py:13-19

Tests

  • Missing end-to-end proof: An inspectable native CLI control trace would substantiate the described unchanged exit, classifier results and report facts with the new observer active.
Agent review details

How this fits together

A protected manual GitHub workflow verifies immutable Solaris source, invokes the production bundled SkillSpector helper through an observer, deletes private scan material, and uploads a restricted summary.

flowchart TD
  A[Protected manual workflow] --> B[Verify fixed Solaris source]
  B --> C[Production bundled scan helper]
  C --> D[Observed SkillSpector CLI]
  D --> E[Restricted metadata projection]
  E --> F[Summary artifact]
  D --> G[Private scratch cleanup]
Loading

Technical review

Best possible solution:

Keep the fixed observer beside the existing diagnostic and document its export, admission, cleanup and nonpublication invariants in specs.

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

Current main projects bounded error classes but no originating frame locations; the hosted failure is confirmed by run metadata, while its underlying TypeError cause remains unverified.

Is this the best way to solve the issue?

Best-fix verdict: acceptable diagnostic enablement; reusing the production helper avoids a second scanner implementation, while changing normal workers or exporting stderr would unnecessarily widen scope and disclosure.

Full review comments:

  • [P3] [P3] Record the exception-export contract in specs — scripts/security/skillspector_exception_diagnostic.py:13-19
    This introduces a security-sensitive diagnostic boundary that exports qualified module locations and validates observer lifecycle evidence, but no spec records its intended limits. AGENTS.md lines 18–20 explicitly require durable intent for such subsystem changes. Add a focused spec note covering fixed workflow admission, allowed fields and bounds, behavior preservation, cleanup, and the prohibition on treating diagnostic output as publication or recovery evidence.
    Confidence: 0.97

Overall correctness: patch is correct
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Fixed Solaris diagnostic keeps the original intent (ac70987: Replay verified original inputs through the production bundled helper without publication or raw-output disclosure.)
  • Bundled scanner privacy and execution policy keeps the original intent (fix(security): classify bundled scanner preparation failures #4062: Retain bounded failure metadata while excluding scanner output, artifact contents and paths; later budget work preserves sequential scanning. Local git -S, blame and some older diff reads encountered unavailable blobs; REST PR records supplied the stated rationale.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit ac70987 adds scripts/security/solaris-bundled-diagnostic.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ac7098782bcf; files: scripts/security/solaris-bundled-diagnostic.ts)

Review metrics

Metric Value Why it matters
Patch size +688/-8 across 6 files Includes 171 added test lines and a 110-line protected workflow; production scan decisions remain owned by the existing helper.

Labels

Label changes:

  • add P2: Useful, narrowly scoped operator diagnostics for a real scanner failure, without an urgent regression introduced by this PR.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Useful, narrowly scoped operator diagnostics for a real scanner failure, without an urgent regression introduced by this PR.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

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

  • Attach the existing redacted native CLI control output showing preserved scanner results and the added safe exception records.

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 30, 2026, 7:01 AM ET / 11:01 UTC.

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Review follow-up: I added the fixed diagnostic contract to the existing specs/security-moderation.md, beside the worker diagnostics policy. It records admission, export/provenance/size bounds, classifier preservation, lifecycle validation, cleanup and the requirement to obtain normal package-specific proof before claiming recovery. Source behavior is unchanged; current-head checks and review will be refreshed after the documentation commit.

Inspectable native before/after output from the retained paired control (both run the installed CLI with the same injected model TypeError, network disabled):

{
  "before": {
    "cliExitCode": 2,
    "simulatedModelCalls": 8,
    "executionSuccessful": false,
    "status": "failed",
    "TypeErrorCount": 5,
    "all1335OriginalHashesPreserved": true,
    "actualModelsInvoked": false,
    "networkEnabled": false,
    "publisherCodeExecuted": false
  },
  "after": {
    "cliExitCode": 2,
    "simulatedModelCalls": 8,
    "executionSuccessful": false,
    "status": "failed",
    "TypeErrorCount": 5,
    "all1335OriginalHashesPreserved": true,
    "actualModelsInvoked": false,
    "networkEnabled": false,
    "publisherCodeExecuted": false
  },
  "sameCliOutcomeAndReportFacts": true,
  "privateCanariesAbsent": true,
  "observerLines": 10,
  "limit": "Both cases inject the same fake model TypeError into the actual installed CLI. This proves observer behavior, not the production exception origin."
}

Observed lifecycle and first bounded exception record:

[
  {
    "rootIndex": 0,
    "kind": "installed"
  },
  {
    "rootIndex": 0,
    "kind": "failure",
    "chain": [
      {
        "class": "TypeError",
        "statusCode": null,
        "frames": [
          {
            "module": "skillspector_llm",
            "line": 1498
          },
          {
            "module": "skillspector_llm_utils",
            "line": 664
          },
          {
            "module": "langchain_runnables",
            "line": 3500
          },
          {
            "module": "langchain_runnables",
            "line": 6031
          },
          {
            "module": "langchain_chat_models",
            "line": 552
          },
          {
            "module": "langchain_chat_models",
            "line": 1931
          },
          {
            "module": "langchain_chat_models",
            "line": 1889
          },
          {
            "module": "langchain_chat_models",
            "line": 2226
          }
        ],
        "unknownFrames": 2,
        "framesTruncated": true
      },
      {
        "class": "RuntimeError",
        "statusCode": null,
        "frames": [
          {
            "module": "skillspector_llm_utils",
            "line": 758
          }
        ],
        "unknownFrames": 0,
        "framesTruncated": false
      }
    ]
  }
]

This control proves observer behavior. It does not identify the real hosted exception origin: the local published image has OpenAI SDK2.54.0/LangChain OpenAI1.7.3, while the failed hosted replay used its uv-lock versions2.44.0/1.3.3. The actual protected hosted diagnostic remains necessary. The secondary RuntimeError in the synthetic chain is incidental event-loop context and is not evidence of the production cause. No publication recovery is claimed.

The SecOps team request is still pending. Patrick's existing full-incident independent-review exception is recorded; no team approval is claimed and enforced GitHub gates remain enabled.

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

The P3 finding is addressed in dff001b93a6dc10b5f5083a66613a549bbf7b6b7: the existing specs/security-moderation.md now records the exception-export contract beside worker diagnostics. The six implementation files are byte-identical to a5f92ca. Refreshed full seven-file restricted independent Sol/high P0–P3 review is scoped-clean with zero findings; static passes, and all frozen source/context hashes match. Native paired-control proof and limits are inspectable here. Current-head CI is running.

SecOps team approval remains pending and is not claimed. Continuing within Patrick’s recorded full-incident independent-review exception while preserving enforced GitHub gates. No diagnostic dispatch, original retry or publication recovery has occurred.

@Patrick-Erichsen
Patrick-Erichsen merged commit aae0ced into main Oct 30, 2026
34 of 36 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the trace-solaris-model-typeerror branch October 30, 2026 11:14

This branch was successfully deployed

1 active deployment
Preview – clawhub — dff001b9 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant