Repository navigation
Make the broken-prompt demo reverse a real schema migration - #158
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis 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. |
The bad change never touched the schema: deploy-bad-change.sh only swapped the prompt and inserted rows, so every commit recorded schema_version 0.0.0 and the rollback printed "schema already at 0.0.0". The demo has never run a migration since it landed in 57c66ba, before the reverse migration runner (97e786b) existed, and nobody went back to wire it in. The bad change now applies migration 001_add_sentiment (a NOT NULL column, recorded in agentic_migrations) and registers its .down.sql under .agentic/schema/. The v0.8 commit records the new version and the step 10 rollback reverses it, consuming one ADR-0019 approval token. The diff step compared the baseline with HEAD, which by then is a LangGraph checkpoint commit with no memory or schema dimension, so it printed "schema_version 0.0.0 -> (none)". It now diffs against the v0.8 commit. run-demo.sh also checks after the rollback that the live schema is back at 0.0.0 and the sentiment column is gone, so CI fails if the reversal is skipped. README updated where it described the old output.
Use agentic resolve HEAD instead of parsing status output, assert the migration is live before rollback so the post-rollback check means something, and re-record demo.cast with the schema bump and reversal.
tonibergholm-codento
force-pushed
the
demo-reverse-migration
branch
from
November 20, 2026 12:15
856b8eb to
4eb0bda
Compare
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.
The broken-prompt demo is supposed to show that
agentic rollbackrestores everythinggit revertcannot, including a reverse schema migration. In practice it never applied a migration. CI loggedschema_version 0.0.0 → (none)at the diff step and "no migrations needed" at the rollback step. Nothing broke it: the demo predates the reverse-migration runner. The diff also compared against HEAD, which is a LangGraph checkpoint commit with no schema dimension.Now:
001_add_sentiment, which adds a NOT NULL column toepisodes, and registers its.down.sqlunder.agentic/schema/.0.0.0and the column is gone, and fails otherwise.Proof:
run-demo.shpasses end to end in 1m54s. The diff showsschema_version 0.0.0 → 001_add_sentiment, the rollback showsreverse schema migrations: 001_add_sentiment → 0.0.0, and the post-check prints0.0.0/0. The daemon log shows the token accepted withreason="reverse_migration".cargo test --workspacepasses.Created with Claude Opus 5.5 and Claude Sonnet 5.5 in Claude Code.