KB-605C

Checkpoint — Birth Stage 2.6A-FIX2 QT-001 Policy-Complete / Fail-Closed / Exact Signoff / Authority Lockdown

6 min read Revision 1

Checkpoint — Birth Stage 2.6A-FIX2

Date: 2026-06-06. Status: PARTIAL (all current-layer gates fail-closed). Mode: EXECUTION (principal-delegate). Live mutation: YES — additive, reversible, birth-neutral. NO QT-001 apply. NO permit. NO trigger/gateway-body/old-DOT change. MCP read-back: PASS.

Outcome

From STAGE2_6A_FIX_FAIL_HARDCODE_STILL_DANGEROUS (second Codex rejection) to STAGE2_6A_FIX2_POLICY_COMPLETE_FAIL_CLOSED_SIGNOFF_EXACT_AUTHORITY_LOCKED_READY_FOR_CODEX_REAUDIT. Second corrective macro for Stage 2.6A. Apply stays BLOCKED; a fresh independent Codex re-audit is required BEFORE Stage 2.6B, any permit, or any apply.

What was applied (one tx, rehearsed BEGIN..ROLLBACK twice first, then COMMIT)

  • New governed table qt001_tier_rule_registry_v2 (11 rules): rule_role GRANT/BLOCK, signal_key, predicate_type (operator CHECK), predicate_params, expected_result, rule_version, approval_status, approved_by, authority_lock, provenance, rule_checksum, active, superseded. Uniqueness via CREATE UNIQUE INDEX (no FK — would need ALTER).
  • Functions: fn_qt001_eval_predicate_v2 (missing/NULL/unknown -> FAIL incl not_in_set(NULL)); fn_qt001_eval_rule_core (evaluates expected_result; superseded/inactive/non-approved -> NOT_PARTICIPATING); fn_qt001_eval_rule_v2; fn_qt001_machine_tier_v2; fn_qt001_collection_signals_v2 (full 74 scope); fn_qt001_signoff_row_valid + fn_qt001_signoff_satisfies (exact binding); fn_qt001_plan_fingerprint_v2 + fn_qt001_fp_compose.
  • CREATE OR REPLACE: fn_qt001_machine_tier (delegates to v2 — single repoint so all downstream consumes the fail-closed parity-not-authority engine); fn_qt001_build_plan_registry (full 74-row scope, source_metadata_hash = complete fingerprint, content-addressed plan_id); fn_dot_birth_qt001_apply (in-body governance lockdown at top of EXECUTE path: readiness v5 + tier apply_allowed + exact signoff; dry-run path unchanged).
  • 20 new v_qt001_* views (blocker matrix, must-not-proceed, rule-engine negative tests + guard, parity-not-authority + diagnostic, fingerprint display/negative/guard, signoff negative/guard, scale v2, hardcode v3 + disguised detector, writer lockdown status + public-execute/directus-dml inventories + no-go, readiness dashboard v5 + guard v5).
  • Inventory: HC-05 -> SUPERSEDED_BY_REGISTRY; HC-14..21 added (HC-14..19 superseded/eliminated; HC-20 PUBLIC EXECUTE + HC-21 Directus DML -> OPEN_NEXT_LAYER, is_authority_gate=false, contained in-body + routed 2.6B).

Headline — parity can no longer authorize; engine fails closed

Parity/divergence appears only in BLOCK rules (grant=0, block=2). Machine tiers (parity NOT authority): TIER1=0, TIER2=7, TIER3=6, TIER_INELIGIBLE=55, TIER_BLOCKED=6 (null-delta collections now fail-closed). All apply_allowed=false. Plan PLAN-9bac30375765 v3, composite 9bac30375765c1162d216b2b70a81ef5, 74 rows.

Guards (live read-back)

must_not_proceed.pass=true; rule_engine_fail_closed 11/11; parity_not_authority pass=true; plan_fingerprint_guard pass=true (74=74, all components sensitive); exact_signoff_binding_guard pass=true (logic exact, current_apply_signoff_safe=false, 13 unsigned); hardcode_guard_v3 pass=true (unclassified 0, dangerous_authority_open 0); disguised_hardcode_detector 9/9; writer enforced_in_body=true; writer_lockdown_no_go writer_cannot_execute=true; scale_not_safe_guard_v2 scale_not_safe=true; readiness_guard_v5 overall_ready=false (SSOT 7/7, APPLY 0/5). Blocker matrix 13/13 (10 FIXED, 3 ROUTED/CONTAINED), 0 OPEN.

Safety anchors (before == after)

birth_registry 1,210,989 == 1,210,989 (birth-neutral) · qt001-apply-origin 0 · tga 129 (no CREATE TRIGGER / no ALTER TABLE) · apr 42 · gateway all_ok=true (c022f849) · open execute permits 0 · done ledgers 0 · Stage 0 freeze enforced.

Gotchas (carry forward)

  • qt001_hardcode_inventory.remediation_status CHECK = {SUPERSEDED_BY_REGISTRY, CLASSIFIED_RETAINED, OPEN_NEXT_LAYER, NO_ACTION_NEEDED}; cannot ALTER (bumps tga) -> map new statuses onto this enum.
  • A view referencing another view via ::regclass cast resolves at CREATE time -> avoid forward/circular refs; use (SELECT definition FROM pg_views WHERE viewname=...) for runtime resolution.
  • fn_qt001_plan_all is a per-row EXISTS full rescan (~5s/74; cancels under the MCP 5s RO timeout) -> run builds via ssh psql with statement_timeout raised; SCALE_NOT_SAFE.
  • All qt001 functions have proacl NULL = PUBLIC EXECUTE by default; contained in-body, REVOKE routed 2.6B.

Artifacts

Report: knowledge/dev/reports/architecture/birth-stage2-6a-fix2-qt001-policy-complete-plan-failclosed-signoff-authority-lockdown-2026-06-06/00..13. SQL: /opt/incomex/docs/mcp-writes/birth-stage2-6a-fix2-2026-06-06/ (01a, 01b, 90_verify, 99_rollback). Index: BIRTH_GATEWAY_DESIGN_INDEX.md rev16.

Next macro

BIRTH_STAGE2_6B_QT001_PERMIT_RUN_KEYSET_RESUME_AND_AUTHORITY_REVOKE: permit/run/keyset/watermark resume lifecycle; REVOKE PUBLIC EXECUTE + owner/role separation (Directus DML); HC-04 resolver, HC-07 TG_ARGV scanner, HC-11 conservation invariant; representative-volume perf gates. Then fresh independent Codex re-audit BEFORE any permit or apply. Blocker: independent re-audit + 2.6B layers + owner permit; zero engineering blocker.

Back to Knowledge Hub knowledge/dev/reports/architecture/checkpoint-birth-stage2-6a-fix2-qt001-policy-complete-plan-failclosed-signoff-authority-lockdown-2026-06-06.md