Repository navigation
fix: report unavailable Git containment proofs during teardown - #7915
Conversation
[Low impact] The PR appears safe to merge; unsuccessful Git proofs still block teardown. Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thank you @WTF-Am-ID. This is a clean, narrow fix for the diagnostic half of #4216, and the old-Git live run (Git 2.37.7) makes the before/after easy to see. What I checked (head On scope: #4216 offered a bootstrap Git floor and a precise refusal, and said the precise refusal on its own keeps the fallback honest. This PR is that second option, so I'm fine with it closing the issue. A floor can follow separately if anyone wants it. State: the no-mistakes check passes on this head, Greptile is 5/5, and live validation is 5/5. CI run 40697406647 is partly done and still running behind today's Actions backlog. If it comes back green and the PR is still clean, it's ready to merge on a later pass. contract-class: restore. Teardown's existing fail-closed refusal now reports its real cause. Nothing that used to land or tear down behaves differently. VISION: aligns rule by rule. One captain: an honest refusal instead of a misleading one. Authority: still refuses, never discards. Scripts/agents: exit-code classification in the script. Restart: no state change. Delegation: strengthens a refusal path. Vendor: plain git. Scope: one function and its message. Nothing is needed from you right now. This is waiting on CI. |
…e, independent of this PR. The focused failing case passed locally with exit 0. The full suite stalled earlier and was stopped. No tracked changes. Command guard rejected cleanup; scratch remains at .ci-7915/ and tests/.ci-7915-cycle.sh
|
Speaking as Kun's firstmate: this is merged. Thank you @WTF-Am-ID — really appreciate you taking the time on this. |
…nguid#7915) # Conflicts: # tests/fm-teardown.test.sh
A rebase onto main silently dropped main's kunchenguid#7915 handling, so an unsupported merge-tree option (Git older than 2.38) or an unrelated Git failure was read as "work not on any remote and not landed". Teardown then refused at a destructive cleanup decision for the wrong reason, telling the operator to discard work that may well have landed. Restore CONTENT_LANDED_PROOF_ERROR so the capability and execution failures are named separately from a real conflict or differing tree, and restore the regression test that covers all five cases: unsupported, contained, conflict, unlanded and error. The test exits 1 before this change and passes after it.
Closes #4216
Review was single-family (Codex) by the owner's temporary choice.
Intent
ok same instructions i gave you before pick high value issues from scan, in all the repos you scanning and use codex only to close them
Context: this task is scan pick P12: upstream issue #4216 in kunchenguid/firstmate. Old Git lacking merge-tree --write-tree is reported as unlanded content rather than an unavailable proof. Triage contract class: restore. Scan notes for this pick:
Issue: #4216
Old Git lacking merge-tree --write-tree is reported as unlanded content rather than an unavailable proof.
Correct the diagnostic while preserving the safe refusal.
Size S.
Contract class: restore.
Maintainer triage.
Evidence:
bin/fm-teardown.sh:1762suppresses merge-tree failure stderr and returns 1 without classifying a missing capability.Competing work: #4218 explicitly says this issue is separate and not addressed. That exact reference is not a claim. The forge-agnostic fallback at #891 does not supply the missing-capability diagnostic or bootstrap reporting. No covering target found.
Closure test: A fake Git capability boundary models old Git rejecting --write-tree, modern Git proving containment, genuine merge conflict and unrelated Git failure. Missing capability must name the unavailable proof and remain fail closed, while successful containment and genuine unlanded-work refusals retain their semantics. If a bootstrap floor is added, keep the existing install-consent path and test it separately. Do not skip away supported coverage to make the suite green.
The owner approved fixing the scan's high-value picks upstream through PRs, written and reviewed by Codex only.
What Changed
git merge-tree --write-treeoptions and other execution failures as an unavailable content-landed proof, while continuing to refuse teardown. Name the Git 2.38 requirement for rejected options and the exit status for other failures.Risk Assessment
✅ Low: The change distinguishes unavailable merge-tree proof from unlanded content while preserving safe refusal and existing containment behavior.
Testing
Reproduced the baseline misdiagnostic using actual Git 2.37.7 and passed six isolated live teardown probes, retaining CLI transcripts and the driver. No suite or lint ran; the focused-helper attempt was guard-blocked. Private runtime cleanup succeeded, but deletion of approximately 103 MB in .live-4216-test-current/ was refused and not retried.
Evidence: Old Git baseline reproduction
Source: Old Git baseline reproduction
Evidence: Actual Git 2.37.7 refusal
Source: Actual Git 2.37.7 refusal
Evidence: Unsupported-option refusal
Source: Unsupported-option refusal
Evidence: Successful containment cleanup
Source: Successful containment cleanup
Evidence: Real merge conflict refusal
Source: Real merge conflict refusal
Evidence: Unlanded content refusal
Source: Unlanded content refusal
Evidence: Unrelated Git failure refusal
Source: Unrelated Git failure refusal
Evidence: Private runtime cleanup
Source: Private runtime cleanup
Evidence: Verification details and retained scratch inventory
Source: Verification details and retained scratch inventory
Evidence: Reproducible live driver
Source: Reproducible live driver
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
Step was skipped.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
make -C .live-4216-test-current/git-2.37.7 -j4 NO_TCLTK=YesPlease NO_GETTEXT=YesPlease NO_CURL=YesPlease NO_OPENSSL=YesPlease NO_EXPAT=YesPlease gitpython3 .live-4216-test-current/drive.pyexercised the baseline and candidate teardown CLIs with real Git repositories, Treehouse leases and private tmux windows.Verified each refusal preserved HEAD, branch, file bytes, metadata, status and task window without invoking Treehouse return.Verified successful containment performed real cleanup, then stopped the private tmux server and removed its socket directory.The existing focused-test helper invocation was guard-blocked as indirect execution and was not retried.git status --short,git diff --exit-codeandgit check-ignore .live-4216-test-current/drive.pyconfirmed unchanged tracked files and excluded scratch.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.