Repository navigation
fix(update): dev-channel updates skip on tag-only Git clones - #193109
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 real behavior proof before merge. What this changesThe PR uses the freshly fetched commit for dev-channel updates when a release-tag clone has no branch tracking mapping. Example: Run openclaw update --channel dev after cloning v2026.9.1 with --single-branch.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 5 items remain This PR addresses a current updater defect and merits repair, but the newly supported checkout loses its update source after activation, and a new regression test fails in CI. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Git updater resolves the configured source, fetches into a private inspection repository, validates candidates, and activates the admitted checkout and runtime. flowchart LR
A[Update command] --> B[Resolve Git source]
B --> C[Private Git fetch]
C --> D[Candidate preflight]
D --> E[Checkout activation]
E --> F[Next update]
Technical reviewBest possible solution: Keep fetched revision and cache identity separate, while retaining the selected source for updater-created main branches so subsequent updates work without changing fetch mappings. Do we have a high-confidence way to reproduce the issue? Current source establishes the successful-fetch-then-no-upstream path for tag-only clones; this read-only review executed no target code. Is this the best way to solve the issue? Separating the fetched commit from its optional cache ref is the smallest appropriate repair, but activation must also preserve the source needed by the next update. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c411658c18b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +12, Tests +91, Docs +3. Total +106 across 4 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 November 4, 2026, 8:38 PM ET / November 5, 2026, 01:38 UTC. |
Retain the selected remote and merge source for updater-created main without depending on an optional tracking cache or changing operator fetch policy. Reconcile PR193109 on the accepted current base for its named budget gate. Co-authored-by: ooiuuii <[email protected]>
b437e13 to
7575408
Compare
Supply the required nullable selected source in the immutable-build mock. Account for its one meaningful fixture line in the existing PR allocation. Co-authored-by: ooiuuii <[email protected]>
|
Thanks @ooiuuii — I ran the remaining real-CLI proof for the current revision. The previous second-update problem is fixed. Independent final code review is running before the landing decision. Real CLI behavior proof for PR #193109 at 6bab880. Ran on secretless AWS Crabbox with Node 24.22.1, pnpm 12.15.0, Git 2.53.0.
Both tag-only updates preserved the tag-only remote.origin.fetch mapping. Build, Doctor, and runtime activation were real, without mocks. |
…claw#193109) Use the freshly fetched dev commit when a release-tag-only clone has no branch tracking mapping, and retain the updater-created main branch's source metadata so subsequent dev updates keep working. Preserve the normal-clone and operator-state paths. Closes openclaw#193108. Real CLI proof on isolated Crabbox: merge-base RED fails no-upstream; contributor-head GREEN updates; a second dev update succeeds after the upstream advances; normal branch clone succeeds. Build, Doctor and runtime activation were real; synthetic release-style Git upstream, no hosted-service coverage claimed. Independent Codex autoreview: scoped-clean, no P0-P3 findings. Exact-head CI: 65 success, 57 skipped, 1 neutral, none failing/pending. Co-authored-by: ooiuuii <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]>
…claw#193109) (cherry picked from commit e45e99d) Release adaptation: Carry freshly fetched revision independently from optional tracking refs; persist remote/merge only for updater-created main branches. Normal/user branches unchanged. All four runtime owners and two focused tests retained; docs/allocation excluded. No later same-PR repair. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 94f3e55892f91b569d97be99dc51745dea999c7c)
…aw#194058) Failed-update triage now captures the operator's environment before managed candidate admission, so a coding agent installed only on the operator's PATH is still offered when the Gateway service's PATH differs. Restores the operator-environment contract from openclaw#134490 and keeps the launch confirmation from openclaw#143139. Proof: shipped CLI on isolated Linux (Crabbox) with a running systemd Gateway: accept launches the operator-only agent, decline starts nothing, base 18bee8e reports no agent found; published 2026.11.1 upgrades to the fix with settings intact. Co-authored-by: TorstenW <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]> (cherry picked from commit 7c702c3) Release adaptation: Capture invoking operator env before candidate admission, forward to interactive triage only; preserve latest target selectors, confirmation and lease cleanup ordering. Exact three authorized production paths plus real lifecycle regression. Follow-up dispositions: ad4863d fix: preserve the running installation when an agent updates its Gateway (openclaw#201570); dc73ec0 fix: let updates finish when another tool briefly reads OpenClaw's databases (openclaw#202541); d07b530 fix: clarify PostgreSQL schema upgrades for Git installs (openclaw#202098); e60ea9f test(update): add a Git release upgrade-survivor scenario (openclaw#201956); 2ef6f7b fix(update): build and serve Git releases outside node_modules (openclaw#201917); dbc1aa0 fix: keep the openclaw command and Gateway working after updating a pnpm install (openclaw#201735); f5e7641 fix: Git checkout updates across a schema change no longer end as post-update-failed after the new release starts (openclaw#201600); 2183caf fix: Git checkout updates no longer fail before the new release starts on a schema change or a busy database (openclaw#201463); 47e8649 fix: explain why Doctor cannot restore a scheduled job’s account (openclaw#201550); 8f2cfd4 fix: remove updater-only restrictions from agent maintenance guidance; cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 24cb734 fix: keep carried-over scheduled jobs running after updates (openclaw#200653); d1276e1 feat(doctor): check OpenClaw ID member roles and honor an optional roles default (openclaw#197785); 0a39956 fix: finish updates when another tool reads OpenClaw's databases during the update (openclaw#201330); ea1c9d5 fix(update): settle remounted package publications before admission (openclaw#201336); 66b5212 fix(update): isolate malformed retained-install markers (openclaw#201199); 7e79c83 fix: let the next update finish a killed source checkout update (openclaw#201009); d905d8a fix: let the next update finish a killed update after the machine restarted (openclaw#200994); fdf0c95 fix: let the next update finish a killed update that had already installed the new version (openclaw#200866); 0c19bcd chore(release): close out 2026.11.5 on main (openclaw#200577); a1940e0 fix(matrix): keep explicit recovery available during deferred migration (openclaw#200805); 18b4776 improve: explain package baseline drift during updates (openclaw#200802); 1ad4cad fix(doctor): reclaim macOS updater runtimes blocked by non-updater processes (openclaw#200732); 427c857 fix: keep one missing archived transcript from blocking every update (openclaw#200733); 802e3f7 fix(update): keep valid cold archives from blocking updates (openclaw#200659); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); 3afe212 fix: let Doctor publish unchanged plugin migrations in any order (openclaw#200658); f65e4db fix(doctor): reclaim runtimes blocked by unrelated Linux processes (openclaw#200657); dab086c fix(update): let candidate Doctor read plugin dependencies from the staged package (openclaw#200595); 3447bee fix(update): keep updates going when the predecessor writes during its stop (openclaw#200569); 0ce9c77 fix: let the next update settle a package publication that a killed update left behind (openclaw#200550); ae31ea3 fix(update): repair handoffs in the journal-pinned lease store (openclaw#200532); 74020ea fix: continue updates when initial SQLite capture is stale (openclaw#200328); 6747b1e feat(update): run Git checkout installs from releases behind the release link (openclaw#199706); e3f8a67 fix(state): keep completed retained agent stores out of startup upgrade (openclaw#200284); 3c512c5 fix(gateway): move managed update lease operations off the main thread (openclaw#200169); ea69fcb chore(release): close out 2026.11.4 on main (openclaw#199956); 618bf31 fix(state): bound startup upgrade copies and pruning to owned state (openclaw#199929); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); 5dbf569 fix(update): plugin failures never fail an update or Gateway health; 764761e fix(update): refuse missing host prerequisites in one line and record a cause per attempt; 4c4fef4 fix(ui): update dialog claims installation before progress is confirmed (openclaw#199254); 136e1f6 fix(update): retrying an update from a dev checkout is refused after a killed update (openclaw#198673); 3bd03da fix(update): avoid duplicate database copies while the Gateway is stopped (openclaw#198148); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); e333f7e chore(ci): drop retired test-lines allocation records (3/3) (openclaw#197657); fd6fa47 fix: converge Gateway updates with environment-only service overrides (openclaw#196371); 7cf5e75 fix: clarify split-install updates and blocked Doctor repairs (openclaw#196342); 6ff8c86 fix(update): retain lazy sqlite catalog generation (openclaw#197095); 930e1f7 fix: keep stable updates and recovery free of premature migrations (openclaw#196474); a15f737 fix: preserve external plugin data during update rehearsal (openclaw#196301); 92798ae fix: updates survive interrupted heartbeat runs (openclaw#195656); c1e55e2 fix(update): restore LaunchAgent registration after repair contention (openclaw#195406); 715c610 fix(doctor): repair retained ISO session end timestamps (openclaw#194685); 689cfc8 fix(update): reclaim dead closing triage repair leases (openclaw#194503); 86bc89e fix(doctor): keep standing Codex parameter advice out of retirement blockers (openclaw#193650); 691bc8d fix(backup): read the backup engine without copying the live database (openclaw#194234); 000542f fix(backup): backups and updates fail on slow storage when a header probe batch misses its deadline (openclaw#194239); 31a65d5 fix(update): skip --no-lazy-fetch on Git versions without it (openclaw#194198); e45e99d fix(update): preserve dev update sources in tag-only Git clones (openclaw#193109) Validation: Baseline2 intended operator-agent failures/32 controls passed; candidate34/34passed (194058-green.log). Accept launches synthetic operator-only CLI with expected env, decline starts nothing. Isolated updater flow, not live systemd/upgrade qualification. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 6689fd575ada8fe40a9593784deac18ec73041cd) (cherry picked from commit 92e7a9fa223b0dc35801f25f70be90b472d9a6b7)
Fixes #193108
What Problem This Solves
Release-tag source installs can switch to dev and remain updatable without changing operator fetch policy. A tag-only mapping may have no main tracking-cache ref even after the authoritative commit has been fetched. Creating main without retaining the selected remote and merge source makes the second update skip
no-upstream.This PR separates the fetched revision from the optional cache identity and persists selected remote/merge metadata only for main actually created by the updater. It preserves exclusions and fresh FETCH_HEAD verification, existing unmanaged-main policy, advisories/rollback and unrelated user config/data.
The current follow-up also completes the immutable-build preflight mock for the required
selectedDevSourcecontract. Its unchanged old return shape did not satisfy the new production result type and broke the services test typecheck. The published body also used non-template headings, causing the separate PR-context job to fail.User Impact
Why This Change Was Made
A selected source and an optional remote-tracking cache are different facts. Requiring a cache mapping would force unnecessary operator configuration, while adopting pre-existing main tracking would exceed the updater’s ownership. The existing Git-step/rollback owner therefore records the selected remote and merge ref only after updater-created main is active.
The worker fixture represents a successful preflight with no selected dev source, so the smallest correct completion is explicit
selectedDevSource: null. Weakening the required result type, casting away the error or changing production behavior would hide the missing consumer adaptation. The one additional meaningful fixture line is accounted for in the same narrow allocation, not by changing a global scalar or deleting unrelated tests.The body uses every heading from the current template: What Problem This Solves, User Impact, Why This Change Was Made and Evidence. The current repository context evaluator, rather than a custom heading-only substitute, validates this complete replacement.
Evidence
Concrete hosted failures and focused follow-up
75754085337a2b8a8f33c98b2054d1e33581ebbcthrough the canonicalcore-test-servicesgraph owner, exit2, missing requiredselectedDevSourceat the immutable-build mock. With the explicit nullable fixture field, the same actual services graph passes, exit0. This is our introduced contract adaptation, not unrelated inherited noise merely because the fixture text also exists in the parent.pnpm test <file> --maxWorkers=1owner, including normal compiled-subprocess preparation and settlement. Touched type-aware lint, format and diff sanity pass.f15e8236a999a4d629814714371f49c586bb119awas read for the template and context source. Template, evaluator, its check entry point and workflow are byte-identical to the published checkout, so no upstream rebase or copied alternate evaluator was needed.Exact test-line accounting
The published parent has 6,536,347 test lines / 6,536,347 ceiling, zero slack. This follow-up adds exactly one required fixture line; the existing narrow allocation changes 137 to138, matching that exact net delta. The ordinary checker now passes at 6,536,348 / 6,536,348, zero slack, both relative to published7575408 and to the logical PR base4dc45181. Full logical PR growth is138. There is no shared scalar increase, unrelated ratchet change, release-context skip, waiver or unrelated coverage deletion.
Retained proof and corrected history
677dd0a3119d3cf2e9f4b8c97ee6194166d21cd7, tree998df66f960c9d475552acea468840c790077b0c. It contains 158/158 targeted tests, two separate native high P0–P3 static reviews, real first/second shipped source-install CLI successes and both exclusion/unmanaged-main controls. SQLite/session/settings/workspace preservation evidence is retained. These successful unchanged proofs were reused, not replayed or represented as new follow-up runtime runs.75754085337a2b8a8f33c98b2054d1e33581ebbc, tree960d4eed79765658dc444aa913215dedeb83fb9e, parent4dc45181. Its new158/158 targeted checks and two exact-target native reviews are retained with their documented unchanged-input reuse boundary. They were not services-shard proof; the newly exposed services defect is acknowledged and fixed here. New follow-up native requests/results are separate static reviews, not runtime proof.Limits and identity
The real source-install CLI proof uses synthetic release-style tags and file remotes. It is not an archived latest-stable installed upgrade, real-user migration, network Git transport, Gateway restart/health or application model-inference qualification. Normal build/Doctor proof retains its optional-transport and plugin migration-inventory limits. No full build or e2e was rerun for this fixture/body-only continuation.
Genuine task-private Git2.56.0/zlib and the available compatible private Node24.20 were reused unchanged. Under the stated current CONTRIBUTING policy,24.16.0+ on24.x and26.1.0+ are compatible while24.22.1+ LTS or26.12.1+ are recommended; a security recommendation warning alone does not invalidate the accepted24.20 evidence. No shared runtime, wrapper, spoofed tool identity or service change was used.
Exact follow-up:
6bab8803680c139aae7342ff7dbe813f1cdc4b3b, parent75754085337a2b8a8f33c98b2054d1e33581ebbc, treec5d46d48a64e968deb583d9ae3809302d0c2af49. Full files, raw commit, patch/objects, native requests/results, current-template/evaluator fingerprints and command/exit receipts are in the private acceptance ZIP. Hosted jobs have not been rerun or publicly changed by this preparation.Reported and scoped by @ooiuuii; original authorship is preserved. Implementation and private proof preparation were AI-assisted using OpenClaw (Roboclaw). This draft is for existing PR193109 only and grants no public mutation authority.