Repository navigation
fix: reuse prepared catalogs and repair Gateway E2E fixtures - #136915
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 2, 2026, 11:50 PM ET / September 3, 2026, 03:50 UTC. ClawSweeper reviewWhat this changesThis PR distinguishes stale catalog recovery from forced provider discovery for model browsing and repairs Gateway E2E fixtures for announcements, sandbox workspaces, and ACP startup. Merge readiness⛔ Blocked before merge - 5 items remain Keep open: the model-catalog change is owner-bound, but the ACP fixture still proves only that an interrupt RPC was sent, not that the cancelled turn terminated. The prior P2 remains unresolved. Priority: P2 Review scores
Verification
How this fits togetherThe prepared model catalog is lifecycle-owned data used by Telegram model pickers, CLI listing, and Gateway flowchart LR
Browse[Telegram, CLI, or Gateway model browse] --> CatalogOwner[Prepared catalog owner]
AuthChange[Authentication change] --> Stale[Catalog marked stale]
CatalogOwner --> Decision[Reuse cache or refresh inventory]
Decision --> ModelOutput[Picker and RPC model results]
E2E[Gateway cancellation E2E] --> ACPX[ACPX plugin launcher]
ACPX --> Fixture[ACP process fixture]
Fixture --> Cancellation[Interrupted turn outcome]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +34, Other 0. Total +38 across 15 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain the catalog-owner refresh split, then make the ACP fixture settle its pending request as interrupted and assert target termination before proving that a queued successor remains unaffected. Do we have a high-confidence way to reproduce the issue? Yes, from source: trigger the fixture's blocking user-input turn, send Is this the best way to solve the issue? No. The catalog fix is at the correct lifecycle owner, but the ACP fixture must model and assert the interrupted terminal outcome to validate the cancellation behavior it claims to cover. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4af3fc294575. 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)
|
The successful announce fixture supplied only aggregate message-tool evidence, which no longer proves a committed final reply to the source conversation. Supply the receipt owned by the embedded runner without changing delivery policy or requester-wake sibling rerouting. Proof: the format suite failed 21 of 87 tests at both c92d0ae and a41af7e; all 87 pass with the corrected fixture.
Inventory callers forced full discovery on every browse while trying to refresh auth-stale content. Give the prepared catalog owner a distinct stale refresh intent, preserve explicit forced refresh, and leave ordinary turn reads on their existing facts. Apply the policy to commands, CLI, and RPC. Correct the Ollama fixture response contract and await full catalog readiness. Verify discovered-only models survive callbacks and RPC while discovery is unavailable, and verify explicit refresh still reaches the provider. Proof: before the fix, the real Gateway made 8 discovery calls after a 3-call warmup, and the owner policy regressions failed. Prepared catalog and auth reload owner tests now pass (43 tests).
The Docker scenario treated workspaceAccess=none as a read-only private workspace. The sandbox mount owner intentionally provides private writable storage while hiding the host and agent workspaces. Assert a private write/read succeeds and the same-named host sentinel stays unchanged. Keep read-only write rejection and read-write host persistence. Use a unique temporary workspace in the owner test so ambient /tmp skills cannot add unexpected mounts. Proof: OrbStack Docker reproduced the old assertion on successful exit zero; the complete none/read-only/read-write scenario now passes.
The cancellation fixture hardcoded a root node_modules adapter path, but acpx owns that dependency. This caused deterministic MODULE_NOT_FOUND startup failures in both release validation runs, not an agent startup flake. Remove the override so the canonical plugin launcher resolves its adapter; retain the synthetic Codex app-server process through CODEX_PATH. Proof: the real installed adapter process passes cancellation authorization, rejects stale replacements without interrupting them, and preserves queued successors when the preceding run is cancelled.
1e15a1d to
078bd46
Compare
|
Merged via squash.
|
…w#136915) * test(agents): model confirmed source replies in announce fixtures The successful announce fixture supplied only aggregate message-tool evidence, which no longer proves a committed final reply to the source conversation. Supply the receipt owned by the embedded runner without changing delivery policy or requester-wake sibling rerouting. Proof: the format suite failed 21 of 87 tests at both c92d0ae and a41af7e; all 87 pass with the corrected fixture. * fix(models): reuse prepared catalogs when browsing inventory Inventory callers forced full discovery on every browse while trying to refresh auth-stale content. Give the prepared catalog owner a distinct stale refresh intent, preserve explicit forced refresh, and leave ordinary turn reads on their existing facts. Apply the policy to commands, CLI, and RPC. Correct the Ollama fixture response contract and await full catalog readiness. Verify discovered-only models survive callbacks and RPC while discovery is unavailable, and verify explicit refresh still reaches the provider. Proof: before the fix, the real Gateway made 8 discovery calls after a 3-call warmup, and the owner policy regressions failed. Prepared catalog and auth reload owner tests now pass (43 tests). * test(sandbox): verify writable private workspace isolation The Docker scenario treated workspaceAccess=none as a read-only private workspace. The sandbox mount owner intentionally provides private writable storage while hiding the host and agent workspaces. Assert a private write/read succeeds and the same-named host sentinel stays unchanged. Keep read-only write rejection and read-write host persistence. Use a unique temporary workspace in the owner test so ambient /tmp skills cannot add unexpected mounts. Proof: OrbStack Docker reproduced the old assertion on successful exit zero; the complete none/read-only/read-write scenario now passes. * test(acpx): use the plugin-owned adapter launcher The cancellation fixture hardcoded a root node_modules adapter path, but acpx owns that dependency. This caused deterministic MODULE_NOT_FOUND startup failures in both release validation runs, not an agent startup flake. Remove the override so the canonical plugin launcher resolves its adapter; retain the synthetic Codex app-server process through CODEX_PATH. Proof: the real installed adapter process passes cancellation authorization, rejects stale replacements without interrupting them, and preserves queued successors when the preceding run is cancelled.
Collapses the model-list cleanup (#135912) and the provider-login branch into one change rebased onto main. - models.list reads one closed catalog source (gateway, prepared, published); the CLI `models list` and chat `/models` consume the prepared catalog directly. - Prepared model runtime: owners publish one curated build, live discovery runs only in the catalog worker, and secret-free provider-auth facts captured at build time replace native readiness reobservation and auth-mode flags. - Provider login: one login runtime shared by the CLI, chat `/login`, Telegram, and the Control UI; `openclaw.setup.auth.start` owns interactive sign-in. - First-run setup inference saves the credential, confirms the in-memory candidate with one tool-free turn, and commits config only on success. - xai catalog derives from the manifest; Codex native auth probes the CLI; doctor repairs legacy model refs and session routes. Integration with main: keeps the worker discovery plan (#137063), worker plugin scoping (#135486), auth order and profile identity (#132450, #137022), the plugin-owned Codex/Claude login readers, and the built-artifact preference for setup revalidation (#136036). Drops main's readiness reobservation (#134524) and stale-refresh catalog mode (#136915): the prepared build already carries the provider-auth facts those paths re-derived. Claude-Session: https://claude.ai/code/session_01CnvVXNnjjQGMrBLYjq29RP
## What Problem This Solves New provider models stay hidden after saved inventory expires, until an explicit refresh. ## Why This Change Was Made #136915 removed repeat acquisition when it reused prepared catalogs. This restores expiry-driven discovery without making readers wait. @steipete for awareness. Production +199/-105 (net +94); test tooling +7/-4; tests/support +214/-6; docs +5. Growth carries original cache deadlines through the existing acquisition path; duplicate normalization and separate inventory maps are removed. ## User Impact Reads return saved rows immediately, then show new models after renewal. Failed providers keep saved rows and their warning while healthy siblings renew. ## Evidence Telegram/Gateway with synthetic responses: main kept 8 rows after expiry; saved rows returned in 90 ms, then the ninth appeared. CLI agrees. Post-login reply: 67 ms. 16 valid config shapes started; invalid legacy input rejected. Getter-backed results retain accepted rows. Full consumer details: `consumers.md`. ## Compatibility No config keys, database changes, migrations, or public plugin API changes. ## Consumers - `models.list`, CLI, selectors, `/models`, `/think` menus, and sticker vision: renewed metadata. - Public agent-runtime getters and setup-shell thinking defaults: saved metadata can start background renewal. - `models status`: renewed metadata for visibility. - Chat metadata publication listener: invalidates cached metadata after renewal. - Catalog warnings: persist until the failed scope succeeds or its inputs change. CLI row output omits the warning. census: generic refreshCommittedProviderCatalogs reviewed — 2 callers listed census: generic error reviewed — 0 callers listed ## Invalidation Cache hits and compatible reloads preserve deadlines. Changed credentials, provider settings, or plugins retire old facts. Restart rebuilds inventory. Explicit refresh retries failures; native refresh retains its scope. ## Contention Existing discovery queue and pending request; concurrent reads return saved rows during a held response. ## Tests Registered `models.list`: expiry, accepted projection, held responses, coalescing, failed siblings, warning recovery. Reload-auth cases: startup/reload publication and snapshot access. Startup-static and test-harness edits produce reply fixtures. Owner/cache checks pass; the test runner prepares the SDK runtime first. Structural checks pass. Co-authored-by: Ayaan Zaidi <[email protected]>
…aw#146317) ## What Problem This Solves New provider models stay hidden after saved inventory expires, until an explicit refresh. ## Why This Change Was Made openclaw#136915 removed repeat acquisition when it reused prepared catalogs. This restores expiry-driven discovery without making readers wait. @steipete for awareness. Production +199/-105 (net +94); test tooling +7/-4; tests/support +214/-6; docs +5. Growth carries original cache deadlines through the existing acquisition path; duplicate normalization and separate inventory maps are removed. ## User Impact Reads return saved rows immediately, then show new models after renewal. Failed providers keep saved rows and their warning while healthy siblings renew. ## Evidence Telegram/Gateway with synthetic responses: main kept 8 rows after expiry; saved rows returned in 90 ms, then the ninth appeared. CLI agrees. Post-login reply: 67 ms. 16 valid config shapes started; invalid legacy input rejected. Getter-backed results retain accepted rows. Full consumer details: `consumers.md`. ## Compatibility No config keys, database changes, migrations, or public plugin API changes. ## Consumers - `models.list`, CLI, selectors, `/models`, `/think` menus, and sticker vision: renewed metadata. - Public agent-runtime getters and setup-shell thinking defaults: saved metadata can start background renewal. - `models status`: renewed metadata for visibility. - Chat metadata publication listener: invalidates cached metadata after renewal. - Catalog warnings: persist until the failed scope succeeds or its inputs change. CLI row output omits the warning. census: generic refreshCommittedProviderCatalogs reviewed — 2 callers listed census: generic error reviewed — 0 callers listed ## Invalidation Cache hits and compatible reloads preserve deadlines. Changed credentials, provider settings, or plugins retire old facts. Restart rebuilds inventory. Explicit refresh retries failures; native refresh retains its scope. ## Contention Existing discovery queue and pending request; concurrent reads return saved rows during a held response. ## Tests Registered `models.list`: expiry, accepted projection, held responses, coalescing, failed siblings, warning recovery. Reload-auth cases: startup/reload publication and snapshot access. Startup-static and test-harness edits produce reply fixtures. Owner/cache checks pass; the test runner prepares the SDK runtime first. Structural checks pass. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes an issue where users browsing models through Telegram or Gateway RPC repeatedly triggered provider discovery instead of reusing the prepared catalog. Also repairs three stale Gateway E2E fixtures that blocked release validation: confirmed announcement delivery, private sandbox workspace writes, and ACP adapter startup.
These failures were already present on
c92d0ae9c07ein Full Release Validation run 1 / Release Checks, as well as ona41af7eb71a95in run 2 / Release Checks. They were not introduced by the intervening release cherry-picks. The duplicated CI summaries account for the reported 42 announcement failures and two ACP failures.Why This Change Was Made
Inventory callers now refresh content when the catalog owner marks it stale after authentication changes. Ordinary reads reuse the prepared generation, and explicit refresh still forces discovery. The shared catalog owner handles that policy for Telegram commands, CLI listing, and Gateway
models.list; turn-path reads retain their existing behavior. Production delta: +4 lines, needed to distinguish those refresh intents and propagate the owner's type. No configuration, environment, schema, or protocol surface is added.The announcement fixture now supplies the committed source-reply receipt required by production. The Docker test verifies that
nonepermits private writes without exposing or modifying the host workspace. The ACP fixture delegates adapter resolution to its owning plugin instead of hardcoding a nonexistent root dependency path. No delivery guard, sibling-reroute fix, sandbox boundary, or cancellation check is removed. The sandbox owner test also uses its temporary-workspace helper so existing/tmp/workspace/skillscontent cannot alter the fixture.User Impact
Prepared models remain available while browsing when discovery is unavailable. Explicit refresh and auth-change recovery remain supported. The other changes improve release validation without changing runtime behavior.
Evidence
MODULE_NOT_FOUNDfor root adapter pathThe picker fixture uses the Ollama API's raw response shape, waits for full catalog readiness, and verifies a model absent from configuration across callbacks and RPC with discovery disabled. It separately verifies explicit refresh reaches the provider. The replacement-catalog callback case remains covered.
ACP dependency inspection also covered the installed adapter's
CODEX_PATHentry point and Codex app-server initialization and turn interruption. The fixture repair preserves that process protocol.Asserted Gateway behavior from the passing run:
{"scenario":"telegram-model-picker-prepared-gateway","verdict":"pass","callbackAcknowledgements":4,"postWarmDiscoveryAttempts":0,"discoveredOnlyModelRetained":true,"explicitRefreshReachedProvider":true,"replacementCallbackRecovered":true}On the release-based candidate, all 12 owner test files pass (482 tests), including 39 requester-wake cases and 259 announcement-delivery cases. The final independent review found no actionable P0–P2 findings. The committed private-QA runtime build passed and the combined four-file E2E run passed 91/91 on release-based head
01f106dd37a0979ea71724932d7103a48a3f05c3. The broadpnpm check:changedrun passed all architecture, type, full-lint, and import-cycle checks, then found six pre-existing redundant<void>arguments in the ACP fixture. Those were removed; the focusedpnpm check:changed --base HEAD --head HEAD -- test/e2e/qa-lab/runtime/webhooks-taskflow-cancellation-authz.e2e.test.tsrecovery run passed. The ACP E2E also passed again after that type-only cleanup.Initial local Gateway timeouts were missing private-QA build artifacts; building the same private-QA profile used by CI fixed startup without increasing timeouts. Full Release Validation itself has not been rerun. Telegram/Ollama proof uses a real Gateway with mock HTTP services; ACP uses the installed adapter with a synthetic app-server fixture; sandbox proof uses Docker.
Release cherry-picks, in order:
8229b8fcb61fa3a4e5b0c80acff087547a7904d41dfddb6e8fa7f57fcc60c4f01384b679e88ad77a85079b8ca7571f48537ef3b0ce5d393880b8b0c71e15a1d9ce4cb7ff9d1364ea8b4fe2528ef81c55These four commits rebased cleanly onto
41419be40bbb17e5eed318992c8e3bf1aee6199b. Applying their patches sequentially toa41af7eb71a95f7fc1ebc83d1b34d8a7a4ed0fe7reproduced the verified release candidate tree exactly (5fcea21d19edfc87037f2c8ff75504da269970cd). The private-QA build and all 91 E2E cases also passed on final main-based head1e15a1d9ce4cb7ff9d1364ea8b4fe2528ef81c55.Named follow-up: replace the existing literal-only thread-routing cases in the announcement format suite with runtime-backed assertions; those unrelated cases are unchanged here.
Focused E2E invocation (after the private-QA runtime build):