Skip to content

release: v0.1.2#25

Merged
brettdavies merged 4 commits intomainfrom
release/v0.1.2
Apr 21, 2026
Merged

release: v0.1.2#25
brettdavies merged 4 commits intomainfrom
release/v0.1.2

Conversation

@brettdavies
Copy link
Copy Markdown
Owner

Summary

Release branch for v0.1.2. Cherry-picked from dev:

Plus the standard release-branch mechanics: Cargo.toml bump to 0.1.2, Cargo.lock refresh, regenerated CHANGELOG.md (git-cliff from squash-commit ## Changelog bodies). Completions had no drift this cycle — CLI surface unchanged.

Type of Change

  • feat: new user-visible capabilities (three behavioral checks + confidence field + dual-layer coverage stat)

Testing

  • All tests passing on dev head before cherry-pick (41 / 41)
  • Pre-push hook green on release branch: fmt / clippy -Dwarnings / test / cargo-deny / Windows compat
  • Coverage matrix drift check passes against the committed artifacts
  • Smoke-tested against rg / bat / bird / xr / anc itself

Files Modified

See the two cherry-pick bodies (commits 72ca148 and 2fcb08d) plus CHANGELOG.md + Cargo.toml + Cargo.lock for the release mechanics.

Deployment Notes

Post-merge:

  1. Annotated tag + push — git tag -a -m "Release v0.1.2" v0.1.2 && git push origin main --tags.
  2. Tag push triggers release.ymlcargo publish (Trusted Publishing) → GitHub Release (draftless, make_latest: false during bottle window) → Homebrew dispatch → finalize-release flips make_latest: true.
  3. Follow-on on agentnative-site: install v0.1.2, regenerate the 10 committed scorecards (H3's proven workflow), run scripts/sync-coverage-matrix.sh to pull dual_layer: 7 into src/data/coverage-matrix.json.

Breaking Changes

  • No breaking changes. Scorecard schema stays at 1.1; confidence on results and dual_layer on matrix summary are additive.

Checklist

  • CI-equivalent gates green locally
  • Cherry-picks touched no guarded paths (docs/plans/, docs/solutions/, docs/brainstorms/, docs/reviews/)
  • Cargo.toml version matches the tag this branch will produce
  • CHANGELOG entries reflect user-facing changes only

## Summary

Small post-release doc sync against what actually shipped in v0.1.1.
Not tied to the next release — lands on \`dev\` for the next release
branch to cherry-pick whenever it cuts.

Two files touched:

- **\`README.md\`** — refreshed the sample dogfood output. The block at
line 82 showed \`30 checks: 20 pass, 8 warn, 0 fail, 2 skip, 0 error\`,
  which was accurate pre-v0.1.1. After the P1 applicability gate fix
  landed, current state is \`30 checks: 26 pass, 2 warn, 0 fail, 2 skip,
0 error\`. Just the sample output; check count and structure unchanged.

- **\`AGENTS.md\`** — closed a real drift. The \"Adding a New Check\"
  section listed the \`Check\` trait methods as \`id()\`, \`group()\`,
  \`layer()\`, \`applicable()\`, \`run()\` — missing \`covers()\` which
  landed in v0.1.1. New contributors adding a check without \`covers()\`
  would silently not appear in the coverage matrix. Also added the
  \`cargo run -- generate coverage-matrix\` regeneration step. Project
  Structure list gained \`src/principles/registry.rs\` and
  \`src/principles/matrix.rs\`. Cross-references CLAUDE.md for the full
  conventions (registry rules, drift detector, artifact lifecycle).

## Changelog

### Documentation

- Document the \`covers()\` trait method and the coverage-matrix
  regeneration step in the \"Adding a New Check\" guide.
- Refresh README sample output to match v0.1.1 dogfood behaviour.

## Type of Change

- [x] \`docs\`: Documentation update

## Related

- v0.1.1 feature PR:
[#21](#21) —
introduced
\`covers()\`, \`src/principles/registry.rs\`, and \`anc generate
coverage-matrix\`.
- CLAUDE.md already has the full registry + drift-detector conventions
(landed in that PR);
this PR just makes AGENTS.md point at them so contributors hit it from
the right entry doc.

## Testing

- [x] Confirmed README sample output matches \`cargo run -- check .\` on
main at commit 5400c43.
- [x] AGENTS.md additions are factual (no change to behavior).
- [x] CLAUDE.md and RELEASES.md reviewed — already current, no edits
needed.

## Files Modified

- \`AGENTS.md\` — 9 insertions, 1 deletion.
- \`README.md\` — 1 insertion, 1 deletion.
## Summary

Ships the three behavioral checks and shared `HelpOutput` cache promised
for v0.1.2 H4:

- `p1-flag-existence` — second behavioral proof of
`p1-must-no-interactive` alongside `p1-non-interactive`
- `p1-env-hints` — behavioral layer over source-only
`p1-env-flags-source`
- `p6-no-pager-behavioral` — behavioral layer over source-only
`p6-no-pager`

All three consume a single `HelpOutput` per target, so the binary's
`--help` is spawned once per run regardless of how many checks inspect
it. Each check declares `covers()` against an existing registry ID — no
new requirement IDs land in this PR, only new verifiers. Three
requirements move from single-layer to dual-layer coverage (dual-layer
count: 4 → 7).

Also carries an unrelated chore: raising
`required_approving_review_count` from 0 → 1 on the `main` branch
ruleset, committed as the first commit of the branch.

## Changelog

### Added

- Add `p1-flag-existence` behavioral check — passes when `--help`
advertises a non-interactive gate flag (`--no-interactive`, `--batch`,
`--headless`, `-y`, `--yes`, `-p`, `--print`, `--no-input`,
`--assume-yes`). Skips when the target already satisfies P1 via
help-on-bare-invocation or stdin-primary.
- Add `p1-env-hints` behavioral check — passes when `--help` exposes
clap-style `[env: FOO]` bindings for flags. Emits medium confidence; the
heuristic covers the canonical but not the only env-binding format.
- Add `p6-no-pager-behavioral` behavioral check — passes when
`--no-pager` is advertised in `--help`. Skips when no pager signal
(`less` / `more` / `$PAGER` / `--pager`) appears. Emits medium
confidence.
- Add `confidence` field to every scorecard result (`high` / `medium` /
`low`). Additive; v1.1 consumers feature-detect.
- Add `dual_layer` count to the coverage matrix summary so the headline
prose surfaces how many covered requirements have verifiers in two
layers.

### Changed

- Raise required approving review count on `main` branch from 0 to 1.

### Documentation

- Regenerate `docs/coverage-matrix.md` + `coverage/matrix.json` to pick
up the three new behavioral verifiers.

## Type of Change

- [x] \`feat\`: New feature (non-breaking change which adds
functionality)

## Testing

- [x] Unit tests added/updated
- [x] Integration tests added/updated
- [x] Manual testing completed
- [x] All tests passing

**Test Summary:**

- Unit + integration tests: 41 passing (up from 35 — 6 tests added for
the new checks, plus additional HelpOutput parser coverage).
- Pre-push hook (mirrors CI): fmt, clippy -Dwarnings, test, cargo-deny,
Windows compat — all green.
- Smoke-tested against `rg`, `bat`, `bird`, `xr` via `anc check
--command`; all new checks produce sensible verdicts.
- Dogfood: `anc check .` on the agentnative repo produces Pass or Skip
(no Warn) for all three new checks.

## Files Modified

**Created:**

- `src/runner/help_probe.rs` — `HelpOutput` cache with lazy `flags()`,
`env_hints()`, `subcommands()` parsers.
- `src/checks/behavioral/flag_existence.rs`
- `src/checks/behavioral/env_hints.rs`
- `src/checks/behavioral/no_pager_behavioral.rs`

**Modified:**

- `src/runner.rs` → `src/runner/mod.rs` (promoted to a module directory
so `help_probe` can live alongside `BinaryRunner`).
- `src/project.rs` — lazy `help_output()` accessor on `Project`
(OnceLock, same pattern as `parsed_files`).
- `src/types.rs` — `Confidence` enum + `CheckResult::confidence` field.
- `src/scorecard.rs` — serialize `confidence` on every result view.
- `src/principles/matrix.rs` — `dual_layer` stat + surfaced in summary
prose.
- `src/checks/behavioral/mod.rs` — register the three new checks.
- `docs/coverage-matrix.md` + `coverage/matrix.json` — regenerated.
- `.github/rulesets/protect-main.json` — raise required approving review
count on `main`.
- 34 existing check files gain `confidence: Confidence::High,` in their
`CheckResult` construction — mechanical, no semantic change.

## Key Features

- One `--help` probe per target regardless of how many checks consume
it. Runner caching means `p1-flag-existence` and
`p6-no-pager-behavioral` share state without explicit plumbing.
- Dual-layer coverage growth: three requirements now have both
behavioral and source/project verifiers, halving the single-layer bucket
for P1 and P6 MUSTs.

## Breaking Changes

- [x] No breaking changes

## Deployment Notes

- Post-merge, regenerate the 10 committed scorecards on
`agentnative-site` (H3's proven workflow) once v0.1.2 is released to
crates.io + Homebrew. Matrix sync (`scripts/sync-coverage-matrix.sh`)
picks up the new `dual_layer` field automatically.

## Checklist

- [x] Code follows project conventions and style guidelines
- [x] Commit messages follow [Conventional
Commits](https://www.conventionalcommits.org/)
- [x] Self-review of code completed
- [x] Tests added/updated and passing
- [x] No new warnings or errors introduced
- [x] Changes are backward compatible
@brettdavies brettdavies merged commit 888a8d8 into main Apr 21, 2026
9 checks passed
@brettdavies brettdavies deleted the release/v0.1.2 branch April 21, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant