Skip to content

docs(adr): ADR-0014 Engine::reconcile_commit design#68

Merged
UnbreakableMJ merged 2 commits into
mainfrom
adr-0014-reconcile-commit-design
May 6, 2026
Merged

docs(adr): ADR-0014 Engine::reconcile_commit design#68
UnbreakableMJ merged 2 commits into
mainfrom
adr-0014-reconcile-commit-design

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Summary

ADR-0014 resolves the three architectural questions blocking the M4 W1 remainder (reconcile_commit + --commit / --adopt-all). Doc-only PR; no code.

The three decisions, all subject to maintainer review:

  • Drift threshold (rules 1-3): pooled default of 5 across pacman / cargo / services / config-files, mirroring ADR-0011s prune pattern. Override via --commit-threshold N; bypass via --adopt-all. Enforced at the CLI boundary.
  • Prompt UX (rules 4-6): per-item TTY menu [y/N/a/s/q]. Non-interactive contexts (no TTY, or AI_AGENT=1) without --adopt-all refuse with RECONCILE_REQUIRES_INTERACTIVE to prevent silent mass-adoption. Env-var detection helper ships partial in M4 (TTY + AI_AGENT only) and full in M5 W2.
  • ReconciliationEntry schema (rules 7-9): extend with adopted: Vec<String> and skipped: Vec<String> rather than break the unit-variant ReconciliationAction enum. Additive deserialization keeps pre-ADR entries valid (vectors default to []). Fresh Uuid::now_v7() per commit; package_count is the audit denominator (items considered, not items adopted).

Why an ADR before code

CLAUDE.md says default to refusing the change rather than guessing on architecture. Threshold defaults, prompt semantics, and state.toml schema shape are exactly the kinds of decisions that should land in docs/adr/ first; the PR review IS the approval.

Files

  • New: docs/adr/0014-reconcile-commit-design.md (156 lines, mirrors ADR-0011 / ADR-0013 format).
  • Update: docs/adr/README.md -- one row added to the Active ADRs catalog table.

Test plan

  • CI: T1 lint passes (no Rust diff -- T2/T3 likely skipped on docs-only changes).
  • Maintainer review of the three decisions; redirect any rule before the implementation PRs.
  • Render check: bat docs/adr/0014-reconcile-commit-design.md looks clean; gh pr view 68 --web markdown preview is faithful.

Out of scope

  • Engine::reconcile_commit implementation -- separate PR after this ADR lands.
  • CLI flags --commit / --adopt-all -- separate PR.
  • M5 env-var detection arms -- already scheduled for M5 W2.
  • vm-11 / vm-12 / vm-13 -- M4 W2.

Refs: PRD §7.3, PRD §11, Plan §7.5; precedents ADR-0010, ADR-0011, ADR-0013.

🤖 Generated with Claude Code

UnbreakableMJ and others added 2 commits May 5, 2026 10:44
Resolves the three architectural questions blocking the M4 W1
remainder (reconcile_commit + --commit / --adopt-all CLI flags):

1. Drift threshold: pooled default of 5, mirrors ADR-0011s prune
   pattern. Override via --commit-threshold N; bypass via
   --adopt-all. Enforced at the CLI boundary, not the engine.
2. Prompt UX: per-item TTY menu (y/N/a/s/q). Non-interactive
   without --adopt-all refuses with RECONCILE_REQUIRES_INTERACTIVE
   to prevent silent mass-adoption.
3. ReconciliationEntry: extend with adopted / skipped Vec<String>
   fields rather than break the unit-variant enum. Additive,
   backward-compatible deserialization for pre-ADR entries.

Catalogs the new entry in docs/adr/README.md.

Refs: PRD §7.3, PRD §11, Plan §7.5

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit ff01c8b into main May 6, 2026
3 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the adr-0014-reconcile-commit-design branch May 6, 2026 23:40
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