feat(B-0707): cron-cadence wiring — daily manifesto-citation snapshot workflow#4758
Conversation
… workflow Ships the 5th (deferred) acceptance criterion from B-0707: cron-cadence wiring for automatic daily manifesto-citation snapshots. New workflow: .github/workflows/manifesto-citation-snapshot-cadence.yml - Daily 06:37 UTC (off-the-hour; before razor-cadence 09:17) - Runs bun tools/hygiene/audit-manifesto-citations.ts --snapshot - Diffs docs/hygiene-history/manifesto-citations/ - Opens snapshot PR (per budget-snapshot-cadence.yml convention) - AgencySignature v1 trailer block on commits + PR body Pattern: copied from .github/workflows/budget-snapshot-cadence.yml which has same shape (cron → bun tool → diff → PR). Same security discipline (env: routing of expressions, "$VAR" quoting in shell). Same auto-merge limitation (GITHUB_TOKEN PRs don't trigger downstream workflows; PR left open for next maintainer/agent merge pass). B-0707 row updated: status remains closed; closed_by now reflects ALL 5 acceptance criteria met (was 4/5 with cron deferred); 5th criterion checkbox flipped to [x] with workflow path inline. Composes with: - B-0525 (parent — constitutional-promotion readiness tracking; this completes the measurement-infrastructure substrate) - B-0707 (child — this commit ships its 5th criterion) - .github/workflows/budget-snapshot-cadence.yml (pattern reference) - .github/workflows/razor-cadence.yml (sibling daily cadence) - .claude/rules/encoding-rules-without-mechanizing.md (the carved-sentence discipline: "encoding rules without mechanizing produces a memory of failures, not prevention" — this cron is the mechanization) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds scheduled GitHub Actions cadence wiring to automatically produce daily manifesto-citation snapshot PRs, completing B-0707’s deferred “cron-cadence wiring” acceptance criterion and updating the backlog row to reflect full closure.
Changes:
- Introduces a new daily scheduled workflow that runs
bun tools/hygiene/audit-manifesto-citations.ts --snapshot, detects changes, and opens a PR with the new snapshot. - Updates the B-0707 backlog row to reflect that all 5/5 acceptance criteria are now met and points to the new workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/backlog/P2/B-0707-manifesto-citation-time-series-tracking-2026-05-23.md | Updates closure text + acceptance criteria to reflect cron cadence now shipped. |
| .github/workflows/manifesto-citation-snapshot-cadence.yml | New daily workflow to generate snapshot and open a PR when snapshot output changes. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6d4cc5148
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… (Copilot P0 + Codex P1 + Copilot P1) Three review findings on PR #4758: 1. Copilot P0 + Codex P1 (SAME BUG, line 97/93): git diff --quiet ignores untracked files. The daily snapshot is a NEW file (YYYY-MM-DD.json) so the first run for a date would have silently declared "no diff" and skipped PR creation. Workflow would have been broken from day 1. Fix: use git status --porcelain which reports BOTH tracked modifications AND new untracked files. 2. Copilot P1 (line 42): workflow_dispatch input `note` was echoed to logs only, not plumbed into commit message or PR body. Misleading (description says "attach to this snapshot"). Fix: plumb NOTE_INPUT into both the commit message AND PR body via env: routing + printf data-only embedding (no shell interp). Matches budget-snapshot-cadence.yml pattern. Security-discipline preserved: NOTE_INPUT routed via env:, embedded via printf to stdin (no eval, no shell interpretation), wrapped in "### Note" sections to clearly demarcate as untrusted data. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Ships the 5th (deferred) acceptance criterion from B-0707: cron-cadence wiring for automatic daily manifesto-citation snapshots.
B-0707 closure now reflects ALL 5 acceptance criteria met (was 4/5 with cron-cadence deferred per #4750).
New workflow
.github/workflows/manifesto-citation-snapshot-cadence.yml:bun tools/hygiene/audit-manifesto-citations.ts --snapshotdocs/hygiene-history/manifesto-citations/Pattern source
Copied from
.github/workflows/budget-snapshot-cadence.ymlwhich has identical shape (cron → bun tool → diff → PR). Same security discipline (env: routing of expressions,"$VAR"quoting in shell, no direct interpolation in run-block scripts).Auto-merge limitation (inherited from pattern source)
GITHUB_TOKEN-created PRs don't trigger downstream workflows (GitHub's anti-infinite-loop guard). The snapshot PR sits open for the next maintainer/agent merge pass — perbudget-snapshot-cadence.ymlconvention. Explicit-no-auto-merge over silent-stall.Composes with
.github/workflows/budget-snapshot-cadence.yml(pattern reference).github/workflows/razor-cadence.yml(sibling daily cadence).claude/rules/encoding-rules-without-mechanizing.md(carved sentence: "encoding rules without mechanizing produces a memory of failures, not prevention" — this cron is the mechanization)Test plan
$VARquoting)ZETA_EXPECTED_BRANCHguard🤖 Generated with Claude Code