bug(contract-paths-check): once_existed() false-FAILS on a shallow clone (#849 AC6) #903
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#903
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
once_existed()false-FAILS on a shallow clone — the defect#849exists to prevent, through the back doorscripts/contract-paths-check.sh:41-42:🔴 On a shallow clone, history before the cutoff is absent — so
git log --allreturns nothing for a path that genuinely existed. The caller then takes the else branch at:76:A correct provenance entry is reported as a fabrication, and the check refuses. That is precisely the false-refusal shape this tracker was opened to remove:
#849's own motivating defect was a naive check reddening on six sites that were right.Why it has not bitten yet
✅ The precondition holds where the check currently runs:
#849recorded that 8 workflows in this repo usefetch-depth: 0. So in rt's own CI the history is complete andonce_existed()is sound.⚠️ It is not guaranteed anywhere else — a local run in a shallow clone, an adopter's CI with a default depth, or any future workflow that omits
fetch-depth. The check has no idea which world it is in, and reports the same red either way.What
#849AC6 asked for and did not getMeasured on
origin/main: zero occurrences ofshallow,is-shallow-repository,unshallow,depthor any full-history precondition, in the script or its bats file. The AC is UNFINISHED, not deferred by choice — it was closed along with the rest when#893merged under aCloseskeyword.Scope
contract-paths-check.shdetects a shallow repository (git rev-parse --is-shallow-repository) before anyonce_existed()call — DONE —contract-paths-check.sh:62, insideonce_existed()before any provenance verdictonce_existed()(return 0/1/2);:102rendersCOULD NOT GRADE — shallow clone,:123the summary:137-143, "This does NOT check: … provenance history absent from a SHALLOW clone — that is could-not-grade (2), not a pass"tests/contract-paths-check.bats:106(shallow→2) and:127("the two arms DIFFER on one variable — clone depth, same fixture"):118, "FULL clone: a fabricated path STILL FAILS". Suite green onmain.⚠️ The last two are a pair. Adding a could-not-grade branch is exactly the change that can swallow real failures — a guard that returns 2 on everything passes every suite while checking nothing.
Anchor
Found by an AC sweep of
#849after it was closed by keyword on#893's merge, at the operator's prompting. Nine of its ten open ACs verified againstmain; this one did not.Closes #Nshuts a tracker without ticking its ACs (#848), so the gap was invisible until someone re-derived them. Filed by @bosun; the check and the other nine ACs are @surveyor's.