Skip to content

Sonny: upgrade steps the lead does, and one-off upgrade work that retires - #525

Merged
lydakis merged 1 commit into
mainfrom
claude/project-thread-qd3kkz
Oct 31, 2026
Merged

lydakis merged 1 commit into
mainfrom
claude/project-thread-qd3kkz

Conversation

@lydakis

@lydakis lydakis commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

George wants the first agent online after an upgrade to do feature migrations instead of us writing scripts. He picked the split rule: agents do steps that need judgment or reach the person's own things, code does the mechanical rewrites, and the store schema stays as it is. He also asked that one-off upgrade code not stay forever.

What changes

  • Upgrade steps (sonny/src/upgrade.rs, upgrade::STEPS): a step is prose in sonny/upgrades/ID.md, whose first line Feature: ROW names its FEATURES.md row, plus a done() check in code. The existing upgrade note (Sonny: after an upgrade, the first lead tells what's new and offers new setup once #420) asks the lead to do each step that isn't done. The lead copies a person's file to ~/.agent/sonny/upgrades/before/ID/ before changing it, and asks first before anything that can't be undone. Each Sonny asks once (recorded in ~/.agent/sonny/tried by a fingerprint of its register). While the check fails, the next upgrade asks again and says it was asked before. This fixes the gap where a step counted as done once the note was sent. Transcript row: ↳ Sonny upgraded · ID.
  • Migrations in code (upgrade::MIGRATIONS, upgrade::once(record, id, run)): runs once, records the id, and runs again only if it failed. The commons move to lookout subscriptions is the first caller; it lands from the commons thread.
  • Retirement: every step and migration names the release it is deleted in, two after the one it ships in. nothing_outlives_its_release fails once CARGO_PKG_VERSION reaches it, the way Chromium's flag expiry test works.
  • Only a lead gets the upgrade note now, not a task window, which works in its own worktree and sandbox.
  • Rules written down: AGENTS.md, FEATURES.md "Keeping it" (a test checks that each step's row names it as upgrade step ID), docs/SONNY.md and the README.

No step ships yet; STEPS and MIGRATIONS are empty until their first users arrive. No protocol or schema change.

Proposal and precedent (Rails/Django schema migrations, Shopify maintenance tasks, release-note "action required" steps, Google's LLM code migrations, parallel change): https://claude.ai/artifact/RFNgdMkH5ZACcDECCUmCG4

Tests

cargo test -p sonny (735 passed), cargo clippy --workspace --all-targets -D warnings on sonny, cargo fmt --check. New tests cover: a step asked once per Sonny, asked again while not done, dropped once done; once running again after a failure; the retire check; a step's file and FEATURES row; the transcript row.

…ires

A change that leaves the person's state to be moved now says how: a
migration in code (upgrade::once, run once and recorded) when a script does
it the same everywhere, or an upgrade step, sonny/upgrades/ID.md plus a
done() check, that the first lead opened after the upgrade does when it
needs judgment or reaches the person's own things. A step is asked once of
each Sonny and again with the next upgrade while its check fails; the lead
copies a person's file before changing it and asks before anything that
cannot be undone. Only a lead gets the upgrade note now, not a task window.

Every step and migration names the release it is deleted in, two after it
ships; a test fails once Sonny's version reaches it, as Chromium's flags
expire. Store schema migrations stay as they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGHAQjuj1jCmeXjXipC
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T17:05:32.366791Z f01992d Manual request
🔒 Security Review ⚠️ Failed 2026-10-31T16:04:13.730340Z
We couldn’t complete this review. Comment @codex security review to try again.
10ae389 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis lydakis self-assigned this Oct 31, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@lydakis
lydakis merged commit f01992d into main Oct 31, 2026
4 checks passed

lydakis commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

Merged without a security review (usage limit); one of the riskier rows in #531 (upgrade steps the lead carries out on the person's config, skills and hosts).


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: f01992df65

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants