Skip to content

feat(agents-audit): land deferred generate display behaviors (META-157) - #23

Merged
qmarcelle merged 1 commit into
mainfrom
feature/meta-157-agents-audit-cli-land-the-two-deferred-generate-display
Jul 25, 2026
Merged

feat(agents-audit): land deferred generate display behaviors (META-157)#23
qmarcelle merged 1 commit into
mainfrom
feature/meta-157-agents-audit-cli-land-the-two-deferred-generate-display

Conversation

@qmarcelle

Copy link
Copy Markdown
Contributor

Summary

Lands the two agents-audit generate CLI display behaviors that were deliberately excluded from the 0.4.4 release (PR #19, governing decision G2) because they're a semantics change (exit code) outside that release's approved scope:

  1. --check + --dry-run drift-gate ordering. Previously --dry-run was checked first, so generate --check --dry-run printed the projection and exited 0 even on drift. Now the drift gate fires first (exit 1, "manual evidence is untouched"), and the JSON projection is still printed under --dry-run.
  2. invalidFileMoved recovery messaging. The generate result has carried an invalidFileMoved field since 0.4.3, but the CLI never surfaced it. Now, when a previous .agents/workspace.json was invalid and moved aside, the CLI prints where it went and that its manual evidence wasn't recovered.

Recovered from the triple-preserved snapshot of feature/vr-639-640-spec-cli-prereqs (2026-07-22 reconciliation): tag preserve/vr-639-640-worktree-2026-07-22, patch docs/audits/worktree-reconciliation/2026-07-22/preservation/tracked-changes.patch (SHA-256 verified), applied fresh on top of current main — the stale branch itself is not being merged.

Closes META-157.

Test plan

  • Both regression tests watched red against pristine main's cli.ts (2 failed / 9 passed) before the implementation
  • Both regression tests green after the implementation (11/11)
  • pnpm -r build
  • pnpm -r typecheck
  • pnpm -r test ✅ — 277 passed, 0 failed (spec 36, cli 6, rules 173, agents-audit 62)
  • Diff scoped to packages/agents-audit/ only — no @workspacejson/spec semantics touched

Two CLI behaviors deferred from the 0.4.4 release (PR #19, gate G2)
because they change exit-code semantics and were out of that
release's approved scope:

- `generate --check --dry-run` now fires the drift gate (exit 1)
  instead of the dry-run branch silently winning and exiting 0. The
  JSON projection is still printed under --dry-run.
- `generate` now surfaces the pre-existing `invalidFileMoved` result
  field: when a previous workspace.json was invalid and moved aside,
  the CLI reports where and that manual evidence could not be
  recovered.

Regression tests watched red against pristine main's cli.ts (2
failing / 9 passing), then green after the implementation (11/11).
Recovered from the triple-preserved 2026-07-22 snapshot
(preserve/vr-639-640-worktree-2026-07-22 tag +
docs/audits/worktree-reconciliation/2026-07-22/preservation/tracked-changes.patch).
Copilot AI review requested due to automatic review settings July 24, 2026 23:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qmarcelle
qmarcelle merged commit e47eb1b into main Jul 25, 2026
2 checks passed
@qmarcelle
qmarcelle deleted the feature/meta-157-agents-audit-cli-land-the-two-deferred-generate-display branch July 25, 2026 08:45
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.

2 participants