fix: replace orphaned liveness status and diagnose amended refs - #559
Merged
Conversation
The derived commit condition folded two distinct axes — object
availability and live-ref reachability — into one misleading "orphaned"
token, and the narrow integration mode misread side-branch-carried work
as orphaned. Split the condition into merged/live/unreachable/missing:
unreachable means the object survives but no live ref reaches it,
missing means the object is gone, and a commit some live branch still
carries stays live under a narrow integration ref (only the landing
answer narrows). The aggregate merge status reads
merged|open|unreachable|unknown, with best-effort reflog retention
(reflog|none) qualifying unreachable commits.
Recorded ref associations gain a read-time continuity diagnosis:
current, advanced, rewritten (best-effort reflog evidence naming the
amend/rebase action, the recorded and current OIDs, and same-tree
equivalence), moved (expired or absent reflog degrades gracefully, and
a reset is a move, not a rewrite), deleted, or unknown. A rewritten ref
surfaces a ref_rewritten diagnostic suggesting the explicit follow-up;
reflog evidence is read-only and never mutates the durable record.
revision show, /api/revisions/{id}, and the inspector detail page carry
the same liveness block; the revision list, association digest, and
inspector cards share the landing vocabulary. revision list
--unreachable and store remove --unreachable replace --orphans (kept as
deprecated aliases); OrphanVisibility is renamed UnreachableVisibility;
the --ref --by liveness filter tightens to commits the named ref's tip
reaches. ADR-0014 is amended and older orphan wording in ADR-0015/0016/
0033 and the CLI reference is updated.
kevinswiber
force-pushed
the
fix/issue-540-liveness-status-axes
branch
from
July 17, 2026 04:18
968a343 to
3922bb9
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.
Summary
merged/live/unreachable/missing— object availability and live-ref reachability stay distinguishable, and nothing user-facing calls a commit or revisionorphanedany more (the token survives only in the unrelated note-anchorResolutionStatus)live(labeled by a containing tip best-effort), so the aggregate readsopen— reachability is a broad axis, only the landing answer narrowsmerged | open | unreachable | unknown; present-but-unreachable and gc'd objects collapse tounreachabledeliberately, keeping object retention out of the aggregate, with the per-commit matrix carrying the distinctionretention(reflog|none, omitted when the probe cannot answer) — one lazyrev-list --reflogper readcurrent/advanced/rewritten/moved/deleted/unknown. A rewrite is claimed only on reflog evidence (commit (amend)/ rebase actions), naming the recorded and current OIDs and same-tree equivalence, and adds aref_rewrittendiagnostic with the suggested explicit follow-up; expired/absent reflogs degrade tomoved, a reset is a move, and reflog evidence never mutates the durable recordrevision showJSON,/api/revisions/{id}, and the inspector detail page carry the same liveness + continuity block;revision list, the association text digest, and inspector cards share the landing vocabularyrevision list --orphansandstore remove --orphansto--unreachable(deprecated aliases kept),OrphanVisibility→UnreachableVisibility, and tighten--ref --by livenessto commits the named ref's tip reachesCloses #540.
Validation
just check— 2,571 tests passed, 1 skipped (fmt + clippy + full suite)npm run check && npm run build— 936 inspector tests passed; checked-inapp.jsrebuilt from the TS sourcesmain's behavior before the change and pass afterChecklist
cog.tomlexplicitly allows the scope.