This repository was archived by the owner on Sep 27, 2026. It is now read-only.
Repository navigation
Govern disk, gate merges, and find tokens where they live - #9
Merged
Merged
Conversation
Three fixes, one per open issue: - Disk governance (#6): min_free_disk floor (per-check > top-level > 5G default, 0 disables), pre-start refusal with exit 16, mid-run statvfs sampling that kills through the existing escalation as non-cacheable disk_exhausted, and free-space observations in the verdict (schema v2). - Merge gating (#5): snapshot refuses only trees that don't honestly exist (unmerged entries, dirty submodules). Publish creates the commit git would: multi-parent merges from MERGE_HEAD (octopus included, stale heads filtered by ancestry), cherry-pick/revert finalization, squash and MERGE_MSG message precedence with git-faithful commentChar handling, rebase refused at publish only. Journal carries the full parent list (schema 2, back-compat reads). - Token chain (#4): GREENTREE_GITHUB_TOKEN -> GITHUB_TOKEN -> gh auth token, resolved once, source logged, never the value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Greentree-Change-Id: 5cfd4fdc9d3572e11dc3f2c42fec3730
LopezAdan
added a commit
that referenced
this pull request
Aug 13, 2026
Three fixes, one per open issue: - Disk governance (#6): min_free_disk floor (per-check > top-level > 5G default, 0 disables), pre-start refusal with exit 16, mid-run statvfs sampling that kills through the existing escalation as non-cacheable disk_exhausted, and free-space observations in the verdict (schema v2). - Merge gating (#5): snapshot refuses only trees that don't honestly exist (unmerged entries, dirty submodules). Publish creates the commit git would: multi-parent merges from MERGE_HEAD (octopus included, stale heads filtered by ancestry), cherry-pick/revert finalization, squash and MERGE_MSG message precedence with git-faithful commentChar handling, rebase refused at publish only. Journal carries the full parent list (schema 2, back-compat reads). - Token chain (#4): GREENTREE_GITHUB_TOKEN -> GITHUB_TOKEN -> gh auth token, resolved once, source logged, never the value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Greentree-Change-Id: 5cfd4fdc9d3572e11dc3f2c42fec3730
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
One verified tree fixing all three open issues, gated and attested by this branch's own build of greentree.
Disk governance (#6)
min_free_diskingreentree.yaml: per-check > top-level > built-in 5G default;0disables. Human units (K/M/G/T, powers of 1024), overflow and exponent forms are config errors.disk_exhausted. A failed statvfs never kills a check;watchsurvives refusals and keeps watching.disk_free_start_bytes/disk_free_min_bytesas filesystem-level observations, so floors can be set from evidence. Schema mismatches are now skipped explicitly, not accidentally.2Gbackstop floor. The mid-run kill was verified live (a 2GB-writing check killed at 1.06s, nothing cached) — and the floor fired for real once during development when this box dipped below it.Merge gating (#5)
MERGE_HEADparent (octopus included), with stale heads filtered by ancestry so a leftover file can never mint a bogus second merge commit; cherry-pick/revert finalize single-parent and leave.git/sequencerfor--continue; squash commits takeSQUASH_MSG; message precedence is-m> squash/merge message (with git-faithfulcore.commentCharhandling,autoincluded) > default. Rebase refuses at publish only, exit 12.Token chain (#4)
GREENTREE_GITHUB_TOKEN→GITHUB_TOKEN→gh auth token --hostname github.com(5s timeout, process-group-killed, drained stdout, any failure falls through). Resolved once per publish, source logged, value never. The exit-15 error enumerates all three sources. This PR's owngreentree/fullstatus was posted through the fallback.Process
Implemented as three changesets, then adversarially reviewed as a whole; the review confirmed 4 P1s and 9 P2s (stale-MERGE_HEAD double-merge hazard, watch dying on disk refusal, test-suite dependence on ≥5G free, the repo's own floor being unsatisfiable on its mandated box, commentChar=auto message loss, gh child leaks, and doc drift among them) — all fixed and covered by tests. One deliberate deferral:
teststill omits already-collected results from its JSON when a later check hits a pre-start refusal; the verdicts remain cached, so nothing is lost.Tests: 67 passing (30 new across the three fixes and the review round).
cargo clippy -D warningsandfmt --checkclean. SPEC/README/SKILL/AGENTS exit-code tables and schema docs updated in lockstep.Closes #4
Closes #5
Closes #6
🤖 Generated with Claude Code