Repository navigation
fix(upgrade): linked runtime targets skip readiness preflight - #1005
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 changesThis PR resolves target entrypoint symlinks before discovering package preflight metadata while preserving registered launch paths. Example: Run
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored draft fixes a current-main preflight bypass with a focused change; no actionable correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherOCM's upgrade preparation reads the selected runtime's package capability and runs native readiness checks before entering the checkpoint and service-cutover transaction. flowchart TD
A[Upgrade command] --> B[Prepared runtime entrypoint]
B --> C[Resolve link for package discovery]
C --> D[Read preflight capability]
D --> E[Run existing native preflight]
E --> F[Reject before cutover]
E --> G[Checkpoint and runtime cutover]
Technical reviewBest possible solution: Keep package discovery in the existing preflight owner, resolve actual entrypoint links, and preserve launch paths, legacy staging, and cold-finalization boundaries. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows the alias-parent metadata lookup bypass, and the PR reports a failing-before/passing-after CLI regression; this read-only review did not execute it. Is this the best way to solve the issue? The focused discovery fix restores the documented capability contract without replacing the registered launch path or forcing unpublished standalone artifacts to exist. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7abac7dfb8b7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 November 5, 2026, 5:32 AM ET / 10:32 UTC. |
Related: #132.
What Problem This Solves
A target registered through an entrypoint symlink could skip its package's advertised readiness preflight and switch runtimes even when that preflight would block startup.
User Impact
Blocked linked targets now fail preparation before source shutdown, checkpoint creation or binding replacement. Ready targets and packages without the capability retain their existing behavior.
Why This Change Was Made
Resolve actual entrypoint symlinks when discovering the package manifest, while retaining the registered launch path and stored metadata. Preserve legacy standalone artifacts whose staged executable is not published yet.
The broader issue remains open: the native isolated-core-startup protocol does not cover plugin convergence.
Evidence
Before: the new CLI regression on the original discovery code skipped preflight and reported a successful switch with a snapshot for a blocked target.
After: seven availability tests pass, including relative links under paths containing spaces, unrelated metadata beside the alias, an exit-zero blocked receipt, ready and legacy controls, and batch source availability.
The blocked case preserves registry bytes and the source binding, creates no snapshot and never invokes cold finalization. Batch refusals preserve source health and desired-running state; existing failure-after-cutover recovery assertions still pass.
Ordered remote baseline completed: formatting, 41 release-policy and 5 native-Gateway Python tests, all-target compilation, Rust suite and isolated installation (
0.3.8). The first full Rust run caught a legacy staging regression; after correction, all 138 upgrade-command tests, seven availability tests and the unrun remainder passed. Unaffected preceding results were retained under the contribution guide's correction procedure.Remote Linux x86_64: Rust/Cargo 1.98.1, Node.js 24.19.0, npm 11.19.1. CI passed all nine jobs, including Linux/macOS full suites and install smoke tests, Windows native checks, Rust 1.88 and all four npm matrices. All four CodeQL analyses passed.
CI qualified candidate
93d2f2aon base7abac7d. The squash landed asdcdccffafter #1004 merged concurrently. All three fix files and the Cargo/CI inputs match the qualified candidate; the concurrent delta only extracts shared official-install handling in two CLI handlers.