100000x · 04 — Full end-to-end proof (Phase D PASS, BEGIN/ROLLBACK)
100000x · 04 — Full end-to-end proof
Phase: D · Status: PASS · Mode: BEGIN/ROLLBACK · Fixture: FIXTURE-NVSZ-PROOF-100000x
Source string: Khoan 1. Day la khoan dau tien.\nKhoan 2. Day la khoan thu hai.
Pre snapshot (inside TX)
phase|staging_rec|staging_pl|vsp|run_rows|iu|dieu28|dieu32|dieu35
pre | 3 | 4 | 152 | 21 | 175 | 27 | 23 | 36
Step 1 — MARK
{
"ok": true,
"lifecycle_status": "pending_review",
"expires_at": "2026-06-10T01:59:45.134733+00:00",
"manifest_digest": "72e01437b1942a99cbe87e2171d06b10",
"staging_record_id": "ab11d44b-6feb-40b9-9049-9dc3af4b2631"
}
Staging row: lifecycle=pending_review · source_kind=system · vector_excluded=t · part_count=3. Payloads: cut_manifest json 796B · mark_report text 85B · coverage_proof json 21B — three-payload contract honored.
Step 2 — VERIFY-MARK (dry-run + apply)
Dry-run: {ok:true, verdict:approved, axis_a_ok:true, axis_b_ok:true, axis_c_ok:true}.
Apply: same verdict; staging row transitions pending_review → approved with approved_at, approved_by=iu-core-100000x-operator, approval_doc_id (this report) all set.
Step 3 — Composer gate toggle (in-TX)
composer_before | f
UPDATE 1
composer_after_open | t
Pattern: [[feedback-in-tx-gate-toggle-reversibility]]. ROLLBACK at the end restores false.
Step 4a — CUT dry-run
{
"ok": true,
"dry_run": true,
"guards_passed": ["G1","G2","G3","G4","G5","G6","G7"],
"pieces_planned": 2,
"run_id": "d24b435f-05ff-4a90-9fc9-4a80662f6022"
}
Step 4b — CUT apply
{
"ok": true,
"applied": true,
"run_id": "ba9f6af4-c5d8-4335-9672-03708724af7c",
"staging_record_id": "ab11d44b-6feb-40b9-9049-9dc3af4b2631",
"pieces_created_count": 2,
"pieces_created": ["b12edb3f-bfeb-4aad-9b47-905bb2f8bad0",
"c86d12f7-486d-4040-912a-7b73d1fd6fc2"]
}
Post-staging: lifecycle=consumed · consumed_at set · consumed_by_run_id=ba9f6af4… · referenced_iu_ids length=2.
New pieces (live):
id | canonical_address | unit_kind | lifecycle | section_type | sort_order | doc_code | root
b12edb3f-bfeb-4aad-9b47-905bb2f8bad0 | FIXTURE-NVSZ-PROOF-100000x-:salt#k1 | design_doc_section | draft | paragraph | 1 | FIXTURE-NVSZ-PROOF-100000x-:salt | t
c86d12f7-486d-4040-912a-7b73d1fd6fc2 | FIXTURE-NVSZ-PROOF-100000x-:salt#k2 | design_doc_section | draft | paragraph | 2 | FIXTURE-NVSZ-PROOF-100000x-:salt | t
Axis A: sort_order dense+monotonic 1,2. Axis B: section_type populated on column. Axis C: both pieces root (no parent_or_container_ref), no orphan.
Step 5 — VERIFY-CUT
{
"ok": true,
"verdict": "verified",
"pieces_count": 2,
"axis_a_ok": true,
"axis_b_ok": true,
"axis_c_ok": true,
"no_vector_ok": true,
"problems": []
}
Step 6 — Cleanup dry-run
cleanup_eligible_rows = 0 (all rows within 15d window; consumed row brand-new).
Step 7 — No-vector + axes
vsp_refs_new_pieces | vsp_total | dieu28 | dieu32 | dieu35
0 | 152 | 27 | 23 | 36
VSP unchanged; DIEU baseline preserved.
Refusal matrix (live, post-Step-4 within same TX)
| Test | Result |
|---|---|
| CUT on already-consumed staging | refusal_code=not_approved ✅ |
CUT with p_source_hash='WRONG_HASH' |
refusal_code=source_changed ✅ |
| CUT with composer gate closed | refusal_code=composer_gate_closed ✅ |
G1 (not_found) and G2 (wrong_kind) covered by Phase B smoke tests against existing sql_snapshot row.
Step 8 — Pre-rollback snapshot
phase | staging_rec | staging_pl | vsp | run_rows | iu
pre_rollback | 6 | 13 | 152 | 33 | 177
(+3 staging rows from MARK fixtures, +9 payloads from 3 MARKs × 3 parts each, +12 audit rows from MARK/verify/cut/refusal calls, +2 IU pieces from CUT apply.)
Step 9 — POST-ROLLBACK snapshot
phase | staging_rec | staging_pl | vsp | run_rows | iu | dieu28 | dieu32 | dieu35 | composer
post_rollback | 3 | 4 | 152 | 21 | 175| 27 | 23 | 36 | false
EXACTLY equals pre. ROLLBACK clean. Zero permanent state pollution.
PASS criteria
| Criterion | Required | Observed | Verdict |
|---|---|---|---|
input_to_staging |
ok:true, lifecycle=pending_review | yes | ✅ |
mark |
1 staging + 3 payloads | yes | ✅ |
verify_mark |
verdict=approved + approval fields set | yes | ✅ |
approve |
lifecycle=approved | yes | ✅ |
cut_from_approved_manifest |
applied:true, pieces_created_count=2 | yes | ✅ |
verify_cut |
verdict=verified, all axes + no_vector ok | yes | ✅ |
cleanup_dry_run_15d |
0 eligible | 0 | ✅ |
no_vector_pollution |
vsp unchanged + 0 refs | 152=152, 0 refs | ✅ |
Why this counts as proof
Every fn called was the live CREATEd function from this macro's apply — not a stub or mock. The only safety wrapper is the outer BEGIN; … ROLLBACK;. Calling these fns outside a TX would mutate state identically. ROLLBACK exists strictly because Phase D must not pollute production state; the same calls against a real Điều 37 source (Phase 1 of next macro) will commit.
Cross-links
- 90000x report 07 (proof template).
- 91000x report 03 (MARK + VERIFY-MARK proof; carry-forward CUT/VERIFY-CUT now closed).
- [[feedback-in-tx-gate-toggle-reversibility]] · [[feedback-honest-channel-block-beats-partial-trigger]].