From 431e7bb96ea1c6bfea9ff23334a51ef7aec7fbea Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Mon, 11 May 2026 23:00:25 +0000 Subject: [PATCH 01/14] =?UTF-8?q?docs(briefs):=20R3=20CI=20Layer=202=20?= =?UTF-8?q?=E2=80=94=20PM=20pre-staged=20Mgr-fill=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author the pre-staged Mgr-fill reference doc Director accepted via msg_4623068b at 22:54Z (greenlight on PM's pre-staged-skeleton offer from gunbc#828 c4425726922). Director will cite this file in their forthcoming worker brief (`docs/briefs/r3-ci-layer-2-path-conditional- gating-worker.md`) as the starting template for Verification Mgr (clever-tern-670) inventory finalization. Content: - §1 affected-set lens Dimension enum reference (cite design doc §2) - §2 slow-test inventory grouped into 9 clusters (78 entries from scripts/slow-test-exemptions.txt) - §3 path-mapping skeleton table — (test_pattern, dimension, required_paths_regex, confidence, dissolution_note). PM partial- fills high-confidence rows; ~12 [Mgr-fill] placeholders left for rows requiring deeper substrate-lens / consumer-tracing knowledge - §4 open questions for Mgr (multi-dim split, conservative defaults, pilot cluster selection — recommended Cluster B = Lane 2 Stage 2d symbolic cost; high-confidence single-dimension contained module) - §5 acceptance checklist for Mgr-fill completion - §6 STOP triggers (new substrate carrier need; dimension outside enum; test-output dependency = lens not bridge) - §7 cross-refs (Layer 1 PR #2718, lens canvas PR #2713, routing msg_a77c7f42, memory feedback_parallel_representation_debt) Hard constraint per feedback_parallel_representation_debt: every row carries a dimension: field matching the lens Dimension enum so post- dissolution skip_* flags compute structurally as `affected_dimensions.contains(group.dimension)` — same enum, structural source. Prevents path-mapping schema divergence from future lens API surface. Dissolution trigger: gate ci_uses_provable_minimal_affected_set_selection (R3 close-blocking; docs/design-affected-set-lens.md §5). When the lens lands, this template + the worker output are deleted. SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...-layer-2-pm-prestaged-mgr-fill-template.md | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md new file mode 100644 index 00000000000..4304e62fc10 --- /dev/null +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -0,0 +1,220 @@ +# R3 CI Layer 2 — PM pre-staged Mgr-fill template + +**Status**: PM pre-staged reference doc for Verification Mgr (clever-tern-670) finalization. Director-authored worker brief (`docs/briefs/r3-ci-layer-2-path-conditional-gating-worker.md`, pending) cites this file as the starting template. + +**Authority**: PM authoring; Director-cited; Mgr-fill destination. Pre-staged 2026-05-11 EOD per Director greenlight at msg_4623068b. + +**Purpose**: provide the Verification Mgr with a starting grouping (slow tests by file-area) plus a `(test_pattern, dimension, required_paths_regex)` skeleton aligned to the affected-set lens per-dimension output shape (`docs/design-affected-set-lens.md` §2). Mgr finalizes inventory + path-mapping; PM only provides the template + structural alignment. + +**Hard constraint** (per `feedback_parallel_representation_debt`): every entry below carries a `dimension:` field matching the affected-set lens `Dimension` enum. The mechanism today is path-regex; the semantic carrier matches the future lens output so post-dissolution `skip_*` flags compute structurally as `affected_dimensions.contains(group.dimension)`. + +**Dissolution trigger**: gate `ci_uses_provable_minimal_affected_set_selection` (R3 close-blocking; `docs/design-affected-set-lens.md` §5). When the lens lands, this template + the worker output are deleted. + +--- + +## §1. Affected-set lens `Dimension` enum (reference) + +Per `docs/design-affected-set-lens.md` §2: + +``` +enum Dimension { + Value, // value-output / structural-output (emit, parse, substrate shape) + Cost, // cost lens / symbolic cost / realization cost + Complexity, // complexity lens / analyze_complexity / asymptotic class + Effect, // effect lens / idempotency / effect-shape + Refinement, // refinement type checks / int width / cardinality +} +``` + +Every test-group entry below carries exactly one primary `dimension:` (multi-dim tests pick the closest match; if a test genuinely spans dimensions, it falls into the "run-always" conservative bucket). + +--- + +## §2. Slow-test inventory grouped by file-area + +Source: `scripts/slow-test-exemptions.txt` (78 active entries as of 2026-05-11 EOD at sha e9c8f9896). Grouped by module prefix; counts in parens. + +### Cluster A — Emission / determinism (~10) + +| Module | Tests | Notes | +|---|---|---| +| `db8_*` | 1 (`db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix`) | DB-8 / ROADMAP Lane 3 Stage 3c | +| `emit_matrix_*` | 6 (`emit_matrix_module_{go,python,rust}_is_deterministic` + `emit_matrix_program_*`) | 5× emit matrix sweep | +| `four_fixture_*` | 2 (`four_fixture_disk_sources_emit_deterministically` + `four_fixture_regression_test::four_fixture_suite_shares_one_reachability_shape`) | 4-fixture corpus | +| `m1_3_emit_rust_test::*` | 6 | M1.3 Rust roundtrip rustc harness | + +### Cluster B — Lane 2 Stage 2d cost migration (~6) + +| Module | Tests | +|---|---| +| `lane2_stage_2d_symbolic_cost_test::*` | 6 (`branch_reports_constant_when_both_arms_constant`, `cost_dag_compiles_cleanly`, `cost_generated_module_matches_checked_in_snapshot`, `recursive_fn_body_contributes_to_loop_cost`, `recursive_fn_reports_linear_via_loop_lowering`, `transform_single_op_reports_constant`, `value_reports_constant`) | + +### Cluster C — M2 lens migration (~7) + +| Module | Tests | +|---|---| +| `m2_lens_cost_migration_test::*` | 3 (`complexity_dag_compiles_cleanly`, `complexity_dag_runs_end_to_end_via_rustc_harness`, `complexity_generated_module_matches_checked_in_snapshot`) | +| `m2_lens_idempotency_migration_test::*` | 1 (`idempotency_emitted_analyze_matches_oracle`) | +| `m2_lens_provenance_migration_test::*` | 1 (`lens_provenance_dag_runs_end_to_end_via_rustc_harness`) | +| `m2_lens_unused_parameters_migration_test::*` | 2 (`unused_parameters_dag_runs_end_to_end_via_rustc_harness`, `unused_parameters_dag_self_analysis_reports_zero_findings`) | + +### Cluster D — T-Lens-Behavioral-Parity / gate #73 / cost lens consumer (~5) + +| Module | Tests | +|---|---| +| `complexity_lens_behavioral_completion::*` | 2 (`literal_bind_cements_constant_complexity_summary`, `recursive_countdown_cements_linear_work_and_span`) | +| `cost_lens_symbolic_consumer_test::*` | 3 (`literal_bind_pins_symbolic_cost_of_constant_on_fixture`, `recursive_countdown_pins_symbolic_cost_linear_and_sizevar_on_fixture`, `e_p_sub_value_relation_per_call_landed_cost_lens_routes_through_per_call_pattern_query`) | +| `lens_behavioral_parity_demonstration_test::*` | 2 (`r3_gate_73_demonstrates_complexity_certainty_is_proven`, `r3_gate_73_demonstrates_symbolic_cost_is_keyed_by_countdown_parameter`) | +| `lens_cost_target_realization_test::*` | 2 (`cost_lens_composes_symbolic_cost_with_rust_type_realization_row`, `cost_lens_demonstration_composes_representative_rust_program_cost`) | + +### Cluster E — Dimension / E7 analyze_complexity / Stage 2f (~12) + +| Module | Tests | +|---|---| +| `dimension::analyze_complexity_tests::*` | 5 (all 5 `analyze_complexity_*` tests) | +| `dimension::fail_closed_tests::*` | 2 (`missing_symbolic_cost_surfaces_*`, `transform_workflow_root_still_backward_reaches_operand_ports`) | +| `e7_analyze_complexity_integration::*` | 4 (4 `analyze_complexity_public_api_*` tests) | +| `lane2_stage_2f_dimension_test::*` | 1 (`analyze_symbolic_cost_composed_matches_lens_at_workflow_root`) | + +### Cluster F — Substrate / R3 gate / cementing (~6) + +| Module | Tests | +|---|---| +| `m0_acceptance::*` | 2 (`compile_boundary_is_fail_closed`, `post_sweep_port_state_matches_diagnostic_table`) | +| `m1_substrate_test::*` | 1 (`referenced_port_walk_real_helper_stack_compiles`) | +| `tc1_substrate_lens_eta_equivalence_strict_fire_test::*` | 1 (gate #11) | +| `t_pb_b_1_dag_runner_test::r3_gate_87_cementing_regen_lens_suites_pass_through_runner` | 1 (gate #87 / Cluster M Phase 2) | +| `bootstrap::tests::kernel_bool_path_a_attaches_diagnostic_when_boolean_algebra_unresolvable` | 1 (Lane 1e-2b) | + +### Cluster G — T-LAS / CRDT / free consequences (~10) + +| Module | Tests | +|---|---| +| `t_las_complexity_contract_compile_error_test::*` | 1 (gate #92 / issue #1952) | +| `t_las_crdt_cost_basis_demo_test::*` | 6 (all 6 `crdt_cost_basis_*` tests) | +| `r3_free_consequences_second_batch_test::*` | 3 (3 `cross_target_optimization_*` / `r3_free_consequences_second_batch_*`) | + +### Cluster H — Parser / regen / R1C-E / R3-V (~7) + +| Module | Tests | +|---|---| +| `sg2_parse_authority_test::parse_surface_dag_compiles_cleanly_for_regen_parse` | 1 | +| `sg2c1_parse_tables_authority_test::parse_tables_generated_module_matches_checked_in_snapshot` | 1 | +| `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_regenerates_named_entry_without_drift` | 1 | +| `r1c_e_emit_gates_dag_test::*` | 1 (R1C-E `.dag` wrapper) | +| `r3_verification_l4_l7_l5_skeleton_test::*` | 2 (R3-V L4 W1 + R3-V L7 gate #10) | +| `t_ci_workflow_as_data_demo_test::*` | 1 (T-Workflow-As-Data) | + +### Cluster I — Demo / thesis / cached_compile / refinement (~5) + +| Module | Tests | +|---|---| +| `t_demo_fixture_test::t_demo_canonical_suites_are_runner_visible` | 1 | +| `thesis_validation_test::kf_1_structural_list_operation_ordering_holds` | 1 | +| `common::cached_compile::tests::cached_compile_any_returns_clean_dag_when_key_warmed_by_strict` | 1 | +| `int_literal_cardinality_test::int_refinement_overflow_is_proven_parametric_for_representable_widths` | 1 (gate #21) | +| `m1_5_verification_test::symbolic_cost_expr_equals_smoke_suite_passes` | 1 (M1.5) | + +--- + +## §3. Path-mapping skeleton (Mgr-fill table) + +Each row: `(test_pattern, dimension, required_paths_regex, confidence, dissolution_note)`. + +PM partial-fills `dimension` where high confidence; Mgr finalizes `required_paths_regex`. Where PM marks `[Mgr-fill]`, the path-mapping requires deeper consumer-tracing than PM has bandwidth for (Mgr owns the lens canvas + Phase 3 brief, has the context). + +**Conservative fail-closed default**: any group where Mgr is unsure of paths → mark `required_paths_regex: .*` (always-run). Dissolution is structural via the lens; bridge-debt period favors over-running over miss-running. + +| Cluster | test_pattern | dimension | required_paths_regex | confidence | dissolution_note | +|---|---|---|---|---|---| +| A | `db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix` | Value | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/db8_.*\.rs)$` | high | gate ci_uses_provable_minimal_affected_set_selection lands → lens.affected_dimensions.contains(Value) | +| A | `emit_matrix_(module|program)_(go|python|rust)_is_deterministic` | Value | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/src/lens_.*\.rs|src/v3/compiler/tests/integration/emit_matrix.*\.rs)$` | high | same | +| A | `four_fixture_.*` | Value | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/four_fixture.*\.rs|tests/.*/four_fixture.*\.dag)$` | medium | same | +| A | `m1_3_emit_rust_test::rustc_roundtrip_.*` | Value | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/m1_3_emit_rust_test\.rs)$` | high | same | +| B | `lane2_stage_2d_symbolic_cost_test::.*` | Cost | `^(dsl/std/lens_cost.*\.dag|src/v3/compiler/src/lens_cost.*\.rs|dsl/std/cost.*\.dag|src/v3/compiler/tests/integration/lane2_stage_2d.*\.rs)$` | high | gate lands → lens.affected_dimensions.contains(Cost) | +| C | `m2_lens_cost_migration_test::complexity_.*` | Cost | `[Mgr-fill]` (likely: complexity.dag + lens_complexity*.rs + lens migration substrate) | medium | gate lands → Cost ∪ Complexity (note multi-dim) | +| C | `m2_lens_idempotency_migration_test::.*` | Effect | `^(dsl/std/lens_idempotency.*\.dag|src/v3/compiler/src/lens_idempotency.*\.rs|src/v3/compiler/tests/integration/m2_lens_idempotency.*\.rs)$` | high | same | +| C | `m2_lens_provenance_migration_test::.*` | Value | `^(dsl/std/lens_provenance.*\.dag|src/v3/compiler/src/lens_provenance.*\.rs|src/v3/compiler/tests/integration/m2_lens_provenance.*\.rs)$` | high | same | +| C | `m2_lens_unused_parameters_migration_test::.*` | Value | `^(dsl/std/lens_unused_parameters.*\.dag|src/v3/compiler/src/lens_unused_parameters.*\.rs|src/v3/compiler/tests/integration/m2_lens_unused_parameters.*\.rs)$` | high | same | +| D | `complexity_lens_behavioral_completion::.*` | Complexity | `[Mgr-fill]` (likely: lens_complexity + lens_cost + cementing substrate) | medium | gate lands → Complexity | +| D | `cost_lens_symbolic_consumer_test::.*` | Cost | `[Mgr-fill]` (likely: cost.dag + lens_cost*.rs + E-P substrate) | medium | gate lands → Cost | +| D | `lens_behavioral_parity_demonstration_test::r3_gate_73_.*` | Complexity | `[Mgr-fill]` (gate #73 LBP — needs cementing-test substrate dep) | medium | gate lands → Complexity ∪ Cost | +| D | `lens_cost_target_realization_test::.*` | Cost | `[Mgr-fill]` (cost-target-realization + rustc harness) | medium | gate lands → Cost ∪ Value | +| E | `dimension::analyze_complexity_tests::.*` | Complexity | `^(dsl/std/(complexity|cost|symbolic_cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration/dimension.*\.rs)$` | high | gate lands → Complexity | +| E | `dimension::fail_closed_tests::.*` | Complexity | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs)$` | medium | same | +| E | `e7_analyze_complexity_integration::.*` | Complexity | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs)$` | high | same | +| E | `lane2_stage_2f_dimension_test::.*` | Complexity | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs)$` | high | same | +| F | `m0_acceptance::.*` | Value | `.*` (conservative — compile-boundary is broad) | low | run-always; gate lands → lens picks structural affected-set | +| F | `m1_substrate_test::.*` | Value | `^(dsl/std/.*\.dag|src/v3/compiler/src/(parse|substrate).*\.rs|src/v3/compiler/tests/integration/m1_substrate.*\.rs)$` | medium | gate lands → Value | +| F | `tc1_substrate_lens_eta_equivalence_strict_fire_test::.*` | Value | `[Mgr-fill]` (substrate eta-equivalence — needs substrate-lens dep map) | medium | gate #11 lands; consider TC1 closure path | +| F | `t_pb_b_1_dag_runner_test::r3_gate_87_.*` | Cost | `[Mgr-fill]` (cementing-test substrate + regen harness) | medium | gate #87 Cluster M Phase 2 lands → dissolves naturally | +| F | `bootstrap::tests::kernel_bool_path_a_.*` | Value | `^(src/v3/compiler/src/bootstrap.*\.rs|dsl/std/types\.dag|dsl/std/boolean_algebra.*\.dag)$` | high | dissolves with Lane 1e-2b Path A close | +| G | `t_las_complexity_contract_compile_error_test::.*` | Complexity | `^(dsl/std/complexity.*\.dag|src/v3/compiler/src/(las|t_las).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | gate #92 lands | +| G | `t_las_crdt_cost_basis_demo_test::.*` | Cost | `^(dsl/std/(cost|las|crdt).*\.dag|src/v3/compiler/src/(las|t_las|crdt).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | T-LAS CRDT closure | +| G | `r3_free_consequences_second_batch_test::.*` | Cost | `[Mgr-fill]` (free-consequences second batch — cross-target optimization + symbolic-cost) | medium | gates #43-#52 (free-consequences) land | +| H | `sg2_parse_authority_test::.*` | Value | `^(dsl/std/parse.*\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | high | SG-2 parser-staging close | +| H | `sg2c1_parse_tables_authority_test::.*` | Value | `^(dsl/std/parse_tables.*\.dag|dsl/std/tokenize.*\.dag|src/v3/compiler/src/parse.*\.rs)$` | high | SG-2c-1 close | +| H | `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_.*` | Value | `^(scripts/regen.*|src/v3/compiler/src/(regen|cli).*\.rs|dsl/std/.*\.dag)$` | medium | SG-6 close | +| H | `r1c_e_emit_gates_dag_test::.*` | Value | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | +| H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | Value | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | +| H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l7_.*` | Value | `[Mgr-fill]` (gate #10 algebraic-law matrix) | medium | gate #10 close | +| H | `t_ci_workflow_as_data_demo_test::.*` | Value | `^(dsl/std/workflow.*\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | T-Workflow-As-Data close | +| I | `t_demo_fixture_test::.*` | Value | `^(tests/.*/t_demo.*\.dag|src/v3/compiler/src/(test_runner|runner).*\.rs|src/v3/compiler/tests/integration/t_demo.*\.rs)$` | medium | T-Demo lane close | +| I | `thesis_validation_test::kf_1_.*` | Value | `.*` (conservative — thesis-level validation is broad) | low | run-always; gate lands → lens picks | +| I | `common::cached_compile::tests::.*` | Value | `^(src/v3/compiler/src/cached_compile.*\.rs|src/v3/compiler/tests/common/cached_compile.*\.rs)$` | high | TESTING.md paydown | +| I | `int_literal_cardinality_test::int_refinement_overflow_is_proven_.*` | Refinement | `^(dsl/std/int.*\.dag|src/v3/compiler/src/(refinement|int_literal).*\.rs|src/v3/compiler/tests/integration/int_literal.*\.rs)$` | high | gate #21 close | +| I | `m1_5_verification_test::symbolic_cost_expr_equals_smoke_.*` | Value | `[Mgr-fill]` (M1.5 verification smoke — needs symbolic-cost equality harness dep map) | medium | M1.5 close | + +--- + +## §4. Open questions for Mgr-fill + +1. **Multi-dimension tests**: rows marked Cost-or-Complexity (e.g., D-cluster LBP, G-cluster free-consequences) — does Mgr split into separate rows per dimension, or accept "primary dimension + conservative regex covers both"? Recommendation: primary dimension is sufficient because the path-regex naturally pulls in both axes' source files. + +2. **Conservative-run-always candidates**: `m0_acceptance::*` and `thesis_validation_test::*` are marked `.*` (always-run). Mgr decides if these justify the cost (~3-5s each cold) or warrant a tighter regex. PM read: keep `.*` until the lens lands; the safety margin is cheap. + +3. **`[Mgr-fill]` rows count**: 12 rows out of ~36 need Mgr to derive `required_paths_regex` from consumer tracing. PM left these blank where derivation requires deeper substrate knowledge (substrate-lens deps, R3-V L4/L7 direct-consumer maps, R1C-E `.dag` wrapper internals, free-consequences cross-target topology). + +4. **Mechanism — single regex per row vs `paths-ignore`-style**: this template uses a single positive regex per row (required_paths_regex). GitHub Actions doesn't natively support per-step path filtering, so the CI consumer is a shell snippet in `ci.yml`: + ```yaml + - name: + if: needs.changes.outputs.skip_ != 'true' + run: cargo test -p v3-compiler --test integration + ``` + The `changes` job computes each `skip_` boolean by checking if any changed file matches the cluster's `required_paths_regex`. + +5. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, ~6 tests, single dimension (Cost). Lowest risk, highest learning per LOC. + +--- + +## §5. Acceptance (Mgr fills, Director ratifies) + +Mgr-fill complete when: + +- [ ] Every `[Mgr-fill]` placeholder in §3 is replaced with a concrete `required_paths_regex` OR explicitly marked `.*` (always-run) with a one-line "why conservative". +- [ ] Each cluster has a pilot-PR worker brief authored (or batched into the Director-authored Layer 2 brief). +- [ ] `changes` job in `ci.yml` extended with per-cluster `skip_` boolean outputs. +- [ ] At least one cluster (pilot) has its `if: needs.changes.outputs.skip_ != 'true'` gate landed and CI-validated against a representative test case (docs-only PR skips; in-cluster code change runs). +- [ ] All path-mapping entries have `dimension:` field aligned to the affected-set lens `Dimension` enum. + +--- + +## §6. STOP triggers (Mgr aborts and surfaces to Director) + +- Any cluster needs a *new* substrate carrier to express path-dependency → STOP. Surface to Director: this is the lens substrate, not a bridge. +- Any path-mapping entry has `dimension:` outside `{Value, Cost, Complexity, Effect, Refinement}` → STOP. Surface to Director: this is a coproduct-dissolution candidate. +- Any cluster's `required_paths_regex` requires depending on test-output (not just changed files) → STOP. That's the lens, not the bridge. + +--- + +## §7. Cross-references + +- **Layer 1 (predecessor)**: PR #2718 — docs-only-skip `v3` via `changes` job + `code` boolean output. Layer 2 extends the same job with per-group flags. +- **Affected-set lens (dissolution)**: `docs/design-affected-set-lens.md` (locked design), PR #2713 (Verification Mgr canvas rebuild). +- **Routing decision**: msg_a77c7f42 (Director ratification of Verification Mgr ownership) — gunbc#828 c4425726922 carries PM's 3-ask scaffold data. +- **Director-authored worker brief**: `docs/briefs/r3-ci-layer-2-path-conditional-gating-worker.md` (pending; ETA per Director ~23:00-23:30Z 2026-05-11). +- **Memory**: `feedback_parallel_representation_debt` (single-Mgr ownership rationale); `feedback_intro_rate_vs_residual_share` (intro-class composition framing). + +--- + +**End of pre-staged Mgr-fill template.** PM signing off; Mgr inherits via Director-cited brief. From dedcf69a4cd95d7d4e81811bbd046fac007d0ce5 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Mon, 11 May 2026 23:11:35 +0000 Subject: [PATCH 02/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20dimensions=20is=20Set,=20not=20single=20?= =?UTF-8?q?primary=20(codex=20REQUEST=5FCHANGES=20fix=20on=20PR=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codex REQUEST_CHANGES on PR #2721 (review #9707) caught a semantic- contract violation: the template asserted "every entry carries exactly one primary `dimension:`" and post-dissolution `skip_*` computation as `affected_dimensions.contains(group.dimension)`. This conflicts with the locked design at `docs/design-affected-set-lens.md` §2: affected_set(Dag_before, Dag_after) = ⋃ over dim in {Value, Cost, Complexity, Effect, Refinement} affected_set(Dag_before, Dag_after, dim) A test that reads BOTH Cost AND Complexity (e.g., D-cluster LBP demonstration; lane2_stage_2f composed-matches-lens) would be silently skipped when only Complexity changes if its dimension is narrowed to "Cost." That's `INVARIANTS.md` P2 single-authority violation against the locked lens design. Fixes: - §1: rewrite from "exactly one primary dimension" to "dimensions is Set = full read-set; affectedness is union semantics" - Header bullet: hard constraint reframed — multi-dim REQUIRED when consumer reads multi; post-dissolution math is `(affected ∩ row.dimensions) ≠ ∅` - §3 table: column rename `dimension` → `dimensions`; rows updated: - D-cluster LBP, lens_cost_target_realization, cost_lens_consumer: expanded to multi-dim sets [Complexity, Cost], [Cost, Value] - lane2_stage_2f_dimension: [Complexity, Cost] (composed-matches-lens) - F-`m0_acceptance` + I-`thesis_validation_test`: full 5-dim set (compile-boundary + thesis-level read every dim) - G-`t_las_crdt_cost_basis_demo`: [Cost, Effect, Value] - G-`r3_free_consequences_second_batch`: [Cost, Value] - H-`t_ci_workflow_as_data_demo`: [Value, Cost] (DimensionReport timing) - All single-dim rows (A, B, Most-C, etc.): formatted as set `[Cost]` - §4 Open question 1: rewrite to forbid narrowing, mandate ADD-when-doubt - §5 acceptance: add dim-set-semantics + union-formula checks - §6 STOP triggers: add "tempted to narrow set → STOP and EXPAND" Director's Layer 2 brief at PR #2719 has the same singular-`dimension:` shape and likely has the same finding waiting to surface; will flag to Director after this lands. SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...-layer-2-pm-prestaged-mgr-fill-template.md | 109 ++++++++++-------- 1 file changed, 59 insertions(+), 50 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 4304e62fc10..e254bf019a8 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -6,7 +6,7 @@ **Purpose**: provide the Verification Mgr with a starting grouping (slow tests by file-area) plus a `(test_pattern, dimension, required_paths_regex)` skeleton aligned to the affected-set lens per-dimension output shape (`docs/design-affected-set-lens.md` §2). Mgr finalizes inventory + path-mapping; PM only provides the template + structural alignment. -**Hard constraint** (per `feedback_parallel_representation_debt`): every entry below carries a `dimension:` field matching the affected-set lens `Dimension` enum. The mechanism today is path-regex; the semantic carrier matches the future lens output so post-dissolution `skip_*` flags compute structurally as `affected_dimensions.contains(group.dimension)`. +**Hard constraint** (per `feedback_parallel_representation_debt` + locked design): every entry below carries a `dimensions:` **field** (Set) matching the affected-set lens `Dimension` enum. **Multi-dimension carriage is REQUIRED, not optional**: a consumer that reads both Cost AND Complexity must carry `dimensions: [Cost, Complexity]` — narrowing to a single "primary" dimension is a semantic-contract violation against `docs/design-affected-set-lens.md` §2 (full affected-set = union across every dimension the consumer reads). Post-dissolution `skip_*` flags compute structurally as `(affected_dimensions ∩ group.dimensions) ≠ ∅` (non-empty intersection means run), NOT `affected_dimensions.contains(single_primary)`. **Dissolution trigger**: gate `ci_uses_provable_minimal_affected_set_selection` (R3 close-blocking; `docs/design-affected-set-lens.md` §5). When the lens lands, this template + the worker output are deleted. @@ -26,7 +26,15 @@ enum Dimension { } ``` -Every test-group entry below carries exactly one primary `dimension:` (multi-dim tests pick the closest match; if a test genuinely spans dimensions, it falls into the "run-always" conservative bucket). +Every test-group entry below carries a `dimensions:` field that is a **Set** — the full set of dimensions the test/consumer reads, NOT a single "primary." Per `docs/design-affected-set-lens.md` §2: + +``` +affected_set(Dag_before, Dag_after) = + ⋃ over dim in {Value, Cost, Complexity, Effect, Refinement} + affected_set(Dag_before, Dag_after, dim) +``` + +A test/consumer is "affected" (must run) when **any** dimension it reads has a proven delta — set intersection, not single-value match. Narrowing multi-dim consumers to a single primary dimension would silently skip tests when only the non-primary dimension changes (semantic-contract violation; codex REQUEST_CHANGES on PR #2721 caught this in an earlier revision of this template). --- @@ -119,71 +127,70 @@ Source: `scripts/slow-test-exemptions.txt` (78 active entries as of 2026-05-11 E ## §3. Path-mapping skeleton (Mgr-fill table) -Each row: `(test_pattern, dimension, required_paths_regex, confidence, dissolution_note)`. +Each row: `(test_pattern, dimensions, required_paths_regex, confidence, dissolution_note)`. -PM partial-fills `dimension` where high confidence; Mgr finalizes `required_paths_regex`. Where PM marks `[Mgr-fill]`, the path-mapping requires deeper consumer-tracing than PM has bandwidth for (Mgr owns the lens canvas + Phase 3 brief, has the context). +`dimensions` is a **Set** — the full set of dimensions the test/consumer reads. Per the lens design §2, post-dissolution skip computation is `(affected_dimensions ∩ group.dimensions) ≠ ∅`. Where PM marks dimensions for a row, the set is the **complete read-set as best derived from the test name + comments**, not a primary; Mgr should expand the set if consumer tracing reveals more dimensions read. -**Conservative fail-closed default**: any group where Mgr is unsure of paths → mark `required_paths_regex: .*` (always-run). Dissolution is structural via the lens; bridge-debt period favors over-running over miss-running. +**Conservative fail-closed default**: any group where Mgr is unsure of paths → mark `required_paths_regex: .*` (always-run). Similarly, when in doubt about dimensions, **add more dimensions to the set, never narrow** — over-running is cheap during the bridge-debt period; miss-running violates the locked-design contract. -| Cluster | test_pattern | dimension | required_paths_regex | confidence | dissolution_note | +| Cluster | test_pattern | dimensions | required_paths_regex | confidence | dissolution_note | |---|---|---|---|---|---| -| A | `db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix` | Value | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/db8_.*\.rs)$` | high | gate ci_uses_provable_minimal_affected_set_selection lands → lens.affected_dimensions.contains(Value) | -| A | `emit_matrix_(module|program)_(go|python|rust)_is_deterministic` | Value | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/src/lens_.*\.rs|src/v3/compiler/tests/integration/emit_matrix.*\.rs)$` | high | same | -| A | `four_fixture_.*` | Value | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/four_fixture.*\.rs|tests/.*/four_fixture.*\.dag)$` | medium | same | -| A | `m1_3_emit_rust_test::rustc_roundtrip_.*` | Value | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/m1_3_emit_rust_test\.rs)$` | high | same | -| B | `lane2_stage_2d_symbolic_cost_test::.*` | Cost | `^(dsl/std/lens_cost.*\.dag|src/v3/compiler/src/lens_cost.*\.rs|dsl/std/cost.*\.dag|src/v3/compiler/tests/integration/lane2_stage_2d.*\.rs)$` | high | gate lands → lens.affected_dimensions.contains(Cost) | -| C | `m2_lens_cost_migration_test::complexity_.*` | Cost | `[Mgr-fill]` (likely: complexity.dag + lens_complexity*.rs + lens migration substrate) | medium | gate lands → Cost ∪ Complexity (note multi-dim) | -| C | `m2_lens_idempotency_migration_test::.*` | Effect | `^(dsl/std/lens_idempotency.*\.dag|src/v3/compiler/src/lens_idempotency.*\.rs|src/v3/compiler/tests/integration/m2_lens_idempotency.*\.rs)$` | high | same | -| C | `m2_lens_provenance_migration_test::.*` | Value | `^(dsl/std/lens_provenance.*\.dag|src/v3/compiler/src/lens_provenance.*\.rs|src/v3/compiler/tests/integration/m2_lens_provenance.*\.rs)$` | high | same | -| C | `m2_lens_unused_parameters_migration_test::.*` | Value | `^(dsl/std/lens_unused_parameters.*\.dag|src/v3/compiler/src/lens_unused_parameters.*\.rs|src/v3/compiler/tests/integration/m2_lens_unused_parameters.*\.rs)$` | high | same | -| D | `complexity_lens_behavioral_completion::.*` | Complexity | `[Mgr-fill]` (likely: lens_complexity + lens_cost + cementing substrate) | medium | gate lands → Complexity | -| D | `cost_lens_symbolic_consumer_test::.*` | Cost | `[Mgr-fill]` (likely: cost.dag + lens_cost*.rs + E-P substrate) | medium | gate lands → Cost | -| D | `lens_behavioral_parity_demonstration_test::r3_gate_73_.*` | Complexity | `[Mgr-fill]` (gate #73 LBP — needs cementing-test substrate dep) | medium | gate lands → Complexity ∪ Cost | -| D | `lens_cost_target_realization_test::.*` | Cost | `[Mgr-fill]` (cost-target-realization + rustc harness) | medium | gate lands → Cost ∪ Value | -| E | `dimension::analyze_complexity_tests::.*` | Complexity | `^(dsl/std/(complexity|cost|symbolic_cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration/dimension.*\.rs)$` | high | gate lands → Complexity | -| E | `dimension::fail_closed_tests::.*` | Complexity | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs)$` | medium | same | -| E | `e7_analyze_complexity_integration::.*` | Complexity | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs)$` | high | same | -| E | `lane2_stage_2f_dimension_test::.*` | Complexity | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs)$` | high | same | -| F | `m0_acceptance::.*` | Value | `.*` (conservative — compile-boundary is broad) | low | run-always; gate lands → lens picks structural affected-set | -| F | `m1_substrate_test::.*` | Value | `^(dsl/std/.*\.dag|src/v3/compiler/src/(parse|substrate).*\.rs|src/v3/compiler/tests/integration/m1_substrate.*\.rs)$` | medium | gate lands → Value | -| F | `tc1_substrate_lens_eta_equivalence_strict_fire_test::.*` | Value | `[Mgr-fill]` (substrate eta-equivalence — needs substrate-lens dep map) | medium | gate #11 lands; consider TC1 closure path | -| F | `t_pb_b_1_dag_runner_test::r3_gate_87_.*` | Cost | `[Mgr-fill]` (cementing-test substrate + regen harness) | medium | gate #87 Cluster M Phase 2 lands → dissolves naturally | -| F | `bootstrap::tests::kernel_bool_path_a_.*` | Value | `^(src/v3/compiler/src/bootstrap.*\.rs|dsl/std/types\.dag|dsl/std/boolean_algebra.*\.dag)$` | high | dissolves with Lane 1e-2b Path A close | -| G | `t_las_complexity_contract_compile_error_test::.*` | Complexity | `^(dsl/std/complexity.*\.dag|src/v3/compiler/src/(las|t_las).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | gate #92 lands | -| G | `t_las_crdt_cost_basis_demo_test::.*` | Cost | `^(dsl/std/(cost|las|crdt).*\.dag|src/v3/compiler/src/(las|t_las|crdt).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | T-LAS CRDT closure | -| G | `r3_free_consequences_second_batch_test::.*` | Cost | `[Mgr-fill]` (free-consequences second batch — cross-target optimization + symbolic-cost) | medium | gates #43-#52 (free-consequences) land | -| H | `sg2_parse_authority_test::.*` | Value | `^(dsl/std/parse.*\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | high | SG-2 parser-staging close | -| H | `sg2c1_parse_tables_authority_test::.*` | Value | `^(dsl/std/parse_tables.*\.dag|dsl/std/tokenize.*\.dag|src/v3/compiler/src/parse.*\.rs)$` | high | SG-2c-1 close | -| H | `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_.*` | Value | `^(scripts/regen.*|src/v3/compiler/src/(regen|cli).*\.rs|dsl/std/.*\.dag)$` | medium | SG-6 close | -| H | `r1c_e_emit_gates_dag_test::.*` | Value | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | -| H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | Value | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | -| H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l7_.*` | Value | `[Mgr-fill]` (gate #10 algebraic-law matrix) | medium | gate #10 close | -| H | `t_ci_workflow_as_data_demo_test::.*` | Value | `^(dsl/std/workflow.*\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | T-Workflow-As-Data close | -| I | `t_demo_fixture_test::.*` | Value | `^(tests/.*/t_demo.*\.dag|src/v3/compiler/src/(test_runner|runner).*\.rs|src/v3/compiler/tests/integration/t_demo.*\.rs)$` | medium | T-Demo lane close | -| I | `thesis_validation_test::kf_1_.*` | Value | `.*` (conservative — thesis-level validation is broad) | low | run-always; gate lands → lens picks | -| I | `common::cached_compile::tests::.*` | Value | `^(src/v3/compiler/src/cached_compile.*\.rs|src/v3/compiler/tests/common/cached_compile.*\.rs)$` | high | TESTING.md paydown | -| I | `int_literal_cardinality_test::int_refinement_overflow_is_proven_.*` | Refinement | `^(dsl/std/int.*\.dag|src/v3/compiler/src/(refinement|int_literal).*\.rs|src/v3/compiler/tests/integration/int_literal.*\.rs)$` | high | gate #21 close | -| I | `m1_5_verification_test::symbolic_cost_expr_equals_smoke_.*` | Value | `[Mgr-fill]` (M1.5 verification smoke — needs symbolic-cost equality harness dep map) | medium | M1.5 close | +| A | `db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix` | `[Value]` | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/db8_.*\.rs)$` | high | gate ci_uses_provable_minimal_affected_set_selection lands → lens emits per-Node delta; consumer reads only Value | +| A | `emit_matrix_(module|program)_(go|python|rust)_is_deterministic` | `[Value]` | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/src/lens_.*\.rs|src/v3/compiler/tests/integration/emit_matrix.*\.rs)$` | high | same | +| A | `four_fixture_.*` | `[Value]` | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/four_fixture.*\.rs|tests/.*/four_fixture.*\.dag)$` | medium | same | +| A | `m1_3_emit_rust_test::rustc_roundtrip_.*` | `[Value]` | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/m1_3_emit_rust_test\.rs)$` | high | same | +| B | `lane2_stage_2d_symbolic_cost_test::.*` | `[Cost]` | `^(dsl/std/lens_cost.*\.dag|src/v3/compiler/src/lens_cost.*\.rs|dsl/std/cost.*\.dag|src/v3/compiler/tests/integration/lane2_stage_2d.*\.rs)$` | high | gate lands → lens emits delta; consumer reads only Cost | +| C | `m2_lens_cost_migration_test::complexity_.*` | `[Cost, Complexity]` | `[Mgr-fill]` (likely: complexity.dag + lens_complexity*.rs + lens migration substrate) | medium | gate lands → set intersection trigger if either dim has delta | +| C | `m2_lens_idempotency_migration_test::.*` | `[Effect]` | `^(dsl/std/lens_idempotency.*\.dag|src/v3/compiler/src/lens_idempotency.*\.rs|src/v3/compiler/tests/integration/m2_lens_idempotency.*\.rs)$` | high | same | +| C | `m2_lens_provenance_migration_test::.*` | `[Value]` | `^(dsl/std/lens_provenance.*\.dag|src/v3/compiler/src/lens_provenance.*\.rs|src/v3/compiler/tests/integration/m2_lens_provenance.*\.rs)$` | high | same | +| C | `m2_lens_unused_parameters_migration_test::.*` | `[Value]` | `^(dsl/std/lens_unused_parameters.*\.dag|src/v3/compiler/src/lens_unused_parameters.*\.rs|src/v3/compiler/tests/integration/m2_lens_unused_parameters.*\.rs)$` | high | same | +| D | `complexity_lens_behavioral_completion::.*` | `[Complexity, Cost]` | `[Mgr-fill]` (likely: lens_complexity + lens_cost + cementing substrate) | medium | reads cementing summary for both Complexity and Cost dims | +| D | `cost_lens_symbolic_consumer_test::.*` | `[Cost]` | `[Mgr-fill]` (likely: cost.dag + lens_cost*.rs + E-P substrate) | medium | gate lands → Cost | +| D | `lens_behavioral_parity_demonstration_test::r3_gate_73_.*` | `[Complexity, Cost]` | `[Mgr-fill]` (gate #73 LBP — needs cementing-test substrate dep) | medium | LBP demonstration reads both certainty (Complexity) + symbolic-cost (Cost) | +| D | `lens_cost_target_realization_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (cost-target-realization + rustc harness) | medium | realization composes Cost projection with Value emission | +| E | `dimension::analyze_complexity_tests::.*` | `[Complexity]` | `^(dsl/std/(complexity|cost|symbolic_cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration/dimension.*\.rs)$` | high | gate lands → Complexity | +| E | `dimension::fail_closed_tests::.*` | `[Complexity]` | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs)$` | medium | same | +| E | `e7_analyze_complexity_integration::.*` | `[Complexity]` | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs)$` | high | same | +| E | `lane2_stage_2f_dimension_test::.*` | `[Complexity, Cost]` | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs)$` | high | "composed matches lens" reads BOTH analyze_symbolic_cost (Cost) and Complexity composition | +| F | `m0_acceptance::.*` | `[Value, Cost, Complexity, Effect, Refinement]` | `.*` (conservative — compile-boundary is broad) | low | compile-boundary touches every dim; run-always until lens lands | +| F | `m1_substrate_test::.*` | `[Value]` | `^(dsl/std/.*\.dag|src/v3/compiler/src/(parse|substrate).*\.rs|src/v3/compiler/tests/integration/m1_substrate.*\.rs)$` | medium | substrate reflects parse Value shape | +| F | `tc1_substrate_lens_eta_equivalence_strict_fire_test::.*` | `[Value]` | `[Mgr-fill]` (substrate eta-equivalence — needs substrate-lens dep map) | medium | gate #11 lands; eta-equivalence is a Value-relation | +| F | `t_pb_b_1_dag_runner_test::r3_gate_87_.*` | `[Cost]` | `[Mgr-fill]` (cementing-test substrate + regen harness) | medium | cementing oracle frozen-Cost lens output; gate #87 Cluster M Phase 2 lands → dissolves | +| F | `bootstrap::tests::kernel_bool_path_a_.*` | `[Value]` | `^(src/v3/compiler/src/bootstrap.*\.rs|dsl/std/types\.dag|dsl/std/boolean_algebra.*\.dag)$` | high | dissolves with Lane 1e-2b Path A close | +| G | `t_las_complexity_contract_compile_error_test::.*` | `[Complexity]` | `^(dsl/std/complexity.*\.dag|src/v3/compiler/src/(las|t_las).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | gate #92 lands; compile-error on Complexity contract violation | +| G | `t_las_crdt_cost_basis_demo_test::.*` | `[Cost, Effect, Value]` | `^(dsl/std/(cost|las|crdt).*\.dag|src/v3/compiler/src/(las|t_las|crdt).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | CRDT cost-basis reads Cost (log budget) + Effect (replica merge) + Value (replica state shape) | +| G | `r3_free_consequences_second_batch_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (free-consequences second batch — cross-target optimization + symbolic-cost) | medium | cross-target optimization reads BOTH Cost (symbolic_cost_witness) and Value (constant_fold consistency); gates #43-#52 (free-consequences) land | +| H | `sg2_parse_authority_test::.*` | `[Value]` | `^(dsl/std/parse.*\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | high | SG-2 parser-staging close | +| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(dsl/std/parse_tables.*\.dag|dsl/std/tokenize.*\.dag|src/v3/compiler/src/parse.*\.rs)$` | high | SG-2c-1 close | +| H | `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_.*` | `[Value]` | `^(scripts/regen.*|src/v3/compiler/src/(regen|cli).*\.rs|dsl/std/.*\.dag)$` | medium | SG-6 close | +| H | `r1c_e_emit_gates_dag_test::.*` | `[Value]` | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | +| H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | `[Value]` | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | +| H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l7_.*` | `[Value]` | `[Mgr-fill]` (gate #10 algebraic-law matrix) | medium | gate #10 close | +| H | `t_ci_workflow_as_data_demo_test::.*` | `[Value, Cost]` | `^(dsl/std/workflow.*\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | workflow-as-data demo reads both Value (workflow shape) + Cost (DimensionReport timing dim evaluates) | +| I | `t_demo_fixture_test::.*` | `[Value]` | `^(tests/.*/t_demo.*\.dag|src/v3/compiler/src/(test_runner|runner).*\.rs|src/v3/compiler/tests/integration/t_demo.*\.rs)$` | medium | T-Demo lane close | +| I | `thesis_validation_test::kf_1_.*` | `[Value, Cost, Complexity, Effect, Refinement]` | `.*` (conservative — thesis-level validation is broad) | low | thesis-level validation reads every dim | +| I | `common::cached_compile::tests::.*` | `[Value]` | `^(src/v3/compiler/src/cached_compile.*\.rs|src/v3/compiler/tests/common/cached_compile.*\.rs)$` | high | TESTING.md paydown | +| I | `int_literal_cardinality_test::int_refinement_overflow_is_proven_.*` | `[Refinement]` | `^(dsl/std/int.*\.dag|src/v3/compiler/src/(refinement|int_literal).*\.rs|src/v3/compiler/tests/integration/int_literal.*\.rs)$` | high | gate #21 close | +| I | `m1_5_verification_test::symbolic_cost_expr_equals_smoke_.*` | `[Cost]` | `[Mgr-fill]` (M1.5 verification smoke — needs symbolic-cost equality harness dep map) | medium | M1.5 close | --- ## §4. Open questions for Mgr-fill -1. **Multi-dimension tests**: rows marked Cost-or-Complexity (e.g., D-cluster LBP, G-cluster free-consequences) — does Mgr split into separate rows per dimension, or accept "primary dimension + conservative regex covers both"? Recommendation: primary dimension is sufficient because the path-regex naturally pulls in both axes' source files. +1. **Multi-dimension rows (D, G, F-`m0_acceptance`, I-`thesis_validation_test`)**: these carry sets like `[Cost, Complexity]` or the full 5-dim set. Mgr should NOT narrow these sets — per the locked design, a test that reads N dimensions is in the affected-set when ANY of those N dimensions has a delta (union semantics). The earlier draft of this template ("primary dimension is sufficient") was a semantic-contract violation caught by codex REQUEST_CHANGES on PR #2721 and is fixed in this revision. **When in doubt about a dim, ADD it to the set, never narrow.** -2. **Conservative-run-always candidates**: `m0_acceptance::*` and `thesis_validation_test::*` are marked `.*` (always-run). Mgr decides if these justify the cost (~3-5s each cold) or warrant a tighter regex. PM read: keep `.*` until the lens lands; the safety margin is cheap. +2. **Conservative-run-always candidates**: `m0_acceptance::*` and `thesis_validation_test::*` carry the full 5-dim set + `.*` regex (always-run). Mgr decides if these justify the cost (~3-5s each cold) or warrant tighter scoping. PM read: keep `.*` until the lens lands; the safety margin is cheap. 3. **`[Mgr-fill]` rows count**: 12 rows out of ~36 need Mgr to derive `required_paths_regex` from consumer tracing. PM left these blank where derivation requires deeper substrate knowledge (substrate-lens deps, R3-V L4/L7 direct-consumer maps, R1C-E `.dag` wrapper internals, free-consequences cross-target topology). -4. **Mechanism — single regex per row vs `paths-ignore`-style**: this template uses a single positive regex per row (required_paths_regex). GitHub Actions doesn't natively support per-step path filtering, so the CI consumer is a shell snippet in `ci.yml`: +4. **Mechanism — single regex per row + dimension-set per row**: each row contributes to `skip_` computation as: `skip_ = "true" iff (changed files ∩ required_paths_regex matches is empty)`. Dimension-set is the **structural carrier for post-dissolution lens substitution**: when the lens lands, `skip_` becomes `(affected_dimensions ∩ row.dimensions) ≠ ∅`. The CI consumer is a shell snippet in `ci.yml`: ```yaml - name: if: needs.changes.outputs.skip_ != 'true' run: cargo test -p v3-compiler --test integration ``` - The `changes` job computes each `skip_` boolean by checking if any changed file matches the cluster's `required_paths_regex`. -5. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, ~6 tests, single dimension (Cost). Lowest risk, highest learning per LOC. +5. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, ~6 tests, **single-dimension set `[Cost]`** (no multi-dim union complexity for the pilot). Lowest risk, highest learning per LOC. --- @@ -195,14 +202,16 @@ Mgr-fill complete when: - [ ] Each cluster has a pilot-PR worker brief authored (or batched into the Director-authored Layer 2 brief). - [ ] `changes` job in `ci.yml` extended with per-cluster `skip_` boolean outputs. - [ ] At least one cluster (pilot) has its `if: needs.changes.outputs.skip_ != 'true'` gate landed and CI-validated against a representative test case (docs-only PR skips; in-cluster code change runs). -- [ ] All path-mapping entries have `dimension:` field aligned to the affected-set lens `Dimension` enum. +- [ ] All path-mapping entries have a `dimensions:` field that is a Set with every member of the set in `{Value, Cost, Complexity, Effect, Refinement}`. **Single-element sets are valid (e.g., `[Cost]`); narrowing a known-multi-dim consumer to a single-element set is not.** +- [ ] Post-dissolution mapping verified: each row's `skip_` formula reads `(affected_dimensions ∩ row.dimensions) ≠ ∅` (union semantics), NOT `affected_dimensions.contains(single_primary)`. --- ## §6. STOP triggers (Mgr aborts and surfaces to Director) - Any cluster needs a *new* substrate carrier to express path-dependency → STOP. Surface to Director: this is the lens substrate, not a bridge. -- Any path-mapping entry has `dimension:` outside `{Value, Cost, Complexity, Effect, Refinement}` → STOP. Surface to Director: this is a coproduct-dissolution candidate. +- Any path-mapping entry has a `dimensions:` element outside `{Value, Cost, Complexity, Effect, Refinement}` → STOP. Surface to Director: this is a coproduct-dissolution candidate. +- Any row tempted to use a single-dimension `dimensions:` set when consumer tracing reveals multi-dim reads → STOP and EXPAND the set. Narrowing is a semantic-contract violation (codex REQUEST_CHANGES on PR #2721 caught one such instance; do not regress). - Any cluster's `required_paths_regex` requires depending on test-output (not just changed files) → STOP. That's the lens, not the bridge. --- From 93080af472cd151abd31abe1e89c26fd724c5f16 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Mon, 11 May 2026 23:21:27 +0000 Subject: [PATCH 03/14] docs(briefs): Layer 2 template count + wording fixes (cursor BLOCKING #9719 on PR #2721) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cursor BLOCKING REVIEW on PR #2721 (review #9719 at dedcf69a) caught factual count discrepancies + the stale singular `dimension` echo that openai-pro had flagged as non-blocking: 1. Cluster A banner — was "(~10)", actual sum = 1+6+2+6 = 15 → fixed to "(15)" 2. Cluster B individual-row count "6" while listing 7 names → fixed to 7; banner "(~6)" → "(7)" 3. emit_matrix Notes "5× emit matrix sweep" while listing 6 tests (3 module + 3 program) → fixed to "6× emit matrix sweep (3 module + 3 program)" for explicit attribution 4. Cluster D banner "(~5)", actual sum = 2+3+2+2 = 9 → fixed to "(9)" 5. Line 7 (Purpose) stale singular `(test_pattern, dimension, required_paths_regex)` echo → fixed to `dimensions` plural; converges with openai-pro APPROVE_WITH_COMMENTS observation (review #9714) that had been deferred to follow-up — cursor's BLOCKING verdict overrides the deferral §4 Open question 5 (pilot recommendation) also corrected from "~6 tests" to "7 tests" for Cluster B consistency. Clusters C/E/F/G/H/I banner counts re-verified against table sums (7/12/6/10/7/5 respectively) — all already exact, no change needed. P1 Modeling Faithfulness restored: every cluster banner now matches its enumerated tests-column sum. SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...r3-ci-layer-2-pm-prestaged-mgr-fill-template.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index e254bf019a8..c5f9dc12e64 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -4,7 +4,7 @@ **Authority**: PM authoring; Director-cited; Mgr-fill destination. Pre-staged 2026-05-11 EOD per Director greenlight at msg_4623068b. -**Purpose**: provide the Verification Mgr with a starting grouping (slow tests by file-area) plus a `(test_pattern, dimension, required_paths_regex)` skeleton aligned to the affected-set lens per-dimension output shape (`docs/design-affected-set-lens.md` §2). Mgr finalizes inventory + path-mapping; PM only provides the template + structural alignment. +**Purpose**: provide the Verification Mgr with a starting grouping (slow tests by file-area) plus a `(test_pattern, dimensions, required_paths_regex)` skeleton aligned to the affected-set lens per-dimension output shape (`docs/design-affected-set-lens.md` §2). Mgr finalizes inventory + path-mapping; PM only provides the template + structural alignment. **Hard constraint** (per `feedback_parallel_representation_debt` + locked design): every entry below carries a `dimensions:` **field** (Set) matching the affected-set lens `Dimension` enum. **Multi-dimension carriage is REQUIRED, not optional**: a consumer that reads both Cost AND Complexity must carry `dimensions: [Cost, Complexity]` — narrowing to a single "primary" dimension is a semantic-contract violation against `docs/design-affected-set-lens.md` §2 (full affected-set = union across every dimension the consumer reads). Post-dissolution `skip_*` flags compute structurally as `(affected_dimensions ∩ group.dimensions) ≠ ∅` (non-empty intersection means run), NOT `affected_dimensions.contains(single_primary)`. @@ -42,20 +42,20 @@ A test/consumer is "affected" (must run) when **any** dimension it reads has a p Source: `scripts/slow-test-exemptions.txt` (78 active entries as of 2026-05-11 EOD at sha e9c8f9896). Grouped by module prefix; counts in parens. -### Cluster A — Emission / determinism (~10) +### Cluster A — Emission / determinism (15) | Module | Tests | Notes | |---|---|---| | `db8_*` | 1 (`db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix`) | DB-8 / ROADMAP Lane 3 Stage 3c | -| `emit_matrix_*` | 6 (`emit_matrix_module_{go,python,rust}_is_deterministic` + `emit_matrix_program_*`) | 5× emit matrix sweep | +| `emit_matrix_*` | 6 (`emit_matrix_module_{go,python,rust}_is_deterministic` + `emit_matrix_program_*`) | 6× emit matrix sweep (3 module + 3 program) | | `four_fixture_*` | 2 (`four_fixture_disk_sources_emit_deterministically` + `four_fixture_regression_test::four_fixture_suite_shares_one_reachability_shape`) | 4-fixture corpus | | `m1_3_emit_rust_test::*` | 6 | M1.3 Rust roundtrip rustc harness | -### Cluster B — Lane 2 Stage 2d cost migration (~6) +### Cluster B — Lane 2 Stage 2d cost migration (7) | Module | Tests | |---|---| -| `lane2_stage_2d_symbolic_cost_test::*` | 6 (`branch_reports_constant_when_both_arms_constant`, `cost_dag_compiles_cleanly`, `cost_generated_module_matches_checked_in_snapshot`, `recursive_fn_body_contributes_to_loop_cost`, `recursive_fn_reports_linear_via_loop_lowering`, `transform_single_op_reports_constant`, `value_reports_constant`) | +| `lane2_stage_2d_symbolic_cost_test::*` | 7 (`branch_reports_constant_when_both_arms_constant`, `cost_dag_compiles_cleanly`, `cost_generated_module_matches_checked_in_snapshot`, `recursive_fn_body_contributes_to_loop_cost`, `recursive_fn_reports_linear_via_loop_lowering`, `transform_single_op_reports_constant`, `value_reports_constant`) | ### Cluster C — M2 lens migration (~7) @@ -66,7 +66,7 @@ Source: `scripts/slow-test-exemptions.txt` (78 active entries as of 2026-05-11 E | `m2_lens_provenance_migration_test::*` | 1 (`lens_provenance_dag_runs_end_to_end_via_rustc_harness`) | | `m2_lens_unused_parameters_migration_test::*` | 2 (`unused_parameters_dag_runs_end_to_end_via_rustc_harness`, `unused_parameters_dag_self_analysis_reports_zero_findings`) | -### Cluster D — T-Lens-Behavioral-Parity / gate #73 / cost lens consumer (~5) +### Cluster D — T-Lens-Behavioral-Parity / gate #73 / cost lens consumer (9) | Module | Tests | |---|---| @@ -190,7 +190,7 @@ Each row: `(test_pattern, dimensions, required_paths_regex, confidence, dissolut run: cargo test -p v3-compiler --test integration ``` -5. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, ~6 tests, **single-dimension set `[Cost]`** (no multi-dim union complexity for the pilot). Lowest risk, highest learning per LOC. +5. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, 7 tests, **single-dimension set `[Cost]`** (no multi-dim union complexity for the pilot). Lowest risk, highest learning per LOC. --- From 262f42d7d9090e4bc7c0cb6657a155a018e2b578 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Mon, 11 May 2026 23:29:28 +0000 Subject: [PATCH 04/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20fix=20skip=5F=20polarity=20(openai-pro=20B?= =?UTF-8?q?LOCKING=20#9721=20on=20PR=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit openai-pro re-review on PR #2721 at sha 93080af4 caught a critical boolean polarity inversion in the skip_ formula. A Mgr/worker following the brief literally would have wired the CI gate backward, silently skipping affected tests — TESTING.md "test selection must not skip affected behavior" violation + Boundary Discipline violation (boolean carrier name and contract encoded opposite meanings). **The bug**: 4 places stated post-dissolution `skip_` formula as `(affected_dimensions ∩ group.dimensions) ≠ ∅` (skip when intersection NON-empty), while the CI consumer wires `if: skip_ != 'true'` (run when skip is NOT true). Combined: when intersection is non-empty (= affected), skip=true → tests don't run → affected tests silently skipped. **The fix**: invert the formula to `(intersection = ∅)` (skip when intersection IS empty = no affected dim that this cluster reads). The CI gate semantics stay the same; the polarity correction is on the post-dissolution lens mapping. Sites corrected: - §1 hard-constraint para (line 9): replaced "(non-empty intersection means run)" with an explicit Boolean polarity block defining `skip = (intersection = ∅)` and equivalent `run = (intersection ≠ ∅)` - §3 path-mapping intro (was line 132, now 142): same polarity fix + "Equivalently: `run = (intersection ≠ ∅)`" - §4 open-question 4 (was line 186, now 196): "skip_ becomes `(intersection ≠ ∅)`" → `(intersection = ∅)` with explicit "same polarity: skip when no affected dim" note - §5 acceptance (was line 206, now 216): same polarity fix + explicit "inverting the polarity silently skips affected tests" warning All 4 references now consistent. Polarity table: intersection = ∅ → skip=true → "do not run" (NOT affected, safe to skip) intersection ≠ ∅ → skip=false → "run" (affected, must run) Director's brief #2719 likely has the same polarity issue and will need parallel fix from the same authority chain. Flagging separately. SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...i-layer-2-pm-prestaged-mgr-fill-template.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index c5f9dc12e64..6083f694dea 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -6,7 +6,17 @@ **Purpose**: provide the Verification Mgr with a starting grouping (slow tests by file-area) plus a `(test_pattern, dimensions, required_paths_regex)` skeleton aligned to the affected-set lens per-dimension output shape (`docs/design-affected-set-lens.md` §2). Mgr finalizes inventory + path-mapping; PM only provides the template + structural alignment. -**Hard constraint** (per `feedback_parallel_representation_debt` + locked design): every entry below carries a `dimensions:` **field** (Set) matching the affected-set lens `Dimension` enum. **Multi-dimension carriage is REQUIRED, not optional**: a consumer that reads both Cost AND Complexity must carry `dimensions: [Cost, Complexity]` — narrowing to a single "primary" dimension is a semantic-contract violation against `docs/design-affected-set-lens.md` §2 (full affected-set = union across every dimension the consumer reads). Post-dissolution `skip_*` flags compute structurally as `(affected_dimensions ∩ group.dimensions) ≠ ∅` (non-empty intersection means run), NOT `affected_dimensions.contains(single_primary)`. +**Hard constraint** (per `feedback_parallel_representation_debt` + locked design): every entry below carries a `dimensions:` **field** (Set) matching the affected-set lens `Dimension` enum. **Multi-dimension carriage is REQUIRED, not optional**: a consumer that reads both Cost AND Complexity must carry `dimensions: [Cost, Complexity]` — narrowing to a single "primary" dimension is a semantic-contract violation against `docs/design-affected-set-lens.md` §2 (full affected-set = union across every dimension the consumer reads). + +**Boolean polarity (load-bearing)**: `skip_ = true` means "no relevant change for this cluster — safe to skip its tests." `skip_ = false` means "relevant change detected — must run." The CI consumer wires `if: needs.changes.outputs.skip_ != 'true'` (run when skip is NOT true). Post-dissolution mapping under the affected-set lens: + +``` +skip_ = (affected_dimensions ∩ row.dimensions) = ∅ + ⇔ no affected dim that this cluster reads + ⇔ safe to skip +``` + +Equivalently: `run_ = (affected_dimensions ∩ row.dimensions) ≠ ∅`. The boolean polarity must match the CI gate semantics; setting `skip=true` on non-empty intersection would silently skip affected tests (TESTING.md violation, openai-pro REQUEST_CHANGES caught an earlier inversion). **Dissolution trigger**: gate `ci_uses_provable_minimal_affected_set_selection` (R3 close-blocking; `docs/design-affected-set-lens.md` §5). When the lens lands, this template + the worker output are deleted. @@ -129,7 +139,7 @@ Source: `scripts/slow-test-exemptions.txt` (78 active entries as of 2026-05-11 E Each row: `(test_pattern, dimensions, required_paths_regex, confidence, dissolution_note)`. -`dimensions` is a **Set** — the full set of dimensions the test/consumer reads. Per the lens design §2, post-dissolution skip computation is `(affected_dimensions ∩ group.dimensions) ≠ ∅`. Where PM marks dimensions for a row, the set is the **complete read-set as best derived from the test name + comments**, not a primary; Mgr should expand the set if consumer tracing reveals more dimensions read. +`dimensions` is a **Set** — the full set of dimensions the test/consumer reads. Per the lens design §2, post-dissolution skip computation is `skip_ = (affected_dimensions ∩ group.dimensions) = ∅` (skip when intersection IS empty / no affected dim that this cluster reads). Equivalently: `run = (intersection ≠ ∅)`. Where PM marks dimensions for a row, the set is the **complete read-set as best derived from the test name + comments**, not a primary; Mgr should expand the set if consumer tracing reveals more dimensions read. **Conservative fail-closed default**: any group where Mgr is unsure of paths → mark `required_paths_regex: .*` (always-run). Similarly, when in doubt about dimensions, **add more dimensions to the set, never narrow** — over-running is cheap during the bridge-debt period; miss-running violates the locked-design contract. @@ -183,7 +193,7 @@ Each row: `(test_pattern, dimensions, required_paths_regex, confidence, dissolut 3. **`[Mgr-fill]` rows count**: 12 rows out of ~36 need Mgr to derive `required_paths_regex` from consumer tracing. PM left these blank where derivation requires deeper substrate knowledge (substrate-lens deps, R3-V L4/L7 direct-consumer maps, R1C-E `.dag` wrapper internals, free-consequences cross-target topology). -4. **Mechanism — single regex per row + dimension-set per row**: each row contributes to `skip_` computation as: `skip_ = "true" iff (changed files ∩ required_paths_regex matches is empty)`. Dimension-set is the **structural carrier for post-dissolution lens substitution**: when the lens lands, `skip_` becomes `(affected_dimensions ∩ row.dimensions) ≠ ∅`. The CI consumer is a shell snippet in `ci.yml`: +4. **Mechanism — single regex per row + dimension-set per row**: each row contributes to `skip_` computation as: `skip_ = "true" iff (changed files ∩ required_paths_regex matches is empty)` — i.e., skip when no relevant file changed. Dimension-set is the **structural carrier for post-dissolution lens substitution**: when the lens lands, `skip_` becomes `(affected_dimensions ∩ row.dimensions) = ∅` — same polarity: skip when no affected dim that this cluster reads (intersection is empty). The CI consumer is a shell snippet in `ci.yml`: ```yaml - name: if: needs.changes.outputs.skip_ != 'true' @@ -203,7 +213,7 @@ Mgr-fill complete when: - [ ] `changes` job in `ci.yml` extended with per-cluster `skip_` boolean outputs. - [ ] At least one cluster (pilot) has its `if: needs.changes.outputs.skip_ != 'true'` gate landed and CI-validated against a representative test case (docs-only PR skips; in-cluster code change runs). - [ ] All path-mapping entries have a `dimensions:` field that is a Set with every member of the set in `{Value, Cost, Complexity, Effect, Refinement}`. **Single-element sets are valid (e.g., `[Cost]`); narrowing a known-multi-dim consumer to a single-element set is not.** -- [ ] Post-dissolution mapping verified: each row's `skip_` formula reads `(affected_dimensions ∩ row.dimensions) ≠ ∅` (union semantics), NOT `affected_dimensions.contains(single_primary)`. +- [ ] Post-dissolution mapping verified: each row's `skip_` formula reads `(affected_dimensions ∩ row.dimensions) = ∅` (skip when intersection IS empty / nothing affected), NOT `≠ ∅`. The CI gate is `if: skip_ != 'true'` (run when skip is false); inverting the polarity silently skips affected tests. --- From d19a1a03ddb9a7710ca74a0000fbe3de0696fb12 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 00:50:04 +0000 Subject: [PATCH 05/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20cluster=20aggregation=20+=20path-regex=20verificati?= =?UTF-8?q?on=20discipline=20(codex=20BLOCKING=20on=20PR=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codex BLOCKING review on PR #2721 at sha 262f42d7 caught two substantive gaps: **(1) Cluster aggregation predicate missing**: §3 defined per-row intersection check but didn't specify how multi-row clusters aggregate to the cluster-level `skip_` boolean. A worker following the brief could implement disjunction (any-row-empty = skip cluster) which would silently skip the OTHER affected rows in the cluster when only one row is unaffected. Fix: explicit conjunction predicate in §3 + §4 + §5 + §6: skip_ = ∀ row ∈ cluster : (changed_files ∩ row.regex) = ∅ Equivalently: run_ = ∃ row ∈ cluster : row affected. **(2) Path regexes PM-authored without source-tree verification**: PM concrete `required_paths_regex` values in §3 were manually authored from the inventory SHA references without validation against actual paths in the source tree. Workers might wire CI gates against stale paths. Fix: explicit Mgr-verification discipline in §3 + §4 + §5 + §6: - Workers MUST validate each concrete regex against source tree at HEAD before CI implementation - Unverified or unverifiable regexes → `.*` per conservative fail-closed default - Confidence column treated as audit priority (low → `.*` first, medium → audit then decide, high → audit but likely fine) - Validation record kept (PR description or commit message) Both fixes preserve the locked-design polarity from earlier revisions: - Per-row formula stays `(intersection = ∅)` for skip semantic - Cluster aggregation is conjunction over rows (∀) - Run formula is the structural complement (∃ ↔ ≠ ∅) All 4 places updated: §3 path-mapping skeleton intro + §4 mechanism + §5 acceptance + §6 STOP triggers. Brief now structurally guards against: - polarity inversion (skip = ∅, not ≠ ∅; openai-pro caught prior) - dimension cardinality narrowing (Set, not single; codex caught prior) - cluster aggregation by disjunction (∀, not ∃; codex caught this) - regex authoring without source-tree validation (codex caught this) SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...-layer-2-pm-prestaged-mgr-fill-template.md | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 6083f694dea..7312ed3af40 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -143,6 +143,17 @@ Each row: `(test_pattern, dimensions, required_paths_regex, confidence, dissolut **Conservative fail-closed default**: any group where Mgr is unsure of paths → mark `required_paths_regex: .*` (always-run). Similarly, when in doubt about dimensions, **add more dimensions to the set, never narrow** — over-running is cheap during the bridge-debt period; miss-running violates the locked-design contract. +**Cluster aggregation predicate** (load-bearing per codex BLOCKING on earlier revision): a cluster has multiple rows (e.g., Cluster A has 4 modules). The cluster-level `skip_` boolean is computed by **conjunction** over rows — skip the cluster ONLY when ALL rows are unaffected: + +``` +skip_ = ∀ row ∈ cluster : + (changed_files ∩ row.required_paths_regex matches) = ∅ +``` + +Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating with `any-row-empty` (i.e., disjunction) would skip the cluster when only ONE row is affected — silently skipping the OTHER affected rows. Aggregation must be `all-rows-empty` (conjunction). + +**Path-mapping verification discipline** (load-bearing per codex BLOCKING on earlier revision): the `required_paths_regex` values below are **PM best-effort manual authoring** — they have NOT been verified against the live source tree at the cited inventory sha (`e9c8f9896`). Workers MUST validate each regex against the source tree at HEAD before implementing the CI gate. Any regex that does not match a path actually present in the tree, OR that a Mgr cannot quickly verify, MUST be replaced with `.*` (always-run) — the conservative fail-closed default. The `confidence` column indicates PM's subjective certainty per row; treat `low` rows as `.*` candidates first, `medium` as audit-then-decide, `high` as audit-but-likely-fine. + | Cluster | test_pattern | dimensions | required_paths_regex | confidence | dissolution_note | |---|---|---|---|---|---| | A | `db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix` | `[Value]` | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/db8_.*\.rs)$` | high | gate ci_uses_provable_minimal_affected_set_selection lands → lens emits per-Node delta; consumer reads only Value | @@ -193,14 +204,30 @@ Each row: `(test_pattern, dimensions, required_paths_regex, confidence, dissolut 3. **`[Mgr-fill]` rows count**: 12 rows out of ~36 need Mgr to derive `required_paths_regex` from consumer tracing. PM left these blank where derivation requires deeper substrate knowledge (substrate-lens deps, R3-V L4/L7 direct-consumer maps, R1C-E `.dag` wrapper internals, free-consequences cross-target topology). -4. **Mechanism — single regex per row + dimension-set per row**: each row contributes to `skip_` computation as: `skip_ = "true" iff (changed files ∩ required_paths_regex matches is empty)` — i.e., skip when no relevant file changed. Dimension-set is the **structural carrier for post-dissolution lens substitution**: when the lens lands, `skip_` becomes `(affected_dimensions ∩ row.dimensions) = ∅` — same polarity: skip when no affected dim that this cluster reads (intersection is empty). The CI consumer is a shell snippet in `ci.yml`: +4. **Mechanism — per-row regex + cluster-level aggregation**: each row contributes a per-row intersection check `(changed_files ∩ row.required_paths_regex matches) = ∅`. The cluster-level boolean **aggregates by conjunction** (all-rows-empty), NOT disjunction: + + ``` + skip_ = ∀ row ∈ cluster : (changed_files ∩ row.required_paths_regex) = ∅ + ``` + + Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating by disjunction (any-row-empty) would silently skip the cluster when only ONE row is affected — running affected tests is mandatory per locked-design contract. **Conjunction is load-bearing; do not invert.** + + Dimension-set is the **structural carrier for post-dissolution lens substitution**: when the lens lands, per-row paths flip to per-row dimension-intersection, but the cluster-level conjunction over rows stays the same: + + ``` + skip_ = ∀ row ∈ cluster : (affected_dimensions ∩ row.dimensions) = ∅ + ``` + + Same polarity, same aggregation. The CI consumer is a shell snippet in `ci.yml`: ```yaml - name: if: needs.changes.outputs.skip_ != 'true' run: cargo test -p v3-compiler --test integration ``` -5. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, 7 tests, **single-dimension set `[Cost]`** (no multi-dim union complexity for the pilot). Lowest risk, highest learning per LOC. +5. **PM-best-effort regex verification** (per codex BLOCKING on earlier revision): the `required_paths_regex` values in §3 are PM-authored without source-tree verification at the cited inventory sha (`e9c8f9896`). Workers MUST validate each regex against live source tree at HEAD before CI implementation. Unverified or unverifiable regexes → replace with `.*` per the conservative fail-closed default. Treat the `confidence` column as audit priority: `low` → `.*` first, `medium` → audit then decide, `high` → audit but likely fine. + +6. **Pilot cluster selection**: which cluster does Mgr prototype first? PM recommendation: **Cluster B (Lane 2 Stage 2d symbolic cost)** — high confidence in path-regex, contained module, 7 tests, **single-dimension set `[Cost]`** (no multi-dim union complexity for the pilot). Lowest risk, highest learning per LOC. --- @@ -213,7 +240,9 @@ Mgr-fill complete when: - [ ] `changes` job in `ci.yml` extended with per-cluster `skip_` boolean outputs. - [ ] At least one cluster (pilot) has its `if: needs.changes.outputs.skip_ != 'true'` gate landed and CI-validated against a representative test case (docs-only PR skips; in-cluster code change runs). - [ ] All path-mapping entries have a `dimensions:` field that is a Set with every member of the set in `{Value, Cost, Complexity, Effect, Refinement}`. **Single-element sets are valid (e.g., `[Cost]`); narrowing a known-multi-dim consumer to a single-element set is not.** -- [ ] Post-dissolution mapping verified: each row's `skip_` formula reads `(affected_dimensions ∩ row.dimensions) = ∅` (skip when intersection IS empty / nothing affected), NOT `≠ ∅`. The CI gate is `if: skip_ != 'true'` (run when skip is false); inverting the polarity silently skips affected tests. +- [ ] Post-dissolution mapping verified: each row's per-row formula reads `(affected_dimensions ∩ row.dimensions) = ∅` (skip when intersection IS empty / nothing affected), NOT `≠ ∅`. The CI gate is `if: skip_ != 'true'` (run when skip is false); inverting the polarity silently skips affected tests. +- [ ] **Cluster-level aggregation verified**: `skip_` aggregates per-row results by conjunction (`∀ row : row-skip-empty`). NOT disjunction (`∃ row : row-skip-empty`). Disjunction silently skips affected rows when only one row is unaffected. +- [ ] **Path regex validation against live source tree**: every concrete (non-`.*`) `required_paths_regex` validated against source tree at HEAD before CI implementation. Unverified entries replaced with `.*` per conservative default. Validation record kept (PR description or commit message citing the validation pass). --- @@ -223,6 +252,8 @@ Mgr-fill complete when: - Any path-mapping entry has a `dimensions:` element outside `{Value, Cost, Complexity, Effect, Refinement}` → STOP. Surface to Director: this is a coproduct-dissolution candidate. - Any row tempted to use a single-dimension `dimensions:` set when consumer tracing reveals multi-dim reads → STOP and EXPAND the set. Narrowing is a semantic-contract violation (codex REQUEST_CHANGES on PR #2721 caught one such instance; do not regress). - Any cluster's `required_paths_regex` requires depending on test-output (not just changed files) → STOP. That's the lens, not the bridge. +- Any cluster aggregation tempted to use **disjunction** (`∃ row : row-skip-empty`) instead of **conjunction** (`∀ row : row-skip-empty`) → STOP. Disjunction silently skips affected rows; conjunction is load-bearing (codex BLOCKING on PR #2721 caught this gap; aggregation predicate now explicit at §3 + §4 + §5). +- Any concrete `required_paths_regex` adopted without source-tree validation at HEAD → STOP and replace with `.*` per conservative fail-closed default. PM-best-effort regexes in §3 are NOT pre-validated; Mgr must validate before CI implementation (codex BLOCKING on PR #2721 caught this gap). --- From 45fc195ac6c09bbbed83851cbf7743f0b7eaecd8 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 00:54:07 +0000 Subject: [PATCH 06/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20fix=20stale=20dsl/std/=20lens-paths=20(codex=20BLOC?= =?UTF-8?q?KING=20inline=20at=20line=20152)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codex BLOCKING inline-review at line 152 (sha 262f42d7) caught that Cluster B's regex used stale `dsl/std/lens_cost.*\.dag` + `dsl/std/cost.*\.dag` paths while the live cost-lens authority is at `src/v3/lenses/cost.dag`. A change to the live authority file would NOT match the stale regex → skip_b=true → cost-lens tests silently skipped (P3 fail-closed + P2 single-authority violation). **Systematic audit + fix**: stale `dsl/std/.dag` pattern applied across many rows (PM authored assuming lens .dag lived in dsl/std/, but the live tree has them at src/v3/lenses/): | Row | Old (stale) | New (verified) | |-----|------------------------------------------------|----------------------------------------------------------------| | B | dsl/std/lens_cost.*.dag + dsl/std/cost.*.dag | src/v3/lenses/cost(_target_realization)?.dag | | C-i | dsl/std/lens_idempotency.*.dag | src/v3/lenses/idempotency.dag | | C-p | dsl/std/lens_provenance.*.dag | src/v3/lenses/(provenance\|emission_provenance).dag | | C-u | dsl/std/lens_unused_parameters.*.dag | src/v3/lenses/unused_parameters.dag | | E×4 | dsl/std/(complexity\|cost\|symbolic_cost).*.dag | src/v3/lenses/(complexity\|cost).dag | | F-b | dsl/std/boolean_algebra.*.dag | dsl/std/logic.dag (boolean-algebra concepts live there) | | G-c | dsl/std/complexity.*.dag | src/v3/lenses/complexity.dag | | G-l | dsl/std/(cost\|las\|crdt).*.dag | `.*` (Mgr-fill; T-LAS substrate-deps not PM-traced yet) | | H-2 | dsl/std/parse.*.dag | src/v3/std/parse_surface.dag + src/v3/compiler/parse_tables.dag| | H-2c| dsl/std/parse_tables.*.dag + dsl/std/tokenize | src/v3/compiler/parse_tables.dag + src/v3/(compiler\|std)/tokenize.dag | | H-w | dsl/std/workflow.*.dag | src/v3/std/workflows.dag | Confidence column dropped from `high` to `medium` for all post-correction rows — Mgr should still validate each path against live source tree at HEAD before CI implementation per the verification-discipline added at d19a1a03d. dissolution_note column carries inline "**Path correction**: ..." annotations documenting each fix for reviewer audit. Cross-cluster bug-class catches now mapped on this template: 1. Dimension cardinality (Set; dedcf69) 2. Boolean polarity (skip = ∅; 262f42d) 3. Count discrepancies + line-7 singular (93080af) 4. Cluster aggregation predicate (∀ not ∃; d19a1a03) 5. Path-regex verification discipline (d19a1a03) 6. **Stale dsl/std/ lens-paths corrected to src/v3/lenses/** (this fix) Brief structurally validated across 6 distinct axes. SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...-layer-2-pm-prestaged-mgr-fill-template.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 7312ed3af40..f5245fd3995 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -160,34 +160,34 @@ Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating | A | `emit_matrix_(module|program)_(go|python|rust)_is_deterministic` | `[Value]` | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/src/lens_.*\.rs|src/v3/compiler/tests/integration/emit_matrix.*\.rs)$` | high | same | | A | `four_fixture_.*` | `[Value]` | `^(dsl/extdeps/.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/four_fixture.*\.rs|tests/.*/four_fixture.*\.dag)$` | medium | same | | A | `m1_3_emit_rust_test::rustc_roundtrip_.*` | `[Value]` | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/m1_3_emit_rust_test\.rs)$` | high | same | -| B | `lane2_stage_2d_symbolic_cost_test::.*` | `[Cost]` | `^(dsl/std/lens_cost.*\.dag|src/v3/compiler/src/lens_cost.*\.rs|dsl/std/cost.*\.dag|src/v3/compiler/tests/integration/lane2_stage_2d.*\.rs)$` | high | gate lands → lens emits delta; consumer reads only Cost | +| B | `lane2_stage_2d_symbolic_cost_test::.*` | `[Cost]` | `^(src/v3/lenses/cost(_target_realization)?\.dag|src/v3/compiler/src/lens_cost.*\.rs|src/v3/compiler/tests/integration/lane2_stage_2d.*\.rs)$` | high | gate lands → lens emits delta; consumer reads only Cost. **Lens-path correction** (codex BLOCKING line 152 fix): `src/v3/lenses/cost.dag` is the live authority, not stale `dsl/std/cost*.dag` | | C | `m2_lens_cost_migration_test::complexity_.*` | `[Cost, Complexity]` | `[Mgr-fill]` (likely: complexity.dag + lens_complexity*.rs + lens migration substrate) | medium | gate lands → set intersection trigger if either dim has delta | -| C | `m2_lens_idempotency_migration_test::.*` | `[Effect]` | `^(dsl/std/lens_idempotency.*\.dag|src/v3/compiler/src/lens_idempotency.*\.rs|src/v3/compiler/tests/integration/m2_lens_idempotency.*\.rs)$` | high | same | -| C | `m2_lens_provenance_migration_test::.*` | `[Value]` | `^(dsl/std/lens_provenance.*\.dag|src/v3/compiler/src/lens_provenance.*\.rs|src/v3/compiler/tests/integration/m2_lens_provenance.*\.rs)$` | high | same | -| C | `m2_lens_unused_parameters_migration_test::.*` | `[Value]` | `^(dsl/std/lens_unused_parameters.*\.dag|src/v3/compiler/src/lens_unused_parameters.*\.rs|src/v3/compiler/tests/integration/m2_lens_unused_parameters.*\.rs)$` | high | same | +| C | `m2_lens_idempotency_migration_test::.*` | `[Effect]` | `^(src/v3/lenses/idempotency\.dag|src/v3/compiler/src/lens_idempotency.*\.rs|src/v3/compiler/tests/integration/m2_lens_idempotency.*\.rs)$` | medium | same. **Lens-path correction**: live authority at `src/v3/lenses/idempotency.dag` | +| C | `m2_lens_provenance_migration_test::.*` | `[Value]` | `^(src/v3/lenses/(provenance|emission_provenance)\.dag|src/v3/compiler/src/lens_provenance.*\.rs|src/v3/compiler/tests/integration/m2_lens_provenance.*\.rs)$` | medium | same. **Lens-path correction**: live authority at `src/v3/lenses/provenance.dag` + `src/v3/lenses/emission_provenance.dag` | +| C | `m2_lens_unused_parameters_migration_test::.*` | `[Value]` | `^(src/v3/lenses/unused_parameters\.dag|src/v3/compiler/src/lens_unused_parameters.*\.rs|src/v3/compiler/tests/integration/m2_lens_unused_parameters.*\.rs)$` | medium | same. **Lens-path correction**: live authority at `src/v3/lenses/unused_parameters.dag` | | D | `complexity_lens_behavioral_completion::.*` | `[Complexity, Cost]` | `[Mgr-fill]` (likely: lens_complexity + lens_cost + cementing substrate) | medium | reads cementing summary for both Complexity and Cost dims | | D | `cost_lens_symbolic_consumer_test::.*` | `[Cost]` | `[Mgr-fill]` (likely: cost.dag + lens_cost*.rs + E-P substrate) | medium | gate lands → Cost | | D | `lens_behavioral_parity_demonstration_test::r3_gate_73_.*` | `[Complexity, Cost]` | `[Mgr-fill]` (gate #73 LBP — needs cementing-test substrate dep) | medium | LBP demonstration reads both certainty (Complexity) + symbolic-cost (Cost) | | D | `lens_cost_target_realization_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (cost-target-realization + rustc harness) | medium | realization composes Cost projection with Value emission | -| E | `dimension::analyze_complexity_tests::.*` | `[Complexity]` | `^(dsl/std/(complexity|cost|symbolic_cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration/dimension.*\.rs)$` | high | gate lands → Complexity | -| E | `dimension::fail_closed_tests::.*` | `[Complexity]` | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs)$` | medium | same | -| E | `e7_analyze_complexity_integration::.*` | `[Complexity]` | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs)$` | high | same | -| E | `lane2_stage_2f_dimension_test::.*` | `[Complexity, Cost]` | `^(dsl/std/(complexity|cost).*\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs)$` | high | "composed matches lens" reads BOTH analyze_symbolic_cost (Cost) and Complexity composition | +| E | `dimension::analyze_complexity_tests::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration/dimension.*\.rs)$` | medium | gate lands → Complexity. **Lens-path correction**: live authority at `src/v3/lenses/complexity.dag` + `src/v3/lenses/cost.dag` | +| E | `dimension::fail_closed_tests::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs)$` | medium | same | +| E | `e7_analyze_complexity_integration::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs)$` | medium | same | +| E | `lane2_stage_2f_dimension_test::.*` | `[Complexity, Cost]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs)$` | medium | "composed matches lens" reads BOTH analyze_symbolic_cost (Cost) and Complexity composition | | F | `m0_acceptance::.*` | `[Value, Cost, Complexity, Effect, Refinement]` | `.*` (conservative — compile-boundary is broad) | low | compile-boundary touches every dim; run-always until lens lands | | F | `m1_substrate_test::.*` | `[Value]` | `^(dsl/std/.*\.dag|src/v3/compiler/src/(parse|substrate).*\.rs|src/v3/compiler/tests/integration/m1_substrate.*\.rs)$` | medium | substrate reflects parse Value shape | | F | `tc1_substrate_lens_eta_equivalence_strict_fire_test::.*` | `[Value]` | `[Mgr-fill]` (substrate eta-equivalence — needs substrate-lens dep map) | medium | gate #11 lands; eta-equivalence is a Value-relation | | F | `t_pb_b_1_dag_runner_test::r3_gate_87_.*` | `[Cost]` | `[Mgr-fill]` (cementing-test substrate + regen harness) | medium | cementing oracle frozen-Cost lens output; gate #87 Cluster M Phase 2 lands → dissolves | -| F | `bootstrap::tests::kernel_bool_path_a_.*` | `[Value]` | `^(src/v3/compiler/src/bootstrap.*\.rs|dsl/std/types\.dag|dsl/std/boolean_algebra.*\.dag)$` | high | dissolves with Lane 1e-2b Path A close | -| G | `t_las_complexity_contract_compile_error_test::.*` | `[Complexity]` | `^(dsl/std/complexity.*\.dag|src/v3/compiler/src/(las|t_las).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | gate #92 lands; compile-error on Complexity contract violation | -| G | `t_las_crdt_cost_basis_demo_test::.*` | `[Cost, Effect, Value]` | `^(dsl/std/(cost|las|crdt).*\.dag|src/v3/compiler/src/(las|t_las|crdt).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | CRDT cost-basis reads Cost (log budget) + Effect (replica merge) + Value (replica state shape) | +| F | `bootstrap::tests::kernel_bool_path_a_.*` | `[Value]` | `^(src/v3/compiler/src/bootstrap.*\.rs|dsl/std/types\.dag|dsl/std/logic\.dag)$` | medium | dissolves with Lane 1e-2b Path A close. **Path correction**: `dsl/std/boolean_algebra.*\.dag` was stale (no such file); replaced with `dsl/std/logic.dag` (boolean-algebra concepts live there per source tree) | +| G | `t_las_complexity_contract_compile_error_test::.*` | `[Complexity]` | `^(src/v3/lenses/complexity\.dag|src/v3/compiler/src/(las|t_las).*\.rs|src/v3/compiler/tests/integration/t_las.*\.rs)$` | medium | gate #92 lands; compile-error on Complexity contract violation. **Lens-path correction**: live authority at `src/v3/lenses/complexity.dag` | +| G | `t_las_crdt_cost_basis_demo_test::.*` | `[Cost, Effect, Value]` | `.*` | **low (Mgr-fill)** | CRDT cost-basis reads multi-dim (Cost log budget + Effect replica merge + Value replica state). Path-dependency for `las`/`crdt` substrate not yet PM-traced; defaulting to `.*` per conservative discipline until Mgr audits the T-LAS substrate-deps | | G | `r3_free_consequences_second_batch_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (free-consequences second batch — cross-target optimization + symbolic-cost) | medium | cross-target optimization reads BOTH Cost (symbolic_cost_witness) and Value (constant_fold consistency); gates #43-#52 (free-consequences) land | -| H | `sg2_parse_authority_test::.*` | `[Value]` | `^(dsl/std/parse.*\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | high | SG-2 parser-staging close | -| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(dsl/std/parse_tables.*\.dag|dsl/std/tokenize.*\.dag|src/v3/compiler/src/parse.*\.rs)$` | high | SG-2c-1 close | +| H | `sg2_parse_authority_test::.*` | `[Value]` | `^(src/v3/std/parse_surface\.dag|src/v3/compiler/parse_tables\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | medium | SG-2 parser-staging close. **Path correction**: parse files live at `src/v3/std/parse_surface.dag` + `src/v3/compiler/parse_tables.dag`, not stale `dsl/std/parse*.dag` | +| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(src/v3/compiler/parse_tables\.dag|src/v3/(compiler\|std)/tokenize\.dag|src/v3/compiler/src/parse.*\.rs)$` | medium | SG-2c-1 close. **Path correction**: live authorities at `src/v3/compiler/parse_tables.dag` + `src/v3/(compiler\|std)/tokenize.dag`, not stale `dsl/std/parse_tables.*` | | H | `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_.*` | `[Value]` | `^(scripts/regen.*|src/v3/compiler/src/(regen|cli).*\.rs|dsl/std/.*\.dag)$` | medium | SG-6 close | | H | `r1c_e_emit_gates_dag_test::.*` | `[Value]` | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | | H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | `[Value]` | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | | H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l7_.*` | `[Value]` | `[Mgr-fill]` (gate #10 algebraic-law matrix) | medium | gate #10 close | -| H | `t_ci_workflow_as_data_demo_test::.*` | `[Value, Cost]` | `^(dsl/std/workflow.*\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | workflow-as-data demo reads both Value (workflow shape) + Cost (DimensionReport timing dim evaluates) | +| H | `t_ci_workflow_as_data_demo_test::.*` | `[Value, Cost]` | `^(src/v3/std/workflows\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | workflow-as-data demo reads both Value (workflow shape) + Cost (DimensionReport timing dim evaluates). **Path correction**: live authority at `src/v3/std/workflows.dag`, not stale `dsl/std/workflow*.dag` | | I | `t_demo_fixture_test::.*` | `[Value]` | `^(tests/.*/t_demo.*\.dag|src/v3/compiler/src/(test_runner|runner).*\.rs|src/v3/compiler/tests/integration/t_demo.*\.rs)$` | medium | T-Demo lane close | | I | `thesis_validation_test::kf_1_.*` | `[Value, Cost, Complexity, Effect, Refinement]` | `.*` (conservative — thesis-level validation is broad) | low | thesis-level validation reads every dim | | I | `common::cached_compile::tests::.*` | `[Value]` | `^(src/v3/compiler/src/cached_compile.*\.rs|src/v3/compiler/tests/common/cached_compile.*\.rs)$` | high | TESTING.md paydown | From 7cbf29feb0207623c64024a5045785a50878da24 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 01:09:54 +0000 Subject: [PATCH 07/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20fix=20regex=20alternation=20escape=20(openai-pro=20?= =?UTF-8?q?APPROVE=5FWITH=5FCOMMENTS=20on=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit openai-pro APPROVE_WITH_COMMENTS on PR #2721 at sha 45fc195a caught a non-blocking regex error: line 185 had `src/v3/(compiler\|std)/tokenize.dag` with `\|` (markdown-cell pipe escape), which a regex engine would interpret as the literal string `compiler|std`, NOT as alternation between `compiler` and `std`. Mechanism of the bug: - Markdown tables use `|` as column separator - To put a literal `|` IN a cell (outside backticks), you escape with `\|` - PM authored the regex with `\|` thinking the markdown-table escape was needed, but the regex is INSIDE backticks (code span) which preserves pipe character literally - A worker copying the regex into ci.yml would silently miss tokenize.dag changes (only matches literal `compiler|std/tokenize.dag`) Fix: drop the unnecessary `\` escape; markdown code spans preserve `|` literally. Now regex correctly reads `src/v3/(compiler|std)/tokenize.dag` — alternation between src/v3/compiler/tokenize.dag and src/v3/std/tokenize.dag, both of which exist per the source tree verified at 45fc195a. Mitigation: the template's own validation discipline at §3 + §5 §6 (workers MUST validate regex against live source tree before CI implementation) would have caught this, but per openai-pro's read "the concrete row should still not carry a known-bad example" — fair. Cumulative bug-class catches on this template now 7 axes hardened: 1. Dimension cardinality (Set; dedcf69) 2. Boolean polarity inversion (skip = ∅; 262f42d) 3. Count discrepancies + line-7 singular (93080af) 4. Cluster aggregation predicate (∀ not ∃; d19a1a03) 5. Path-regex verification discipline (d19a1a03) 6. Stale dsl/std/ lens-paths corrected (45fc195a) 7. Markdown-cell-escape leaking into regex semantics (this fix) SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index f5245fd3995..9a635d2dfe9 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -182,7 +182,7 @@ Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating | G | `t_las_crdt_cost_basis_demo_test::.*` | `[Cost, Effect, Value]` | `.*` | **low (Mgr-fill)** | CRDT cost-basis reads multi-dim (Cost log budget + Effect replica merge + Value replica state). Path-dependency for `las`/`crdt` substrate not yet PM-traced; defaulting to `.*` per conservative discipline until Mgr audits the T-LAS substrate-deps | | G | `r3_free_consequences_second_batch_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (free-consequences second batch — cross-target optimization + symbolic-cost) | medium | cross-target optimization reads BOTH Cost (symbolic_cost_witness) and Value (constant_fold consistency); gates #43-#52 (free-consequences) land | | H | `sg2_parse_authority_test::.*` | `[Value]` | `^(src/v3/std/parse_surface\.dag|src/v3/compiler/parse_tables\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | medium | SG-2 parser-staging close. **Path correction**: parse files live at `src/v3/std/parse_surface.dag` + `src/v3/compiler/parse_tables.dag`, not stale `dsl/std/parse*.dag` | -| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(src/v3/compiler/parse_tables\.dag|src/v3/(compiler\|std)/tokenize\.dag|src/v3/compiler/src/parse.*\.rs)$` | medium | SG-2c-1 close. **Path correction**: live authorities at `src/v3/compiler/parse_tables.dag` + `src/v3/(compiler\|std)/tokenize.dag`, not stale `dsl/std/parse_tables.*` | +| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(src/v3/compiler/parse_tables\.dag|src/v3/(compiler|std)/tokenize\.dag|src/v3/compiler/src/parse.*\.rs)$` | medium | SG-2c-1 close. **Path correction**: live authorities at `src/v3/compiler/parse_tables.dag` + `src/v3/(compiler|std)/tokenize.dag`, not stale `dsl/std/parse_tables.*`. **Regex correction** (openai-pro APPROVE_WITH_COMMENTS on 45fc195a): unescaped pipe for alternation; prior `\|` was a markdown-cell escape that would have been interpreted as literal `compiler|std` by a regex engine, not alternation between `compiler` and `std` | | H | `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_.*` | `[Value]` | `^(scripts/regen.*|src/v3/compiler/src/(regen|cli).*\.rs|dsl/std/.*\.dag)$` | medium | SG-6 close | | H | `r1c_e_emit_gates_dag_test::.*` | `[Value]` | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | | H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | `[Value]` | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | From c61a7edecc05ca6afcc3b7700ec280c81f57b625 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 01:48:32 +0000 Subject: [PATCH 08/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20Dimension=20enum=20is=20OPEN=20per=20design=20?= =?UTF-8?q?=C2=A72=20+=20THESIS=20user-defined=20dims=20(codex=20BLOCKING?= =?UTF-8?q?=20on=20PR=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codex BLOCKING inline-review at line 186-ish caught that my §6 STOP trigger hard-rejected any `dimensions:` element outside the built-in base set `{Value, Cost, Complexity, Effect, Refinement}` — which closes the user-extensibility surface that THESIS + docs/design-affected-set- lens.md §2 leave intentionally open with the trailing `...`. Verification (codex was correct): - `docs/design-affected-set-lens.md` §2: `⋃ over dim in {value, cost, complexity, effect, refinement, ...}` (note ellipsis = open enum) - `THESIS.md` "User-defined dimensions" section: 'User-declared dimensions extend the same structural proof surface ... the ceiling of what gunbc can prove is user-extensible.' The built-in base set ≠ the full enum. My template was treating them as equivalent, which would have rejected valid user-defined dims at the STOP gate (INVARIANTS P1 single-authority violation against THESIS/design + P3 fail-closed violation since rejection-instead-of- fail-closed is the opposite of safety). Fixes: - **§1** Dimension enum reference: rewrote with explicit `Dimension = {value, cost, complexity, effect, refinement, ...}` notation + the trailing `...` annotated as "OPEN for user-defined" + paragraph on THESIS user-extensibility framing + explicit instruction to treat unknown dim as fail-closed (always-run), NOT reject - **§5** acceptance criterion: updated to reference the open enum + fail-closed-for-unknown behavior - **§6** STOP trigger: now reads "cannot be carried as a typed Dimension at all (e.g., string-as-dimension, runtime-only)" — that's the genuine structural failure. Encountering a NEW user-defined dimension is NOT a STOP; it's a row carried as fail-closed-always-run Cumulative bug-class catches on this template now 8 axes hardened (was 7 before this fix; ci-skip-pattern-script wasn't applicable here): 1. Dimension cardinality (Set; dedcf69) 2. Boolean polarity inversion (skip = ∅; 262f42d) 3. Count discrepancies + line-7 singular (93080af) 4. Cluster aggregation predicate (∀ not ∃; d19a1a03) 5. Path-regex verification discipline (d19a1a03) 6. Stale dsl/std/ lens-paths corrected (45fc195a) 7. Markdown-cell-escape leaking into regex semantics (7cbf29fe) 8. **Dimension enum hard-closed rejecting user-defined** (this fix) — THESIS + design doc §2 explicitly leave open SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- ...-layer-2-pm-prestaged-mgr-fill-template.md | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 9a635d2dfe9..be5d5c1df8a 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -24,18 +24,25 @@ Equivalently: `run_ = (affected_dimensions ∩ row.dimensions) ≠ ∅` ## §1. Affected-set lens `Dimension` enum (reference) -Per `docs/design-affected-set-lens.md` §2: +Per `docs/design-affected-set-lens.md` §2 (note the trailing `...` — this enum is **open**): ``` -enum Dimension { - Value, // value-output / structural-output (emit, parse, substrate shape) - Cost, // cost lens / symbolic cost / realization cost - Complexity, // complexity lens / analyze_complexity / asymptotic class - Effect, // effect lens / idempotency / effect-shape - Refinement, // refinement type checks / int width / cardinality -} +Dimension = {value, cost, complexity, effect, refinement, ...} + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ + built-in base set OPEN for user-defined ``` +Built-in base members: +- **Value** — value-output / structural-output (emit, parse, substrate shape) +- **Cost** — cost lens / symbolic cost / realization cost +- **Complexity** — complexity lens / analyze_complexity / asymptotic class +- **Effect** — effect lens / idempotency / effect-shape +- **Refinement** — refinement type checks / int width / cardinality + +**User-extensibility (load-bearing)**: per `THESIS.md` "User-defined dimensions," user-declared dimensions extend the same structural proof surface as built-ins. A `.dag` lens authored for a project-specific concern (e.g., "max external HTTP calls per workflow," "bounded memory footprint per request," "no cross-tenant data flow") is a valid `Dimension` member by construction. The trailing `...` in §2 is intentional; closing the enum would close the user-extensibility surface (codex BLOCKING on PR #2721 caught an earlier draft that hard-rejected outside-set dims). + +**For this template**: every row's `dimensions` set MUST be carried as Set structurally. Encountering a dimension outside the built-in base set → treat as fail-closed (always-run) until consumer-tracing identifies the affected-set predicate; do NOT reject the row. + Every test-group entry below carries a `dimensions:` field that is a **Set** — the full set of dimensions the test/consumer reads, NOT a single "primary." Per `docs/design-affected-set-lens.md` §2: ``` @@ -239,7 +246,7 @@ Mgr-fill complete when: - [ ] Each cluster has a pilot-PR worker brief authored (or batched into the Director-authored Layer 2 brief). - [ ] `changes` job in `ci.yml` extended with per-cluster `skip_` boolean outputs. - [ ] At least one cluster (pilot) has its `if: needs.changes.outputs.skip_ != 'true'` gate landed and CI-validated against a representative test case (docs-only PR skips; in-cluster code change runs). -- [ ] All path-mapping entries have a `dimensions:` field that is a Set with every member of the set in `{Value, Cost, Complexity, Effect, Refinement}`. **Single-element sets are valid (e.g., `[Cost]`); narrowing a known-multi-dim consumer to a single-element set is not.** +- [ ] All path-mapping entries have a `dimensions:` field that is a Set. The base set per `docs/design-affected-set-lens.md` §2 is `{Value, Cost, Complexity, Effect, Refinement, ...}` — **note the trailing `...`**: the enum is **open** for user-defined dimensions (per `THESIS.md` "User-defined dimensions" — user-declared dimensions extend the same structural proof surface). Unknown dimension on a row → carry it through + treat as fail-closed (always-run); do NOT reject. **Single-element sets are valid (e.g., `[Cost]`); narrowing a known-multi-dim consumer to a single-element set is not.** - [ ] Post-dissolution mapping verified: each row's per-row formula reads `(affected_dimensions ∩ row.dimensions) = ∅` (skip when intersection IS empty / nothing affected), NOT `≠ ∅`. The CI gate is `if: skip_ != 'true'` (run when skip is false); inverting the polarity silently skips affected tests. - [ ] **Cluster-level aggregation verified**: `skip_` aggregates per-row results by conjunction (`∀ row : row-skip-empty`). NOT disjunction (`∃ row : row-skip-empty`). Disjunction silently skips affected rows when only one row is unaffected. - [ ] **Path regex validation against live source tree**: every concrete (non-`.*`) `required_paths_regex` validated against source tree at HEAD before CI implementation. Unverified entries replaced with `.*` per conservative default. Validation record kept (PR description or commit message citing the validation pass). @@ -249,7 +256,7 @@ Mgr-fill complete when: ## §6. STOP triggers (Mgr aborts and surfaces to Director) - Any cluster needs a *new* substrate carrier to express path-dependency → STOP. Surface to Director: this is the lens substrate, not a bridge. -- Any path-mapping entry has a `dimensions:` element outside `{Value, Cost, Complexity, Effect, Refinement}` → STOP. Surface to Director: this is a coproduct-dissolution candidate. +- Any path-mapping entry has a `dimensions:` element that **cannot be carried as a typed Dimension at all** (e.g., string-as-dimension, runtime-only dimension) → STOP. Surface to Director: this is a coproduct-dissolution candidate. **Note: encountering a dimension OUTSIDE the base set `{Value, Cost, Complexity, Effect, Refinement}` is NOT a STOP** — the design doc §2 enum has trailing `...` (open enum per `THESIS.md` "User-defined dimensions"); novel dimensions extend the enum and are carried as fail-closed (always-run) until consumer-tracing identifies the affected-set predicate (codex BLOCKING on PR #2721 caught earlier draft that hard-rejected outside-set dims, which would have closed the user-extensibility surface the THESIS leaves intentionally open). - Any row tempted to use a single-dimension `dimensions:` set when consumer tracing reveals multi-dim reads → STOP and EXPAND the set. Narrowing is a semantic-contract violation (codex REQUEST_CHANGES on PR #2721 caught one such instance; do not regress). - Any cluster's `required_paths_regex` requires depending on test-output (not just changed files) → STOP. That's the lens, not the bridge. - Any cluster aggregation tempted to use **disjunction** (`∃ row : row-skip-empty`) instead of **conjunction** (`∀ row : row-skip-empty`) → STOP. Disjunction silently skips affected rows; conjunction is load-bearing (codex BLOCKING on PR #2721 caught this gap; aggregation predicate now explicit at §3 + §4 + §5). From 5c227c50515c5f231141ed9dc751589d872359d1 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 02:54:59 +0000 Subject: [PATCH 09/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20carry=20user-defined=20Timing=20dim=20explicitly=20?= =?UTF-8?q?(codex=20BLOCKING=20on=20PR=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codex BLOCKING re-review at sha c61a7edec line 197 (~193 in their relay) caught a narrowing residual after the prior open-enum fix: the `t_ci_workflow_as_data_demo_test` row carried `[Value, Cost]` but the test actually evaluates `DimensionReport` / `ci_modeled_timing` — a user-defined Timing dim distinct from generic Cost. My prior open-enum fix (c61a7edec) updated §1/§5/§6 to ALLOW user- defined dims but I didn't fix THIS row to USE one. Per the just- established 'carry the dim, don't narrow' framing in §6, this row should carry `[Value, Cost, Timing]` (or just `[Value, Timing]` if Cost is sufficiently distinct from Timing in the test). **Why it's load-bearing**: a future timing-only delta (e.g., DimensionReport schema change touching only timing fields, not Cost) would be 'affected' for this test under the lens but the prior row narrowed Timing → Cost → if Cost.affected = empty but Timing.affected non-empty, test would be silently skipped (TESTING.md violation + THESIS user-defined-dims framing violation). Fix: - Row dimensions: `[Value, Cost]` → `[Value, Cost, Timing]` - Row dissolution-note: explicit annotation citing `DimensionReport` + `ci_modeled_timing` user- defined dim + the carrying-vs-narrowing rationale - Self-references this template's own open-enum support per §1 — the row is now an in-table demonstration of the open-enum framing (consistency between framing and example) This also re-stress-tests cluster aggregation: cluster H aggregates over multiple rows including this Timing-carrying row, so cluster- level skip computation correctly fail-closes when ANY row's dim intersects with affected_dims. Cumulative bug-class catches on this template now 9 axes hardened: 1. Dimension cardinality (Set) 2. Boolean polarity inversion (skip = ∅) 3. Count discrepancies + line-7 singular 4. Cluster aggregation predicate (∀ not ∃) 5. Path-regex verification discipline 6. Stale dsl/std/ lens-paths corrected 7. Markdown-cell-escape regex 8. Dimension enum hard-closed (open per THESIS) 9. **Narrowing user-defined dim to built-in** (this fix; carry don't normalize) SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index be5d5c1df8a..7b2b4809f42 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -194,7 +194,7 @@ Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating | H | `r1c_e_emit_gates_dag_test::.*` | `[Value]` | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | | H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | `[Value]` | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | | H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l7_.*` | `[Value]` | `[Mgr-fill]` (gate #10 algebraic-law matrix) | medium | gate #10 close | -| H | `t_ci_workflow_as_data_demo_test::.*` | `[Value, Cost]` | `^(src/v3/std/workflows\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | workflow-as-data demo reads both Value (workflow shape) + Cost (DimensionReport timing dim evaluates). **Path correction**: live authority at `src/v3/std/workflows.dag`, not stale `dsl/std/workflow*.dag` | +| H | `t_ci_workflow_as_data_demo_test::.*` | `[Value, Cost, Timing]` | `^(src/v3/std/workflows\.dag|src/v3/compiler/src/(workflow|evaluator).*\.rs|src/v3/compiler/tests/integration/t_ci_workflow.*\.rs)$` | medium | workflow-as-data demo reads Value (workflow shape) + Cost (general cost lens) + **Timing** (user-defined dim per `DimensionReport` / `ci_modeled_timing` in the test). **Path correction**: live authority at `src/v3/std/workflows.dag`. **Dimension correction** (codex BLOCKING on PR #2721): prior revision normalized Timing into Cost; Timing is a user-defined dim distinct from generic Cost (per THESIS user-defined dimensions + design doc §2 open enum); narrowing would silently skip the test when only timing-shape changes (not generic Cost) — carrying Timing explicitly preserves fail-closed coverage. Demonstrates this template's open-enum support per §1 | | I | `t_demo_fixture_test::.*` | `[Value]` | `^(tests/.*/t_demo.*\.dag|src/v3/compiler/src/(test_runner|runner).*\.rs|src/v3/compiler/tests/integration/t_demo.*\.rs)$` | medium | T-Demo lane close | | I | `thesis_validation_test::kf_1_.*` | `[Value, Cost, Complexity, Effect, Refinement]` | `.*` (conservative — thesis-level validation is broad) | low | thesis-level validation reads every dim | | I | `common::cached_compile::tests::.*` | `[Value]` | `^(src/v3/compiler/src/cached_compile.*\.rs|src/v3/compiler/tests/common/cached_compile.*\.rs)$` | high | TESTING.md paydown | From 3dd578d3b91187fda539f8ac688c88d145dc4699 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 03:00:57 +0000 Subject: [PATCH 10/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20codify=203-arm=20regex=20completeness=20invariant?= =?UTF-8?q?=20(mirror=20Director=20PR=20#2727=20worker-brief=20discipline)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Director's PR #2727 absorbed Brian inline + codex BLOCKING convergent finding on post-#2719 fail-open hole: per-group regex must include THREE arms — deps + test-source + fixture — missing any is a P3 fail-open boundary class. This template (PR #2721) had the same structural issue: most PM- authored rows have arms (1) deps + (2) test-source but lack arm (3) `tests/dag/*.dag` fixture explicitly. Per Director's canonical worker-brief discipline (PR #2727), this mirrors the gap and adds the 3-arm completeness invariant to align. Updates: - §3 path-mapping intro: explicit 3-arm completeness invariant + per- arm fail-open semantics + audit note that PM-authored rows in §3 below need Mgr fixture-arm audit for tests reading from `tests/dag/*.dag` (e.g., `t_pb_b_1_dag_runner_test` consumes `tests/dag/t_pb_b_1_*.dag`) - §5 acceptance: new checklist item — every concrete regex includes arms (1) + (2) + (3) where applicable; Mgr-fill rejects missing arms 2/3 - §6 STOP triggers: two new STOP triggers for missing test-source arm OR missing fixture-arm-when-applicable - Cross-link to Director PR #2727 / #2719 for canonical framing This codifies but does NOT retrofit existing §3 rows — that's Mgr-fill audit work (per the §3 disclaimer + Mgr-fill discipline). PM signals the gap; Mgr fixes per row. Cumulative bug-class catches on this template now 10 axes: 1. Dimension cardinality (Set) 2. Boolean polarity inversion 3. Count discrepancies + line-7 singular 4. Cluster aggregation predicate (∀ not ∃) 5. Path-regex verification discipline 6. Stale dsl/std/ lens-paths 7. Markdown-cell-escape regex 8. Dimension enum hard-closed (open per THESIS) 9. Narrowing user-defined dim (Timing→Cost) 10. **Missing test-source/fixture arms in regex** (this fix mirroring Director PR #2727 worker-brief discipline) SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- .../r3-ci-layer-2-pm-prestaged-mgr-fill-template.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 7b2b4809f42..3915fc6c061 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -161,6 +161,14 @@ Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating **Path-mapping verification discipline** (load-bearing per codex BLOCKING on earlier revision): the `required_paths_regex` values below are **PM best-effort manual authoring** — they have NOT been verified against the live source tree at the cited inventory sha (`e9c8f9896`). Workers MUST validate each regex against the source tree at HEAD before implementing the CI gate. Any regex that does not match a path actually present in the tree, OR that a Mgr cannot quickly verify, MUST be replaced with `.*` (always-run) — the conservative fail-closed default. The `confidence` column indicates PM's subjective certainty per row; treat `low` rows as `.*` candidates first, `medium` as audit-then-decide, `high` as audit-but-likely-fine. +**3-arm regex completeness invariant** (load-bearing per Director PR #2727 absorbing convergent Brian inline + codex BLOCKING on post-#2719 fail-open hole): each `required_paths_regex` MUST contain THREE arms — missing any arm is a fail-open boundary class P3 forbids: + +1. **Transitive `src/v3/*` source dependencies** — files the group's tests transitively depend on (typically `src/v3/lenses/*.dag` + `src/v3/compiler/src/lens_*.rs` etc.) +2. **The group's OWN test source files** — `*_test.rs` paths under `src/v3/compiler/tests/integration/`. Without this arm, a PR that edits a slow test would be classified as "unaffected" by its own regex and silently skipped (the test edit IS the change-class the test MUST run on). +3. **The group's `tests/dag/*.dag` TestClaim fixture paths** (where applicable) — `*.dag` files under `src/v3/compiler/tests/dag/` that the test consumes as canonical authority for what it asserts. Without this arm, a PR editing the fixture would skip the test that depends on it. + +**Audit note on existing rows**: most PM-authored rows in §3 below have arms (1) + (2) but DO NOT explicitly include arm (3) `tests/dag/*.dag` — Mgr-fill audit MUST add arm (3) where applicable for each row whose test reads from `src/v3/compiler/tests/dag/` (e.g., `t_pb_b_1_dag_runner_test` consumes `tests/dag/t_pb_b_1_*.dag`; `r1c_e_emit_gates_dag_test` consumes `tests/dag/r1c_e_emit_gates_omni.template.dag`; etc.). Inverse: tests that don't read from `tests/dag/*.dag` don't need arm (3). See Director PR #2727 for the canonical worker-brief framing this mirrors. + | Cluster | test_pattern | dimensions | required_paths_regex | confidence | dissolution_note | |---|---|---|---|---|---| | A | `db8_rust_emit_avoids_time_paths_and_float_hooks_on_program_matrix` | `[Value]` | `^(dsl/extdeps/rust.*\.dag|src/v3/compiler/src/emit.*\.rs|src/v3/compiler/tests/integration/db8_.*\.rs)$` | high | gate ci_uses_provable_minimal_affected_set_selection lands → lens emits per-Node delta; consumer reads only Value | @@ -250,6 +258,7 @@ Mgr-fill complete when: - [ ] Post-dissolution mapping verified: each row's per-row formula reads `(affected_dimensions ∩ row.dimensions) = ∅` (skip when intersection IS empty / nothing affected), NOT `≠ ∅`. The CI gate is `if: skip_ != 'true'` (run when skip is false); inverting the polarity silently skips affected tests. - [ ] **Cluster-level aggregation verified**: `skip_` aggregates per-row results by conjunction (`∀ row : row-skip-empty`). NOT disjunction (`∃ row : row-skip-empty`). Disjunction silently skips affected rows when only one row is unaffected. - [ ] **Path regex validation against live source tree**: every concrete (non-`.*`) `required_paths_regex` validated against source tree at HEAD before CI implementation. Unverified entries replaced with `.*` per conservative default. Validation record kept (PR description or commit message citing the validation pass). +- [ ] **3-arm regex completeness invariant** (per Director PR #2727): every concrete `required_paths_regex` includes (1) transitive `src/v3/*` deps + (2) OWN test source (`*_test.rs` under `src/v3/compiler/tests/integration/`) + (3) OWN `tests/dag/*.dag` fixture (where the test reads from there). Mgr-fill review REJECTS regexes missing arm (2) or (3) for tests that use them. Cross-link: Director worker brief #2719 (post-merge follow-up #2727) §2(c) for the canonical fail-open framing. --- @@ -261,6 +270,8 @@ Mgr-fill complete when: - Any cluster's `required_paths_regex` requires depending on test-output (not just changed files) → STOP. That's the lens, not the bridge. - Any cluster aggregation tempted to use **disjunction** (`∃ row : row-skip-empty`) instead of **conjunction** (`∀ row : row-skip-empty`) → STOP. Disjunction silently skips affected rows; conjunction is load-bearing (codex BLOCKING on PR #2721 caught this gap; aggregation predicate now explicit at §3 + §4 + §5). - Any concrete `required_paths_regex` adopted without source-tree validation at HEAD → STOP and replace with `.*` per conservative fail-closed default. PM-best-effort regexes in §3 are NOT pre-validated; Mgr must validate before CI implementation (codex BLOCKING on PR #2721 caught this gap). +- Any `required_paths_regex` missing the **OWN test-source arm** (`*_test.rs` under `src/v3/compiler/tests/integration/`) → STOP. A PR editing the test itself would silently skip it. (Per Director PR #2727 / Brian inline + codex BLOCKING convergent on post-#2719 fail-open hole.) +- Any `required_paths_regex` missing the **OWN `tests/dag/*.dag` fixture arm** for a test that consumes TestClaim fixtures from there → STOP. A PR editing the fixture (canonical authority for what the test asserts) would silently skip it. Cross-check: if the test calls `t_pb_b_1_*.dag` / `t_r3_gate_87_cementing_regen_*.dag` / `r1c_e_emit_gates_omni.template.dag` / etc., the regex MUST cover the fixture path. (Same Director PR #2727 framing.) --- From 8f11a3578e56f96c01447a92ffe0bfe0bfe40cbc Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 12 May 2026 03:12:41 +0000 Subject: [PATCH 11/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20restore=20`...`=20ellipsis=20in=20quoted=20=C2=A72?= =?UTF-8?q?=20union=20formula=20(cursor=20APPROVE=5FWITH=5FCOMMENTS-level?= =?UTF-8?q?=20exploratory=20on=20PR=20#2721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cursor APPROVE review #9858 at sha 5c227c505 noted an exploratory inconsistency: my quoted design-doc §2 union formula at lines 48-51 enumerated only the 5 built-in dimensions without the trailing `...` that the actual `docs/design-affected-set-lens.md` §2 has, while my surrounding text (lines 27-33, §1 enum reference) stresses the open- enum framing. Fix: restore the `...` in the quoted formula + add inline annotation '← OPEN per §2; user-defined dims extend' so Mgr-fill readers can't misread the box as closed. Now lines 27-33 (open-enum framing) + lines 48-51 (formula quote) + §5 acceptance + §6 STOP triggers all consistently affirm the open- enum framing per THESIS user-defined dimensions. Non-blocking exploratory observation; quick fix because the cost is trivial (1-char + comment) and the value is internal-consistency preservation. SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 3915fc6c061..2901e152015 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -47,7 +47,7 @@ Every test-group entry below carries a `dimensions:` field that is a **Set Date: Tue, 12 May 2026 03:36:28 +0000 Subject: [PATCH 12/14] =?UTF-8?q?docs(briefs):=20Layer=202=20template=20?= =?UTF-8?q?=E2=80=94=20add=20test-source=20arm=20to=204=20rows=20violating?= =?UTF-8?q?=20own=203-arm=20invariant=20(codex=20BLOCKING=20on=20PR=20#272?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codex BLOCKING REQUEST_CHANGES at sha 8f11a3578 caught my OWN 3-arm completeness invariant being violated by 4 rows that ship concrete regex but lack test-source arm. Per the invariant I codified in §3 + §5 + §6, every concrete regex MUST include the OWN test-source arm under `src/v3/compiler/tests/integration/`. These rows didn't: 1. `dimension::analyze_complexity_tests::.*` — had `tests/integration/dimension.*\.rs` arm but that file doesn't exist (tests live inline as a module in `tests/integration.rs`); arm matched nothing → fail-open 2. `dimension::fail_closed_tests::.*` — NO test-source arm 3. `e7_analyze_complexity_integration::.*` — NO test-source arm 4. `lane2_stage_2f_dimension_test::.*` — NO test-source arm 5. `sg2c1_parse_tables_authority_test::.*` — NO test-source arm Fix: add test-source arm to each row: - For inline modules (dimension/e7/lane2_stage_2f): test lives inline in `src/v3/compiler/tests/integration.rs`; add that path. Broad-but- correct per fail-closed default (any edit to integration.rs triggers these tests; a finer-grained match isn't expressible via path regex because the modules are inline in the file). - For sg2c1 (standalone file): add explicit `src/v3/compiler/tests/integration/sg2c1_parse_tables_authority_test\.rs`. Each row's dissolution_note now carries inline annotation citing the codex BLOCKING finding + the test-source-arm correction rationale. **Lesson**: codifying the invariant in §3/§5/§6 doesn't retrofit existing rows — needed to AUDIT each concrete regex against the invariant after codification. PM did partial audit on path correctness (dsl/std → src/v3/lenses) but didn't re-audit for test-source-arm presence. cursor #9858 noted earlier the boxed-formula inconsistency in §1; codex now caught the same class on §3 row content. Audit discipline = match-the-framing-everywhere, not just-codify-the-framing. Cumulative bug-class catches on this template now 11 axes hardened: 1. Dimension cardinality (Set) 2. Boolean polarity inversion 3. Count discrepancies + line-7 singular 4. Cluster aggregation predicate (∀ not ∃) 5. Path-regex verification discipline 6. Stale dsl/std/ lens-paths 7. Markdown-cell-escape regex 8. Dimension enum hard-closed (open per THESIS) 9. Narrowing user-defined dim (Timing→Cost) 10. 3-arm regex completeness invariant codified 11. **Existing rows violated own 3-arm invariant** (this fix — codification didn't retrofit) SG-0 hand-path delta: 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- .../r3-ci-layer-2-pm-prestaged-mgr-fill-template.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md index 2901e152015..04ae436b899 100644 --- a/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md +++ b/docs/briefs/r3-ci-layer-2-pm-prestaged-mgr-fill-template.md @@ -184,10 +184,10 @@ Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating | D | `cost_lens_symbolic_consumer_test::.*` | `[Cost]` | `[Mgr-fill]` (likely: cost.dag + lens_cost*.rs + E-P substrate) | medium | gate lands → Cost | | D | `lens_behavioral_parity_demonstration_test::r3_gate_73_.*` | `[Complexity, Cost]` | `[Mgr-fill]` (gate #73 LBP — needs cementing-test substrate dep) | medium | LBP demonstration reads both certainty (Complexity) + symbolic-cost (Cost) | | D | `lens_cost_target_realization_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (cost-target-realization + rustc harness) | medium | realization composes Cost projection with Value emission | -| E | `dimension::analyze_complexity_tests::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration/dimension.*\.rs)$` | medium | gate lands → Complexity. **Lens-path correction**: live authority at `src/v3/lenses/complexity.dag` + `src/v3/lenses/cost.dag` | -| E | `dimension::fail_closed_tests::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs)$` | medium | same | -| E | `e7_analyze_complexity_integration::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs)$` | medium | same | -| E | `lane2_stage_2f_dimension_test::.*` | `[Complexity, Cost]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs)$` | medium | "composed matches lens" reads BOTH analyze_symbolic_cost (Cost) and Complexity composition | +| E | `dimension::analyze_complexity_tests::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration\.rs)$` | medium | gate lands → Complexity. **Lens-path correction**: live authority at `src/v3/lenses/complexity.dag` + `src/v3/lenses/cost.dag`. **Test-source arm correction** (codex BLOCKING on PR #2721): tests live inline as a module in `src/v3/compiler/tests/integration.rs` (not as a standalone file under `tests/integration/dimension*.rs`); prior regex's `dimension.*\.rs` arm matched nothing → fail-open if integration.rs edited. Replaced with `src/v3/compiler/tests/integration\.rs` (broad-but-correct per fail-closed default) | +| E | `dimension::fail_closed_tests::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension).*\.rs|src/v3/compiler/tests/integration\.rs)$` | medium | same. **Test-source arm correction** (codex BLOCKING): tests live inline in `tests/integration.rs`; added that path to regex | +| E | `e7_analyze_complexity_integration::.*` | `[Complexity]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(analyze_complexity|dimension|public_api).*\.rs|src/v3/compiler/tests/integration\.rs)$` | medium | same. **Test-source arm correction** (codex BLOCKING): tests live inline in `tests/integration.rs`; added that path to regex | +| E | `lane2_stage_2f_dimension_test::.*` | `[Complexity, Cost]` | `^(src/v3/lenses/(complexity|cost)\.dag|src/v3/compiler/src/(lens_complexity|dimension).*\.rs|src/v3/compiler/tests/integration\.rs)$` | medium | "composed matches lens" reads BOTH analyze_symbolic_cost (Cost) and Complexity composition. **Test-source arm correction**: tests live inline in `tests/integration.rs`; added that path | | F | `m0_acceptance::.*` | `[Value, Cost, Complexity, Effect, Refinement]` | `.*` (conservative — compile-boundary is broad) | low | compile-boundary touches every dim; run-always until lens lands | | F | `m1_substrate_test::.*` | `[Value]` | `^(dsl/std/.*\.dag|src/v3/compiler/src/(parse|substrate).*\.rs|src/v3/compiler/tests/integration/m1_substrate.*\.rs)$` | medium | substrate reflects parse Value shape | | F | `tc1_substrate_lens_eta_equivalence_strict_fire_test::.*` | `[Value]` | `[Mgr-fill]` (substrate eta-equivalence — needs substrate-lens dep map) | medium | gate #11 lands; eta-equivalence is a Value-relation | @@ -197,7 +197,7 @@ Equivalently: `run_ = ∃ row ∈ cluster : row affected`. Aggregating | G | `t_las_crdt_cost_basis_demo_test::.*` | `[Cost, Effect, Value]` | `.*` | **low (Mgr-fill)** | CRDT cost-basis reads multi-dim (Cost log budget + Effect replica merge + Value replica state). Path-dependency for `las`/`crdt` substrate not yet PM-traced; defaulting to `.*` per conservative discipline until Mgr audits the T-LAS substrate-deps | | G | `r3_free_consequences_second_batch_test::.*` | `[Cost, Value]` | `[Mgr-fill]` (free-consequences second batch — cross-target optimization + symbolic-cost) | medium | cross-target optimization reads BOTH Cost (symbolic_cost_witness) and Value (constant_fold consistency); gates #43-#52 (free-consequences) land | | H | `sg2_parse_authority_test::.*` | `[Value]` | `^(src/v3/std/parse_surface\.dag|src/v3/compiler/parse_tables\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2_.*\.rs)$` | medium | SG-2 parser-staging close. **Path correction**: parse files live at `src/v3/std/parse_surface.dag` + `src/v3/compiler/parse_tables.dag`, not stale `dsl/std/parse*.dag` | -| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(src/v3/compiler/parse_tables\.dag|src/v3/(compiler|std)/tokenize\.dag|src/v3/compiler/src/parse.*\.rs)$` | medium | SG-2c-1 close. **Path correction**: live authorities at `src/v3/compiler/parse_tables.dag` + `src/v3/(compiler|std)/tokenize.dag`, not stale `dsl/std/parse_tables.*`. **Regex correction** (openai-pro APPROVE_WITH_COMMENTS on 45fc195a): unescaped pipe for alternation; prior `\|` was a markdown-cell escape that would have been interpreted as literal `compiler|std` by a regex engine, not alternation between `compiler` and `std` | +| H | `sg2c1_parse_tables_authority_test::.*` | `[Value]` | `^(src/v3/compiler/parse_tables\.dag|src/v3/(compiler|std)/tokenize\.dag|src/v3/compiler/src/parse.*\.rs|src/v3/compiler/tests/integration/sg2c1_parse_tables_authority_test\.rs)$` | medium | SG-2c-1 close. **Path correction**: live authorities at `src/v3/compiler/parse_tables.dag` + `src/v3/(compiler|std)/tokenize.dag`, not stale `dsl/std/parse_tables.*`. **Regex correction** (openai-pro APPROVE_WITH_COMMENTS on 45fc195a): unescaped pipe for alternation; prior `\|` was a markdown-cell escape that would have been interpreted as literal `compiler|std` by a regex engine, not alternation between `compiler` and `std`. **Test-source arm correction** (codex BLOCKING on PR #2721): test lives in standalone file `src/v3/compiler/tests/integration/sg2c1_parse_tables_authority_test.rs`; added that path to satisfy 3-arm completeness invariant | | H | `sg6_hand_authored_census_test::sg6_regen_lens_cli_smoke_.*` | `[Value]` | `^(scripts/regen.*|src/v3/compiler/src/(regen|cli).*\.rs|dsl/std/.*\.dag)$` | medium | SG-6 close | | H | `r1c_e_emit_gates_dag_test::.*` | `[Value]` | `[Mgr-fill]` (R1C-E `.dag` wrapper) | low | R1C-E closure | | H | `r3_verification_l4_l7_l5_skeleton_test::r3_verification_l4_.*` | `[Value]` | `[Mgr-fill]` (R3-V L4 direct consumer) | medium | gates #43+ L4-L7 lane | From 73456f9277394cf242c9ba6d2fe4105c634a35ad Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 02:54:35 +0000 Subject: [PATCH 13/14] =?UTF-8?q?docs(r3):=20add=20R3=20close=20interrogat?= =?UTF-8?q?ion=20sheet=20=E2=80=94=20meta-acceptance=20checklist=20per=20o?= =?UTF-8?q?perator=20directive=202026-05-13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator directive: come up with checklist of questions/interrogation as a sheet to check things off to close R3. Director busy — PM authoring draft for ratification. Doc scope: - Meta-acceptance complementary to §1.8 state-check predicates - §1.8 verifies structural form; this sheet asks did each predicate execute at close-time, does match-target reflect semantic intent, are cross-doc ledgers internally coherent, are audit-doc ratifications all on-ledger - §0 purpose + relationship to existing authority (§1.6 demo principle, §1.7 status, §1.8 ledger) - §1-§12: 12 interrogation categories - §1 per-gate predicate execution audit - §2 cross-doc ledger consistency - §3 semantic intent verification (gotcha audit per predicate-family) - §4 cross-gate interaction - §5 standing-program ledger - §6 audit-doc ratification trail - §7 behavioral demonstration coverage - §8 substrate fail-closed audit - §9 hand-Rust ledger - §10 documentation coherence - §11 external-facing surfaces - §12 close ceremony - §13 disposition tracking (NOT-CHECKED / PASSING / FAILING / NEEDS-AUDIT / N/A) - §14 anti-patterns post-close (regression prevention) - §15 open questions for Director ratification (Q1-Q5) Authoring shape: - PM-tier draft per operator directive; Director (zesty-bear-812) ratification expected before R3-close ceremony - 5 open questions surfaced for Director disposition (Q1 mechanized vs manual predicate run, Q2 audit-doc close-window, Q3 operator sign-off form, Q4 NEEDS-AUDIT blocking semantics, Q5 reviewer-bot encoding for anti-patterns) Out of scope: - New gate authoring (that's §1.8 ledger work) - DECLARED → PASSING transitions (per-gate Mgr work) - R4 forward-looking acceptance (WISHLIST.md) Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/r3-close-interrogation.md | 210 +++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 docs/r3-close-interrogation.md diff --git a/docs/r3-close-interrogation.md b/docs/r3-close-interrogation.md new file mode 100644 index 00000000000..10d77112965 --- /dev/null +++ b/docs/r3-close-interrogation.md @@ -0,0 +1,210 @@ +# R3 Close Interrogation Sheet + +**Authoring status**: PM-authored draft per operator directive 2026-05-13 (Director busy). Surfaces for Director ratification + cross-Mgr refinement before R3 close. + +**Operational use**: this is the meta-acceptance checklist for R3 close. Each item is a question; check off when the answer is verified, not assumed. R3 is closeable when every required item is PASSING (per §13 disposition tracking). + +--- + +## §0. Purpose + scope + +**Why this sheet exists**: `docs/r3-program-plan.md` §1.8 has 104 closure-gate state-check predicates. Each predicate verifies a structural form (a count is zero, a file exists, a test passes). But structural form is not behavioral realization. A gate can pass its predicate while failing its intent — e.g., a `Lookup::Miss` count of zero is satisfied if `Miss` is renamed `NotFound`, not if the deferral pattern is dissolved. + +**This sheet asks the meta-questions** that §1.8 predicates alone cannot answer: +- Did each predicate execute at close-time, not at declaration-time? +- Does each predicate's match-target reflect the gate's semantic intent? +- Are cross-doc ledgers internally coherent? +- Are audit-doc ratifications all on-ledger? +- Are standing-program ledgers zero, not just predicate-trivial? + +**Relationship to existing authority**: +- §1.6 (demonstration principle) governs demonstration-gate (a)/(b)/(c) minimum bar; this sheet checks that the bar was actually met per gate +- §1.7 (status taxonomy) governs DECLARED / CONSUMER_LANDED / PASSING transitions; this sheet checks that PASSING claims are evidence-backed +- §1.8 (ledger) is the per-gate state; this sheet is the meta-state over that ledger + +**Out of scope**: +- Authoring new gates (that's §1.8 ledger work) +- Resolving DECLARED → PASSING transitions (that's per-gate Mgr work) +- R4 forward-looking acceptance (that's `WISHLIST.md`) + +--- + +## §1. Per-gate predicate execution audit + +- [ ] All 104 §1.8 state-check predicates have been EXECUTED at HEAD within 24h of close ceremony +- [ ] Execution log preserved as audit artifact at `docs/audit/r3-close-predicate-execution-YYYY-MM-DD.md` +- [ ] For each PASSING gate: predicate's actual output (count, command, file presence) matches the row's documented expectation +- [ ] No gate's predicate trivially passes via empty match-target (e.g., grep against non-existent path) without semantic check +- [ ] No gate marked PASSING based on predicate run from declaration-time only; close-time execution is required + +--- + +## §2. Cross-doc ledger consistency + +- [ ] §1.5 per-lane gate counts sum to §1.8 enumerated total +- [ ] §1.8 enumerated count (104 as of 2026-05-12) matches `docs/r3-structure.md` §"Acceptance" enumeration +- [ ] Q1 row in §"Q-decisions" (currently §10) sub-counts match §1.5 + §1.8 totals +- [ ] No gate ID gaps or duplicates in §1.8 (1..104 monotonically) +- [ ] All gate IDs referenced in `docs/audit/*.md` are present in §1.8 +- [ ] `docs/r3-remaining-work-dependency-graph.md` gate-status snapshot consistent with §1.8 PASSING/DECLARED state + +--- + +## §3. Semantic intent verification (gotcha audit) + +For each gate, audit for "passes structurally, fails intent": + +- [ ] **state-check** gates: predicate's match-target captures the semantic intent, not just textual form. Example gotcha: gate #104 Part A predicate `git grep "Lookup<"` would pass if `Lookup` is renamed to `Result`; verify the dissolution is structural (the Miss-deferral pattern is gone), not lexical. +- [ ] **demonstration** gates: §1.6 (a)/(b)/(c) bar verified per gate (end-to-end execution + observable output + ≥2 algebra-instance non-trivial input). No demonstration that runs in <50ms with single-line fixture. +- [ ] **substrate-shape** gates: each landed carrier has ≥1 consumer reading from it. No "carrier landed but unused" passes. +- [ ] **substrate-gap-class** gates: gap is structurally dissolved (existence-proof case works without bridge), not merely renamed or fenced. +- [ ] **count-check** gates: zero achieved via real elimination, not predicate narrowing. If predicate scope was narrowed during R3, audit the excluded scope for residuals. +- [ ] **substrate-gap-class** gates that involve "X works without Y" (e.g., gate #62 "no include_str!"): predicate verified against current HEAD AND against representative use-case program. + +--- + +## §4. Cross-gate interaction + +- [ ] Each "gates on X" dependency in §1.5/§1.8: X has compatible status with consumer (no PASSING gate references DECLARED-only predecessor in its authority chain) +- [ ] Lane-level demonstrations exercise ALL gates in the lane, not just convenient subsets +- [ ] Where two gates close the same class via different mechanisms (e.g., dissolution vs deletion): both mechanisms verified or one is unambiguously canonical +- [ ] Cluster sequencing (e.g., Cluster F sub-phases F-α/F-β/F-γ) all sub-gates closed before cluster-level gate marked PASSING + +--- + +## §5. Standing-program ledger + +- [ ] `r3_debt_paydown_zero_remaining` predicate executed at close: 0 results +- [ ] ROADMAP `Post-merge debt` rows: 0 entries +- [ ] §10 RED escalations: ALL CLOSED with owner sign-off recorded on-ledger +- [ ] sweep §1 Class A/B/C/F/G entries: 0 active +- [ ] No tracked-debt rows survive R3 close per §1.5 inclusion list + +--- + +## §6. Audit-doc ratification trail + +- [ ] Each `docs/audit/*.md` from R3 epoch (2026-04 onward) has one of: corresponding §1.8 gate, §10 closure entry, or explicit "R4-deferred" disposition +- [ ] No "ratified-but-not-gate-tracked" discipline lingers (per `feedback_grep_audit_docs_before_answering_close_questions`) +- [ ] All Director ratifications via dashboard messages (msg_XXXXXXXX) have on-ledger representation (either §1.8 row update or §10 closure) +- [ ] All operator directives (Brian sanctions at gunbc#846 + #828) have on-ledger representation +- [ ] No canvas-tier PR with "RATIFIED" disposition remains unreflected in §1.8 + +--- + +## §7. Behavioral demonstration coverage + +- [ ] Every gate with `predicate-family = demonstration` satisfies §1.6 (a)/(b)/(c) minimum bar +- [ ] Each canonical lens (complexity + cost + parallelism + effect_enumeration) has behavioral-parity demonstration matching frozen v2-oracle snapshot (per gate #73) +- [ ] Pure Bootstrap zero achievable end-to-end (per gates #8 + #84) — verified by running PB-0 census on clean checkout +- [ ] L4 emit/eval match: full corpus exhaustion (per gate #9 graduation criterion), not just Rust/Int W1 slice +- [ ] L7 algebraic laws: exhaustive per-(algebra, inhabitant, law) coverage (per gate #10 graduation criterion), not bounded `Int` slice +- [ ] Self-host fixed point: `pb_self_compile_fixed_point` runs without v2 fallback (per gate #16) + +--- + +## §8. Substrate fail-closed audit + +- [ ] No `Lookup::Miss` constructions in `src/v3/lenses/` + `src/v3/std/` (per gate #104 Part A predicate executed at close) +- [ ] No `::Miss\b` in generated lens code `src/v3/compiler/src/lens_*_generated.rs` (per gate #104 Part B) +- [ ] No `unreachable!()` or `panic!()` in lens read-channel code paths +- [ ] C-8 fail-closed discipline verified across §1.7 PASSING gates: every detectable problem produces a `Diagnostic`, no silent `None` or warning +- [ ] No `ArrowBody::Pending` residuals (per audit §3.6 sibling) + +--- + +## §9. Hand-Rust ledger + +- [ ] PB-0 census predicates report 0 hand-Rust survivors (per gates #8 + #84) +- [ ] All generated-code paths exercised by test harness (no dead generated code) +- [ ] `EXPECTED_HAND_AUTHORED_TEST` residuals match declared retirement schedule; no surprise survivors +- [ ] `lens_producer_files_remaining` per `ROADMAP.md` §"Lane acceptance — .dag gates" reaches zero +- [ ] `pb_rust_tests_outside_residual_zero` per `ROADMAP.md` T-PB-B row reaches zero + +--- + +## §10. Documentation coherence + +- [ ] `THESIS.md` cross-references to design docs all resolve (no 404 paths) +- [ ] `INVARIANTS.md` P1-P9: no §1.8 PASSING gate violates an INVARIANT +- [ ] `ROADMAP.md` milestones consistent with §1.8 closure (R3-closed milestone reflects ledger reality) +- [ ] `docs/r3-program-plan.md` §1.8 design-doc cross-references all live (no stale `:line-number` anchors) +- [ ] `docs/r3-remaining-work-dependency-graph.md` consistent with §1.8 status snapshot at close +- [ ] `WISHLIST.md` R4 items NOT promoted into R3 gates without explicit operator ratification (no silent scope leakage) +- [ ] `MODELING.md`, `CODING.md`, `TESTING.md` discipline anchors all reachable from §1.8 gate "Pass target" text + +--- + +## §11. External-facing surfaces + +- [ ] Full test suite passes on clean checkout (`cargo test --workspace`) +- [ ] `cargo fmt --all --check` clean +- [ ] `cargo clippy --all-targets -- -D warnings` clean +- [ ] No `EXPECTED_HAND_AUTHORED_TEST`-style harness-only test types beyond declared schedule +- [ ] Any breaking change in R3 has a migration note in commit message or PR body + +--- + +## §12. Close ceremony + +- [ ] Director sign-off recorded (zesty-bear-812 or successor role-node) on-ledger +- [ ] Operator sign-off recorded (Brian) on-ledger +- [ ] `ROADMAP.md` R3 → R3-closed milestone update merged +- [ ] §1.8 status sweep frozen: no further DECLARED → CONSUMER_LANDED transitions on R3 gates post-close +- [ ] R4 work-item creation greenlit by operator +- [ ] R3 close audit doc preserved: `docs/audit/r3-close-YYYY-MM-DD.md` capturing per-gate predicate execution output + this interrogation sheet's final disposition + +--- + +## §13. Disposition tracking + +Each item above resolves to one of: + +| Status | Meaning | +|---|---| +| **NOT-CHECKED** | Item has not yet been audited (default state) | +| **PASSING** | Item verified at close-time HEAD; evidence preserved | +| **FAILING** | Item verified to fail; blocker for R3 close | +| **NEEDS-AUDIT** | Item attempted but evidence ambiguous; deeper investigation required | +| **N/A** | Item explicitly does not apply (with rationale recorded) | + +For each item, record: +- **Status** (above) +- **Owner** — which session/role runs the check +- **Evidence** — where the check's output is preserved (audit doc anchor, log file, commit SHA) +- **Last-checked timestamp** (ISO-8601) +- **Notes** — deviations, exceptions, or context + +R3 is closeable when: +- All required items in §1-§12 are PASSING or N/A +- Zero FAILING +- Zero NEEDS-AUDIT (resolve first) + +--- + +## §14. Anti-patterns post-close (regression prevention) + +To prevent R3-class debt from re-emerging in R4, post-R3 PRs should be reviewer-flagged for: + +- New gate added to §1.8 without §1.7 status assignment +- `docs/audit/*.md` authored without §1.8 row OR §10 entry OR explicit R4-deferred disposition +- Demonstration gate added without §1.6 (a)/(b)/(c) bar receipt +- Predicate that trivially passes (empty match-target, narrowed scope without scope-justification) +- `Lookup::Miss` or equivalent deferral-pattern re-introduction +- Hand-Rust added without PB-0 receipt or named retirement schedule +- Cross-doc count drift (§1.5 vs §1.8 vs r3-structure.md) without same-PR sync +- Audit doc ratification not reflected in §1.8 within same close window + +--- + +## §15. Open questions for Director ratification + +Items where PM-tier authoring needs Director disposition before finalizing this sheet: + +- **Q1**: Should §1 (per-gate predicate execution audit) be a mechanized run (script walks §1.8 + executes each predicate, writes output to audit doc) or a manual per-gate sign-off? +- **Q2**: §6 (audit-doc ratification trail) — what's the canonical close-window? "From 2026-04 onward" or "since last R-close" or other? +- **Q3**: §12 close ceremony — does operator sign-off require formal directive at gunbc#846, or is dashboard-relayed sanction sufficient? +- **Q4**: §13 disposition — should NEEDS-AUDIT be a hard block on close, or can close proceed with named NEEDS-AUDIT items deferred to R4 with explicit migration? +- **Q5**: §14 anti-patterns — should any of these be reviewer-bot encoded (api-review providers flag automatically) or remain human-reviewer discipline? + +Director / operator ratification on Q1-Q5 informs final shape of this sheet before R3-close ceremony. From c928b2865bfbf1055f8de7f25299812216627aa6 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 03:00:09 +0000 Subject: [PATCH 14/14] =?UTF-8?q?docs(r3):=20interrogation=20sheet=20v1=20?= =?UTF-8?q?=E2=80=94=20adversarial=20promise-vs-delivery=20audit=20per=20o?= =?UTF-8?q?perator=20directive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator refinement directive 2026-05-13: "i want the doc to be antagonistic — we have to go over all the work that was done, acceptance criteria — what was promised, what was delivered. for example complexity — how do we know it 'works' — we actually promised to deliver complexity errors — are those working? whats an example of one — do we have a demo?" Restructure: v0 was structural meta-checklist (did predicates run, are counts coherent). v1 is adversarial promise-vs-delivery interrogation — for every promise: cite the verbatim claim, cite the delivery, demand a concrete example, attempt a falsification probe. New structure: - §0 disposition vocabulary (NOT-CHECKED / PROVEN / WEAK-EVIDENCE / GAP / R4-DEFERRED / NOT-PROMISED) - §1 dimension promises (complexity, cost, parallelism, effect_enumeration, user-defined) — verbatim promise + 4-9 probes per dim - §2 substrate promises (PB-0, closed system, cost-of-change=1, fail-closed) - §3 emission promises (omni-emission 5 targets, workflow-as-data, tests-as-data) - §4 self-application promises (lens self-application, self-host fixed point) - §5 closure-criteria promises (5 substrate-gap classes, v2 retirement, BridgeLedgerZero) - §6 "show the correct code" promise (THESIS.md:103-105 diagnostic discipline) - §7 cross-doc ledger coherence (structural — kept from v0) - §8 per-gate predicate execution at close - §9 anti-patterns post-close - §10 close ceremony - §11 6 open questions for Director ratification - §12 authoring history (v0 → v1) Probe pattern (every promise): 1. Verbatim promise + doc citation 2. "Show me the .dag program / code / test that delivers it" 3. "Show me a concrete example with input → output" 4. **Falsification probe**: what would disprove "delivered"; has it been attempted? Example (§1.1 Complexity): show .dag program that violates complexity contract, verbatim error message, second example with different complexity class, test pinning the diagnostic, behavior when contract removed, behavior with LYING annotation, end-to-end demonstration path, run on clean checkout, falsification probe (untested complexity violation case). R3 closes when every probe is PROVEN or R4-DEFERRED with operator acceptance. Zero GAP. Zero WEAK-EVIDENCE. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/r3-close-interrogation.md | 393 +++++++++++++++++++++------------ 1 file changed, 257 insertions(+), 136 deletions(-) diff --git a/docs/r3-close-interrogation.md b/docs/r3-close-interrogation.md index 10d77112965..1f16872935b 100644 --- a/docs/r3-close-interrogation.md +++ b/docs/r3-close-interrogation.md @@ -1,210 +1,331 @@ -# R3 Close Interrogation Sheet +# R3 Close Interrogation — Adversarial Audit -**Authoring status**: PM-authored draft per operator directive 2026-05-13 (Director busy). Surfaces for Director ratification + cross-Mgr refinement before R3 close. +**Authoring status**: PM-authored draft per operator directive 2026-05-13 ("come up with the final list of questions/interrogation as a sheet where we can check things off to close R3"; refinement directive 2026-05-13: "i want the doc to be antagonistic — we have to go over all the work that was done, acceptance criteria — what was promised, what was delivered"). Director ratification pending. -**Operational use**: this is the meta-acceptance checklist for R3 close. Each item is a question; check off when the answer is verified, not assumed. R3 is closeable when every required item is PASSING (per §13 disposition tracking). +**Stance**: this is an ADVERSARIAL audit, not a checklist. Predicates being green is necessary but not sufficient — a gate can pass its predicate while the feature it gates is still broken. For every promise R3 made, this sheet demands the receipt: ---- +1. **The promise** — verbatim quote from a doc, with citation +2. **The delivery** — code, test, or demo that satisfies it +3. **A concrete example** — real input → real output, end-to-end +4. **Falsification probe** — what could disprove "delivered"; has it been attempted -## §0. Purpose + scope +R3 closes when every promise has all four. Predicates and counts are evidence; they are not the verdict. -**Why this sheet exists**: `docs/r3-program-plan.md` §1.8 has 104 closure-gate state-check predicates. Each predicate verifies a structural form (a count is zero, a file exists, a test passes). But structural form is not behavioral realization. A gate can pass its predicate while failing its intent — e.g., a `Lookup::Miss` count of zero is satisfied if `Miss` is renamed `NotFound`, not if the deferral pattern is dissolved. +--- -**This sheet asks the meta-questions** that §1.8 predicates alone cannot answer: -- Did each predicate execute at close-time, not at declaration-time? -- Does each predicate's match-target reflect the gate's semantic intent? -- Are cross-doc ledgers internally coherent? -- Are audit-doc ratifications all on-ledger? -- Are standing-program ledgers zero, not just predicate-trivial? +## §0. Disposition vocabulary -**Relationship to existing authority**: -- §1.6 (demonstration principle) governs demonstration-gate (a)/(b)/(c) minimum bar; this sheet checks that the bar was actually met per gate -- §1.7 (status taxonomy) governs DECLARED / CONSUMER_LANDED / PASSING transitions; this sheet checks that PASSING claims are evidence-backed -- §1.8 (ledger) is the per-gate state; this sheet is the meta-state over that ledger +| Status | Meaning | +|---|---| +| **NOT-CHECKED** | The question hasn't been asked at HEAD yet | +| **PROVEN** | Promise verbatim cited + delivery cited + concrete example reproducible + falsification probe attempted and survived | +| **WEAK-EVIDENCE** | Promise + delivery cited but example is single-fixture, narrow, or non-end-to-end. Acceptable for R4-deferred items; blocker for R3 close | +| **GAP** | Promise exists; delivery absent OR demo doesn't run OR example doesn't reproduce | +| **R4-DEFERRED** | Promise explicitly deferred to R4 with operator acceptance recorded | +| **NOT-PROMISED** | The "expected" behavior was never promised; out of R3 scope | -**Out of scope**: -- Authoring new gates (that's §1.8 ledger work) -- Resolving DECLARED → PASSING transitions (that's per-gate Mgr work) -- R4 forward-looking acceptance (that's `WISHLIST.md`) +A close-eligible R3 has every item PROVEN or R4-DEFERRED with operator-recorded acceptance. Zero GAP. Zero WEAK-EVIDENCE. --- -## §1. Per-gate predicate execution audit +## §1. The dimension promises -- [ ] All 104 §1.8 state-check predicates have been EXECUTED at HEAD within 24h of close ceremony -- [ ] Execution log preserved as audit artifact at `docs/audit/r3-close-predicate-execution-YYYY-MM-DD.md` -- [ ] For each PASSING gate: predicate's actual output (count, command, file presence) matches the row's documented expectation -- [ ] No gate's predicate trivially passes via empty match-target (e.g., grep against non-existent path) without semantic check -- [ ] No gate marked PASSING based on predicate run from declaration-time only; close-time execution is required +### §1.1 Complexity ---- +**Promise** (THESIS.md:87-91 + 119-123): the compiler analyses program complexity as a structural fact carried by the data model, validates by reading structure, and "rejects structural, effect, and complexity bugs that ordinary compilers never model." -## §2. Cross-doc ledger consistency +**Probes**: -- [ ] §1.5 per-lane gate counts sum to §1.8 enumerated total -- [ ] §1.8 enumerated count (104 as of 2026-05-12) matches `docs/r3-structure.md` §"Acceptance" enumeration -- [ ] Q1 row in §"Q-decisions" (currently §10) sub-counts match §1.5 + §1.8 totals -- [ ] No gate ID gaps or duplicates in §1.8 (1..104 monotonically) -- [ ] All gate IDs referenced in `docs/audit/*.md` are present in §1.8 -- [ ] `docs/r3-remaining-work-dependency-graph.md` gate-status snapshot consistent with §1.8 PASSING/DECLARED state +- [ ] Show me a `.dag` program that violates a complexity contract. Quote the code. +- [ ] Compile it. What is the verbatim error message? (`Diagnostic` with `reason` + `at`, not `panic!` or silent skip.) +- [ ] Show me a SECOND example with a different complexity class (linear/quadratic/exponential). +- [ ] Where is the test that pins the error message? Cite `:`. +- [ ] If I REMOVE the contract annotation, does the program still compile? (It should — the contract is the assertion.) +- [ ] If I add a LYING annotation (`complexity: O(1)` on an O(n) body), does the compiler catch the lie? Show me the diagnostic. +- [ ] Is there a demonstration `.dag` program that exercises Complexity end-to-end via the v3 evaluator? Cite path. +- [ ] Run the demonstration on clean checkout. What does stdout/stderr say? +- [ ] **Falsification probe**: write a program whose complexity is wrong in a way the lens hasn't been tested against. Does the lens catch it? Or did we only test the cases we already knew worked? ---- +### §1.2 Cost -## §3. Semantic intent verification (gotcha audit) +**Promise** (r3-program-plan.md §1.6 + §1.8 #70: `cost_lens_demonstration`): the cost lens reads representative target programs, composes algebra+realization cost end-to-end, and produces observable cost-bound output. -For each gate, audit for "passes structurally, fails intent": +**Probes**: -- [ ] **state-check** gates: predicate's match-target captures the semantic intent, not just textual form. Example gotcha: gate #104 Part A predicate `git grep "Lookup<"` would pass if `Lookup` is renamed to `Result`; verify the dissolution is structural (the Miss-deferral pattern is gone), not lexical. -- [ ] **demonstration** gates: §1.6 (a)/(b)/(c) bar verified per gate (end-to-end execution + observable output + ≥2 algebra-instance non-trivial input). No demonstration that runs in <50ms with single-line fixture. -- [ ] **substrate-shape** gates: each landed carrier has ≥1 consumer reading from it. No "carrier landed but unused" passes. -- [ ] **substrate-gap-class** gates: gap is structurally dissolved (existence-proof case works without bridge), not merely renamed or fenced. -- [ ] **count-check** gates: zero achieved via real elimination, not predicate narrowing. If predicate scope was narrowed during R3, audit the excluded scope for residuals. -- [ ] **substrate-gap-class** gates that involve "X works without Y" (e.g., gate #62 "no include_str!"): predicate verified against current HEAD AND against representative use-case program. +- [ ] Show me a `.dag` program with a cost budget. Quote it. +- [ ] Show me the symbolic-cost output the lens produces. Verbatim. +- [ ] Show me a program that EXCEEDS its cost budget. What error fires? +- [ ] Where is the test? Cite path. +- [ ] Is the cost arithmetic actually composing? Show me a multi-level program (call within call) and the symbolic-cost result. +- [ ] **Falsification probe**: program with recursive call whose cost is bounded by a Tier-3 fact. Does the lens compute the bound or punt? ---- +### §1.3 Parallelism -## §4. Cross-gate interaction +**Promise** (THESIS.md:17 "Parallelism is the default because independence is visible in the structure"; r3-program-plan.md §1.6 lane T-Lens-Behavioral-Parity needs parallelism gate per Cluster F): -- [ ] Each "gates on X" dependency in §1.5/§1.8: X has compatible status with consumer (no PASSING gate references DECLARED-only predecessor in its authority chain) -- [ ] Lane-level demonstrations exercise ALL gates in the lane, not just convenient subsets -- [ ] Where two gates close the same class via different mechanisms (e.g., dissolution vs deletion): both mechanisms verified or one is unambiguously canonical -- [ ] Cluster sequencing (e.g., Cluster F sub-phases F-α/F-β/F-γ) all sub-gates closed before cluster-level gate marked PASSING +**Probes**: ---- +- [ ] Show me a `.dag` program where the parallelism lens identifies independent subgraphs. Quote the program. +- [ ] Show me the lens's output — which nodes are flagged parallel, which serial. +- [ ] If I add a fake dependency, does the lens correctly serialize? Demo. +- [ ] **Falsification probe**: program with hidden state coupling that LOOKS independent. Does the lens report independent (wrong) or report state coupling (right)? -## §5. Standing-program ledger +### §1.4 Effect enumeration -- [ ] `r3_debt_paydown_zero_remaining` predicate executed at close: 0 results -- [ ] ROADMAP `Post-merge debt` rows: 0 entries -- [ ] §10 RED escalations: ALL CLOSED with owner sign-off recorded on-ledger -- [ ] sweep §1 Class A/B/C/F/G entries: 0 active -- [ ] No tracked-debt rows survive R3 close per §1.5 inclusion list +**Promise** (r3-program-plan.md §1.6 needs effect_enumeration gate per Cluster F): the effect lens enumerates effects (I/O, memory mutation, etc.) per program location. ---- +**Probes**: -## §6. Audit-doc ratification trail +- [ ] Show me a program with mixed pure + I/O effects. What does the lens classify per location? +- [ ] Show me a "pure" claim on a function that secretly does I/O. Does the lens catch the contradiction? +- [ ] Where is the test fixture? +- [ ] **Falsification probe**: effect-leaks through a callback or higher-order construct. Does the lens trace it? -- [ ] Each `docs/audit/*.md` from R3 epoch (2026-04 onward) has one of: corresponding §1.8 gate, §10 closure entry, or explicit "R4-deferred" disposition -- [ ] No "ratified-but-not-gate-tracked" discipline lingers (per `feedback_grep_audit_docs_before_answering_close_questions`) -- [ ] All Director ratifications via dashboard messages (msg_XXXXXXXX) have on-ledger representation (either §1.8 row update or §10 closure) -- [ ] All operator directives (Brian sanctions at gunbc#846 + #828) have on-ledger representation -- [ ] No canvas-tier PR with "RATIFIED" disposition remains unreflected in §1.8 +### §1.5 User-defined dimensions + +**Promise** (THESIS.md:95-101 + docs/thesis/correctness-dimensions.md#user-defined-dimensions): "A user writes a lens in `.dag` — e.g., 'max external HTTP calls per workflow,' 'bounded memory footprint per request,' 'no cross-tenant data flow' — and the compiler validates every program against it using the same mechanism it uses for built-in dimensions." + +**Probes**: + +- [ ] Show me ONE user-defined lens that lives in `.dag` (not Rust). Cite the file. +- [ ] Show me a program it validates. Show the output. +- [ ] Did the user-defined lens use the same mechanism as built-in? Or a parallel infrastructure? +- [ ] **Falsification probe**: would a NEW user-defined lens (one we haven't written yet) actually work end-to-end? Author a simple one. Does it compile and run? --- -## §7. Behavioral demonstration coverage +## §2. The substrate promises + +### §2.1 Pure Bootstrap (zero hand-Rust) + +**Promise** (r3-program-plan.md §1.8 gates #8 + #84; project memory `feedback_pb_zero_is_r3_close_target`): "R3 close = 0 hand-Rust + 0 TESTING residual per §1.8 gates #8 + #84." + +**Probes**: + +- [ ] Run the PB-0 census predicate. What's the count? Should be 0. +- [ ] If non-zero: enumerate each survivor. Justify each as named-retirement-schedule. +- [ ] If zero: when was census last run? Cite SHA. +- [ ] Compile gunbc with itself end-to-end. Does the output match a reference build? Bit-for-bit, or just behavioral? +- [ ] **Falsification probe**: write a new compiler feature in pure `.dag` (no Rust). Does it self-host? + +### §2.2 Closed system / no escape hatches + +**Promise** (THESIS.md:23 + INVARIANTS.md): "`.dag` is designed as a closed system: bounded data, bounded iteration, and composition that preserves those bounds." Memory `feedback_groundedness_gates_lenses`: "no escape syntax; lenses apply to every program by construction." -- [ ] Every gate with `predicate-family = demonstration` satisfies §1.6 (a)/(b)/(c) minimum bar -- [ ] Each canonical lens (complexity + cost + parallelism + effect_enumeration) has behavioral-parity demonstration matching frozen v2-oracle snapshot (per gate #73) -- [ ] Pure Bootstrap zero achievable end-to-end (per gates #8 + #84) — verified by running PB-0 census on clean checkout -- [ ] L4 emit/eval match: full corpus exhaustion (per gate #9 graduation criterion), not just Rust/Int W1 slice -- [ ] L7 algebraic laws: exhaustive per-(algebra, inhabitant, law) coverage (per gate #10 graduation criterion), not bounded `Int` slice -- [ ] Self-host fixed point: `pb_self_compile_fixed_point` runs without v2 fallback (per gate #16) +**Probes**: + +- [ ] grep for `unsafe` in `src/v3/`. Count: 0 expected. +- [ ] grep for `panic!()` outside narrow boundaries. Where are the survivors? Justify each. +- [ ] grep for annotations (`#[...]` on user-facing constructs). Should be zero per `feedback_no_annotations`. +- [ ] grep for metadata markers (`__is_X` strings). Should be zero per `feedback_no_metadata_markers`. +- [ ] **Falsification probe**: write a program that tries to "leave the stack" via an opaque-string back-channel. Does the compiler accept it? + +### §2.3 Single authority / cost-of-change = 1 + +**Promise** (CLAUDE.md): "When the language grows by one type, one expression, or one transport, how many files need editing? The answer should be 1." + +**Probes**: + +- [ ] Add a new built-in type to the language. How many files change? Show the diff line count per file. +- [ ] Add a new expression form. Same question. +- [ ] Add a new emission target (or extend an existing one). Same question. +- [ ] If the count is >1 for any case: name the files, explain WHY they need editing. +- [ ] **Falsification probe**: pick a recent PR that added a feature. Re-do the change. Was it ACTUALLY 1 file, or were there hidden auxiliary edits? + +### §2.4 Fail-closed discipline + +**Promise** (INVARIANTS.md C-8; project memory `feedback_fail_closed_discipline`): "every detectable problem is a Diagnostic; no warnings, no silent Nones, no panics." + +**Probes**: + +- [ ] grep for `Option::None` returns in lens read channels. Should be zero (replaced with `Witness::Violates`). +- [ ] grep for `unreachable!()` outside truly-impossible-by-construction paths. Justify each survivor. +- [ ] Trigger an error condition at runtime. Is the result a `Diagnostic` with `reason: ` + `at: `, or something less structured? +- [ ] **Falsification probe**: write a malformed program. Does the compiler emit a clear diagnostic that points to the structurally correct alternative (per THESIS.md:103-105 "Show the correct code")? --- -## §8. Substrate fail-closed audit +## §3. The emission promises + +### §3.1 Omni-emission (5 targets) + +**Promise** (THESIS.md:115 + WISHLIST.md R4.A): "automatic parallelism, memoization, omni-emission ... are consequences of the same structural commitments." R3 scope per recent ratification: Rust + Python + Go + C + C++ emission targets. + +**Probes**: + +- [ ] Show me a single `.dag` program. Emit it to all 5 targets. Are the outputs runnable? +- [ ] Behavioral parity: same input through each output target. Do they produce equivalent results? +- [ ] Pick the most complex emission target. Is there a non-trivial example that compiles and runs? +- [ ] **Falsification probe**: program with feature X. Does target Y handle X correctly, or punt to a stub? + +### §3.2 Workflow-as-data + +**Promise** (r3-program-plan.md §1.8 #82 / Cluster F: `ci_workflow_modeled_as_dag`): CI workflow is itself a `.dag` program, not hand-authored YAML. + +**Probes**: + +- [ ] Show me the `.dag` source for the CI workflow. Cite path. +- [ ] Where does the YAML get generated from the `.dag`? Show the emitter. +- [ ] When the CI runs, is it reading from a generated YAML, OR is `.dag` directly executed by some runner? +- [ ] If the `.dag` source is changed, does the YAML auto-regenerate? Show me the regen path. +- [ ] **Falsification probe**: change the `.dag` source, leave the YAML stale. Does CI fail? Or silently pass? -- [ ] No `Lookup::Miss` constructions in `src/v3/lenses/` + `src/v3/std/` (per gate #104 Part A predicate executed at close) -- [ ] No `::Miss\b` in generated lens code `src/v3/compiler/src/lens_*_generated.rs` (per gate #104 Part B) -- [ ] No `unreachable!()` or `panic!()` in lens read-channel code paths -- [ ] C-8 fail-closed discipline verified across §1.7 PASSING gates: every detectable problem produces a `Diagnostic`, no silent `None` or warning -- [ ] No `ArrowBody::Pending` residuals (per audit §3.6 sibling) +### §3.3 Tests-as-data + +**Promise** (r3-program-plan.md §1.8 gate `tests_as_data_demonstration`): tests live in `.dag` as `TestClaim` data, not as hand-Rust behavior assertions. + +**Probes**: + +- [ ] How many tests are ported to `.dag` TestClaim form? Count. +- [ ] Pick one. Show the TestClaim source. Show it executing. +- [ ] Where's the runner? Is it itself `.dag` or hand-Rust? +- [ ] **Falsification probe**: add a new TestClaim entirely in `.dag`, no Rust. Does it run? --- -## §9. Hand-Rust ledger +## §4. The self-application promises + +### §4.1 Lens self-application + +**Promise** (r3-program-plan.md §1.8 `lens_self_application_demonstrated`): the compiler's own lenses analyze the compiler itself. + +**Probes**: + +- [ ] Run the complexity lens on the compiler's own source. What does it report? +- [ ] Run the cost lens on a self-host pipeline. Show the symbolic cost. +- [ ] If the compiler has a complexity contract violation against itself, does it fail to compile? +- [ ] **Falsification probe**: introduce a known complexity-violation into the compiler. Does the self-application lens catch it before tests do? + +### §4.2 Self-host fixed point + +**Promise** (r3-program-plan.md §1.8 #16: `pb_self_compile_fixed_point`): compiler compiles itself, the output compiles itself, and the result is identical (bit or behavioral). -- [ ] PB-0 census predicates report 0 hand-Rust survivors (per gates #8 + #84) -- [ ] All generated-code paths exercised by test harness (no dead generated code) -- [ ] `EXPECTED_HAND_AUTHORED_TEST` residuals match declared retirement schedule; no surprise survivors -- [ ] `lens_producer_files_remaining` per `ROADMAP.md` §"Lane acceptance — .dag gates" reaches zero -- [ ] `pb_rust_tests_outside_residual_zero` per `ROADMAP.md` T-PB-B row reaches zero +**Probes**: + +- [ ] Run the fixed-point pipeline. Does iteration N == iteration N+1? +- [ ] How many iterations to converge? (Should be ≤2.) +- [ ] If divergent: what's the byte-diff or behavior-diff? +- [ ] **Falsification probe**: introduce a non-deterministic compiler step. Does the fixed-point predicate catch it? --- -## §10. Documentation coherence +## §5. The closure-criteria promises + +### §5.1 5 substrate-gap classes closed + +**Promise** (r3-program-plan.md §1.4 + §4): five substrate-gap classes (parser/grammar, function-valued data, file-ingestion, workflow/scheduling, reflection-closure) closed per Brian-ratified scope 2026-05-06. + +**Probes** (per class): + +- [ ] Class 1 (parser/grammar #60): show concept-faithful `Int<64>`, `Real<64>`, `Nat<8>` lower without v2-fallback. Where? Demo. +- [ ] Class 2 (function-valued #61): show a function-valued data flow program working end-to-end. Demo. +- [ ] Class 3 (file-ingestion #62): show `.dag` program reading an external file via `FileAttachment` carrier (per Director ratification 2026-05-13). Demo. +- [ ] Class 4 (workflow/scheduling #63): show CI workflow scheduling executing via `.dag`. Demo. +- [ ] Class 5 (reflection-closure #64): show `lens_apply.rs` reflection via PB-Runtime, end-to-end. Demo. +- [ ] **Falsification probe**: write a new substrate-gap (a 6th class). Could the framework absorb it without changes to the closure criteria? Or would §1.4 need re-authoring? + +### §5.2 v2 fully retired + +**Promise** (r3-program-plan.md §1.2): v2 not the live compiler; v2-oracle has no remaining test consumers per dissolution gates. + +**Probes**: -- [ ] `THESIS.md` cross-references to design docs all resolve (no 404 paths) -- [ ] `INVARIANTS.md` P1-P9: no §1.8 PASSING gate violates an INVARIANT -- [ ] `ROADMAP.md` milestones consistent with §1.8 closure (R3-closed milestone reflects ledger reality) -- [ ] `docs/r3-program-plan.md` §1.8 design-doc cross-references all live (no stale `:line-number` anchors) -- [ ] `docs/r3-remaining-work-dependency-graph.md` consistent with §1.8 status snapshot at close -- [ ] `WISHLIST.md` R4 items NOT promoted into R3 gates without explicit operator ratification (no silent scope leakage) -- [ ] `MODELING.md`, `CODING.md`, `TESTING.md` discipline anchors all reachable from §1.8 gate "Pass target" text +- [ ] grep for `src/v2/` imports in `src/v3/`. Should be zero. +- [ ] grep for v2-oracle fixtures in v3 tests. Survivors must be frozen-snapshot consumption only, not live. +- [ ] **Falsification probe**: delete `src/v2/`. Does the test suite still pass? + +### §5.3 BridgeLedgerZero + +**Promise** (r3-program-plan.md §1.3): bridge inventory at zero — no bolt-on bridge between concept layers. + +**Probes**: + +- [ ] What's the current bridge ledger? Should be 0. +- [ ] If non-zero: enumerate each bridge. Has each a named dissolution trigger and target date? +- [ ] **Falsification probe**: would a code reviewer notice if a new bridge type was introduced without ledger entry? --- -## §11. External-facing surfaces +## §6. The "show the correct code" promise + +**Promise** (THESIS.md:103-105): "Diagnostics should point to the structurally correct program, not just report that the current one is wrong." -- [ ] Full test suite passes on clean checkout (`cargo test --workspace`) -- [ ] `cargo fmt --all --check` clean -- [ ] `cargo clippy --all-targets -- -D warnings` clean -- [ ] No `EXPECTED_HAND_AUTHORED_TEST`-style harness-only test types beyond declared schedule -- [ ] Any breaking change in R3 has a migration note in commit message or PR body +**Probes**: + +- [ ] Find a recent compile error. Does the diagnostic point to the correct alternative, or just say "this is wrong"? +- [ ] Pick 5 diagnostic message types. For each, does it satisfy the "show the correct code" criterion? +- [ ] If diagnostic just says "X is wrong" without "Y would be right": is that a GAP for R3 close, or R4-deferred? +- [ ] **Falsification probe**: write a program with a known structural error. Read the diagnostic. Could a user act on it without reading source code? --- -## §12. Close ceremony +## §7. Cross-doc ledger coherence (structural — keep from v0) -- [ ] Director sign-off recorded (zesty-bear-812 or successor role-node) on-ledger -- [ ] Operator sign-off recorded (Brian) on-ledger -- [ ] `ROADMAP.md` R3 → R3-closed milestone update merged -- [ ] §1.8 status sweep frozen: no further DECLARED → CONSUMER_LANDED transitions on R3 gates post-close -- [ ] R4 work-item creation greenlit by operator -- [ ] R3 close audit doc preserved: `docs/audit/r3-close-YYYY-MM-DD.md` capturing per-gate predicate execution output + this interrogation sheet's final disposition +These structural checks remain — they don't replace the adversarial promise-audit but they're necessary supporting evidence. + +- [ ] §1.5 lane counts sum to §1.8 enumerated total +- [ ] §1.8 enumerated count matches r3-structure.md §"Acceptance" +- [ ] Q1 row in §10 matches §1.5 + §1.8 totals +- [ ] No gate ID gaps or duplicates in §1.8 +- [ ] All `docs/audit/*.md` ratifications represented in §1.8 OR §10 (per `feedback_grep_audit_docs_before_answering_close_questions`) +- [ ] `docs/r3-remaining-work-dependency-graph.md` consistent with §1.8 PASSING/DECLARED state +- [ ] `r3_debt_paydown_zero_remaining` at close: 0 +- [ ] ROADMAP `Post-merge debt` rows: 0 +- [ ] §10 RED escalations: ALL CLOSED with owner sign-off on-ledger --- -## §13. Disposition tracking +## §8. Per-gate predicate execution at close -Each item above resolves to one of: +Every §1.8 PASSING gate's predicate must EXECUTE at close-time, not just at declaration-time. The execution log is preserved as `docs/audit/r3-close-predicate-execution-YYYY-MM-DD.md`. -| Status | Meaning | -|---|---| -| **NOT-CHECKED** | Item has not yet been audited (default state) | -| **PASSING** | Item verified at close-time HEAD; evidence preserved | -| **FAILING** | Item verified to fail; blocker for R3 close | -| **NEEDS-AUDIT** | Item attempted but evidence ambiguous; deeper investigation required | -| **N/A** | Item explicitly does not apply (with rationale recorded) | - -For each item, record: -- **Status** (above) -- **Owner** — which session/role runs the check -- **Evidence** — where the check's output is preserved (audit doc anchor, log file, commit SHA) -- **Last-checked timestamp** (ISO-8601) -- **Notes** — deviations, exceptions, or context - -R3 is closeable when: -- All required items in §1-§12 are PASSING or N/A -- Zero FAILING -- Zero NEEDS-AUDIT (resolve first) +- [ ] All 104 §1.8 predicates executed at HEAD within 24h of close ceremony +- [ ] Execution log preserved as audit artifact +- [ ] No predicate trivially passes via empty match-target or narrowed scope without justification +- [ ] PASSING gates whose predicate produces output: output preserved in close audit doc --- -## §14. Anti-patterns post-close (regression prevention) +## §9. Anti-patterns post-close (regression prevention) -To prevent R3-class debt from re-emerging in R4, post-R3 PRs should be reviewer-flagged for: +To prevent R3-class debt from re-emerging: - New gate added to §1.8 without §1.7 status assignment - `docs/audit/*.md` authored without §1.8 row OR §10 entry OR explicit R4-deferred disposition - Demonstration gate added without §1.6 (a)/(b)/(c) bar receipt -- Predicate that trivially passes (empty match-target, narrowed scope without scope-justification) +- Predicate that trivially passes (empty match-target, narrowed scope without justification) - `Lookup::Miss` or equivalent deferral-pattern re-introduction - Hand-Rust added without PB-0 receipt or named retirement schedule - Cross-doc count drift (§1.5 vs §1.8 vs r3-structure.md) without same-PR sync -- Audit doc ratification not reflected in §1.8 within same close window +- Diagnostic that says "X is wrong" without "Y would be right" (regression against THESIS.md:103-105) + +--- + +## §10. Close ceremony + +- [ ] Every §1-§8 item PROVEN or R4-DEFERRED with operator acceptance +- [ ] Zero GAP, zero WEAK-EVIDENCE +- [ ] Director sign-off recorded on-ledger +- [ ] Operator sign-off recorded on-ledger +- [ ] `ROADMAP.md` R3 → R3-closed milestone update merged +- [ ] §1.8 status sweep frozen +- [ ] R4 work-item creation greenlit +- [ ] R3 close audit doc preserved: `docs/audit/r3-close-YYYY-MM-DD.md` capturing per-gate predicate execution output + every probe's disposition with evidence link --- -## §15. Open questions for Director ratification +## §11. Open questions for Director ratification -Items where PM-tier authoring needs Director disposition before finalizing this sheet: +- **Q1**: For "Show me an example" probes — is one example per dimension sufficient, or do we require N examples covering the design space? +- **Q2**: For "Falsification probe" probes — do we require a probe attempt for every promise, or only for the headline thesis claims? +- **Q3**: For WEAK-EVIDENCE items — what's the operator threshold for "WEAK is good enough" vs "must be PROVEN"? (E.g., gate #10 L7 exhaustive — currently bounded `Int` slice; is that WEAK or R4-DEFERRED?) +- **Q4**: For external-checking — does R3 close require an independent reviewer (cross-Mgr or external) to attempt the falsification probes, or PM/Director self-audit sufficient? +- **Q5**: For evidence preservation — is `docs/audit/r3-close-YYYY-MM-DD.md` the canonical artifact, or do we also need per-probe evidence files? +- **Q6**: For the "diagnostics show correct code" probe — what counts as PROVEN? "Some diagnostics do" vs "every diagnostic class does" vs "the lens-discipline diagnostics specifically do"? + +--- -- **Q1**: Should §1 (per-gate predicate execution audit) be a mechanized run (script walks §1.8 + executes each predicate, writes output to audit doc) or a manual per-gate sign-off? -- **Q2**: §6 (audit-doc ratification trail) — what's the canonical close-window? "From 2026-04 onward" or "since last R-close" or other? -- **Q3**: §12 close ceremony — does operator sign-off require formal directive at gunbc#846, or is dashboard-relayed sanction sufficient? -- **Q4**: §13 disposition — should NEEDS-AUDIT be a hard block on close, or can close proceed with named NEEDS-AUDIT items deferred to R4 with explicit migration? -- **Q5**: §14 anti-patterns — should any of these be reviewer-bot encoded (api-review providers flag automatically) or remain human-reviewer discipline? +## §12. Authoring history -Director / operator ratification on Q1-Q5 informs final shape of this sheet before R3-close ceremony. +- **2026-05-13 v0** — PM-authored structural meta-acceptance checklist (12 categories, predicate-execution focus). Insufficient: structural, not adversarial. +- **2026-05-13 v1** (this version) — restructured per operator directive ("antagonistic"). Promise-vs-delivery interrogation with falsification probes. Awaits Director ratification on Q1-Q6 + cross-Mgr refinement before R3-close ceremony.