Commit Graph

47 Commits

Author SHA1 Message Date
Bo a10d6d5e90 feat(release): ci-local-release --quick mode — fast pre-tag sanity (ag-gm2) (#534)
## Summary

`scripts/ci-local-release.sh` default run takes ~78min (4657s) — a full
release rehearsal (multi-platform cross-build + SBOM cyclonedx/spdx +
syft/grype/trivy vuln scan + race tests +
eval/HIL/digital-twin/readiness gates). Too heavy for iterative pre-tag
use.

This adds a `--quick` (alias `--sanity`) mode: the fast code-correctness
subset, skipping the slow release-rehearsal lane. Target <5min.

## What --quick KEEPS
- current-platform `make build` + `go vet` + `go test` (no `-race`)
- manifest version-consistency check
- `release-smoke-test.sh` + `ao init`/`ao rpi` smoke
- the cheap correctness gates (CLI snippets, shellcheck, doc/manifest
gates) in Phases 2/3/3b
- agents-hub content-hash isolation gate (cheap, real protection)

## What --quick SKIPS (prints a clear note)
- SBOM generation (cyclonedx/spdx)
- multi-platform release-binary validation (cross-build rehearsal)
- vuln-scan security gate (syft/grype/trivy)
- AgentOps contract canaries + Go race tests
- eval / digital-twin / HIL / release-readiness rehearsal gates
- release-provenance artifacts (manifest + tag-index) — `--quick` is
explicitly not a rehearsal

## What --quick treats as ADVISORY (run, but does NOT gate the verdict)
- worktree-disposition gate + MemRL feedback health — these reflect
**local machine state**, not committed code. New `run_step_advisory()`
helper warns instead of failing.

## Unchanged
- Default (no flag) behavior is the full rehearsal for the real tag.
`--fast` is untouched.

## Verification
- `bash -n` + `shellcheck --severity=error` (repo gate severity): clean
- `bats tests/scripts/ci-local-release.bats`: 30/30 pass (6 new
`--quick` tests added)
- `--quick` ran end-to-end and exercised the correct lane (built binary,
ran smoke + hash gate, skipped rehearsal/eval/HIL/readiness, advisory
worktree/MemRL)
- Quick `make build + vet + go test ./...` step verified rc=0 (60
packages) in 238s with real HOME
- Diff stat: 129/+ 12/- in the script, all intentional control-flow
restructure (no collateral)

Closes-scenario: ag-gm2#quick-mode
Bounded-context: BC5-Runtime
Evidence: scripts/ci-local-release.sh
2026-05-24 22:48:06 -04:00
Bo e431339c40 feat(hookless)!: remove all hooks — skills + CLI only (soc-57b7f #remove-all-hooks) (#511)
## What

AgentOps 3.0 goes **fully hookless**. This removes the entire hook
product surface — the product is now skills + the `ao` CLI with **zero
hooks**. CI is the authoritative gate.

## Deleted

- `hooks/` — 46 hook scripts + `hooks.json` + examples (whole directory)
- `cli/embedded/hooks/` + embedded `hooks.json` +
`embedded/lib/hook-helpers.sh`
- `lib/hook-helpers.sh`
- `ao hooks` CLI command: `cli/cmd/ao/hooks.go`, `hooks_run.go` + 5 hook
test files; `cli/internal/bridge/hooks.go`;
`cli/internal/doctor/fix_hooks.go` + test
- Codex hook manifest (`hooks/codex-hooks.json`) + handler/audit scripts
(`scripts/audit-codex-hooks.sh`, `install-dev-hooks.sh`,
`test-hooks-output.sh`, `test-codex-hookless-lifecycle.sh`,
`test-hookless-rpi-phased.sh`)
- Hook lease surface: `docs/contracts/hook-lease-*`,
`schemas/hook-lease.v1.schema.json`,
`scripts/check-hook-lease-inventory.sh`,
`check-hook-port-replacements.sh`, `generate-hook-lease-inventory.py`
- Hook docs: `docs/HOOKS.md`, `cli/docs/HOOKS.md`,
`docs/architecture/hook-noise-audit.md`,
`docs/contracts/hook-runtime-contract.md`
- `tests/hooks/` (whole dir) + hook test scripts; 5 hook eval suites +
fixtures

## CI gates removed

`hook-preflight`, `validate-hooks-doc-parity`, `hook-output-schema-lint`
(+ scripts/bats), the hook eval suites, the `test-runtime-codex-smoke` /
`test-codex-native-install` / `test-codex-plugin-install` hook-handler
assertions, the cli-integration hook-lifecycle steps, the bats
`tests/hooks/*` glob + orphan-hooks audit, and the `--with-hooks`
install path. `embedded-sync` now validates only lib/skills. Both
summary `needs:` lists + the summary echo +
`docs/contracts/ci-jobs.yaml` updated; `validate-ci-policy-parity`
passes (66 rows). `.codex-plugin/plugin.json` drops the "Hooks"
capability.

## Load-bearing PRESERVED (reported, not forced)

- **`cli/cmd/ao/codex_runtime.go`** — the codex runtime *lifecycle
profile* (`HookCapable`/`HookConfigured` detection) is a
runtime-capability abstraction used by 6 `validate-codex-*` CI gates,
distinct from the hook product. Deleting it is a separate refactor.
- **`hooks-authoring` skill** + `schemas/hooks-manifest.v1.schema.json`
— reframed as an opt-in "author your own hooks" guide. Deleting the
skill cascades into catalog/domain-map/dispositions/context-map golden
files (skill-count sync), out of scope for the hook-product removal.
- **`scripts/pre-push-gate.sh`** — retired local gate (not in CI);
self-skips deleted hook scripts via `[[ -x ]]` guards; its 55 bats tests
still pass.
- Domain-enforcement audit keeps the `enforced`-mode schema for
backward-compatible JSON readers, but the hookless resolver only returns
`audited`/`unavailable`.

## Verification

`go build` / `go vet` clean; `go test ./...` = **11849 passed, 0
failed** (68 pkgs). gofmt clean on all touched files. Green: registry
`--check` (0 hooks), `regen-codex-hashes --check`,
`validate-ci-policy-parity`, `check-wiring-closure`,
`validate-embedded-sync`, `validate-manifests`, `validate-agents-split`,
`doc-release` (0 broken links), `generate-cli-reference --check`,
`heal.sh --strict`, codex/claude/plugin smoke tests, baseline-audit (0
stale). Diff: 231 files, +354 / −39803.

Closes-scenario: soc-57b7f#remove-all-hooks
Bounded-context: BC5-Runtime
Evidence: .github/workflows/validate.yml
2026-05-24 11:19:37 -04:00
Bo fc16cf31df feat(release): require zero-trust audit evidence (#297)
## Summary
- add eval fast, eval baseline-audit, VIL, and digital-twin evidence to
local release artifact manifests
- require resolver/audit validation to reject incomplete
SBOM/security/eval/HIL/VIL/twin proof bundles
- document the zero-trust release proof bundle and add focused BATS
coverage

## Validation
- bash -n scripts/ci-local-release.sh
scripts/resolve-release-artifacts.sh
scripts/validate-release-audit-artifacts.sh
- shellcheck --severity=error scripts/ci-local-release.sh
scripts/resolve-release-artifacts.sh
scripts/validate-release-audit-artifacts.sh
- bats tests/scripts/ci-local-release.bats
tests/scripts/release-artifacts.bats
- git diff --check
- markdownlint docs/RELEASING.md docs/release-e2e-checklist.md
docs/contracts/release-readiness.md
- bash scripts/validate-ci-policy-parity.sh
- bash tests/docs/validate-doc-release.sh
- scripts/pre-push-gate.sh --fast (passed; warn-only executable-spec
link-integrity reports unknown flags --lint/--orphans)
- bd dep cycles
- scripts/bd-audit.sh --json

Bead: soc-owed.7

---------

Co-authored-by: Codex <codex@example.invalid>
2026-05-18 01:14:33 +00:00
Boden Fuller 72bd4a61b5 Release v2.41.1 2026-05-15 09:09:38 -04:00
Boden Fuller 1fec77380e ci: promote contract canaries to required gate 2026-05-03 18:16:56 -04:00
Boden Fuller fb41ddef08 Harden repo operating loop validation 2026-05-03 10:28:07 -04:00
Boden Fuller 342a8fc010 release: restore prep state and plan zero-trust gate 2026-05-02 20:10:30 -04:00
Boden Fuller 8385cf6a64 chore: add release readiness gate 2026-05-02 18:46:12 -04:00
Bo aae3f1a434 docs: add competitive radar (#160) 2026-04-26 22:58:33 -04:00
Boden Fuller ae4d84cae5 feat(scripts): add content-hash snapshot gate for ~/.agents mutation detection
The existing scripts/check-home-isolation.sh grep-checks test files for
t.Setenv("HOME", ...) patterns but cannot detect:
  - Tests that explicitly unset HOME after setup
  - Tests that write to ~/.agents and then use os.Chtimes to restore
    the mtime (the same API recovery_test.go:285 uses legitimately
    can hide test-side poisoning)

This adds a post-hoc content-hash gate that:
  1. Captures SHA-256 of ~/.agents/{learnings,patterns,findings,rpi/next-work.jsonl}
     BEFORE the test phase.
  2. Re-captures and diffs AFTER the test phase.
  3. Fails the gate on any content change — mtime restoration cannot
     hide it because the hash depends on file content, not stat metadata.

Wired into both local gates:
  - scripts/pre-push-gate.sh — capture right after check-home-isolation,
    diff as the final phase before the summary.
  - scripts/ci-local-release.sh — capture after check_required_cmds,
    diff as Phase 6 before Summary via the existing run_step helper.

The remote CI surface (.github/workflows/validate.yml) is deferred to a
follow-up micro-epic so the blast radius of this change stays local.

Script skips gracefully on minimal containers without shasum via an
explicit command-exists check at the top.

Verified via 6-judge pre-mortem council. Part of Micro-epic 1.
2026-04-10 20:39:48 -04:00
Boden Fuller 184ac88e10 fix(ci): fix secret scan false positives and regen codex hashes
- Exclude .gc/ dir and Getenv/DOLT_PASSWORD lines from secret pattern scan
- Regenerate codex hashes for forge, post-mortem, scenario after SKILL.md fixes
2026-04-06 22:09:00 -04:00
Boden Fuller afb172bbe1 chore(ci): remove coverage percentage gates from CI
Remove coverage-ratchet job, cmd/ao coverage floor check, and all
associated scripts/tests/baseline. Coverage percentages are noisy
during test migrations and architectural refactors — they block CI
without catching real bugs.

Deleted: .coverage-baseline.json, scripts/check-cmdao-coverage-floor.sh,
scripts/coverage-ratchet.sh, tests/scripts/check-cmdao-coverage-floor.bats
Updated: validate.yml, pre-push-gate.sh, ci-local-release.sh, pre-push-gate.bats
2026-04-06 20:47:23 -04:00
Boden Fuller 99d3d369c5 feat(rpi): wave 2 backlog — swarm guards, hook hardening, release idempotency
Epic D: Add pre-spawn worker detection to git-worker-guard (blocks worktree-add
and agent-spawn from workers). Enhance check-file-manifest-overlap.sh edge cases.
Wire validate-swarm-evidence.sh into CI. Fix .agents/retros→retro in index.go
and init.go. Add grep-for-existing-functions to swarm worker template.

Epic E: Replace partial embedded check in pre-push-gate with full
validate-embedded-sync. Lazy-init git rev-parse in research-loop-detector.
Add retag idempotency guard (skip if tag already at HEAD). Add git_sha to
release-artifacts.json manifest. Empty stdin guard in go-test-precommit.
2026-04-04 20:56:17 -04:00
Boden Fuller 3ca44565e2 test: honor TMPDIR in json flag consistency script 2026-04-03 18:12:40 -04:00
Boden Fuller e1b6b39350 Remove release cadence gate and sync Codex artifacts 2026-04-02 18:36:08 -04:00
Boden Fuller 96c7116f65 fix(release): add mkdir -p guard before tag-index append 2026-04-02 16:39:08 -04:00
Boden Fuller 284c6fbf52 fix(release): link audit artifacts to release tag names
Adds write_tag_index() that appends a tag→run_id mapping to
.agents/releases/local-ci/tag-index.txt when --release-version is
passed (or a semver is resolvable from plugin.json). Each entry is
one line: "<vX.Y.Z> <RUN_ID> <generated_at>". Skips gracefully when
no semver version is available (e.g. bare git-describe hash runs).
2026-04-02 15:58:22 -04:00
Boden Fuller 98e581989c codex: retire stale artifact provenance metadata 2026-04-01 13:10:42 -04:00
Boden Fuller 061edb548b fix(release): harden retag and audit artifacts 2026-03-22 21:11:41 -04:00
Boshu2 96e57a0122 fix(ci): resolve remaining CI failures for v2.25.0
- Sync docs/CHANGELOG.md with root CHANGELOG.md for release freeze gate
- Trim crank (819→800) and evolve (803→779) under line limits
- Fix markdownlint MD007 in codex discovery (3-space → 2-space indent)
- Remove codex install bundle parity from CI, pre-push, release smoke test
- All codex sync-based checks disabled (skills-codex/ manually maintained)
2026-03-14 13:56:46 -04:00
Boshu2 85e2bf580b fix(ci): remove codex skill parity check from CI pipeline
The sync-codex-native-skills.sh script is unreliable and overwrites manual
edits to skills-codex/. Codex skills are now manually maintained.

- Remove validate-codex-skill-parity step from validate.yml
- Comment out from ci-local-release.sh
- Skip in pre-push-gate.sh
- Keep codex-runtime-sections and install-bundle checks (structural, not parity)
2026-03-14 13:05:35 -04:00
Test a066494297 test(codex): validate backbone generated prompts 2026-03-08 18:45:34 -04:00
Test a59330be58 fix(contract): publish next-work queue v1.3 parity 2026-03-08 13:47:07 -04:00
Boden Fuller 1a81173bcf Add headless runtime skill smoke gate 2026-03-07 16:38:25 -05:00
Boden Fuller 9205270833 Harden local codex skill validation 2026-03-07 13:26:49 -05:00
Boden Fuller 6dfef761b3 Fix codex skill sync and local push gates 2026-03-07 12:14:08 -05:00
Boden Fuller 83bea6bdd5 enforce canonical root worktree hygiene 2026-03-06 12:40:17 -05:00
Bo b75bee0911 chore: automate codex skill parity (#72) 2026-03-05 20:43:27 -05:00
Boden Fuller 40504e59de fix(ci,tests): resolve 4 post-mortem follow-ups from na-xjw
- Fix frontmatter-only learning file, wire validate-learning-coherence
  into local CI gate (scripts/ci-local-release.sh)
- Add 4 BATS tests: no-jq fallback for write_failure and
  write_memory_packet, newline injection guard, tab/newline escaping
- Document count-verification conformance and vibe language filter
  patterns in .agents/patterns/
2026-03-05 12:55:21 -05:00
Boden Fuller b5fc8dfae8 feat(docs,ci): wave 2 — CI sync and INDEX consolidation (na-xjw)
- Wire coverage-ratchet and skill-schema checks into ci-local-release.sh
- Skip validate-learning-coherence.sh (pre-existing frontmatter-only file)
- Document local-only check rationale in CI-CD.md
- Add Testing & CI section to docs/INDEX.md
- Consolidate testing-skills.md and release-e2e-checklist.md links

Issues: na-xjw.7, na-xjw.9
2026-03-05 10:40:25 -05:00
Boden Fuller 88e8e46eb3 feat(docs,tests): wave 1 — testing & documentation improvements (na-xjw)
- Fix 11 stale `tests/claude-code/` paths in testing-skills.md
- Remove phantom e2e-install-test.sh reference and --skip-e2e-install flag
- Add validate.sh to athena, grafana-platform-dashboard, push skills
- Create docs/TESTING.md umbrella testing guide
- Create docs/CI-CD.md CI architecture document
- Add README.md to 6 test subdirectories
- Add 17 BATS unit tests for lib/hook-helpers.sh functions
- Wire orphaned tests into runners (run-all.sh + validate.yml)

Issues: na-xjw.1, na-xjw.2, na-xjw.3, na-xjw.4, na-xjw.5, na-xjw.6, na-xjw.8, na-xjw.10
2026-03-05 10:37:45 -05:00
Boden Fuller aef2ecd6db feat(goals+scripts): add release cadence gate + refresh achieved directives (na-grf)
- Add scripts/release-cadence-check.sh: warn <7d, block <1d, --security bypass
- Wire cadence check into ci-local-release.sh Phase 2 parallel checks
- Add release-cadence goal gate in GOALS.md (weight 3)
- Mark D3 (cross-runtime test) and D4 (flywheel proof) as achieved
- Add D7 (enforce release cadence in pre-release gate)
- Fix stale CI job count in CLAUDE.md: 14 → 24 jobs
2026-03-03 21:19:23 -05:00
Boden Fuller 86aa0e4efd feat: add ao mind command and standardize skill YAML frontmatter
Integrate mind knowledge graph tool as `ao mind` subcommand (scan,
normalize, link, index, all, graph) wrapping python3 -m mind. Update
all 9 skill output templates to emit standardized YAML frontmatter
(id, type, date) with source wikilinks for RPI chain skills. Mirror
all changes to skills-codex/ for parity.

Also includes: hooks coverage test updates, go-complexity precommit
guard, ci-local-release allowlist fix, and new integration/lint tests.
2026-02-26 11:54:10 -05:00
Boden Fuller 9c64d21010 chore: align ci-local gate with current ao commands
- update ci-local smoke commands to current ao CLI surface

- harden shell/danger scans against .claude worktree noise

- update AGENTS CI parity docs for codex-runtime-sections
2026-02-26 11:29:29 -05:00
Boden Fuller 6f619afb44 ci: add codex-runtime-sections validation job
New CI job validates codex skills against residual marker allowlist.
Updated summary job to include new gate.
2026-02-26 11:02:23 -05:00
Boden Fuller 3299fd4680 fix(doctor): add ~/.codex/ paths, fix stale hints, add CI gate
Doctor was reporting 3 false warnings after the Codex-native migration:
- Plugin check missed ~/.codex/skills/ (only searched ~/.claude/, ~/.agents/)
- Search index hint referenced old flat "ao store rebuild" command
- Version display showed "vv2.18.2" (double v prefix from ldflags)

Also:
- Add check-doctor-health.sh to ci-local-release.sh Phase 2
- Fix make install to run build first (ensures embedded sync)
- Add formatVersion unit test
2026-02-26 06:56:12 -05:00
Boden Fuller bdf112ba7f feat: align codex skill docs and hook command mappings 2026-02-26 05:48:41 -05:00
Boden Fuller ce431db0f9 fix: unify install scripts — shallow clone, symlinks, consistent UX
- Codex installer: --depth 1 clone, symlinks instead of copies,
  find -L verification, consistent "git pull" update message
- OpenCode installer: --depth 1 clone, find -L fix for skill count
- All docs updated to curl one-liner pattern for both runtimes
- CI dangerous-pattern scan excludes install-codex.sh
2026-02-25 21:49:04 -05:00
Boden Fuller c4c6e15d4e test: add comprehensive test coverage for v2.18 release validation
- safety_test.go: 16 functions, 134 cases covering T1-T4 threat model
- goals_subsystem_test.go: 8 functions testing GOALS.md parsing, scoring, drift
- ratchet_subsystem_test.go: 18 functions testing gates, chains, validation
- workflow_integration_test.go: 4 cross-command workflow tests
- flag_matrix_test.go: 6 functions, 58 cases testing --json/--help/invalid flags
- test-hook-lifecycle.sh: 43 lifecycle simulation tests
- test-v218-commands.sh: 32 functional CLI command tests
- release-smoke-test.sh: 102 assertions covering all ao commands
- CI: add cli-integration job to validate.yml
- Wire release-smoke-test.sh into ci-local-release.sh Phase 5
2026-02-25 08:44:19 -05:00
Boden Fuller 87e14a2da5 fix(memrl): complete 6 follow-up items from ag-2s4 post-mortem
1. Remove dead anti-pattern-only functions from close-loop (tech-debt)
2. Extend ao dedup to scan .agents/patterns/ (improvement)
3. Add --merge flag to ao dedup for automated cleanup (improvement)
4. Add ao contradict command for contradiction detection (improvement)
5. Add MemRL feedback loop health check to CI (process-improvement)
6. Reduce updateMarkdownFrontMatter complexity 15→≤5 (tech-debt)
2026-02-24 20:29:19 -05:00
Boden Fuller c27d520665 fix(ci): add cleanup trap, job throttling, and --jobs flag to local release gate
Background processes leaked on Ctrl+C — added trap handlers for INT/TERM/EXIT
that kill all spawned PIDs and remove temp dirs. Capped parallel jobs at half
CPU cores (min 4) with a throttle loop to prevent CPU saturation. Added --jobs
flag to override. Removed -v from background go test -race (noise in bg jobs).
2026-02-24 18:57:42 -05:00
Boden Fuller e199ecae04 Execute ag-30x wave 2/3 beads and close epic 2026-02-24 14:32:15 -05:00
Boden Fuller 273e0bd9c3 fix: address all 6 post-mortem findings from TDD hardening
Post-mortem council flagged 6 items. All resolved:

1. Clean dead code in measure_test.go — removed longOutput variable,
   order variable, fixed byte-vs-rune assertion to use len([]rune())
2. Add goleak for goroutine leak detection — replaces fragile
   runtime.NumGoroutine + sleep heuristic with deterministic check
3. Assert AntiStars values in goals_init_test.go — not just count
4. Fix ci-local-release.sh invocation: ./scripts/ not bash scripts/
5. Add MigrateV1ToV2 and killAllChildren package-level tests —
   previously at 0% coverage in internal/goals
6. Fix goroutine leak in rpi_status.go — same signal.Stop-without-close
   pattern found by audit of all signal.Notify sites (1/3 leaking)
2026-02-24 11:46:47 -05:00
Boden Fuller 03c4849795 fix(goals): goroutine leak, nil Process guard, and TDD coverage expansion
TDD approach: wrote tests first proving 2 bugs (goroutine leak in
runGoals signal handler, nil pointer panic in configureProcGroup Cancel
closure), then fixed them. Added 15 new test cases covering detectGates,
buildInteractiveGoalFile, directivesFromPillars, and multi-byte rune
truncation. Wired check-skill-flag-refs.sh into release gate. Deleted
untracked cli/AGENTS.md (redundant with ~/gt/AGENTS.md).
2026-02-24 11:20:53 -05:00
Boden Fuller e3b0be9dad fix: local CI gate — exclude test files from secret scan, drop --require-tools
Secret scan was matching `secretFile` in _test.go files and .claude/worktrees/.
Security gate was failing on missing hadolint (no Dockerfiles in repo).
2026-02-22 17:24:27 -05:00
Boden Fuller 1a78c745b4 prune goals 83→25, add trust-and-prove track specs
Council consensus: feature saturation reached. Removed 58 grep-for-string,
file-exists, and keyword-in-README goals. Kept only goals guarding real
mechanical invariants. Added Track 1 (RPI orchestrator stabilization) and
Track 2 (flywheel proof) evolution cycle specs.

Also includes pending security hardening, workflow fixes, and script cleanup.
2026-02-21 21:23:53 -05:00
Boden Fuller 37d4b5b2ae Merge branch 'codex/rpi-supervisor-cli' into main 2026-02-21 19:41:50 -05:00