Summary
gh-rev open resolves the current branch/PR head correctly, but gh-rev next generates revision YAML using the stale last_reviewed_head_sha from state.toml. The installed CLI also advertises --pr selectors without providing sync, leaving no supported way to register an otherwise known GitHub PR.
Environment
- Repository:
NibiruChain/sai-website
- PR:
#1147
- Requested/published head:
44bd69002fb7bc54bf5108c3142a31453ebd09f4
- Existing ledger head:
904e4d736e0a8d51e2774d143d478a593d8387f8
- Installed commands:
register, open, next, context, status, paths (no sync)
Reproduction
A temporary local chore/faster-init ref pointed exactly at the published PR head.
gh-rev open nibiruchain__sai-website --branch chore/faster-init
# reports head_sha: 44bd69002fb7bc54bf5108c3142a31453ebd09f4
gh-rev next nibiruchain__sai-website --branch chore/faster-init --label independent-pr-1147
# command output also reports head_sha: 44bd6900...
However, the generated revision contains:
head_sha: 904e4d736e0a8d51e2774d143d478a593d8387f8
Repeating open followed by next produced the same stale YAML. state.toml retained:
last_reviewed_head_sha = "904e4d736e0a8d51e2774d143d478a593d8387f8"
Separately:
gh-rev open nibiruchain__sai-website --pr 1147
# gh-rev: PR 1147 is unknown; run sync or open the branch first
Opening the exact local branch first did not make the PR known, and this CLI version has no sync command.
Expected behavior
next should stamp the immutable snapshot returned by the immediately preceding open, or fail rather than emit contradictory evidence.
- If
--pr is advertised, the installed CLI should provide a supported way to discover/synchronize PR metadata, or automatically adopt an exact matching local branch ledger.
- The error should not instruct users to run a command unavailable in that binary.
Impact
Review findings for the current PR cannot be recorded with trustworthy YAML evidence. Best-effort revisions must preserve the stale generated evidence and explain the mismatch in prose, weakening the ledger's identity guarantees.
Summary
gh-rev openresolves the current branch/PR head correctly, butgh-rev nextgenerates revision YAML using the stalelast_reviewed_head_shafromstate.toml. The installed CLI also advertises--prselectors without providingsync, leaving no supported way to register an otherwise known GitHub PR.Environment
NibiruChain/sai-website#114744bd69002fb7bc54bf5108c3142a31453ebd09f4904e4d736e0a8d51e2774d143d478a593d8387f8register,open,next,context,status,paths(nosync)Reproduction
A temporary local
chore/faster-initref pointed exactly at the published PR head.However, the generated revision contains:
Repeating
openfollowed bynextproduced the same stale YAML.state.tomlretained:Separately:
Opening the exact local branch first did not make the PR known, and this CLI version has no
synccommand.Expected behavior
nextshould stamp the immutable snapshot returned by the immediately precedingopen, or fail rather than emit contradictory evidence.--pris advertised, the installed CLI should provide a supported way to discover/synchronize PR metadata, or automatically adopt an exact matching local branch ledger.Impact
Review findings for the current PR cannot be recorded with trustworthy YAML evidence. Best-effort revisions must preserve the stale generated evidence and explain the mismatch in prose, weakening the ledger's identity guarantees.