07013335b9
Implement the improve_auto-agents_pipeline plan end-to-end and apply post-implementation hardening fixes so master can only advance via SHAs that passed CI against the exact current master.
Key changes:
- Add deterministic merge driver in `tools/merge_drive.py`:
- Single-instance lock (`fcntl.flock`) + heartbeat/status surfaces.
- Train-merge with bisect-on-failure and independent bisect/restart budgets.
- `head_commit_id` optimistic lock enforcement on merge endpoint.
- Single-PR strategy switched to `Do=merge` (sha-stable) to avoid unverified rewritten commits.
- Restart throttling/sleeps to prevent burning retry budget under master churn.
- Persistent clone management (`ensure_repo`: fetch/reset/clean with fresh-clone fallback on corruption).
- Cooperative SIGTERM/SIGINT stop propagation through long CI polling.
- Explicit claim lifecycle for `auto/claimed-merge`:
- claim/release comments with TTL,
- expired-claim sweep,
- operational labels on release (`auto/ci-timeout`, `auto/restart-throttled`,
`auto/needs-implementer`, `auto/needs-conflict-resolution`).
- Claim-marker interoperability: sweep recognizes both driver and `claim_pr.ts` markers.
- Hardened API semantics: split idempotent GET retries vs state-change semantics.
- Remove token-in-URL clone pattern; use git `http.extraheader` auth instead.
- Adopt structured module logging + env-configurable levels.
- Add/expand invariant auditor in `tools/verify_invariant.py`:
- Non-zero exit when violations exist (cron/alert correctness).
- Robust auto-close routine using forward patch applicability on current `origin/master`.
- Merge-bot commit validation now checks:
- required CI contexts passed,
- associated PR has non-dismissed APPROVED review.
- Improve close-path wording/docs to match forward-apply algorithm.
- Add logger-based output and verbosity controls.
- Add operational setup/audit tooling:
- `tools/forgejo_audit.py` (preconditions/audit report).
- `tools/setup_auto_labels.py` (idempotent `auto/*` label provisioning).
- `tools/setup_branch_protection.py` (direct-push allow-list enforcement).
- `tools/audit_branch_protection.py` (dismiss_stale_approvals audit/flip support).
- `tools/migrate_to_new_driver.py` (claim/schedule/train cleanup migration).
- `tools/flag_stale_prs.py` (idle PR triage flow).
- `tools/local_ci_gate.sh` canonical local gate runner with `--continue-on-fail`.
- Add claim orchestration support in skills scripts:
- New `claim_pr.ts` helper (claim/release + TTL comments).
- `list_prs.ts` gains `--exclude-claimed` filter.
- Update script reference docs accordingly.
- Telemetry/schema upgrades in `tools/_forgejo_cache.py`:
- Add `merge_cycle`, `ci_gate_events`, `llm_activity`.
- Add batched `ci_gate_events` insertion API with rollback semantics.
- Ensure `bisect_depth` default handling is safe.
- Surface merge-driver telemetry in velocity reporting pipeline.
- Agent prompt/behavior updates:
- Review supervisor idle loop tuned (300s -> 60s).
- Review worker cycle cap/escalation behavior refined.
- Task implementor guidance updated to use local CI gate wrapper.
- Documentation and operational guidance:
- Expand `AGENTS.md` with merge invariant runbook, label registry, tool links,
and full merge-driver env var catalog (including logging/restart/claim TTL knobs).
- Update `CHANGELOG.md` with implementation and hardening entries, plus deferred TS-test note.
- Repo hygiene:
- Correct `.gitignore` to stop blanket ignoring `tools/*`; keep only generated artifacts ignored.
Testing/validation:
- Add comprehensive unit suite under `tests/auto_agents/` covering:
- merge driver recursion/restarts/409 paths/signal handling/claim sweeps,
- verifier auto-close logic with real local git fixtures,
- schema migration + telemetry batch writes,
- branch protection and setup/audit helpers.
- Current result: `100 passed` in `tests/auto_agents/`.
64 lines
2.5 KiB
TOML
64 lines
2.5 KiB
TOML
# tools/milestones-notes.toml — optional editorial overrides for the
|
||
# milestone-completion canvas.
|
||
#
|
||
# Copy this file to `tools/milestones-notes.toml` and edit any slot you want
|
||
# to override. Any slot omitted here falls back to the deterministic narrative
|
||
# generated by tools/render-milestones.py.
|
||
#
|
||
# Run `python3 tools/render-milestones.py` to re-render after editing.
|
||
#
|
||
# IMPORTANT: commentary strings are emitted inside JSX <Text>...</Text>
|
||
# nodes, so you can include plain text and (in key_findings_jsx) raw JSX,
|
||
# but must escape `>` as `>` and avoid stray `{` / `}` (they will be
|
||
# auto-escaped to \u007B / \u007D unless you use key_findings_jsx).
|
||
|
||
[notes]
|
||
|
||
# Intro paragraph under the H1. Keep it short — 2–3 sentences.
|
||
# intro_body = """
|
||
# Week 17 snapshot. Two milestones are closed (M1, M2); six of the eight open
|
||
# milestones are behind schedule. The 14-day window shows modest forward
|
||
# motion on M3 and M5, while M4, M7, M8, and M9 are idle.
|
||
# """
|
||
|
||
# Title for the caveats Callout (plain text, no JSX).
|
||
# projections_callout_title = "Read before interpreting projections"
|
||
|
||
# Body of the caveats Callout.
|
||
# projections_callout_body = """
|
||
# Projections are a 14-day linear forecast and do not model scope expansion
|
||
# or the effect of active scope-freeze efforts. Treat "Stalled" rows as
|
||
# "idle right now", not "abandoned".
|
||
# """
|
||
|
||
# Full replacement for the "Key findings" body.
|
||
#
|
||
# This slot is RAW JSX — it is inlined directly into the template's
|
||
# <Stack gap={8}>...</Stack>, after the <H2>Key findings</H2>. Use the
|
||
# built-in <Text>/<Card>/<Pill>/<Callout> components. Any curly brace you
|
||
# really want in the output must be written as \u007B / \u007D or split
|
||
# across strings.
|
||
#
|
||
# key_findings_jsx = """
|
||
# <Text>
|
||
# <Text as="span" weight="semibold">Custom finding.</Text>{" "}
|
||
# Hand-written interpretation that the numbers alone can't
|
||
# capture.
|
||
# </Text>
|
||
# """
|
||
|
||
# Extra trailing sentence appended to the footer line.
|
||
# footer_tail = "Snapshot taken during the Sunday-morning HAL9000 burst."
|
||
|
||
# Per-milestone overrides — by version id.
|
||
# Each milestone's card shows the `theme` (the bold one-liner) and the
|
||
# `description` (the longer paragraph). Omit either to keep the default.
|
||
#
|
||
# [notes.descriptions."v3.2.0"]
|
||
# theme = "Decisions, invariants, and selective plan correction."
|
||
# description = """
|
||
# Decision records persisted to SQLite during Strategize/Execute, invariant
|
||
# precedence chain (plan > action > project > global), revert/append
|
||
# correction with BFS impact analysis, and DoD-gated plan apply.
|
||
# """
|