Repository navigation
fix(config): align roster fixtures and docs with explicit ownership - #163475
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 2, 2026, 7:29 AM ET / 11:29 UTC. ClawSweeper reviewWhat this changesThe branch updates documentation examples and existing test fixtures to use keyed agent rosters and explicit service owners. Merge readiness⛔ Blocked before merge - 3 items remain This follow-up remains useful: current main still contains examples and fixtures rejected by canonical roster admission. No introduced correctness defect was found; the protected security label also requires maintainer handling. Priority: P2 Review scores
Verification
How this fits togetherAgent configuration defines workspaces, channel routing, and ownership of background services. Config admission validates that configuration before the Gateway and CLI consume it; Doctor owns legacy migration. flowchart TD
A[Documentation examples] --> C[Canonical agent configuration]
B[Test fixtures] --> C
D[Legacy configuration] --> E[Doctor migration]
E --> C
C --> F[Config admission]
F --> G[Gateway and CLI]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +29, Docs +192. Total +221 across 48 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep documentation and fixtures canonical while preserving routing, workspace locations, auth inheritance, and heartbeat enrollment under the existing Doctor migration contract. Do we have a high-confidence way to reproduce the issue? Yes, from source: current-main examples contain roster markers that raw config admission rejects, with existing tests covering that refusal. No runtime reproduction was executed in this read-only review. Is this the best way to solve the issue? Yes. Updating the authored examples and fixtures uses the existing canonical contract and keeps legacy repair in Doctor; no competing runtime compatibility path is introduced. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ee578bc73257. LabelsLabel changes:
Label 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
|
|
Landed (squash |
The OAuth fixture still writes agents.list and a default marker, so current config admission rejects all three authority scenarios after #162612. Use explicit owner and peer entries with owner as the system agent, keeping the model mappings, held refresh gates, and assertions unchanged. Related onboarding, memory, recovery, and sharing fixes are already on main in e07172e, f1d611a (#163475), and 0c1714d. This commit changes only the remaining OAuth fixture. Validation: all three OAuth cases passed (127.57s Vitest), covering shared rotation/restart, account-mismatch fencing, and logout during refresh. The 18-case selection took 1556.36s wall, including a 1045.8s cold runtime build. Scoped typed lint, owning type graphs, formatting, and independent review passed. Relevant config/auth inputs are unchanged through 093ccc8. Runtime proof used 4c60fa0 and the unchanged fixture. Later fs-safe and environment-alias changes on main were inspected but not re-executed.
…entries (#163512) Follow-up to #163475: more test fixtures (OAuth refresh cancel, models auth API key, relogin persistence, the shared trigger-handling harness, cold-storage backup, cost-usage archive identity, heartbeat scheduler, and the caller-mode state-migration family) still authored the retired agents.list roster and were rejected at config admission after #162612 moved that migration into Doctor. Fixtures loaded as runtime config now use keyed agents.entries with explicit owners; Doctor migration tests that intentionally feed the legacy shape are unchanged. Production LOC 0. Refs #162612 #163475
…mples (openclaw#163475) After openclaw#162612 moved legacy agents.list/default-marker migration into Doctor, test fixtures and 61 documentation examples still authored the retired roster shape and were rejected at config admission (main hourly 36996061103, 12 files plus docs-config-examples). Fixtures and docs now use keyed agents.entries with explicit surface owners; runtime admission is unchanged. Production LOC 0. Refs openclaw#162612
The OAuth fixture still writes agents.list and a default marker, so current config admission rejects all three authority scenarios after openclaw#162612. Use explicit owner and peer entries with owner as the system agent, keeping the model mappings, held refresh gates, and assertions unchanged. Related onboarding, memory, recovery, and sharing fixes are already on main in bf3a7e9, e2658df (openclaw#163475), and 0bc74fe. This commit changes only the remaining OAuth fixture. Validation: all three OAuth cases passed (127.57s Vitest), covering shared rotation/restart, account-mismatch fencing, and logout during refresh. The 18-case selection took 1556.36s wall, including a 1045.8s cold runtime build. Scoped typed lint, owning type graphs, formatting, and independent review passed. Relevant config/auth inputs are unchanged through 691284d. Runtime proof used 32f3cd3 and the unchanged fixture. Later fs-safe and environment-alias changes on main were inspected but not re-executed.
…entries (openclaw#163512) Follow-up to openclaw#163475: more test fixtures (OAuth refresh cancel, models auth API key, relogin persistence, the shared trigger-handling harness, cold-storage backup, cost-usage archive identity, heartbeat scheduler, and the caller-mode state-migration family) still authored the retired agents.list roster and were rejected at config admission after openclaw#162612 moved that migration into Doctor. Fixtures loaded as runtime config now use keyed agents.entries with explicit owners; Doctor migration tests that intentionally feed the legacy shape are unchanged. Production LOC 0. Refs openclaw#162612 openclaw#163475
Refs #162612
What Problem This Solves
Fixtures and copyable documentation still used retired agent roster markers, so intentional canonical-config admission rejected tests before they reached their actual contracts and rejected copied multi-agent examples.
User Impact
The documentation now uses keyed
agents.entriesand explicit surface owners while preserving routing, workspace locations, auth inheritance, and heartbeat enrollment. Doctor still owns legacy migration: normal updates invoke candidate Doctor through the backup flow; direct binary replacements requireopenclaw doctor --fixbefore startup. Runtime behavior is unchanged.Why This Change Was Made
The confirmed failing files authored their own rosters; shared state scenarios did not introduce the legacy fields. Their fixture construction now emits canonical configuration, including the fixtures whose assertions require unchanged config bytes. The obsolete docs negative case now validates a canonical roster while retaining indented MDX-fence coverage. The same change converts 61 documentation examples across 35 pages, including one example previously hidden in a JavaScript fence.
Final diff against the integrated main base: production 0 changed lines; tests +30/-18; docs +279/-87. No new modules, exports, test files, runtime fallback, dependency changes, or schema changes.
Evidence
Historical failure attribution is from main run 36996061103 at
4ee88721f043; each of the 13 named job logs was fetched once. The following local file runs passed on candidate004595e8429c10cb02f928301bf3953ce4124909usingnode scripts/run-vitest.mjs <file> --maxWorkers=1(the direct repository harness for a prepared worktree):src/cli/models-cli.auth-login.integration.test.tspackages/memory-host-sdk/src/host/session-files.test.tssrc/config/docs-config-examples.test.tssrc/gateway/server-close.model-acquisition.test.tssrc/gateway/provider-browser-auth/persistence.integration.test.tssrc/commands/models.auth.provider-resolution.test.tssrc/gateway/server.incomplete-stream.test.tssrc/cli/agent-session-affinity.process.test.tssrc/commands/doctor-lint.oauth.test.tssrc/commands/cleanup-live-state.test.tssrc/agents/main-session-recovery/main-session-restart-recovery-marking.test.tssrc/gateway/server.startup-defaults-reload.test.tssrc/gateway/server.startup-recovery-webchat.test.tsThe initial pass covered 120 tests across 13 files. All four Gateway files passed all three runs. The final docs rerun passed all 15 tests in 12.83s harness time. The affinity suite's four existing real CLI/HTTP-egress cases account for 30.97s of test time; no cases or waits were added. CI duration is pending.
Static inspection found no remaining retired roster markers or newly unparseable fences among the changed examples; every changed multi-agent example declares explicit ownership. The existing shared heartbeat block retains enrollment of both agents.
Other-cause findings, deliberately left unchanged:
src/cli/state-dir-gateway-check.process.test.tsfailed identically 3/3 normal runs (24.36s, 23.62s, 23.01s): normal CLI output replaces the expected state-mismatch detail with the generic command-failed/Doctor message. A separateOPENCLAW_DEBUG=1diagnostic run (23.30s) exposed the intended refusal fromrunStateStoreGuardinsrc/cli/program/preaction.ts:116and passed, including the no-auth-config-write assertion. There was no roster rejection. This diagnostic pass does not fix or clear the three normal failures. Temporary output capture was removed; this file is absent from the diff.src/infra/session-cost-usage-worker-io.test.tsfailed in historical job 110803163036 with a SQLite identity collision atsqlite-worker-broker-admission.ts:201, with no roster rejection. It was neither changed nor rerun.The original candidate passed
env -u OPENCLAW_TESTBOX node scripts/check-changed.mjs(including seven affected test typecheck graphs, targeted lint, formatting, ratchets, boundaries, and dead-export scans),git diff --check, and independent Codex P1 autoreview (scoped-clean, no findings).A parallel repair landed as
e07172ef9092ae00b1b71e92d0f66312951e4fa8during validation. Four identical fixture edits are now supplied by main. Mainee578bc73257aa228561c350417b96010dec87fawas integrated to resolve the recovery fixture overlap, retaining its landed typed config and workspace path. The remaining PR consists of 35 docs pages and nine test files. On the merged candidate, recovery marking passed all 11 tests (33.01s wall); the four Gateway suites each passed 3/3 again (12 additional file runs). Fresh independent Codex P1 review wasscoped-cleanwith no findings. The final staged changed-file gate against that exact main base passed, including all seven test typecheck graphs and targeted lint. Final head:8b23f612dac53173350dd41aab8e1f8fb5bf11ad.Validation ran locally under the campaign waiver. No production-file import-dependent or new-export closure gates apply. Auto-merge remains off.