Commit Graph

4 Commits

Author SHA1 Message Date
Bo e50e9aca80 fix(ci): unbreak claude-review (timeout+cancel) and executable-spec-link-integrity (missing scenario) gates (ag-1kcr) (#593)
Restores two CI gates the 2026-05-29 evolve session left broken/flaky.

## Fix 1 — claude-review hang (the gate you flagged)
`claude-code-review.yml` (required merge gate) + `claude.yml`
(`@claude`) ran `anthropics/claude-code-action@v1` with **no
`timeout-minutes`**. A hung LLM call ran to GitHub's **6h default** →
required check stuck `pending` forever → merge blocked → forced 3×
`--admin` bypass this session (#591 stuck ~17min).
- `claude-code-review.yml`: `timeout-minutes: 20` (hung review → **fast
fail**, re-runnable, not stuck) + `concurrency` (`cancel-in-progress`)
to supersede lingering runs.
- `claude.yml`: `timeout-minutes: 30` (same hang class).

A timed-out required check still blocks merge but is now *actionable*.
Changing required-ness / the 6h default is out of scope
(branch-protection policy).

## Fix 2 — executable-spec-link-integrity RED on main (regression from
#591)
#591 (ag-8ok) added directive **D15** with `**Scenarios:**
s-2026-05-24-015` but never created the scenario file. The lint gate
(`ao goals scenarios --lint`) was **path-filter-skipped** on #591's CI,
so the phantom reference merged and left **main red** (this also blocks
#593's own copy of the gate). Fix: add
`spec/scenarios/s-2026-05-24-015.json` (mirrors -013/-014), properly
linking D15. Lint now: *"No executable-spec link defects found."*

## Note on this PR's own claude-review
`claude-code-action` requires the workflow file to be byte-identical to
main's (anti-tamper). Because this PR *modifies*
`claude-code-review.yml`, its own `claude-review` check fails by design
(the action's error says this is "normal"). This PR must be admin-merged
— the **last** bypass before the timeout protects future PRs. All
deterministic gates (Validate, 65 jobs) are the merge signal.

Closes-scenario: ag-1kcr#claude-review-timeout
Bounded-context: BC5-Runtime
2026-05-28 21:12:07 -04:00
Bo 351859aa53 docs(ci): first-principles gate-rebuild design — 67 jobs → 10 purpose-grouped (ag-877 #gate-rebuild-design) (#588)
Cycle 1 of the CI gate rebuild (epic ag-5ck) — directive: rebuild the
gates from first principles, no strangler.

**Thesis:** the 59 check scripts are the safety logic (keep); the
**67-job orchestration** of `validate.yml` (1,978 lines) is accretion
slop. Collapse to **~10 purpose-grouped jobs**, each running its family
of scripts. Same coverage, ~85% fewer jobs.

**Safety (the no-strangler net):** coverage-proof — every script invoked
by old `validate.yml` must be invoked by new (`comm -23` must be empty);
the rebuild PR runs the new file against itself, so main stays protected
until green.

**Flagged danger:** branch-protection required-checks cutover (rename 64
required checks → 10) is admin-gated, repo-wide blast radius —
operator-coordinated, not autonomous.

This PR lands the design only. Build (new `validate.yml`) + cutover
follow.

Closes-scenario: ag-877#gate-rebuild-design
Bounded-context: BC2-Validation
Evidence: spec/teardown-2026-05-28/gate-rebuild-first-principles.md
2026-05-28 17:44:54 -04:00
Bo 00a7d5e53b chore(cli): delete 2 zero-import dead packages (ag-nxm #dead-pkgs) (#581)
## Wave 1 — AgentOps teardown (epic ag-097)

Deletes two genuinely-dead Go packages: `cli/internal/plans` +
`cli/internal/worker` (verified 0 importers, no blank imports, no non-Go
refs). Build + vet + full test suite green (EXIT=0, 0 failures).

### Scope discipline (why 2, not 6)
Discovery + execution narrowed the candidate list:
- **`internal/domain` excluded** — `domain/packet` has 4 live importers
(ports/storage, adapters/storage_fs, rpi/artifacts). Not dead.
- **`safety`, `wikiworker`, `feedbackcompiler` split to ag-jqx** —
they're 0-import but **contract-entangled**: `safety` is the only
production anchor for the `.agents/swarm-role` agents-write-surfaces
entry; `wikiworker` for `.agents/quarantine` (a live surface —
agentworker has 26 active quarantine tests); `feedbackcompiler` is the
documented forge F5.4 capability. Deleting them naively fails
`TestAgentsWriteSurfaces_EachAllowlistEntryHasProductionReference`. They
need owner decisions, not a naive rm.

### Evidence
- spec/teardown-2026-05-28/{spine,slop-map,strangler-plan}.md (added in
this PR)
- .agents/research/2026-05-28-teardown-discovery.md (local)

Closes-scenario: ag-nxm#dead-pkgs
Bounded-context: BC5-Runtime
Evidence: spec/teardown-2026-05-28/
2026-05-28 16:07:47 -04:00
Bo 74ea26d13d feat(goals): link strategic directives to scenarios (soc-m8tdn #directives-scenarios) (#486)
## What

All 14 GOALS.md strategic directives reported `zero-scenario-directive`
warnings under `ao goals scenarios --lint` (the warn-only
`executable-spec-link-integrity` / F1.6 gate) because none carried a
linked active scenario — `ao goals measure --directives` showed every
directive at 0/0 scenarios.

This links each of the 14 directives to a schema-valid, status=`active`
promoted spec scenario using the canonical non-lossy linker `ao goals
scenarios --create ... --status active`. That command:

- assigns each directive a stable `directive_id` (e.g.
`d-gate-the-install-path`),
- authors one scenario per directive under `spec/scenarios/` carrying
the directive's `directive_id` (bidirectional link), and
- patches each directive's `**Scenarios:**` line via the byte-level
non-lossy patcher.

Each scenario `goal` is a real Given/When/Then acceptance grounded in
that directive's actual CI gate or steer metric (smoke-test suites,
install-smoke, validate-quarantine-empty, flywheel-lifecycle,
go-complexity, codex-parity, nightly dream-cycle, close-loop skill
drafts, workbench eval, check-loop-shape, corpus snapshot/restore,
agent-ergonomics, reinforcement contract) — not filler.

## Verification

| Check | Before | After |
|---|---|---|
| `ao goals scenarios --lint` | `0 error(s), 14 warning(s)` (all
`zero-scenario-directive`) | `No executable-spec link defects found.` |
| `ao goals scenarios --lint --strict` | (would fail) | clean, exit 0 |
| `ao goals validate` | exit 0 | exit 0 |
| markdownlint GOALS.md | — | 0 errors |
| scenarios vs `schemas/scenario.v1.schema.json` | — | 14/14 validate |
| `go test ./internal/goals/... ./internal/scenario/...` | — | 416 pass
|

GOALS.md diff: **+28 insertions / 0 deletions** (non-lossy — 14
directives × blank line + `**Scenarios:**` line). No code, no
`validate.yml`, no `registry.json`, no hooks touched.

Closes-scenario: soc-m8tdn#directives-scenarios
Bounded-context: BC1-Corpus
Evidence: GOALS.md
2026-05-23 20:10:54 -04:00