11000x · 09 — Regression matrix + lessons + carry-forward
11000x · 09 — Regression matrix + lessons + carry-forward
Regression matrix (post-apply, before commit)
| Invariant | Pre-baseline | Post-11000x | Verdict |
|---|---|---|---|
| Repo HEAD | d88d08b | d88d08b (working tree dirty, commit pending) | ✓ |
| Tests collected | 1305 | 1324 (+19 new) | ✓ +19 |
| Tests passing | 1305 | 1324 | ✓ |
| DOT D9 inventory total | 156 | 163 (+7) | ✓ +7, all ok |
| D8 drift unregistered objects | 0 | 0 | ✓ |
public.tables count |
263 | 263 | ✓ unchanged |
public.functions count |
486 | 489 (+3 fns from 029) | ✓ as designed |
event_type_registry rows |
25 | 25 | ✓ unchanged |
dot_iu_command_catalog rows |
20 | 20 | ✓ unchanged |
iu_vector_sync_point total |
152 | 152 | ✓ unchanged |
| - indexed | 149 | 149 | ✓ unchanged |
| - dryrun | 3 | 3 | ✓ unchanged |
iu_lifecycle_log rows |
146 (all enact) | 146 | ✓ unchanged |
information_unit lifecycle_status='enacted' |
146 | 146 | ✓ unchanged |
event_outbox total rows |
121,289 | 121,289 | ✓ unchanged |
event_outbox event_domain='piece' |
0 | 0 | ✓ bounded proof clean |
iu_core.routes_master_enabled |
true | true | ✓ unchanged |
iu_core.retention_enabled |
false | false | ✓ unchanged |
iu_core.three_axis_auto_refresh_enabled |
false | false | ✓ unchanged |
piece_event_runtime.emit_enabled |
(absent) | false | ✓ default closed |
piece_event_runtime.dry_run_only |
(absent) | true | ✓ safe default |
Qdrant collection iu_core_iu_chunks |
(not queried live) | (not touched by macro) | ✓ no driver run |
production_documents collection |
(not queried live) | (not touched) | ✓ NEVER touched |
| PR #669 | OPEN (last known) | not modified by macro | ✓ |
| Mac cron pilot | installed | installed; healthcheck.py updated to 8 surfaces | ✓ will pick up 8th surface on next fire |
| pg_dump pre-mutation backup | — | 79.4 MB sha c62ed38a… | ✓ |
All invariants pass.
Lessons written to memory
feedback-event-outbox-check-vs-registry-drift.md (NEW)
Registering an event_domain in event_type_registry is necessary but not sufficient — event_outbox.event_domain has a separate CHECK constraint that must also accept the new value.
Why: 10000x seeded 6 piece.* event types in the registry; the column CHECK on event_outbox still rejected
'piece'. The defect lay dormant because no piece event was ever emitted. 11000x surfaced it in Phase B of the bounded BEGIN/ROLLBACK proof and patched it via migration 030.How to apply: any future macro that adds a new event_domain or event_stream value must include in its verification pack at least one
BEGIN; INSERT INTO event_outbox …; ROLLBACK;round-trip.
feedback-trigger-emit-over-fn-rewrite.md (NEW)
When wiring side-effect emission to existing lifecycle functions, prefer a TRIGGER on the canonical audit log table over
CREATE OR REPLACErewrites of the lifecycle function body.Why: lifecycle functions (fn_iu_supersede, fn_iu_piece_split, fn_iu_piece_merge) are 100+ lines of plpgsql with FSM gates, advisory locks, post-write read-back assertions, and governance FK probes. Rewriting them risks subtle bugs and complicates rollback. A trigger on iu_lifecycle_log gives 100% coverage of successful transitions with a ~40-line standalone fn whose drop is byte-clean.
How to apply: new emit-event hooks for lifecycle transitions go via a new trigger fn on iu_lifecycle_log. Edits to fn_iu_* in
sql/iu-core/<num>_*.sqlshould be RESERVED for true bug fixes in the lifecycle behaviour itself.
feedback-pinning-tests-bump-per-macro.md (RE-CONFIRMED)
The 11000x macro hit the trip-wire tests/test_iu_core_ddl.py::EXPECTED_COUNTS
on first run after the migration. The error pointed to the SUM=163
assertion, which led to discovery of 13 other pinning test files. All
13 were bumped in the SAME working tree (this commit), not in a follow-on,
in line with the existing rule.
Carry-forward
| For macro | Item |
|---|---|
| Operator | Phase 1 dry-run rehearsal: UPDATE dot_config SET value='true' WHERE key='piece_event_runtime.emit_enabled' — wait one supersede/split/merge call — inspect v_piece_event_outbox — UPDATE … value='false'. Runbook in ops/piece-event-runtime-package-11000x/05-operator-runbook.md. |
| 11500x | Templates + Instances: fn_iu_template_from_collection, fn_iu_instance_from_template, fn_iu_validate_piece_graph, +3 DOT commands |
| 12000x | Wire route-worker subscribers for event_domain='piece' — only after the operator has run Phase 1 dry-run rehearsal in production |
| Open external | PR #669 (frontend/DevOps owner) — not touched by 11000x |
| Open external | Retention enable timing: id-18 eligible ~2026-06-22, command_run eligible ~2026-08-21+ — not enabled by this macro |
What's NOT in scope (and stays out)
- Production_documents collection: NEVER touched.
- PR #669 merge: NOT done.
- Nuxt deploy: NOT triggered.
- Qdrant collection reindex / new collection: NONE.
- Retention enable: NOT done.
- Cross-IU vector boundary: still healthy.
- Lark / S177 Cowork: unrelated, untouched.