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: needs maintainer review before merge. What this changesThe Gateway’s model catalog, its list of available models, recovers after plugin preparation timeouts outside active native-file verification while preserving terminal handling for stalled verification. Example: A plugin import stalls after native verification finishes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this is a useful, source-supported repair that current main still needs, and no actionable patch defect was found. The member-authored item also requires explicit maintainer judgment before closure. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway prepares model choices in a worker that loads provider plugins and verifies captured native companion files. The parent receives progress and catalog results, then either retains a terminal verification failure or replaces failed catalog owners. flowchart TD
A[Gateway catalog request] --> B[Catalog worker prepares plugins]
B --> C[Native file verification]
C --> D[Start, progress, and end notifications]
D --> E[Parent preparation deadline]
E --> F{Verification active at timeout?}
F -->|Yes| G[Record terminal verification failure]
F -->|No| H[Replace worker and republish catalog]
Technical reviewBest possible solution: Keep timeout classification at the existing catalog owner, using verifier lifecycle facts to preserve normal recovery and terminal native stalls. Do we have a high-confidence way to reproduce the issue? Yes, source establishes a clear reproduction path: block plugin import before verification or after its completion until preparation expires, and current main selects the terminal admission error. The PR reports failing negative controls and passing boundary regressions; execution was not repeated during this read-only review. Is this the best way to solve the issue? Yes, explicit verifier start/end facts repair the incorrect classification at its existing owner while retaining member-based deadline renewal and the established recovery lifecycle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 83c8fea9408f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +27, Tests +67, Docs +1. Total +95 across 6 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 9, 2026, 3:53 AM ET / 07:53 UTC. |
|
I ran an isolated foreground-Gateway comparison of parent Each version first published a healthy dynamic catalog. I then used actual
On the parent, the second timeout stopped automatic catalog recovery. With this PR, it followed ordinary worker-timeout recovery and a replacement worker published the fresh catalog without a plugin reload or Gateway restart. The new model ID was absent from static configuration and the previous catalog, excluding a stale-list success. I waited 15 seconds between the two fresh calls; the original long-running client request was excluded from the verdict. Separate observation: both versions also logged data-store ownership warnings ( This covers Linux process suspension with a synthetic provider, not physical macOS sleep or suspension during active native verification. No external model requests or real provider credentials were used; external container networking was disconnected during both experiments. |
955ad9c to
809a029
Compare
CI retention repair — 2026-11-25
The actual CI heap failure was traced to the manifest model-row cache retaining a superseded hosted catalog solely as an identity key. The cache now retains that identity weakly, while keeping the existing snapshot/config identity checks and cached rows. No timeout, permission, dependency, or configuration contract changes.
The existing compiled-worker heap regression failed before this correction; all 11 existing worker heap cases and 26 model-catalog tests now pass. The earlier six custody/recovery cases remain valid unchanged-input proof. Final local ClawSweeper code/security review of
809a029ac296..436da4a0499dcompleted with no actionable findings. Its note that this small correction adds no new regression is covered by the existing failing CI regression, not a test-count waiver. Scoped lint/format pass. Current-head CI is pending; the prior failed head is not claimed green.Current head:
436da4a0499d2a36a2c7c64f2d8d6bbaac2ba22d.Current repair and validation (2026-11-25)
Ported onto main
ba6d94ec1771without restoring the retired native integration suite or deleted directory-verifier helper. The existing custody integration suite now covers both pre-verification and post-verification import stalls through the real compiled Gateway worker and replacement publication owners. Each regression failed on main; all six cases pass with the fix. Recovery is asserted on the new published snapshot, never the superseded failed snapshot. Existing terminal-stall and host-sleep cases remain intact.Qualified touched-owner type-aware lint, formatting and diff checks pass. Historical Docker/Gateway evidence below is not a new-head live run; current worker integration proof is not full user-visible Gateway/channel end-to-end proof. Hosted CI and that remaining runtime qualification are still required before merge readiness.
Fresh local ClawSweeper finding disposition: its P2 asks to extend terminal handling to native namespace copying/hashing outside reference verification. The reported bug and existing progress channel concern reference verification only. The current recovery owner (
prepared-model-runtime.refresh-scope.ts,recoverCatalog) publishes withcatalogMode: "static"; it does not automatically replay the failed discovery. Retaining normal recovery for other preparation work is intentional, not an automatic hot retry loop. A persistent filesystem stall may recur on a later discovery demand; this accepted limitation is now documented. Expanding permanent terminal classification and lifecycle instrumentation to every native file operation is outside this repair. No authority, file-admission checks, timeout budgets, dependency versions or configuration were changed.What Problem This Solves
Fixes: a Gateway model catalog stops recovering when a plugin import times out before native verification starts or after verification has finished.
User Impact
User impact: normal catalog preparation timeouts recover through the existing shared worker lifecycle, while stalled native verification remains terminal for that capture. No configuration, migration, or timeout-budget changes are required.
Why This Change Was Made
The native verifier reports entry, verified-member progress, and exit through one lifecycle owner. The catalog worker forwards start/end immediately and only classifies a timeout as stalled native admission while verification is active. Existing idle deadline renewal still requires new completed members.
Related: #166687. This follow-up does not establish resolution of the separately reported Windows MSIX startup starvation (#167406); preserved Windows replay and caller attribution remain unverified.
Evidence
node scripts/check-changed.mjs --stagedis running; core typecheck passed and test graph checks are in progress. Cost measurement:pnpm test src/agents/prepared-model-catalog-worker.native.integration.test.ts --maxWorkers=1passed all eight tests in 111.47 seconds wall; individual test durations totaled 65.15 seconds (86.99-second Vitest invocation including transformation/setup). This existing native-worker suite must exceed 30 seconds to prove the real compiled worker, import boundary, shared catalog recovery, and terminal native admission—not a helper substitute. Fake timers bound the existing preparation deadline and an explicit import barrier replaces real sleeps; no new per-test Gateway/process boot was added. Hosted CI seconds will be recorded once its selected run completes.