15000x · 09 — Lessons + carry-forward (4 lessons: sidecar-over-column, pinning-tests-bump, birth-gate-noise, gate-toggle-durable; 10 carry-forward items)
15000x · 09 — Lessons + carry-forward
Lessons (new this macro)
L1 — Sidecar tables beat column-adds for productizing live infra
iu_piece_collection is read by 9+ live functions and 4 live views. Adding is_template / instantiated_from columns would touch every caller; ALTER TABLE is also harder to roll back when rows reference the new state. Two sidecar tables keyed on collection_id give the same expressive power at zero blast radius. Views (v_iu_product_template, v_iu_product_template_instance) reconstitute the "all in one row" feel without owning the data.
Rule: when productizing a marker / lineage on top of an actively-joined table, prefer sidecar PK=FK table + view, not column-add.
L2 — Pinning tests are part of the migration, not test-suite hygiene
First full-suite run after 031 failed 12 tests pinning ('table',25) / ('view',24) / ('function',59) literals (and one len(governed)=20). These are the trip wire that catches a forgotten conformance-scan bump — they SHOULD fail when surface counts move. Bump them in the same commit as the migration that moved the counts, per [[feedback-pinning-tests-bump-per-macro]].
Operational tip: before full-suite run, grep -rnE "\('(table|view|function)',N\)" tests/ (with N = current pinning) returns the complete bump-list deterministically.
L3 — Birth-gate warnings are not failures (but noise is real)
fn_iu_compose emits one WARNING per minted piece: Birth gate L1 PILOT-ONLY: P-pub2 missing — production sẽ BLOCK. Didn't block the 10 piece births. Per 12000x carry-forward, needs triage — either silence when PILOT is intentional, or opt out of the hook for iu_core/template/* canonical addresses. Carry-forward to 16000x.
L4 — Composer-gate toggle inside a TX is the cleanest productization pattern
The 12000x bounded BEGIN/ROLLBACK pattern also works for durable COMMIT-ed work, simply by re-closing the gate before COMMIT:
BEGIN;
UPDATE dot_config SET value='true' WHERE key='iu_core.composer_enabled';
-- durable composer work --
UPDATE dot_config SET value='false' WHERE key='iu_core.composer_enabled';
COMMIT; -- gate matches pre-state; compositions are durable
Already in memory as [[feedback-in-tx-gate-toggle-reversibility]] — extended here from rehearsal to durable productization.
Memory entries proposed (3)
- [[feedback-sidecar-over-column-add-for-live-infra]] (NEW) — see L1
- [[feedback-pinning-tests-bump-per-macro]] (REFRESH) — extend with grep command + note 15000x bumped 12 tests
- [[project-dot_iu_cutter_v0_6_iu_core_15000x_productization_operator_ops_closeout]] (NEW) — full project entry
Carry-forward to 16000x+
| # | Item | Target |
|---|---|---|
| 1 | Birth-gate PILOT noise — fix P-pub2 missing warning |
16000x |
| 2 | Template versioning lineage column (parent_template_id on registry) |
16000x |
| 3 | Bulk export of template-bundle (collection + pieces + manifest) | 16000x |
| 4 | Live (non-dry-run) piece event delivery | 17000x |
| 5 | VPS Linux timer / Grafana monitoring fallback | 16500x |
| 6 | Retention enable after 30+ day soak | ≥17000x |
| 7 | PR #669 merge / Nuxt deploy | external (different clone) |
| 8 | Auto-instantiate from event (template.published → spawn instance) | 17500x |
| 9 | Template piece mutation invariants (supersede propagation) | 16000x |
| 10 | Cross-template piece sharing observability | 16000x |
What 15000x intentionally did NOT do
- Did NOT add a new healthcheck surface — 8 is the right size; productization observable through catalog count + vector boundary + write gates + 2 new views.
- Did NOT create a "template" event_type — would require event_outbox CHECK update (10000x defect lesson);
iu.collection_createdalready fires. - Did NOT touch the 12000x untracked ops dir — left as-is per origin macro's intent.
- Did NOT introduce template_status workflow —
lifecycle_statusoniu_piece_collectionalready covers it.