Skip to content

feat(state): extend ReconciliationEntry with adopted/skipped vectors#69

Merged
UnbreakableMJ merged 1 commit into
mainfrom
feat/m4-w1-reconcile-entry-fields
May 7, 2026
Merged

feat(state): extend ReconciliationEntry with adopted/skipped vectors#69
UnbreakableMJ merged 1 commit into
mainfrom
feat/m4-w1-reconcile-entry-fields

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Summary

  • Extends pearlite_state::ReconciliationEntry with adopted: Vec<String> and skipped: Vec<String>, both #[serde(default)] so pre-ADR [[reconciliations]] rows deserialize cleanly with empty vectors (ADR-0014 §7).
  • Tightens package_count's docstring to name it explicitly as the audit denominator (ADR-0014 §9).
  • Adds three round-trip tests in reconciliation::tests: legacy entry without decision vectors, populated decision vectors, and AdoptAll with empty skipped.

The ReconciliationAction unit-variant enum (AdoptAll / Interactive / Skipped) keeps its existing TOML shape — purely additive, no migrate() invocation.

First of four PRs landing the M4 W1 reconcile-commit work; subsequent PRs build Engine::reconcile_commit (B), the CLI surface (C), and the vm-11 scenario (D) on top of these new fields.

Test plan

  • cargo test -p pearlite-state --lib — 21/21 passing (3 new).
  • cargo clippy --workspace --all-targets -- -D warnings — clean.
  • cargo run -p pearlite-audit -- check . — 0 violations.
  • CI green.

Refs: ADR-0014, PRD §7.3

🤖 Generated with Claude Code

Adds two `Vec<String>` fields to `pearlite_state::ReconciliationEntry`,
both `#[serde(default)]` so pre-ADR `[[reconciliations]]` rows
deserialize cleanly with empty vectors. Tightens `package_count`'s
docstring to name it as the audit denominator (ADR-0014 §9).

Backfills three round-trip tests in `reconciliation::tests`:
- legacy entry without decision vectors deserializes with empty `[]`,
- populated decision vectors round-trip through TOML,
- AdoptAll with empty `skipped` round-trips.

Schema change is additive; the `ReconciliationAction` unit-variant
enum (AdoptAll / Interactive / Skipped) keeps its existing TOML
representation per ADR-0014 §7.

Refs: ADR-0014, PRD §7.3

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit 0c79680 into main May 7, 2026
3 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the feat/m4-w1-reconcile-entry-fields branch May 7, 2026 15:16
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