Repository navigation
fix: complete Gateway upgrades after Node prefix changes - #145335
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 19, 2026, 6:22 PM ET / 22:22 UTC (Revision 40). ClawSweeper reviewWhat this changesThe PR selects compatible Node runtimes during updates, rebinds eligible Gateway services to the invoking installation, and restores the original service after failed activation. Merge readiness⛔ Blocked before merge - 7 items remain The PR remains useful, but a source-proven Linux planning defect prevents ordinary systemd installations from receiving the intended prefix reconciliation. Earlier recovery repairs and their bounded native proof remain valid. Priority: P1 Review scores
Verification
How this fits togetherThe updater coordinates package installation, Node selection, Doctor maintenance, and the operating system's Gateway service. It must preserve service ownership and operator state while activating or recovering an installation. flowchart TD
A[Update request and installed packages] --> B[Inspect Node and Gateway ownership]
B --> C{Service can be rebound}
C -->|Yes| D[Prepare invoking installation]
C -->|No| E[Update existing service installation]
D --> F[Activate under live ownership]
E --> F
F --> G{Gateway healthy}
G -->|Yes| H[Complete update]
G -->|No| I[Restore verified original service]
Decision needed
Why: Root policy requires published-driver upgrade evidence, while the body explicitly defers that qualification; the prior review requested a landing disposition that remains unresolved. Before merge
Findings
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use canonical override semantics throughout planning and restoration, preserve authored service settings, and establish or explicitly accept the published-driver upgrade boundary before landing. Do we have a high-confidence way to reproduce the issue? Yes, from source: an ordinary Linux user service with known-empty override metadata deterministically takes the service-root fallback in the new planner. No target code was executed during this read-only review. Is this the best way to solve the issue? Not yet: extending the existing updater is appropriate, but metadata presence is not equivalent to an operator override, and the same mistaken assumption appears in planning and recovery. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ff38246e6710. 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
HistoryReview history (39 earlier review cycles; latest 8 shown)
|
Reconcile the validated Node-continuity component with current main. The source tree is identical to the tested a99b5b87 integration; rebase preserves the existing PR and avoids publishing unsigned local merge commits.
7cd723e to
8bdb422
Compare
Standalone finalizers park and restore their owned service even when the updater restart is disabled. Use matching isolated package metadata and assert one maintenance stop/restore while forbidding updater restart and failure triage. Pre-execution failures now report through UpdateCommandFailure. Preserve the original error identity in its cause chain and assert the finished failed run, published run ID, and report path. Unknown-owner refusals reach the operator as bounded diagnostics before exit 1; retain the refusal and package-manager recovery advice checks and the no-mutation assertions. Readiness now invokes the UTF-8 child runner. Mock that transport with the captured Doctor report and physical exit facts, preserving the chmod-000 warning, guidance, and byte-for-byte configuration assertions. Reuse the three native Doctor fixture corrections from #145335 (97c7b35, Jason / @fuller-stack-dev), with shared payload assertions in the existing support file. Pin native support so built checkout artifacts cannot redirect Doctor past the fixture's intended transport. Keep relative-selector triage checks on both contracts: update publishes structured failure facts before exit 1, while standalone repair preserves the original exception. Both retain absolute target selectors and restore the caller environment. Validation: changed checks and P1 review passed; Doctor permission cases and both selector cases passed. The one-worker full-file attempt also hit an existing 120-second test limit on the contended host. Per maintainer ruling, hosted CI is the full-run judge; no timeouts were changed.
Problem
Closes #107930.
After a Node upgrade, the invoking CLI and managed Gateway can use different global installations. Preparation must preserve the verified service; an owned failed activation must recover its exact original runtime without losing operator data.
Implementation and scope
before.stopped=false, under the actual final native lifecycle lock. Preserve operator timeout intent, current-main definition backups, ownership/readiness, and source-update contracts.--no-restart, foreign services, non-rewritable definitions and fresh-profile preflight. Optional full-package scan budgets emit explicit unverified-contents warnings; mandatory runtime identities and strict package-swap bounds remain enforced.Canonical head:
47aa7daa495e526b9cbef71d77ab77f105b44fa2; tree:a48bd890155f3f3cafa38419bb0e264147172326. Normal merges preserve original head3d28f1bd5a6960bd0726a35db028dd617e0964a8and Jason (Json), Peter Steinberger and Dallin Romney's contributor ancestry. No replacement PR, rebase or force-push.The main-relative component contains 148 paths. The all-file audit retains updater regression/support coverage and required compiled native-worker entries/type-graph partitions. Browser tab provenance uses upstream #150233; generic Vitest profiling uses upstream #149010. PR defer-cleanup tooling, UI/Canvas and quota diagnostics are retained upstream history, not component changes.
Source and CI verification
Independent API reviews found no actionable P0–P2 findings in the authority/restoration repairs and subsequent integrations. Earlier qualified source includes the full519-case CLI suite,174 focused main-integration cases,140 changed handoff/native/partition cases, and148 package-integrity/original-service cases. The preceding timeout integration passed32 infra,19 migrated and70 CLI tests, with55 execution cases rerun after intact helper extraction. Existing line caps and exact-once shard coverage remain enforced.
The previous hosted merge tree exposed the newer structured
PackageLauncherFingerprintAPI. All six failed jobs reported the same obsolete string declaration. Current source integrates main695501b81158e483011df9416b14f8ea54236d1b, imports the authoritative type, preserves all207 upstream-only paths, and retains the component's typed optional scan limits. Frozen pnpm12.4 dependency sync adopted upstream fs-safe0.16 without changing the lockfile. Independent API review and current focused original-service/package-integrity/filesystem/lease-publication tests passed:234 passed, with one Bun-only case skipped on Node. The final typed fixture correction then passed19 migrated-worker and37 post-update tests, fresh core/CLI-update types, lint, formatting and the unchanged line-cap ratchet.The subsequent main
fd22b275d548b137f2054e39d7cd81674693c590integration preserves all283upstream-only paths exactly. Its two partition conflicts were resolved by retaining upstream CLI-program exclusions and all ownership assertions alongside the dedicated updater/gateway-methods shards. The complete exact-once partition suite, fresh core/CLI-update typegraphs, lint, formatting, line-cap ratchet and independent API review passed. No component runtime source changed in this integration.R13 hosted CI identified two inherited fixture readiness/teardown failures. Both were reproduced on the published source. The follow-up joins actual identity-bound task-event writes before teardown and gives two real-provider startup setup waits a finite10second budget. Product deadlines and all ownership/failure assertions remain unchanged. All31 corrected focused tests, owning typegraphs, style/line-cap checks and independent API review pass; original failures remain recorded.
Repository policy permits squash/rebase but not merge commits. Landing uses the supported squash path with verified explicit credit to Jason (Json), Peter Steinberger and Dallin Romney. Original commits remain in this canonical PR history; main receives the squash commit. No PR replacement or source-history rewriting.
Resulting-head hosted CI, supported prepare and merge remain pending. Prior failures are retained and are not counted as green resulting-head checks.
Finite isolated native component acceptance
Completed at direct product source
3e0ab8628b386635feb72d48f2b5e48d952c7cd3(isolated runtime payloads A59a14/B6205; no newer-payload claim):before.stopped=false; original2 sessions/4 messages retained their exact digest.Subsequent integrations preserve the direct native restoration/ownership algorithm. Updated upstream fingerprint and bigint database-publication dependencies receive focused current-source tests; accepted native cases are not replayed.
Original signed-D1 Doctor failures remain failures. The earlier post-rebind outcome remains UNKNOWN/NOT_PROVED because its intended fault was not injected. Initial fixture failures and the optional entry-cap observation failure remain recorded; the latter was repaired and exercised on the actual tree.
The whole published-driver first-hop/npm-prefix installer journey, in-flight inference handoff and wider native-platform qualification are separate program obligations, not established by this bounded component acceptance. No live Odin deployment, restart or failure testing was performed.