IU Test b–f Command Pack — 07 DOT Command Gap and Spec
07 — DOT Command Gap and Spec
Live catalog = 42 dot_iu_* commands (verified). This maps each test to existing vs missing commands and specifies the proposed wrappers. All proposed commands must obey Điều 35 (DOT pair + dot_iu_command_run audit, mutating flag) and no-hardcode (params discovered from registry/config, not literals).
1. Command matrix
| Test | Existing DOT command(s) | Missing / proposed | R/O or mutating | Input params | Output evidence | Owner law | Gate | Rollback | Impl macro |
|---|---|---|---|---|---|---|---|---|---|
| b | dot_iu_rebuild_metadata_axes (refresh, not filter) |
dot_iu_filter_axis_b |
read-only | tag_key, match_mode, lifecycle_status?, doc_code? |
count + ordered unit_ids + registry_validated + deltas_zero | Đ38/39 | none | N/A | M1 |
| c | (none; fn_iu_subtree only) |
dot_iu_subtree |
read-only | root_unit_id/root_address, max_depth?, include_self? |
descendant set + depth + cycle_free + orphan_free | Đ38/39 | none | N/A | M1 |
| f | (none; fn_iu_sql_link_validate, v_iu_sql_link_resolved) |
dot_iu_sql_link_validate, dot_iu_sql_link_resolve |
read-only | link_id? (NULL=all) |
per-link validate_ok + fingerprint_match + resolved | Đ38/39, Đ33 | none | N/A | M2 |
| f (deferred) | — | dot_iu_sql_link_register, dot_iu_sql_link_capture_probe |
mutating | link def / probe input | new link row / capture proof | Đ38/39, Đ32, Đ35 | bounded | rollback / disable link | M2 follow-up |
| d | dot_iu_create_collection, dot_iu_add_piece, dot_iu_remove_piece, dot_iu_reorder_piece, dot_iu_create_file_from_pieces, dot_iu_split_piece, dot_iu_merge_piece, dot_iu_render_file, dot_iu_clone_piece |
(commands exist; gated + review-blocked) | mutating | collection/piece ids, review_decision_id | structure_operation rows, split/merge sets, render hash | Đ38/39, Đ32, Đ35, Đ30/31 | structure_ops + composer | fn_iu_structure_op_rollback |
M4 |
| e | dot_iu_auto_instantiate_from_event, dot_iu_auto_instantiate_rollback_by_actor, iu.post_cut.axis_materialize |
dot_iu_trigger_test (in→out probe) |
mutating | test route id, test IU id | route_attempt + dead_letter + idempotency proof | Đ45, Đ35 | delivery | retire test route/IU | M5 |
| all | (none) | dot_iu_test_harness_run (orchestrator) |
read-only or mutating (per sub-test) | test id set, mode (dry/commit) | aggregate PASS/PARTIAL + per-test evidence + run report | Đ35 | inherits | inherits | M1 (read-only core), extended later |
2. Required proposed commands — detail
2.1 dot_iu_filter_axis_b (read-only)
Wraps filter_axis_b(...) (deliverable 02). Validates tag_key ∈ iu_metadata_tag_registry. Audit mutating=false. Returns ordered rowset + JSON evidence. No gate.
2.2 dot_iu_subtree (read-only)
Wraps filter_axis_c_subtree(...) (deliverable 03) → fn_iu_subtree, cross-checked vs iu_tree_path + iu_relation. Cycle/orphan flags. No gate.
2.3 dot_iu_sql_link_validate / dot_iu_sql_link_resolve (read-only)
Wrap fn_iu_sql_link_validate and v_iu_sql_link_resolved (deliverable 04). Per-link or all-links. Fingerprint-drift detection. No gate.
2.4 dot_iu_trigger_test (mutating, gated)
Drives one trigger-in + one trigger-out cycle on a test route + test IU (deliverable 06). Requires iu.* event types (U6) and bounded delivery_enabled (08). Emits route_attempt + dead_letter evidence; idempotency assertion built in.
2.5 dot_iu_test_harness_run (orchestrator)
Single entry that runs a configured subset of {b,c,f-read,d,e}, each in its own audited sub-run, aggregates a PASS/PARTIAL/BLOCKED verdict, and writes one consolidated evidence JSON + KB report path. Config-driven (test list + mode from a config row, not hardcoded). The read-only core (b,c,f-read) ships in M1/M2; mutating sub-tests (d,e) are wired in once their dependencies (U3/U6/gate) land. This is U1.
3. No-hardcode + Điều 35 compliance for all proposed commands
- Every command has a catalog row in
dot_iu_command_catalog(pair) and writes adot_iu_command_runrow (mutatingflag correct). - Inputs that are identifiers (tag keys, link ids, route ids, collection ids) are resolved/validated against live registries; no literal uuids baked in.
- Read-only commands assert
mutating=falseand are provable via BEGIN/ROLLBACK zero-delta. - Mutating commands carry a rollback primitive and a gate reference.
4. Catalog delta summary
- New read-only:
dot_iu_filter_axis_b,dot_iu_subtree,dot_iu_sql_link_validate,dot_iu_sql_link_resolve,dot_iu_test_harness_run(read-only core). - New mutating (deferred):
dot_iu_sql_link_register,dot_iu_sql_link_capture_probe,dot_iu_trigger_test. - No change to the 9 existing d-commands and the 5-command operator cut surface — reuse as-is (live-ready-means-use-not-rewrite).