Auto-commit + auto-close generator drift after coily exec #48
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?
Originally filed by @coilysiren on 2026-05-11T04:58:29Z - https://github.com/coilysiren/coily/issues/113
Problem
Scheduled
coily exec daily-*sessions choke onrepo_verb_dirtywhenever an adjacent generator leaves the tree dirty between runs. The high-frequency cause (mcporter.d.tstimestamp churn) is fixed upstream in coilyco-ai#277, but real schema drift (mcporter version bump, new tool, transport change) still trips the gate.The right shape, per kai's design call: have
coily execitself auto-commit deterministic generator outputs after a successful verb, so the tree is clean by the time the next scheduled task fires. Audit trail preserved via a freshly-filed GitHub issue that the same commit closes — keeps the "every commit closes an issue" rule airtight, no hook change needed.Config surface
Repo-wide block in
.coily/coily.yaml, applies to every verb undercommands::paths- one-level glob list (filepath.Match). No**support, punt.prefixfield (issue handles the hook).pushtoggle (always pushes).Per-verb flow
After
coily exec <verb>returns 0:git status --porcelain. Empty -> return as today.auto-commit.paths. Any unmatched -> logauto-commit skipped: unexpected paths <list>, return. Next verb tripsrepo_verb_dirtyas today (surprise drift still gets human eyes).gh issue createon the current repo with the chore body. Capture#N.git add <matched paths>.git commit -m "<message including closes #N>"- passes existing commit-msg hook unmodified.gh issue close #Nwith a comment naming the failing hook and the audit row, abort, leave tree dirty.git push. GitHub auto-closes#Non receive.auto-committed <SHA>, closed #N, <K> filesto stdout. Not silent.Issue + commit shape
Issue title:
chore: refresh <first-glob-match> after <verb> auto-commitIssue body:
Label
auto-filedso the daily-backlog routine can filter these out of human triage.Commit message:
Diff stats in the issue body are the audit surface: if a "header refresh" issue is closed with a 200-line diff, it shows up in the closed-issue stream and can be investigated.
Failure semantics
gh issue createfails (offline, rate-limited, auth) -> no commit, tree stays dirty, next verb trips the gate. Same recovery as today.git pushfails (offline) -> commit landed locally, issue still open on GitHub. Next push from any verb carries it and GitHub closes#N.Safety properties preserved
--audit-override-dirtysemantics unchanged.--no-verifystays banned.Hook change
None. The commit honestly closes an issue, so
scripts/check-commit-closes-issue.pyis unchanged across all sibling repos. The "every commit closes an issue" rule stays airtight.Rollout
kai-brew-release. No locally-built binary.brew upgrade coily, add theauto-commitblock to coilyco-ai's.coily/coily.yaml.coily exec daily-updatelands a chore commit + closed issue, second run is no-op.Done when
coily exec <verb>withauto-commit.pathsconfigured leaves the tree clean after success when only allowlisted paths are dirty.chore:commit lands on main with anAudit-log:trailer and acloses #Nkeyword.#Nis auto-closed by GitHub on push, labeledauto-filed.repo_verb_dirtyon the next verb (safety property preserved).coily exec daily-updateruns against coilyco-ai produce exactly one chore commit (idempotence).Related