Repository navigation
fix: v0.1.9 upgrade blockers (supervised sessions, cross-protocol daemon stop, Windows daemon job) - #477
Merged
Conversation
v0.1.3 through v0.1.8 stored write sub-agents as `supervised`, a mode protocol 37 removed. An upgraded store then failed every snapshot, event replay and completion read that touched one. Store schema 64 rewrites the session rows and every journaled session summary to `auto`, which is how those children run now.
After an upgrade, `qq daemon stop` and `restart` failed on the version check and left the old daemon running. Stopping now uses the shutdown route every daemon shares, and discovery treats metadata another version left behind as stale once its server no longer answers.
A detached daemon stayed in the job of the shell that started it, so closing that terminal, SSH session or CI step killed it. It now breaks away as the command worker does, and still starts inside a job that forbids breakaway.
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: fa851c4cea
ℹ️ 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".
Migration 62 builds run completion receipts by decoding journaled run_finished events and skips any it cannot decode. In a store from before 62, those events still said `supervised`, so the upgraded runs lost their receipts. Rewrite the retired mode ahead of the backfill too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three upgrade bugs found while preparing v0.1.9.
What changes for users
supervisedapproval mode, which protocol 37 removed. Snapshots, event replay and completion reads failed on any session that had one. Store schema 64 rewrites those values toautoin session rows, journaled events and run completion receipts. Those children already run asautotoday. For stores older than schema 62, the rewrite runs before the completion-receipt backfill, so those runs keep their results.qq daemon stopandrestartwork across a protocol change. Before, they failed on the version check and left the old daemon running. They now use the shutdown request every daemon version answers, and discovery treats a discovery file left by another version as stale once its server no longer answers.Store schema goes from 63 to 64; protocol, capabilities and descriptor versions are unchanged. The release notes' Upgrading section should say: migration is forward-only, so back up the store first.
How I verified it
cargo xtask checkpasses on the full workspace (fmt, lint, clippy, nextest, doctests).a_store_with_retired_supervised_mode_opens_and_replays_as_auto, upgrading from schema 61 and from 63: before the fix the 63 case failed withPersistence(Constraint), and the 61 case lost its completion receipt.restart_replaces_a_daemon_from_another_protocol_version(real binary): before the fix it failed with "server protocol version 39 does not match client version 40".qq-serverunit test covers an embedded server refusing to stop and a dead daemon's leftover discovery file.tests/daemon_windows.rscovers both a job that permits breakaway and one that forbids it. It runs in thenative command owner (windows-latest)job, which this PR'sci:fulllabel turns on, and passes there.run_finishedevent has its receipt.Known regressions and budgets
None known.
win32jobis now a Windows-only dev-dependency; it was already in the lockfile.