Skip to content

fix(workers): preserve explicit scanner model settings - #3802

Merged
vincentkoc merged 3 commits into
mainfrom
fix/workers-scanner-provider-controls
Sep 24, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
fix/workers-scanner-provider-controls

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Security workers discard explicitly configured scanner model and reasoning settings when they create restricted subprocess environments. The required browser gate also depends on a live skills.sh entry that now renders the application's not-found page.

User Impact

Preserve optional scanner controls while leaving active scanner defaults, scanner versions, credentials, moderation decisions, and result reuse unchanged. Luna/high activation remains separate in #3800 until compatible scanner releases and credentialed verification are available.

Keep the existing skill metadata layout coverage in required CI using ClawHub's controlled local mirror fixture, rather than the availability of one live public entry.

Why This Change Was Made

  • aa945803: add REASONING_EFFORT, SKILLSPECTOR_MODEL, and SKILLSPECTOR_REASONING_EFFORT to both existing restricted child-environment lists. Tests cover both ClawScan workers and direct bundled-skill SkillSpector, including the existing worker-token and endpoint exclusions. Upstream scanner versions still determine supported settings.

  • d86aef72: call the existing devSeed:seedCanonicalSearchFixture after the disposable local backend is configured and functions are pushed; move the metadata layout test to the required profile-context shard. All typography, wrapping, no-overflow, and runtime-error assertions are preserved. The stress setup normalizes to exactly three category/topic nodes. The fixture leaves imports and scan admission disabled; no application or Convex source changes.

  • 744b8961: match the existing local-auth runner guard, so the broad public-backend browser command does not try to use a local-only fixture. The required local shard sets VITE_ENABLE_DEV_AUTH=1 and executes every metadata assertion.

Application production TypeScript: net +6 lines for supported provider controls. Test-runner infrastructure: net +3. Tests: net +35, including the intact moved layout test. Specs/changelog: net +8; CI routing: +1. Scanner workflow defaults and dependency locks are unchanged.

Evidence

Final head: 744b8961f49aee2480ff85b80eaae732923967e4.

  • Worker proof on Blacksmith Testbox: 67 focused scanner/workflow tests; ci:static; ci:unit (7,195 passed, 3 skipped, coverage passed); schema and CLI TypeScript checks. The four worker/test files remain byte-identical to that proof and the earlier independent Sol/high review.
  • Fixture proof on Blacksmith Testbox: 34 infrastructure/seed tests; ci:static; all four profile-context browser specs, including the moved layout test, against a real disposable local Convex/backend and app with retries disabled; all 18 remaining public-read smoke tests. Command exit 0; lease stopped.
  • Runner-guard proof on the same Blacksmith Testbox route: ci:static passed; with dev auth disabled and an unreachable base URL the local-only spec skips without backend access; the canonical local-auth runner executes the metadata test with retries disabled: 1 passed, 0 skipped. Command exit 0; lease stopped.
  • Independent manual review of the final fixture diff and split: clean. Exact test-body comparison confirms only the route and two stress-setup normalization lines differ from the original assertions.
  • Original failed smoke report confirmed the hardcoded public skill rendered “We couldn't find that page.” The controlled fixture repairs that dependency; no metadata assertion is skipped or weakened in the required local shard.
  • Hosted PR checks cover final head 744b8961f49aee2480ff85b80eaae732923967e4; required results and current-head ClawSweeper findings are verified before merge.

AI-assisted implementation; the changed boundaries and proof described above were independently reviewed.

@clawsweeper

clawsweeper Bot commented Sep 24, 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 Sep 24, 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 Sep 24, 2026 7:59am UTC

Request Review

@vincentkoc
vincentkoc marked this pull request as ready for review September 24, 2026 07:30
@blacksmith-sh

This comment has been minimized.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 4:02 AM ET / 08:02 UTC (Revision 3).

ClawSweeper review

What this changes

The branch forwards explicit model and reasoning settings to two security-worker scanner subprocesses and moves a skill-metadata browser check to a seeded local CI fixture.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. Current main still drops the explicit scanner settings, while the branch provides a bounded repair and retains the browser layout check in required CI. The related draft PR addresses a broader model rollout and is not a replacement.

Priority: P2
Reviewed head: 744b8961f49aee2480ff85b80eaae732923967e4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused, covers both worker paths, and retains a passing real-browser CI check; scanner tests stop at the subprocess boundary.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The member-authored PR is exempt from the ordinary contributor proof gate. Its final-head profile-context check passed against the local browser fixture; child-process tests support scanner environment forwarding but do not establish a live provider call. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR is exempt from the ordinary contributor proof gate. Its final-head profile-context check passed against the local browser fixture; child-process tests support scanner environment forwarding but do not establish a live provider call. No stored-data contract changes.
Evidence reviewed 12 items Current-main gap: The main-branch scanner allowlist ends at OPENAI_API_KEY and omits the three optional settings.
Worker pass-through: The introduced allowlist entries are copied from the worker environment into child processes; the surrounding restricted-environment design remains in place.
Prepublication pass-through: The second worker forwards the same settings only through its ClawScan child-environment allowlist.
Findings None None.
Security None None.

How this fits together

ClawHub security workers receive skill and package scan jobs, launch scanners with restricted environments, and use their reports in publication and moderation decisions. A separate browser CI runner starts a disposable app and Convex backend to check the rendered skill page.

flowchart LR
  A[Scan job] --> B[Security worker]
  B --> C[Restricted child environment]
  C --> D[ClawScan and SkillSpector]
  D --> E[Scan result]
  F[Local browser runner] --> G[Seeded skill catalog]
  G --> H[Skill layout check]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test LOC production +6; tests +35; runner and CI +4 The production growth is limited to explicit environment controls, while the larger diff relocates an existing browser assertion.

Technical review

Best possible solution:

Keep the narrow worker allowlists and the required seed-backed browser assertion; handle any change to active scanner defaults in the separate dependency-gated rollout.

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

Yes, from source: current main reconstructs scanner child environments from allowlists that omit the explicit settings. I did not execute a current-main scanner reproduction.

Is this the best way to solve the issue?

Yes—this is the narrowest fix for the pass-through gap. Inheriting the entire worker environment would weaken isolation, and removing the browser assertion would lose layout coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9896c69728cd.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded worker configuration repair with limited blast radius and retained CI coverage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The member-authored PR is exempt from the ordinary contributor proof gate. Its final-head profile-context check passed against the local browser fixture; child-process tests support scanner environment forwarding but do not establish a live provider call. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-24T07:40:05.206Z sha aa94580 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T07:48:49.147Z sha d86aef7 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit 9a614dc into main Sep 24, 2026
36 of 38 checks passed
@vincentkoc
vincentkoc deleted the fix/workers-scanner-provider-controls branch September 24, 2026 08:03

This branch was successfully deployed

1 active deployment
Preview – clawhub — 744b8961 Deployed Sep 24, 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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