Repository navigation
fix(doctor): report warnings for keyed agent configs - #123058
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 8:19 PM ET / September 14, 2026, 00:19 UTC (Revision 16). ClawSweeper reviewWhat this changesUpdates Doctor warnings and auth-migration hints to recognize keyed agent configurations, preserve configuration paths, and evaluate Codex requirements for the correct agent. Merge readiness✅ Ready for maintainer review This remains a useful, bounded repair: current main still misses keyed-agent diagnostics and agent-specific runtime context. No blocking defect was established in the introduced changes; the maintainer-authored PR is also protected from cleanup closure. Priority: P2 Review scores
Verification
How this fits togetherDoctor reads configuration and local state to explain problems and offer repairs. Its configuration diagnostics also consult runtime selection policy to determine whether an agent needs the Codex plugin. flowchart TD
A[Agent configuration] --> B[Shared roster reader]
B --> C[Agent identity and source path]
C --> D[Doctor diagnostic checks]
C --> E[Runtime policy resolver]
E --> D
F[Local auth and session state] --> D
D --> G[Warnings and repair guidance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +12, Tests +105. Total +117 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep Doctor aligned with the shared roster and runtime-policy owners so warnings identify the correct agent and configuration path without changing stored preferences or repair safeguards. Do we have a high-confidence way to reproduce the issue? Yes, source establishes concrete cases: keyed heartbeat settings are skipped on main, and per-agent request parameters lose their agent context during Codex diagnostics. This read-only review did not execute the tests or CLI. Is this the best way to solve the issue? Yes, consuming existing roster provenance and passing agentId through the existing resolver is a narrow repair that preserves the established configuration and migration contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 078ca0bc2ff6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
8fce3cb to
33a8dcf
Compare
33a8dcf to
71d3e1f
Compare
71d3e1f to
574de1a
Compare
|
Refreshed against current main because Doctor's warning aggregation materially changed after this head (not merely for behindness). New exact head: Reconciliation evidence:
Mandatory direct Codex inspection completed personally at sibling
Verification:
@clawsweeper re-review |
574de1a to
6d40f5b
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f24a220 to
e75841a
Compare
|
@clawsweeper re-review Rebased onto current |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8abafc3 to
acd20d8
Compare
|
Rebased onto current Cleanup in this refresh:
Proof:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
acd20d8 to
123eeab
Compare
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* commit '8e6fe8e02ddb51bfec4e80071f0f2adcae4cf098': (47 commits) refactor: simplify Gateway health response parsing (#147834) fix: avoid Gateway stalls when renaming sessions (#147869) refactor(plugins): reuse worker optional-method validation (#147925) refactor(infra): remove unreachable firewall diagnostic fallback (#147882) fix(ui): open attached automations from session hovercards (#147749) refactor(reply): share usage-bar numeric coercion (#147863) fix(doctor): report warnings for keyed agent configs (#123058) perf(plugins): reuse complete registry comparisons (#147893) fix(workboard): await lifecycle sweep completion in tests (#147950) fix: reduce stalls when browsing large session inventories (#147911) refactor(onboard): share custom model definition (#147915) feat(ios): collapse completed chat work above replies (#148002) fix(voice-call): retain state runtime for deferred streams (#147689) test(qa): compare Telegram entities semantically (#147752) fix(plugins): preserve runtime scope for deferred CLI actions (#147688) test(qa): keep Slack progress marker visible (#147748) test(qa): finish channel picker prompts (#147730) test(tui): handle auth restriction prompt (#147729) fix(qa): retain onboarding prompts across redraw bursts (#147687) fix(qa): seed Teams ambiguous timeout deterministically (#147686) ...
* commit '069710f909f0a7158777d0fc0bf1eab84e20c699': (45 commits) refactor(infra): consolidate update campaign reset ownership (openclaw#146555) refactor: simplify Gateway health response parsing (openclaw#147834) fix: avoid Gateway stalls when renaming sessions (openclaw#147869) refactor(plugins): reuse worker optional-method validation (openclaw#147925) refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882) fix(ui): open attached automations from session hovercards (openclaw#147749) refactor(reply): share usage-bar numeric coercion (openclaw#147863) fix(doctor): report warnings for keyed agent configs (openclaw#123058) perf(plugins): reuse complete registry comparisons (openclaw#147893) fix(workboard): await lifecycle sweep completion in tests (openclaw#147950) fix: reduce stalls when browsing large session inventories (openclaw#147911) refactor(onboard): share custom model definition (openclaw#147915) feat(ios): collapse completed chat work above replies (openclaw#148002) fix(voice-call): retain state runtime for deferred streams (openclaw#147689) test(qa): compare Telegram entities semantically (openclaw#147752) fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688) test(qa): keep Slack progress marker visible (openclaw#147748) test(qa): finish channel picker prompts (openclaw#147730) test(tui): handle auth restriction prompt (openclaw#147729) fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687) ...
* commit '4ddb9ed21245eaca9f243e555a5ec070aaaf0dad': (113 commits) fix: avoid Gateway stalls when renaming sessions (openclaw#147869) refactor(plugins): reuse worker optional-method validation (openclaw#147925) refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882) fix(ui): open attached automations from session hovercards (openclaw#147749) refactor(reply): share usage-bar numeric coercion (openclaw#147863) fix(doctor): report warnings for keyed agent configs (openclaw#123058) perf(plugins): reuse complete registry comparisons (openclaw#147893) fix(workboard): await lifecycle sweep completion in tests (openclaw#147950) fix: reduce stalls when browsing large session inventories (openclaw#147911) refactor(onboard): share custom model definition (openclaw#147915) feat(ios): collapse completed chat work above replies (openclaw#148002) fix(voice-call): retain state runtime for deferred streams (openclaw#147689) test(qa): compare Telegram entities semantically (openclaw#147752) fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688) test(qa): keep Slack progress marker visible (openclaw#147748) test(qa): finish channel picker prompts (openclaw#147730) test(tui): handle auth restriction prompt (openclaw#147729) fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687) fix(qa): seed Teams ambiguous timeout deterministically (openclaw#147686) refactor(mcp): load OAuth only when credentials are needed (openclaw#147884) ...
* fix(doctor): diagnose keyed agent configuration * test(doctor): consolidate roster diagnostics coverage * refactor(doctor): keep roster preview within owner limit * test(doctor): trim keyed runtime fixture
What Problem This Solves
Doctor diagnostics could skip keyed
agents.entriesrosters or name the wrong authored config path. Affected checks included auth-profile migration hints, model-fallback analysis, sandbox overrides, heartbeat direct-message policy, orphaned agent recovery, and preview tool-profile warnings.Codex plugin validation also resolved implicit OpenAI runtime policy without the current agent identity, so one agent's provider request parameters could be ignored or attributed to another agent.
Why This Change Was Made
The repair uses
listAgentEntriesWithSource/readAgentRosterProperty, the existing roster owners, everywhere a diagnostic needs source provenance. Keyed input keepsagents.entries.<key>guidance; supported list input keepsagents.list[...]guidance. Codex diagnostics passagentIdthrough the existing runtime resolver instead of reimplementing provider policy.Current main commit
fbf24873f48restored keyed enumeration for the fallback and sandbox checks, but always rendered keyed paths. This branch retains that coverage while preserving the authored list/keyed source and repairs the remaining Doctor owners.No config key, default, API, migration, or runtime fallback is added or removed.
Codex Dependency Contract
The acting PR owner and the root orchestrator each directly inspected the exact sibling
../codextags. Root independently confirmed that the immutable source links and contract conclusion below match both pinned revisions.Historical preserved-bundle pin:
rust-v0.147.0resolves tobe6e8eac029b183056b7e4402879f15d2c85f61b.codex-rs/app-server-protocol/src/protocol/v2/turn.rs:71-160codex-rs/app-server-protocol/src/protocol/v2/thread.rs:216-268codex-rs/core/src/session/turn_context.rs:448-468Current rebased pin:
@openai/codex0.150.1 atextensions/codex/package.json:10-12.rust-v0.150.1resolves to90854393966b21e9ebfd21b122334eb09a20c93d.codex-rs/app-server-protocol/src/protocol/v2/turn.rs:71-160codex-rs/app-server-protocol/src/protocol/v2/thread.rs:235-278codex-rs/core/src/session/turn_context.rs:563-585extensions/codex/src/app-server/turn-params.ts:89-146.Both pinned contracts expose native model, service-tier, reasoning, personality, and related turn controls, not a generic provider request-parameter channel. Agent-authored provider request parameters therefore select the embedded OpenClaw path, so the diagnostic must resolve policy with the exact
agentId.Preserved-Bundle Reconciliation
Retained:
Dropped with proof:
src/docker-setup.e2e.test.ts: unrelated fixture coverage; no changed production branch uniquely depended on it;src/commands/doctor.warns-per-agent-sandbox-docker-browser-prune.e2e.test.ts: current main already has keyed full-Doctor coverage plus a stronger direct sandbox owner test; the preserved warm-up also ran product code before harness state isolation;Final surface: 13 files. Production +43/-23 (net +20); tests +210/-88 (net +122); aggregate +253/-111 (net +142). The production growth is provenance-aware path rendering and
agentIdpropagation through existing owners.Evidence
Pre-fix proof on the original base captured missing keyed auth/fallback/heartbeat warnings, incorrect preview paths, unscoped Codex policy resolution, and stale state-recovery advice. Original post-fix Testbox
tbx_01kzwzjywd6x4101wad4zb56qqpassed 341 tests; the source-aware state follow-up Testboxtbx_01kzx3kebg6z9rxn9crbntffh5captured the list-path failure and then passed 38/38 state-integrity tests.Final rebased proof:
151fbaad45adac60d6a684e8680551173d8f38a0;f24a220b79a43fc9d9ebea5a95c347b037f5fbc8;tbx_01m154kpg0jsxqgd0h8q38rj6w(hydration run 33213008770): seven focused files, 3 Vitest shards, 294 tests (87 runtime-config, 48 commands-light, 159 commands), exit 0;git diff --check: passed;$autoreviewoverorigin/main...HEAD: no P0-P2 findings, patch correct, confidence 0.94 (thread01a04a4c-a559-7601-83c5-a7d0785da9c7);git range-diff eb07eecd4042..6d40f5b766f 151fbaad45a..f24a220b79areconciled both authoritative remote commits. Differences are current-main overlap and the audited test/fixture trimming above. A synthetic merge against the exact base succeeds, and GitHub reports the PR mergeable.No agent transcript is included because publication consent was not granted.