ci(mind): self-heal stale complete/index.md on push to main - #117
Merged
Conversation
An alarm-only index check emailed the human once per push while the index was stale — three storms so far, the latest (~25 emails) caused by an ad-hoc `git mv` into complete/ that no `record --apply` folding can prevent. On push to main the workflow now regenerates the index, verifies convergence, and pushes a github-actions bot commit, failing only when the repair itself fails; pull-request runs keep the read-only failure. The GITHUB_TOKEN heal push cannot re-trigger the workflow, so no loop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Jammy2211
pushed a commit
that referenced
this pull request
Jul 30, 2026
Jammy2211
pushed a commit
that referenced
this pull request
Jul 30, 2026
Jammy2211
added a commit
that referenced
this pull request
Aug 14, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #116.
Overview
The Lifecycle Drift workflow's
index --checkwas alarm-only: whilecomplete/index.mdwas stale it failed — and emailed — on every push to main until something regenerated the index. Three storms so far (2026-07-24 → #97; 2026-07-30 morning →aba2ce5; 2026-07-30 evening →fa35972, ~25 emails in 2h). The third break was an ad-hocgit mvof 10 phase prompts intocomplete/afterrecord --applyhad regenerated the index — no amount of folding registry writes into lifecycle.py can prevent manual mutations, and with many concurrent agent sessions they will keep happening. So the check now repairs instead of alarming.Changes (single file:
.github/workflows/lifecycle_drift.yml)index --apply, verify convergence withindex --check, commitcomplete/index.mdasgithub-actions[bot], push. Up to 3 attempts, each rebuilt from the fresh tip, so a concurrent push never needs rebase/conflict handling; if a concurrent push already healed main, exit green without committing.index --applynot converging (a lifecycle.py bug) or the push still rejected after 3 attempts.index --apply" message.lifecycle.py check: unchanged hard fail (state contradictions are not auto-fixable).permissions: contents: write(required for the heal push; PR runs never push).GITHUB_TOKENdo not trigger workflow runs, and convergence is verified before pushing regardless.Validation
bash -nchecked.fa35972: the heal regenerated the 10 missing entries (823 → 833 records), committed as the bot identity, and pushed — exit 0.GITHUB_EVENT_NAME=pull_request→ error annotation + exit 1.lifecycle.py check+index --checkpass on this branch.Post-merge I'll run a controlled live test: push a deliberately index-stale (semantically valid) tweak directly to main and confirm the workflow pushes a bot heal commit instead of emailing.
🤖 Generated with Claude Code