# Payment Plan Parity Audit — 2026-04-02 (Focused Pass)

## Scope of this pass
This pass stayed tightly focused on validating the newly merged **admin cart item-level payment-plan** slice and then identifying the smallest next parity step around schedule-code fidelity.

## Blocking discovery (repo/source-of-truth mismatch)
Before executing the manual QA matrix, I verified the expected source-of-truth artifacts and payment-plan code paths in this checkout.

### What was checked
- Expected audit/source documents:
  - `docs/audit/payment-plan-parity-audit-2026-04-02.md`
  - `docs/agents.md`
- Expected implementation surfaces for the merged admin-cart payment-plan slice:
  - Admin cart item-level payment plan selection
  - Checkout metadata propagation
  - Scheduled payment persistence (`scheduled_payments`)

### Findings
- `docs/agents.md` is not present in this checkout.
- No payment-plan/cart/checkout scheduled-payment implementation paths were found in `app/`, `resources/`, `routes/`, `tests/`, or `database/`.
- No legacy schedule code tokens (e.g. `MONTHLY_1`, `WEEKLY_MON`) were found in this checkout.

Because those artifacts are absent from this branch, end-to-end validation of the “newly merged admin cart slice” cannot be executed here.

## Manual QA results (current checkout)

> Result summary: **blocked due to missing implementation and missing source-of-truth doc(s) in this repository snapshot**.

### QA matrix requested vs status
1. Item-level `payment_plan_id` selection in admin cart  
   - **Status:** Blocked (no corresponding admin cart payment-plan code found).
2. First-payment pricing changes on selection  
   - **Status:** Blocked (no pricing/payment-plan code paths found).
3. Selection persists through cart/session reload  
   - **Status:** Blocked (no cart payment-plan persistence code found).
4. Checkout carries plan metadata correctly  
   - **Status:** Blocked (no checkout payment-plan metadata path found).
5. `scheduled_payments` rows created/visible after checkout  
   - **Status:** Blocked (no `scheduled_payments` model/migration/query/test surface found).

## Exact manual/CLI verification steps run
Use this as a reproducible checklist to confirm environment parity before the next pass:

1. Confirm expected docs exist
   - `rg --files -g '*.md'`
2. Confirm expected audit/agents paths
   - `find . -maxdepth 4 -type f | rg 'payment-plan-parity|agents\.md|audit'`
3. Inspect payment/schedule code surfaces
   - `rg -n "payment_plan|scheduled_payment|cart|checkout|MONTHLY_1|WEEKLY_MON|payment" app routes resources tests database`
4. Confirm repository footprint for likely implementation areas
   - `find . -maxdepth 3 -type d`

## Newly discovered gaps/regressions
1. **Missing source doc gap:** `docs/agents.md` is absent from this checkout.
2. **Missing implementation gap:** No detectable payment-plan/scheduled-payment implementation exists in this checkout.
3. **Missing parity baseline gap:** Legacy schedule-code tokens are absent, so fidelity comparison cannot yet be performed.

## Tighter pre-demo checklist (end-to-end scheduled-payment behavior)
Before demoing parity behavior, verify all of the following in the target branch/environment:

1. Source-of-truth docs present
   - `docs/agents.md`
   - latest parity audit doc
2. Admin cart item-level payment plan UX wired
   - select/update `payment_plan_id` per item
   - immediate first-payment pricing refresh
3. Session/cart persistence
   - reload keeps selected plans
4. Checkout payload fidelity
   - item-level plan metadata survives order creation
5. Scheduled payments persistence
   - `scheduled_payments` rows written at checkout
   - admin visibility/query path exists
6. Schedule-code parity bridge
   - legacy codes (`MONTHLY_1`, `WEEKLY_MON`, etc.) map deterministically to DSM-Next interval model
   - mapping is covered by focused unit tests

## Next narrow slice (highest-value parity step)
Given the current checkout state, the safest next slice is **repository/environment alignment**, then schedule-code bridge work.

### Recommended very next PR
1. Restore/sync the expected source-of-truth artifacts and payment-plan branch content into this repo snapshot (no redesign, no schema changes).
2. Add a narrow schedule-code mapping layer only:
   - Input: legacy schedule tokens (e.g., `MONTHLY_1`, `WEEKLY_MON`)
   - Output: current simplified interval representation
   - Behavior: deterministic mapping + explicit unsupported-code handling
3. Add unit tests for each supported legacy token and unsupported fallback behavior.

If/once those files exist in the working tree, the subsequent pass should execute the full requested admin-cart manual QA matrix and record exact pass/fail evidence.
