Repository navigation
fix(system-agent): normalize route-neutral roster entries - #130370
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 5:09 PM ET / 21:09 UTC. ClawSweeper reviewWhat this changesThe PR makes first-run agent roster metadata that cannot affect inference routing absent from the system-agent route fingerprint. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this PR open for explicit maintainer review. Current main still fingerprints every authored default agent entry, while first-run setup creates an entry containing name and workspace; the branch corrects that producer-level mismatch without weakening the guarded consumers. The protected Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherSystem-agent setup verifies an inference route, then compares a route projection before each guarded persistent operation. The projection turns relevant configuration into a stable identity used to decide whether the verified inference binding is still valid. flowchart LR
A[Inference verification] --> B[Route projection]
C[First-agent setup write] --> D[Updated roster]
D --> B
B --> E[Guarded route comparison]
E --> F[Persistent setup operation]
Decision needed
Why: The branch deliberately changes the identity compared by a persistent inference guard, while the exact package-level scenario was not rerun because Docker was unavailable. Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +23. Total +31 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the single producer-side normalization and obtain maintainer acceptance of the focused proof or a fresh packaged Docker run; do not relax persistent-boundary revalidation. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main unconditionally projects an authored agent, while first-agent setup writes only route-neutral roster metadata. The repository also has a packaged Docker reproduction command, though it was not rerun here. Is this the best way to solve the issue? Yes. The patch repairs the fingerprint producer rather than bypassing the guarded comparison, and it retains all fields that the previous projection treated as route-affecting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a2051ff3a982. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
# Conflicts: # src/system-agent/inference-route.test.ts # src/system-agent/inference-route.ts
|
Refreshed onto current Focused proof: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Follow-up review found that a setup-materialized default @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact head @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact packaged proof completed on
No credentials or secret-bearing output were included. Exact-head CI is also fully green and the PR is mergeable. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…30370) * fix(system-agent): normalize route-neutral roster entries * fix(system-agent): ignore materialized agent dir in route projection
Problem
Maturity run 32992034783 failed the packaged
system-agent-first-runDocker lane after the fuzzy planner selected and beganopenclaw.setup. The first guarded setup write correctly created the defaultmainroster entry, but the next guarded persistent boundary rejected the still-working verified Claude CLI binding and surfaced the generic inference-unavailable message.The inference-route projection emitted an
agentfingerprint whenever an authored agent entry existed, even when that entry contained only route-neutral first-run fields such asdefault,name, andworkspace. The first setup write therefore changed the fingerprint from “no agent projection” to an object whose only relevant value was the already-recordedmainid. The model, provider, agent directory, credential, runtime artifact, params, tools, and runtime policy were unchanged.Repair
Normalize an authored agent entry to absence in the inference fingerprint when it contributes no route-affecting overrides. Entries with agentDir, model, params, tools, relevant model aliases, or agent-runtime overrides remain projected exactly as before. Route identity still independently records the selected agent id and resolved agent directory.
This repairs the fingerprint producer instead of bypassing persistent-boundary revalidation, rebinding after mutation, retrying inference, or weakening the fail-closed authority checks.
Verification
sameDefaultInferenceRoutereturns false) and passes after normalization.node scripts/run-vitest.mjs src/system-agent/inference-route.test.ts src/system-agent/verified-inference.test.ts src/system-agent/operations.setup-transaction.test.ts— 55 passed.node scripts/check-changed.mjs -- src/system-agent/inference-route.ts src/system-agent/inference-route.test.ts— passed, including core/core-test typechecks, focused lint, deadcode, database-first, schema, sidecar, and import-cycle guards.Production LOC: +20/-12 (net +8). Tests: +24/-1 (net +23). The production growth names the route-affecting subset once and removes the previous unconditional projection.
Risk
This touches the system-agent inference authority fingerprint. It deliberately narrows only fields that cannot change inference execution; model/auth/runtime/plugin/agent-dir projections and every persistent-boundary check remain intact. Maintainer/security-owner review is appropriate before merge. No public config, migration, or persistence change. No changelog: internal first-run correctness repair.