DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path change-requests/cr-2026-177-loomworks-manifestation-preview-metering-v0_1.md

DUNIN7-M4 — INFRASTRUCTURE CHANGE REQUEST

CR-2026-177 — Manifestation preview is unmetered: spend context accepted and dropped (v0.1)

Version. 0.1 · Date. 2026-08-06 · Author. Claude.ai (drafting) / Marvin Percival (approving). Target. /Users/dunin7/loomworks-engine, branch main. Baseline. Post CR-2026-176. CC confirms exact HEAD at Step 0. Companion to. inspection-briefs/loomworks-b32-findings-v0_1.md, where this was found while investigating something else. Charter. Autonomous regime. Status. Ready for CC execution. Priority. Ahead of B-32 (Wave 3) — B-32's premise depends on this.


1. Summary

preview_manifestation accepts a spend context at engagement/manifestation.py:400 and never forwards it (dropped at :463-467). The Manifestation LLM call is therefore unmetered today, and the route's own 402 handler is unreachable — it cannot fire because nothing ever reports insufficient credit on this path.

It survived because the credit gate is unit-tested directly and never through this route.

Why this comes before B-32. B-32 would build a spend-consent screen in front of this call. Asking permission for a spend that never happens is worse than asking nothing — it would be a false claim to the user, in a product whose posture is that claims should be checkable.


2. Scope

Fix. Forward the spend context from :400 through to the LLM call site at :463-467, so the existing gate actually runs on this path.

Test — the important part. A test that exercises metering through this route, not against the gate directly. The defect's whole cause was route-level coverage absent while unit-level coverage passed. Two cases minimum: sufficient credit (call proceeds, spend recorded) and insufficient credit (402 returns — proving the handler is now reachable).

Audit for siblings. Any other call site that accepts a spend context and drops it the same way. Report what's found; fix only if identical in shape and trivially so. Anything structurally different gets reported for its own CR, not absorbed here.


3. Behavior change — named explicitly

This starts charging for something currently free. Manifestation previews consume credit after this lands where they did not before. That is the correct state — the metering was always intended, it just never ran — but it is a live behavior change for anyone using the product today, and it should not land silently.

No mitigation is proposed (no grace period, no announcement) because the current behavior is a defect, not a granted allowance. Named here so the Operator can object before the checkpoint if they see it differently.


4. Out of scope


5. Build steps

| Step | What | Mode | |---|---|---| | 0 | Pre-flight — confirm baseline HEAD, tree clean. | Auto | | 1 | Forward the spend context; confirm the gate runs. | Auto | | 2 | Route-level metering tests, both cases (sufficient / insufficient). | Auto | | 3 | Audit for sibling drop-the-context sites. Fix only if identical and trivial; otherwise report. | Auto | | 4 | Full engine suite; ruff 0; mypy at/below baseline. | Auto | | A | Checkpoint — behavior change; Operator confirms knowingly. | Checkpoint | | 5 | Tag cr-2026-177-manifestation-preview-metering. Push. | Auto |


6. Acceptance gate

  1. Spend context reaches the LLM call; gate runs on this path.
  2. Route-level test proves 402 is now reachable — this is the acceptance criterion that matters most, since unreachability was the defect.
  3. Sibling audit reported, whether or not anything was found.
  4. Full suite green, both gates clean.

7. Kickoff prompt


Execute CR-2026-177 v0.1 at ~/Downloads/cr-2026-177-loomworks-
manifestation-preview-metering-v0_1.md. Confirm the CR number against
the ledger first.

Live defect found during Wave 0's B-32 investigation: preview_manifestation
accepts a spend context at engagement/manifestation.py:400 and drops it
at :463-467. The Manifestation LLM call is unmetered today and the
route's 402 handler is unreachable.

The test matters as much as the fix. This survived because the credit
gate is unit-tested directly but never through this route — so Step 2's
tests must exercise metering THROUGH the route, both sufficient and
insufficient credit, proving 402 can now fire.

Step 3: audit for other sites that accept a spend context and drop it.
Fix only if identical in shape and trivially so; report anything
structurally different for its own CR.

Note at checkpoint: this starts charging for something currently free.
That's intended and named in the CR's §3, but flag it in your report
so the Operator confirms knowingly.

Baseline: post CR-2026-176. Confirm current HEAD at Step 0.

DUNIN7 — Done In Seven LLC — Miami, Florida CR-2026-177 — Manifestation preview metering — v0.1 — 2026-08-06