Repository navigation
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 September 12, 2026, 12:12 PM ET / 16:12 UTC (Revision 34). ClawSweeper reviewWhat this changesThe PR centralizes provider admission, preserves working automatic credentials when accounts are saved, reports the serving credential source, and adds shared startup and Doctor binding migration. Merge readiness⛔ Blocked before merge - 7 items remain This protected PR retains distinct credential-policy work beyond the merged catalog and login fixes. No new blocking defect was established in the examined owner paths; the documented compatibility tradeoff remains unresolved. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s model runtime combines provider configuration, saved accounts, and plugin-declared environment credentials to choose authentication for discovery and inference. Gateway, CLI, and chat consumers use those prepared decisions, while Doctor owns persistent upgrade repairs. flowchart TD
A[Provider configuration] --> D[Shared provider admission]
B[Saved accounts] --> D
C[Plugin credential declarations] --> D
D --> E[Prepared credential selection]
E --> F[Discovery and inference]
E --> G[Gateway CLI and chat status]
H[Doctor upgrade repair] --> A
Decision needed
Why: The remaining question changes supported credential and upgrade behavior; source correctness and successful bounded runs cannot establish that product acceptance. Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one admission and Doctor migration owner, with explicit auth/storage and SDK acceptance of the upgrade contract and its remaining service-environment and rollback limits. Do we have a high-confidence way to reproduce the issue? Yes for the bounded credential-selection scenarios documented in the retained production-path results and regression coverage; this review inspected their source but did not execute a current-main reproduction. Is this the best way to solve the issue? Yes structurally: shared admission, prepared source identity, and Doctor-owned persistence avoid competing policies. Whether the stricter activation contract is acceptable remains an owner decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5ba72cc78e39. 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 (33 earlier review cycles; latest 8 shown)
|
aeb8ac6 to
bb882cd
Compare
|
My take is that the central admission decision makes sense. Having a key available and choosing to use a provider are different things, and checking authored config before route projection seems like the right place to draw that distinction. I read A few questions came up while following the code. I may be missing context around how these paths are used:
That's where my reading landed. This is a source-only opinion with AI assistance, including an independent Daybreak reading of the SDK path. I haven't run these scenarios or independently reproduced the runtime evidence in the PR. |
0c9ed8a to
89f4613
Compare
|
Closing this without merging. It grew to 344 files and changes too much behavior in one change to review or roll back safely. The work will come back as a stack of smaller, owner-scoped PRs (admission owner and binding planner, Doctor binding migration, config selected-path identity, per-surface adapters, SDK types), each with its own proof. The branch stays for that split. |
Addresses #144726/#117956: provider entries, accessible accounts or plugin-owned env vars admit model use; generic credentials do not. Saving A retains working B; fallback records its replacement with one notice. Startup projects bindings; Doctor persists the same policy.
Head:
49a24d37509152ca12b95744b3ffc26d627602b6. Round5:101 tests and structural checks pass; census exits0; CI34704997470/1 pending. Production differs from ac6d: CI repair adds braces/renames a shadowed local; run-loop shares retry/proceed assignments; SQLite cell inspection shares row-read/missing-row handling. No API/schema/persistence change.Consumers
F/S keys are defined once (
F01=path,S01=symbol); later uses name that same file/symbol. F01:line adds position. Use/By tables map contracts to readers/writers.Prefixes: runner/ = src/agents/embedded-agent-runner/; methods/ = src/gateway/server-methods/; doctor-shared/ = src/commands/doctor/shared/; plan/ = src/agents/runtime-plan/; cron-agent/ = src/cron/isolated-agent/; sessions/ = src/agents/sessions/; agents/ = src/agents/; gateway/ = src/gateway/; commands/ = src/commands/; sdk/ = src/plugin-sdk/; config/ = src/config/. reply/ = src/auto-reply/reply/; profiles/ = src/agents/auth-profiles/; system-agent/ = src/system-agent/; telegram/ = extensions/telegram/src/; test-project/ = test/tsconfig/tsconfig.core.test.; plugins/ = src/plugins/; infra/ = src/infra/; flows/ = src/flows/. Other paths are repository-relative. Braces list exact alternatives.
10,284 positions not individually mapped; typed+lexical census attached (11,692 syntax candidates minus1,408 mapped, not changed APIs).
Model/status readers
Wire: packages/gateway-protocol/src/schema/agents-models-skills.ts:ModelChoiceSchema/generated clients (available, unavailableReason, unavailableUntil, outcomes). Producers: F01=agents/model-catalog-decisions.ts, F38=methods/models-list-result.ts, F02=gateway/server-model-catalog.ts/chat metadata; typed IDs/booleans.
Picker/cache/accounts
Admission/family conflicts
Manifest env owners
Admitted discovery
Catalog scope/SDK donors
Bedrock discovery
Credential source/env name
Readiness/source/hints
Provider selection
Startup binding/receipts
Binding facts/copies
Provider declarations/writes
Account publication/stores
Session database readers
Cron path readers
Doctor/startup
Health/CLI status
Gateway serving status
Auth invalidation/retention
Auth completion/accounts
Chat status/setup
Private lookup/test partitions
resolveProviderSourceConfig is private in F15;2 local callers, SDK behavior unchanged. F31=scripts/lib/tsgo-core-test-shards.mts registers agents-auth:90 roots moved from agents-root/agents-other, unchanged bodies/720-root ceiling.
Completion/notice
Session model projection
Documentation readers
Cron config facts
F46:resolveCronAgentConfig now copies private facts at :77 with copyConfigResolutionFacts(runtimeConfig,cfgWithAgentDefaults). This repairs the top-level spread that lost startup-approved bindings for persisted cron selectors; no new admission policy.
Moved target tests
Production readers
Test/fixture readers
Retained supplemental consumers; no added live proof.
Exports/hosts/terminals
Registry carriers preserve instance/admission; fixtures are supplemental.
Lexical/private dispositions
29 lexical categories: source dispositions, not typed closure or blanket exemptions. Raw SHA256:c1b4e7836c7de4670dbad3f1fa7138c9998e0f5f33c53e7df0f608ccd07ce629.
First8 counts exclude imports/repeated reads: credentials facts.ts:143,283; defaults/refValue validation-secretrefs.ts:18; drain doctor-config-flow.ts:699; emit :211,348,582,628; isActive catalog-context.ts:241,355; status catalog-context.ts:281,305,393 and harness/runtime-plugin.ts:161; includeChannelModelOverrides configured-provider-selection-ids.ts:51, plugin-auto-enable.shared.ts:112,392,508, telemetry.ts:238. Typed readers remain in scope.
Remaining17 counts include owner/test files, not dynamic calls; private none means no outer/exported consumer.
census: generic credentials reviewed — 2 callers listed
census: generic defaults reviewed — 1 callers listed
census: generic drain reviewed — 1 callers listed
census: generic emit reviewed — 4 callers listed
census: generic isActive reviewed — 2 callers listed
census: generic refValue reviewed — 1 callers listed
census: generic status reviewed — 4 callers listed
census: generic includeChannelModelOverrides reviewed — 5 callers listed
census: generic agentRuntimeAuthPlanMatchesTarget reviewed — 5 callers listed
census: generic captureModelsJsonContents reviewed — 2 callers listed
census: generic cfgWithAgentDefaults reviewed — 19 callers listed
census: generic collectConfiguredMediaProviderSelectionIds reviewed — 2 callers listed
census: generic collectConfiguredModelProviderSelectionIds reviewed — 2 callers listed
census: generic collectConfiguredProviderSelectionIds reviewed — 4 callers listed
census: generic ExistingAgentDatabaseTarget reviewed — 2 callers listed
census: generic fingerprintPreparedRuntimeFacts reviewed — 5 callers listed
census: generic includePluginCatalogs reviewed — 9 callers listed
census: generic listExistingAgentDatabaseTargets reviewed — 5 callers listed
census: generic modelsJsonContents reviewed — 21 callers listed
census: generic prepareConfiguredRuntimeFactsBatch reviewed — 4 callers listed
census: generic projectExistingAgentDatabaseTargets reviewed — 2 callers listed
census: generic resolveTargetSqliteOptions reviewed — 6 callers listed
census: generic resolveTargetSqlitePath reviewed — 8 callers listed
census: generic templateModelRegistry reviewed — 8 callers listed
census: generic updateCandidateAuthProfileStore reviewed — 3 callers listed
Publication/outcomes
Startup writer cleanup
F23:commitAutomaticConfigRepair drops unused unsetPaths/withCommit; sole caller F25 passed neither. Planner keeps applyUnsetPathsForWrite/resolveManagedUnsetPathsForWrite; other writer contracts remain. Dead preflight reassignment and misplaced runner/compact.ts comment removed.
Other reader ties
Request/executable facts
resolveAuthProfileEligibility unchanged. sdk/agent-runtime.ts loaders omit requestSelection; getter reexports narrowed core. Shipped options/3 negative type assertions retained; correction compile pending. profiles/usage.ts/agents/model-fallback-runner.ts consume canonical order/awaited quota reprobe; markAuthProfileSuccess records existing lastProbeAt.
Correction consumer dispositions
Reviewed89f positions; RM1/earlier omissions are reviewer misses.
Auth-store writers below use the new publication owner with the supplied database/owner/managed transaction; fixture roles unchanged, no new live proof.
Seven source-project rows
Projects: test-project/agents-root.json; all6 SDK rows F57=test-project/sdk.json/runtime plugin-sdk. Source only; core queries exclude both files. C8 limits below.
Config-file receipt correction
IO-selected configPath reaches load/snapshot/backup/prefix recovery/include-write/preflight and the binding planner. No second env lookup or object-only receipt. Registered commands/agent-exec.configless.test.ts opposite-receipt cases fail on89f/pass RM1; bindings correct, files/receipts unchanged. No schema/receipt-format change.
Validation and correction consumers
Reviewed8f positions; object-only tests/mocks are not upgrade proof. TUI/getter omissions are earlier reviewer misses.
Contention
Invalidation
RM2: committed.path → expected runtime/shared planner; observed runtime independently loads file. Full route guard; no ambient/second lookup or copied observation. Registered setup passes.
Credential removal/replacement/order/route, env withdrawal, endpoint/model/plugin changes, expiry and successful empty same-account refresh revoke retained facts; stale completion cannot publish.
Added auth.profiles metadata preserves working learned rows; credential/readiness still decides retention. Retained registered proof checks the same key/output limit.
Auth refresh signals before config await and rechecks scope/publication. Groups/registries/workers carry admitted IDs; session projection cannot widen them.
Root/include revisions and separate raw-root/updater hashes remain current. Selected custom/default files have distinct receipts; load/recovery/preflight must use IO-selected identity. Both registered opposite-receipt cases pass.
Plugin/browser connection/request/refresh generations retire copies; missing availability is unknown, discovery is not provider-wide readiness.
get-reply.types.ts, commands-login.ts, chat-send-agent-dispatch.ts and server-plugins.ts bind callbacks across awaits. Generic gateway.request rejects stale output. Google Meet/Workboard/meeting-browser/voice-call/meeting-tool retain error paths and committed effects; server-plugins.test.ts is boundary proof only.
Tests
Retained proof stays at its recorded revision:
Shipped SDK proof
C8: strict real Node/WebSocket types, unchanged inventories;3 catalog types exclude requestSelection/shipped options compile;3 old errors retained. Catalog calls compile-only;9 shipped/16 candidate behavior counts overlap. Predates getter correction, not current-graph proof. Artifacts: shipped9.4 tar,89f package130,matrix132; SHA256 identities retained in result.md.