Render mighost 0.5 ghost classification and add RBW_FORCE#2
Merged
Conversation
Ghost rows in db:migrate:status now come from Mighost::API.orphaned_migrations instead of per-version snapshot recovery: a superseded (re-timestamped) ghost renders with a calmer 🪦 status and a "≡ <version>" badge pointing at its successor, a branchless deleted ghost shows "✂ deleted in:<sha>", and ghosts dismissed or hidden via hide_superseded render as plain NO FILE. Live git/worktree recovery still covers versions without a stored snapshot, so fresh clones keep working with zero setup. Also fixes a stale branch badge leaking from one ghost row onto the next branchless one - the tag local was never reset per iteration, which was unreachable while mighost always guessed a branch. RBW_FORCE=1 forces formatting past NO_COLOR, CI, non-tty, and LLM agent detection; an explicit RBW_PLAIN=1 still wins.
amberpixels
force-pushed
the
ghost-classification
branch
from
July 23, 2026 10:38
971e8e8 to
b16a73a
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.
What
Teaches
db:migrate:statusto read the ghost classification mighost 0.5 provides, fixes a branch-badge leak that classification made reachable, and adds anRBW_FORCEescape hatch for formatting auto-detection.Ghost classification
Ghost data now comes from
Mighost::API.orphaned_migrations(one call, indexed by version) instead of per-versionfind_or_recover_snapshot. Each ghost row carries the most informative badge available, by precedence:≡ <version>- the migration was re-timestamped and lives on under another applied version. The row also gets a calmer 🪦 status instead of 👻, since it's stale bookkeeping rather than a lost migration.⌥ <branch>/⌥ₜ<branch>- unchanged branch attribution.✂ deleted in:<sha>- the commit that removed the file, when no branch still holds it.Because detection goes through mighost's orphan detector,
db:migrate:statusnow honors dismissals andhide_supersededfor the first time: a suppressed ghost renders as plainNO FILE. Versions the detector lists without a stored snapshot still fall back to live git/worktree recovery, so fresh clones keep working with zero setup.Branch badge leak fix
The ghost branch tag was assigned inside a conditional and never reset per row, so a branchless ghost inherited the previous ghost's badge. Unreachable while mighost always guessed a branch; mighost 0.5 makes nil branches the normal case. The tag is now built fresh per row, and a regression spec renders two ghost rows to prove the second stays clean.
RBW_FORCE
Railbow.plain?returns true underCLAUDECODE,NO_COLOR,CI, or non-tty output, with no way back in (RBW_PLAIN=0is just falsy).RBW_FORCE=1now overrides all auto-detection - useful for capturing formatted output to a file or letting an agent inspect the real rendering. An explicitRBW_PLAIN=1still wins. Documented inRBW_HELPand the README env table.Testing
Railbow.plain?truth table acrossRBW_PLAIN/RBW_FORCE/NO_COLOR/CLAUDECODE/CI/ tty.NO FILE.just lintandbundle exec rspec(323 examples) pass.