From 431e7bb96ea1c6bfea9ff23334a51ef7aec7fbea Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Mon, 11 May 2026 23:00:25 +0000 Subject: [PATCH 01/11] =?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/11] =?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/11] 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/11] =?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/11] =?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/11] =?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/11] =?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/11] =?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/11] =?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/11] =?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/11] =?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