# AGENT-PROMPT-v5-P1-1b — Piece D mapping amendment: D-M3-A+ approval

**Date:** 2026-08-07
**Follows:** `docs/AGENT-PROMPT-v5-P1-1b-piece-d-mapping-amendment-b-approval.md`,
`docs/p1-1b-status.md` ("2026-08-07 Piece D D-M2-A ordered instruction 3 — item-8
collision, clean stop at D-M3"), and `docs/PROJECT-STATE.md`
**Authority:** Miguel
**Stage:** governed records only

## Decision: D-M3-A+ approved; D-M3 closed

Miguel's exact approval sentence, recorded verbatim:

> Aprovo D-M3-A+

This explicitly selects **D-M3-A+** as the binding amendment to Piece D item 8's standalone test
and closes D-M3. The amended contract is:

1. The fixture is an imported `DOCFLG` row: `ImportEvidenceRowId IS NOT NULL`.
2. It is terminal: `Status='Resolved'`.
3. It begins with `ResolutionEvidence IS NULL` under the accepted O9-D5 historical exemption.
4. The owner-level forged-GUC probe proves two ordered assertions in one transaction that is rolled
   back:
   1. The first direct `UPDATE`, from `NULL` to a non-null evidence value, succeeds with the forged
      `sibyla.docflg_evidence_append_id` matching `FlagInstanceID`. This is the real accepted bypass
      and remains contained only by the item-3/item-8 effective roster proving zero
      non-owner/non-superuser direct `DOCFLG` DML reachability.
   2. The second direct `UPDATE`, attempting to replace the now-populated evidence with another
      value while the same forged GUC remains set, fails with SQLSTATE `23514` and exact message
      `terminal DOCFLG rows are append-only`. This proves the accepted bypass permits only a single
      first append and does not permit overwrite.
5. The existing exact audit/provenance post-state assertions remain binding at the correct
   checkpoints: the raw direct first append creates no `P11aCommandAudit` command row;
   `RegistryFieldProvenance` remains the same single `ItemClass` provenance row unchanged; and the
   failed second update leaves the first appended value intact. The entire transaction is rolled
   back.
6. No accepted object changes. `RejectTerminalDOCFLGMutationFn` remains byte-identical. No
   migration, DDL, `src/`, test, fixture implementation, helper, importer, Scope 1, O5, shared/live
   database, or container work is authorized by this records commit.
7. D-M3 is closed by D-M3-A+. Piece D still has no candidate. Ordered instruction 3 TDD may resume
   only after this exact records commit is independently reviewed, committed, and pushed; TDD then
   starts fresh from that pushed tip. Scope 1 remains unauthorized until Piece D receives a fresh
   independent **Accept**.

The prior item-8 fixture started terminal with `ResolutionEvidence` already populated and expected a
successful overwrite. The latest focused attempt proved that shape impossible under the accepted
`RejectTerminalDOCFLGMutationFn`: its narrow exception requires
`OLD."ResolutionEvidence" IS NULL AND NEW."ResolutionEvidence" IS NOT NULL`, in addition to an
imported terminal row, the matching forged GUC, and every other column remaining unchanged. This
amendment changes the test fixture and ordered assertions, not the accepted function.

## Ordered execution authority

Piece D still has no candidate. Ordered instruction 3 is re-authorized **only after** the records
commit containing exactly this approval document, `docs/p1-1b-status.md`, and
`docs/PROJECT-STATE.md` is independently reviewed, committed, and pushed. TDD must then start
fresh from that pushed tip and implement only D-M3-A+ together with the otherwise-unchanged approved
Piece D mapping, Option A, and D-M2-A.

This records stage does not itself authorize starting TDD, running a build, test, database, or
container, or touching any implementation path. It does not authorize ordered instruction 4
separately; after a candidate is produced under ordered instruction 3, the existing fresh
independent integration-focused Accept/Reject review remains required.

## Scope and non-goals

This is a records-only approval. It does not create a Piece D candidate or Accept, authorize Scope
1, alter any accepted migration or schema object, reopen any baseline or prior decision, change the
prototype pin, perform O5 work, or update project evolution. The D-M3 stop remains intact as
historical evidence; D-M3-A+ is now the operative item-8 mapping. This records approval and its
authorization do not authorize a merge; no merge is authorized.

## Ordered authority and records instruction

For current state, `docs/PROJECT-STATE.md` remains authoritative. For the Piece D execution
contract, read the Piece D go-ahead and approved mapping, the Option A amendment that closed D-M1,
the D-M2-A amendment that closed D-M2, then this D-M3-A+ amendment. This document supersedes only
the prior item-8 standalone fixture and assertion shape that caused D-M3.

The exact versioned path set for this records commit is:

1. `docs/AGENT-PROMPT-v5-P1-1b-piece-d-mapping-amendment-c-approval.md`
2. `docs/p1-1b-status.md`
3. `docs/PROJECT-STATE.md`

No other versioned path belongs to this records stage.
