Repository navigation
fix(install): retain rollback payloads with recoverable publication - #287
Conversation
Retain credential coalescing, typed review diagnostics and remaining tool allowances for the protocol 31 compatibility line.
Preserve legacy rollback bytes, verify read-only single-link payloads and reject unexpected selectors before atomically choosing a version.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c886ee1095
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| install_stage="$(mktemp -d "$INSTALL_DIR/.qq-install.XXXXXX")" \ | ||
| || fail "cannot stage an installation in $INSTALL_DIR" | ||
|
|
||
| retain_binary() ( |
There was a problem hiding this comment.
Add a committed migration regression test
This bug fix adds legacy migration, retained-payload validation, and rollback selection, but tests/install_sh.sh is unchanged and only exercises clean installations; a repo-wide search found no committed fixture covering upgrades, foreign selectors, corrupt payloads, or rollback. The external macOS fixture described in the commit cannot protect CI from regressions, so extend the repository test suite with these public failure and recovery paths.
AGENTS.md reference: AGENTS.md:L146-L150
Useful? React with 👍 / 👎.
| ln "$install_stage/payload" "$retained_binary" 2>/dev/null || true | ||
| rm -f "$install_stage/payload" || fail "cannot remove the temporary publication link" |
There was a problem hiding this comment.
Recover interrupted hard-link publications
If the installer is killed or the host loses power after ln publishes the retained payload but before the following rm, the staging payload remains as a second hard link. Every later run then rejects that retained executable because its link count is two, while cleanup only knows the new run's staging directory, leaving upgrades blocked until manual repair. Publish without this crash window or recover installer-owned stale staging links before enforcing the single-link invariant.
AGENTS.md reference: AGENTS.md:L81-L84
Useful? React with 👍 / 👎.
|
Misa — execution-backed review of exact head f267641 (head reconfirmed October 15). This is substantive installer work: retained immutable payload selection supports legacy migration, upgrades and rollback. It is not yet crash-recovery qualified. Executed earlier on my isolated Linux x86_64 workspace at this unchanged head: the committed installer suite passed 17 checks; independent legacy migration, upgrade and rollback checks passed. The real unmodified installer performed real filesystem operations, using local release archives/checksums and harmless shell executable fixtures, not a compiled QQ binary. Confirmed failure: pause immediately after the real hard-link publication in install.sh:184–190, then SIGKILL the isolated installer process group before staging-link removal. The retained payload remains at link count 2. An ordinary uninstrumented retry exits 1 with 'multiple hard links ... nothing was selected'. The prior selected executable remains usable. Neighboring kill boundaries and SIGTERM recover; concurrent same-version installation can transiently hit the same refusal. This corroborates the existing review finding with execution, rather than adding a duplicate defect. Acceptance still needed: safe recoverable publication without weakening hash/type/single-link validation; committed migration/rollback/interruption/concurrency regressions; Linux and macOS qualification, including actual QQ/Keychain behavior. The full QQ build could not start because Cargo is absent in this review environment. Existing suites were not rerun unchanged today. Disposition: needs fixes. This is a bounded installer review, not whole-application verification, merge approval or deployment acceptance. install.sh blob 393ce7c3a25dd3a3230bec3af872ced824da5199 is also present in the previously inspected #299; preserve authorship and reconcile overlap before duplicating a fix. |
Preserve the original PR history while selecting the independently implemented current-main tree. Supersedes the old installer implementation and excludes unrelated unmerged compatibility ancestry. No force push.
* feat(jev): sync protocol and transport provenance [skip ci] * feat(jev): sync cross-host contract boundary * fix(jev): validate shared nullable usage * fix(jev): retain approval response provenance * fix(jev): update approval provenance fixture * fix(jev): retain checkpoint response provenance * chore(jev): refresh sleep lint coordinates * docs(jev): record canonical temp verification * docs: record final Jev verification and platform limits * test(qq-core): stabilize shell duration deadline fixture * fix(jev): retain transport request provenance [skip ci] * fix(jev): reject reflected credential IDs [skip ci] * docs(jev): record live transport provenance [skip ci] --------- Co-authored-by: openclaw-consensus-bot <[email protected]> * test(core): stabilize delegation audit fixtures (ENG-1028) AF6.2: baseline a_text_only_slice_report_is_never_audited_or_treated_as_the_answer retried after its inner deadline. Preserve assertions and nextest hang guard; use paused clock for deadlines and native writes for compaction. Mutation audit records remaining descendant-bound coverage gaps. * fix(install): retain rollback payloads with recoverable publication (#287) * fix(runtime): preserve protocol 31 recovery baseline Retain credential coalescing, typed review diagnostics and remaining tool allowances for the protocol 31 compatibility line. * fix(installer): retain executable payloads before selection Preserve legacy rollback bytes, verify read-only single-link payloads and reject unexpected selectors before atomically choosing a version. * WIP: preserve deterministic fixtures and advisory journal ownership * fix(install): retain rollback payloads with recoverable publication * docs(install): record takeover of existing PR 287 --------- Co-authored-by: openclaw-consensus-bot <[email protected]> Co-authored-by: Zachary Meyer <[email protected]> * docs(plans): consolidate remaining work and retire stale plans (#323) * docs(plans): consolidate remaining work and retire stale plans * docs(plans): preserve review acceptance and successor status * docs(plans): retain retention and MCP response safety gates * test(core): keep frozen-clock setup watchdog live * Revert "feat(jev): sync protocol and transport provenance [skip ci]" This reverts commit 60dd03d. * test(core): guard frozen post-preflight collection with live watchdog --------- Co-authored-by: Romy Mondello <[email protected]> Co-authored-by: openclaw-consensus-bot <[email protected]>
Summary
Take over this existing PR as a focused installer reliability change targeting
main. Preserve installed executable bytes for rollback and make interrupted payload publication recoverable. This supersedes the earlier preservation checkpoint; it does not import the auth, runtime, or diagnostic changes from #299.What changed
.qq-versions/qq-<sha256>and select the installed version through a relativeqqsymlink.Verification
sh -n install.shandgit diff --check: passed.bash tests/install_sh.sh: passed; covers legacy migration, retained reuse, rollback, unsafe-target refusals, and interruption before/after both legacy and requested payload publication. Parent independently ran the installer suite; the implementation agent reran it after the permission fix.cargo xtask smoke: implementation agent reports 6 passed, 0 failed.cargo xtask check
Head
b456fd20b14avsorigin/main; 4 changed file(s); scope: qq, xtask.cargo fmt --all -- --checkcargo xtask lintcargo clippy --color never -p qq -p xtask --all-targets --all-features -- -D warningscargo nextest run --color never --profile default -p qq -p xtaskAll gates passed in 37.0s.
Outstanding qualification
Compatibility and limits
No runtime, dependency, protocol, descriptor, or store-schema changes relative to the implementation baseline. Stop clients/servers before upgrades; retained executables do not reverse store migrations. This is not a macOS signing/Keychain authorization fix, arbitrary same-user race protection, or an fsync/power-loss durability guarantee. Disk usage grows with retained payloads; cleanup is explicit and manual.
Original PR history is preserved; takeover updates were pushed without force. The PR now targets
mainand contains four changed files.