100000x · 09 — Carry-Forward (memory updates + next macro)
100000x · 09 — Carry-Forward
A. Memory updates from this macro
Refresh
-
[[feedback-fn-iu-create-returns-jsonb-not-uuid]] — correct the result-key reference. Live
fn_iu_createreturnsjsonbwith keyiu_id(NOTid). 90000x memory had(result->>'id')::uuid— wrong; live shows'iu_id', v_iu_idin the function body. Always use(result->>'iu_id')::uuid. -
[[feedback-channel-memory-drifts-verify-live]] — add four new drifts:
information_unit.section_typeis NOT set byfn_iu_create(onlyidentity_profile->>'primary_section_type_ref'); callers must follow-up withUPDATE.section_typeCHECK vocab is the 13-item set{appendix, article, changelog, checklist, definition, governance_process, heading, instruction_block, paragraph, principle, process, section, technical_spec}.clauseis INVALID for section_type (valid forpiece_roleonly).iu_core.iu_staging_record.source_kindCHECK vocab is{agent, user, system, import}.fixtureis INVALID; usesystem.referenced_iu_idsisuuid[]; subqueries that return the array column don't combine withid = ANY(...); useIN (SELECT unnest(col) FROM ...).
New
-
[[feedback-fn-iu-create-no-column-writes-for-sort-section-doc]] —
fn_iu_createwrites onlyid, canonical_address, unit_kind, owner_ref, created_by, updated_by, identity_profile, parent_or_container_ref(plus version anchor). It does NOT populatesort_order, section_type (column), section_code, doc_code. Cut/composer fns must follow up withUPDATE information_unit SET …to set those columns. Proven 100000x mig 040R 2026-05-26. -
[[feedback-iu-piece-membership-role-vocab-seven]] —
iu_piece_membership.piece_roleCHECK vocab is{title, intro, body, step, clause, appendix, reference}(7 roles).clauseis VALID here (and only here); distinct fromsection_typevocab oninformation_unit. -
[[feedback-cut-from-manifest-g7-via-composer-enabled-config-key]] — G7 composer gate reads
dot_configrowkey='iu_core.composer_enabled' value='true'. In-TX toggle (UPDATE dot_config…) is safe and reverts on rollback. Operator must close after a real cut. Proven 100000x report 04. -
[[project-iu-core-100000x-reauthor-apply-cut-verify-full-proof-pass-2026-05-26]] — project memory for this macro.
B. Code/SSOT bumps for operator commit (deferred)
100000x did NOT bump SSOT or pinning tests. Per [[feedback-pinning-tests-bump-per-macro]] discipline, the operator commit that wraps this macro should include:
| File | Change |
|---|---|
cutter_agent/iu_core/dot_commands.py::_REGISTRY |
+2 entries: dot_iu_cut_from_manifest (category=piece, mutating=true, reversible=true) and dot_iu_verify_cut_result (category=health, mutating=false, reversible=false) |
D9 conformance test (e.g. tests/conformance/test_d9_object_count.py) |
bump expected public_fns 500→502, dot_catalog 34→36 |
| Pinning tests (per macro discipline) | update 15+ sites referencing dot_catalog rows count |
Single commit recommended. PR title suggestion: iu-core(100000x): add fn_iu_cut_from_manifest + fn_iu_verify_cut_result + DOT catalog.
C. Next macro — 110000x first real Điều 37 cut
Use the runbook in report 08. Recommended scope for 110000x:
- Operator supplies real Điều 37 source (text or file).
- Author manifest with proper canonical_addresses, sort_orders, parent_or_container_refs.
- Run MARK → VERIFY-MARK → APPROVE → CUT → VERIFY-CUT live (NOT BEGIN/ROLLBACK).
- Healthcheck: piece count, lifecycle, axes, no-vector.
- Optional: create an
iu_piece_collectionof kindcutand add memberships viafn_iu_collection_add_pieceto surface in collection views. - KB report under
…/v0.6-iu-core-110000x-first-real-dieu37-cut/.
D. Surfaces still preserved (re-confirmed for safety)
| Surface | Why preserved |
|---|---|
production_documents |
mission rule + structurally absent in directus DB |
| Qdrant collections | mission rule + zero outbound calls from new fns |
| Nuxt deployment | mission rule |
iu_core.retention_enabled gate |
unchanged (false) |
iu_core.composer_enabled gate |
restored to false post-proof |
| PR #669 | untouched |
| 037-039 fn bodies | unchanged (no CREATE OR REPLACE on existing) |
| 25000x mig 033 auto-instantiate | unchanged |
DOT/D9 SSOT (cutter_agent) |
NOT bumped (deferred to operator commit) |
| Pinning tests | NOT bumped (paired with SSOT) |
E. Lessons (one-line each)
- Live signature survey is cheap and saves a re-author cycle — 50 LOC of
pg_proc/information_schema.columnsintrospection before authoring catches every drift the macro charter foresaw. - plpgsql defers SQL-stmt resolution → smoke-test refusal paths immediately — 90000x mig 040 was authored CREATE-clean but would have crashed at first apply on
payload_jsoncolumn missing. 100000x ran G1/G2 smoke tests right after CREATE. - In-TX gate toggle + BEGIN/ROLLBACK is the right pattern for proof — composer gate flipped open for the cut, closed by ROLLBACK; zero permanent state, full pipeline exercise.
- Vocab mistakes are the dominant error class — 4 of 6 drifts patched in this macro were vocab (section_type, source_kind, payload_kind, category). Live CHECK introspection is mandatory before fixture authoring.
F. End-state after 110000x first real cut green
- 7-stage operating flow proven on real source.
- pg_dump growth proportional to source size + 1 audit row + N IU pieces.
- DOT
dot_iu_cut_from_manifestrun_status='applied' count = number of real cuts. iu_core.composer_enableddiscipline established: open per-cut, close after.
Cross-links
- Report 00 — top-line PASS summary.
- Report 08 — operator runbook for real Điều 37.
- 91000x report 07 — original re-author roadmap (now closed by this macro).