From e4afbdd0a417067ddf3ba37355fcf32fcfffeb9f Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 04:20:24 +0000 Subject: [PATCH 1/6] test: pin slow test ratchet jsonl bridge --- ROADMAP.md | 2 +- scripts/test-check-test-timeout.sh | 113 +++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100755 scripts/test-check-test-timeout.sh diff --git a/ROADMAP.md b/ROADMAP.md index 911dfdd01dd..f2b05023c3a 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -435,7 +435,7 @@ Tracked debt not dispatched with the 2026-04-21 lane wave (Lane 1e P3.0, SG-2c-4 - **Lane E-I — port `SubValueRelation` + inductive fields + cost algebra (M)**: port Tier 1 (structural) + Tier 2 (lattice) + Tier 3 (`CostBound` + master theorem). Requires E-T, E-C. Pre-flight: verify v3 lowers `CostBound`'s self-referential-through-`List` shape. Acceptance: carrier types ported with round-trip tests; no lens row moves on E-I alone because consumer-visible facts still wait for E-P producer/consumer wiring. - **Lane E-P — per-call descent-evidence provenance (M)**: producer coverage gate #76 receipt is landed as `v3_compiler::dag::per_call_descent_evidence` for the current ratcheted lowered callable surface (live `TransformTarget::Callable` edges; per-argument evidence vector; arithmetic, structural sub-value, preserved-value, and fail-closed unknown/absent cases; `TransformNode` stays unwidened). v2 stores this class of fact on `ExprCall.descent_evidence` (`src/v2/00_core.dag:199`); v3 derives it off-substrate for now. Requires E-T, E-C, E-I. Remaining acceptance for the broader lane: cost lens consumption and same-source v2/v3 cementing beyond the already-wired complexity recurrence consumer. - **Lane E-M — `MethodSemantics` port-or-subsume (S–M)**: **closed via M-b structural subsumption.** Transitive facts (`CollectionSizeEffect` / `CostShape` / `AlgebraFieldTemplate`) remain algebra-declaration facts; v3 method-like calls dispatch through `TransformTarget::{Callable, FieldProject, Operator}` and typed declaration/effect metadata. No `src/v3/std/method_semantics.dag`, no Rust mirror, and no `ExprMethodCall` attachment point. -- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the exemption list. `scripts/slow-test-exemptions.txt` currently has **41** active non-comment exemptions (per `scripts/check-test-timeout.sh`’s sed-based count: non-empty lines with inline `#` comments stripped); `scripts/check-test-timeout.sh` meta-ratchet default `TEST_TIMEOUT_MAX_EXEMPTIONS` matches that count. **PR #1856 receipt:** the 41↔41 alignment was re-established by **removing a duplicate** `t_demo_fixture_test::t_demo_canonical_suites_are_runner_visible` exemption row (it had pushed `exempt_count` to **42** vs the default-**41** ratchet floor). **Landed partial:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Still open:** fresh CI-shaped per-test timing audit, stale exemption deletion if any entries measure under 2s, and per-exempt duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. +- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle; T-WAD Slice 6 bridge landed)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the original exemption list. The free-form `scripts/slow-test-exemptions.txt` table and the `TEST_TIMEOUT_MAX_EXEMPTIONS` row-count floor are now retired: `scripts/check-test-timeout.sh` reads structured warn policy from `scripts/test-node-wall-clock-ratchet.jsonl` and fails closed for any over-budget test whose libtest token is absent from that JSONL. **Historical receipts:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Still open:** move warn policy off the checked-in JSONL bridge and onto modeled test-node timing / `TestNodeCostDimension` facts for R3 gate #102 closure; fresh CI-shaped per-test timing audit, stale warn-row deletion if any entries measure under 2s, and per-node duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. - **`IntegrationRsScan` / `integration_rs_active_line_contains` in `src/v3/compiler/tests/integration/common/mod.rs` — PARTIAL (T-Receipts; char/byte-char literal widening **PR #1856**).** Historical context (#686 / #705): the scanner was narrow enough that authors on its scan path avoided `b'\\'` / `b'"'` in favor of numeric byte constants. **Landed in #1856:** explicit `ByteCharLiteral` / `CharLiteral` states with escape-aware skipping plus lifetime vs `'…'` disambiguation and focused unit tests — byte-char and character literals no longer false-green Band-C `#[path` / `mod` needles. (Earlier ROADMAP text cited **PR #1791** for partial CI / row hygiene only; **#1856** is the live implementation receipt for the widening in `common/mod.rs`.) **Residual:** raw strings (`r#"…"#`) and byte strings (`b"…"`, `br#"…"#`) are still intentionally loud via the existing opener probe (panic in `Code`). Dissolution for that remainder: widen `IntegrationRsScan` for those forms **or** replace this scan with a structural reader. Owner: unassigned; P2 Boundary Discipline / T-Receipts bundle. - **Stale-receipt sweep in `docs/briefs/` — PARTIAL (T-Receipts W1).** The cited `DeclarationLookup` cleanup brief now carries a historical-receipt banner stating the lane is closed by SG-4b-1-fix and that `DeclarationLookup` / `find_declaration` are gone from `src/v3/lenses/variant_payload.dag`; its stale INVARIANTS refs were also updated to stable anchors. Remaining broad `docs/briefs/` sweep stays open for later post-wave stale claims. **Include:** `docs/design-pure-bootstrap.md`'s hand-maintained count ("78 hand-maintained .rs files") was stale vs. the SG-0 census — **CLOSED in this R1 PR**: all five occurrences (lines 7, 49, 82, 105, 242 of the design doc) now point at the live census, reframed as deltas against the illustrative 78-file baseline, or scoped to the non-test + TESTING residual framing. No frozen absolute count remains. - **Compiler–`std/` consolidation program — specific migrations**: end-state defined in [docs/thesis/compiler-std-consolidation.md](docs/thesis/compiler-std-consolidation.md). Each of the migrations below is a standalone lane; together they collapse the compiler-specific type surface toward the positive definition (pipeline + regen + lens-specific return-type carriers + accessor). **Ratchet:** count of `type` declarations in `src/v3/compiler/*.dag` AND `src/v3/lenses/*.dag` that are NOT in the positive-def set AND NOT exempted → 0. Positive-def: pipeline/regen types + lens-API return carriers (`Origin`, `UnusedParameter`, `ComplexitySummary`, `VariantPayloadShapeLookup` 3-variant, `TemplateArgumentBinding` semantic carrier, etc.). Exempted: `parse_tables.dag` (7 types, pending SG-2c-proper per-row classification). In-ratchet: **workaround-shaped infer-helper coproducts with named dissolution triggers (`TemplateArgumentsMatch`, `TemplateArgumentCursor`, `NormalizedInstantiationArgs`)** — Lookup-pattern carriers on lens surfaces import `v3.std.lookup::Lookup` (`complexity`, `cost`, `infer_helpers`). Primary count: 3. See thesis doc table for per-file disposition. diff --git a/scripts/test-check-test-timeout.sh b/scripts/test-check-test-timeout.sh new file mode 100755 index 00000000000..6a7d88347dc --- /dev/null +++ b/scripts/test-check-test-timeout.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash +# Self-test for scripts/check-test-timeout.sh. +# +# Pins the T-WAD Slice 6 bridge behavior: slow-test policy comes from the +# structured JSONL manifest, and over-budget tests missing from that manifest +# fail closed. The retired slow-test-exemptions.txt count floor must not be +# required for the consumer to run. + +set -euo pipefail + +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +cd "$ROOT" + +CONSUMER="$ROOT/scripts/check-test-timeout.sh" +TMPDIR="$(mktemp -d)" +trap "rm -rf $TMPDIR" EXIT + +MANIFEST="$TMPDIR/test-node-wall-clock-ratchet.jsonl" +LOG="$TMPDIR/libtest.log" + +cat > "$MANIFEST" <<'EOF' +{"test":"slow_warned_test","policy":"warn"} +{"test":"not_warn_policy","policy":"fail"} +EOF + +write_log() { + cat > "$LOG" <<'EOF' +test fast_test ... ok <0.001s> +test slow_warned_test ... ok <2.500s> +EOF +} + +test_warn_manifest_allows_known_slow_test() { + write_log + local output + if ! output=$(TEST_TIMEOUT_MANIFEST="$MANIFEST" bash "$CONSUMER" "$LOG" 2000 2>&1); then + echo "FAIL [known-warn]: consumer rejected a manifest warn-policy test" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi + if [[ "$output" != *"warn-policy tests exceeded budget"* ]]; then + echo "FAIL [known-warn]: consumer passed but did not report warn-policy backlog" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi +} + +test_unknown_slow_test_fails_closed() { + write_log + cat >> "$LOG" <<'EOF' +test slow_unknown_test ... ok <2.100s> +EOF + + local output exit_code + if output=$(TEST_TIMEOUT_MANIFEST="$MANIFEST" bash "$CONSUMER" "$LOG" 2000 2>&1); then + exit_code=0 + else + exit_code=$? + fi + + if [ "$exit_code" -eq 0 ]; then + echo "FAIL [unknown-slow]: consumer passed with an over-budget test absent from JSONL" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi + if [[ "$output" != *"slow_unknown_test"* ]] || [[ "$output" != *"not warn-listed in manifest"* ]]; then + echo "FAIL [unknown-slow]: consumer failed but did not name the missing slow test" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi +} + +test_zero_parsed_lines_fails_closed() { + printf 'not libtest output\n' > "$LOG" + + local output exit_code + if output=$(TEST_TIMEOUT_MANIFEST="$MANIFEST" bash "$CONSUMER" "$LOG" 2000 2>&1); then + exit_code=0 + else + exit_code=$? + fi + + if [ "$exit_code" -eq 0 ]; then + echo "FAIL [zero-parsed]: consumer passed on a log with no libtest timing lines" + return 1 + fi + if [[ "$output" != *"zero test-result lines parsed"* ]]; then + echo "FAIL [zero-parsed]: consumer failed but did not report parser drift guard" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi +} + +failures=0 + +for test_fn in \ + test_warn_manifest_allows_known_slow_test \ + test_unknown_slow_test_fails_closed \ + test_zero_parsed_lines_fails_closed; do + echo "Test: $test_fn..." + if "$test_fn"; then + echo " PASS" + else + failures=$((failures + 1)) + fi +done + +if [ "$failures" -ne 0 ]; then + echo "FAIL: $failures check-test-timeout self-test(s) failed" + exit 1 +fi + +echo "PASS: check-test-timeout JSONL manifest behavior verified" From 60b8c2b78406c1edafddcdbcf8b1ba767d5cabf1 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 04:30:36 +0000 Subject: [PATCH 2/6] test: cover non-warn timeout manifest rows --- scripts/test-check-test-timeout.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/test-check-test-timeout.sh b/scripts/test-check-test-timeout.sh index 6a7d88347dc..473dc8e32bb 100755 --- a/scripts/test-check-test-timeout.sh +++ b/scripts/test-check-test-timeout.sh @@ -70,6 +70,31 @@ EOF fi } +test_non_warn_manifest_policy_fails_closed() { + write_log + cat >> "$LOG" <<'EOF' +test not_warn_policy ... ok <2.100s> +EOF + + local output exit_code + if output=$(TEST_TIMEOUT_MANIFEST="$MANIFEST" bash "$CONSUMER" "$LOG" 2000 2>&1); then + exit_code=0 + else + exit_code=$? + fi + + if [ "$exit_code" -eq 0 ]; then + echo "FAIL [non-warn-policy]: consumer treated a non-warn manifest row as warn-listed" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi + if [[ "$output" != *"not_warn_policy"* ]] || [[ "$output" != *"not warn-listed in manifest"* ]]; then + echo "FAIL [non-warn-policy]: consumer failed but did not name the non-warn slow test" + printf '%s\n' "$output" | sed 's/^/ | /' + return 1 + fi +} + test_zero_parsed_lines_fails_closed() { printf 'not libtest output\n' > "$LOG" @@ -96,6 +121,7 @@ failures=0 for test_fn in \ test_warn_manifest_allows_known_slow_test \ test_unknown_slow_test_fails_closed \ + test_non_warn_manifest_policy_fails_closed \ test_zero_parsed_lines_fails_closed; do echo "Test: $test_fn..." if "$test_fn"; then From 9d23c595d057c7f7d25bf250eb3752aa5a780f4f Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 05:23:33 +0000 Subject: [PATCH 3/6] ci: run test-timeout ratchet self-test --- .github/workflows/ci.yml | 5 +++++ Makefile | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b38c4032ddf..5f3baa5a74b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,6 +151,11 @@ jobs: # silently neutering the consumer. run: bash scripts/test-check-manager-brief-authority.sh + - name: Test-timeout ratchet self-test (consumer not ceremonial) + # Prevents future JSONL manifest parsing changes from silently + # neutering fail-closed slow-test policy. + run: bash scripts/test-check-test-timeout.sh + - name: Rust toolchain single-authority check (P2) # Pinned channel must not be duplicated in dsl/extdeps/rustup.dag; # authority is rust-toolchain.toml only (PR #1794). diff --git a/Makefile b/Makefile index 95be064456f..db7aa7004aa 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,12 @@ manager-brief-authority-check: manager-brief-authority-test: @bash scripts/test-check-manager-brief-authority.sh +# Self-test for the per-test timeout ratchet consumer. Without this, +# future JSONL manifest parsing changes could silently neuter fail-closed +# behavior for slow-test policy. +test-timeout-ratchet-test: + @bash scripts/test-check-test-timeout.sh + # Ensure generated artifacts are up to date verify-fix: lint-upsert @RUSTFLAGS="-D warnings" cargo run -p gunbc-codegen --bin gunbc-bootstrap From c0d4de6248486b3a8b924c8c20ecff507e5b6e10 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 06:16:04 +0000 Subject: [PATCH 4/6] Merge origin/main into session/sharp-deer-576 --- ROADMAP.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index bee5ae8353a..6fc6bcfb880 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -435,11 +435,7 @@ Tracked debt not dispatched with the 2026-04-21 lane wave (Lane 1e P3.0, SG-2c-4 - **Lane E-I — port `SubValueRelation` + inductive fields + cost algebra (M)**: port Tier 1 (structural) + Tier 2 (lattice) + Tier 3 (`CostBound` + master theorem). Requires E-T, E-C. Pre-flight: verify v3 lowers `CostBound`'s self-referential-through-`List` shape. Acceptance: carrier types ported with round-trip tests; no lens row moves on E-I alone because consumer-visible facts still wait for E-P producer/consumer wiring. - **Lane E-P — per-call descent-evidence provenance (M)**: producer coverage gate #76 receipt is landed as `v3_compiler::dag::per_call_descent_evidence` for the current ratcheted lowered callable surface (live `TransformTarget::Callable` edges; per-argument evidence vector; arithmetic, structural sub-value, preserved-value, and fail-closed unknown/absent cases; `TransformNode` stays unwidened). v2 stores this class of fact on `ExprCall.descent_evidence` (`src/v2/00_core.dag:199`); v3 derives it off-substrate for now. Requires E-T, E-C, E-I. Remaining acceptance for the broader lane: cost lens consumption and same-source v2/v3 cementing beyond the already-wired complexity recurrence consumer. - **Lane E-M — `MethodSemantics` port-or-subsume (S–M)**: **closed via M-b structural subsumption.** Transitive facts (`CollectionSizeEffect` / `CostShape` / `AlgebraFieldTemplate`) remain algebra-declaration facts; v3 method-like calls dispatch through `TransformTarget::{Callable, FieldProject, Operator}` and typed declaration/effect metadata. No `src/v3/std/method_semantics.dag`, no Rust mirror, and no `ExprMethodCall` attachment point. -<<<<<<< HEAD -- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle; T-WAD Slice 6 bridge landed)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the original exemption list. The free-form `scripts/slow-test-exemptions.txt` table and the `TEST_TIMEOUT_MAX_EXEMPTIONS` row-count floor are now retired: `scripts/check-test-timeout.sh` reads structured warn policy from `scripts/test-node-wall-clock-ratchet.jsonl` and fails closed for any over-budget test whose libtest token is absent from that JSONL. **Historical receipts:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Still open:** move warn policy off the checked-in JSONL bridge and onto modeled test-node timing / `TestNodeCostDimension` facts for R3 gate #102 closure; fresh CI-shaped per-test timing audit, stale warn-row deletion if any entries measure under 2s, and per-node duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. -======= -- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the original exemption list. **Landed partial:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Manifest bridge landed:** `scripts/slow-test-exemptions.txt` and `TEST_TIMEOUT_MAX_EXEMPTIONS` are retired; `scripts/check-test-timeout.sh` now reads structured warn policy from `scripts/test-node-wall-clock-ratchet.jsonl` pending #102 projection from modeled `TestNodeCostDimension` timing facts. **D1 residual sweep 2026-05-13:** [docs/debt/slow-test-residual-sweep-2026-05-13.md](docs/debt/slow-test-residual-sweep-2026-05-13.md) verified manifest names against current libtest list and retired one now-under-budget warn row. **Still open:** fresh CI-shaped per-test timing audits, stale warn-row deletion when entries measure under 2s, and per-node duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. ->>>>>>> origin/main +- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the original exemption list. **Landed partial:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Manifest bridge landed:** `scripts/slow-test-exemptions.txt` and `TEST_TIMEOUT_MAX_EXEMPTIONS` are retired; `scripts/check-test-timeout.sh` now reads structured warn policy from `scripts/test-node-wall-clock-ratchet.jsonl` and fails closed for over-budget libtest tokens absent from that JSONL, with `scripts/test-check-test-timeout.sh` wired through CI/Makefile to pin the consumer contract pending #102 projection from modeled `TestNodeCostDimension` timing facts. **D1 residual sweep 2026-05-13:** [docs/debt/slow-test-residual-sweep-2026-05-13.md](docs/debt/slow-test-residual-sweep-2026-05-13.md) verified manifest names against current libtest list and retired one now-under-budget warn row. **Still open:** fresh CI-shaped per-test timing audits, stale warn-row deletion when entries measure under 2s, and per-node duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. - **`IntegrationRsScan` / `integration_rs_active_line_contains` in `src/v3/compiler/tests/integration/common/mod.rs` — PARTIAL (T-Receipts; char/byte-char literal widening **PR #1856**).** Historical context (#686 / #705): the scanner was narrow enough that authors on its scan path avoided `b'\\'` / `b'"'` in favor of numeric byte constants. **Landed in #1856:** explicit `ByteCharLiteral` / `CharLiteral` states with escape-aware skipping plus lifetime vs `'…'` disambiguation and focused unit tests — byte-char and character literals no longer false-green Band-C `#[path` / `mod` needles. (Earlier ROADMAP text cited **PR #1791** for partial CI / row hygiene only; **#1856** is the live implementation receipt for the widening in `common/mod.rs`.) **Residual:** raw strings (`r#"…"#`) and byte strings (`b"…"`, `br#"…"#`) are still intentionally loud via the existing opener probe (panic in `Code`). Dissolution for that remainder: widen `IntegrationRsScan` for those forms **or** replace this scan with a structural reader. Owner: unassigned; P2 Boundary Discipline / T-Receipts bundle. - **Stale-receipt sweep in `docs/briefs/` — PARTIAL (T-Receipts W1).** The cited `DeclarationLookup` cleanup brief now carries a historical-receipt banner stating the lane is closed by SG-4b-1-fix and that `DeclarationLookup` / `find_declaration` are gone from `src/v3/lenses/variant_payload.dag`; its stale INVARIANTS refs were also updated to stable anchors. Remaining broad `docs/briefs/` sweep stays open for later post-wave stale claims. **Include:** `docs/design-pure-bootstrap.md`'s hand-maintained count ("78 hand-maintained .rs files") was stale vs. the SG-0 census — **CLOSED in this R1 PR**: all five occurrences (lines 7, 49, 82, 105, 242 of the design doc) now point at the live census, reframed as deltas against the illustrative 78-file baseline, or scoped to the non-test + TESTING residual framing. No frozen absolute count remains. - **Compiler–`std/` consolidation program — specific migrations**: end-state defined in [docs/thesis/compiler-std-consolidation.md](docs/thesis/compiler-std-consolidation.md). Each of the migrations below is a standalone lane; together they collapse the compiler-specific type surface toward the positive definition (pipeline + regen + lens-specific return-type carriers + accessor). **Ratchet:** count of `type` declarations in `src/v3/compiler/*.dag` AND `src/v3/lenses/*.dag` that are NOT in the positive-def set AND NOT exempted → 0. Positive-def: pipeline/regen types + lens-API return carriers (`Origin`, `UnusedParameter`, `ComplexitySummary`, `VariantPayloadShapeLookup` 3-variant, `TemplateArgumentBinding` semantic carrier, `LinearBranchesLookup` terminal lens-private control-flow carrier, etc.). Exempted: `parse_tables.dag` (7 types, pending SG-2c-proper per-row classification). In-ratchet: **workaround/scaffold-shaped lens coproducts with named dissolution triggers (`TemplateArgumentsMatch`, `TemplateArgumentCursor`, `NormalizedInstantiationArgs`, `NonCommutingPairLookup`)** — Lookup-pattern carriers on lens surfaces import `v3.std.lookup::Lookup` (`complexity`, `cost`, `infer_helpers`); `NonCommutingPairLookup` dissolves when typed pairwise non-commute evidence lands on `WorkflowParallelismReport`. Primary count: 4. See thesis doc table for per-file disposition. From 142b06dcfa8c61246ca1456572bb786afcb23265 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 06:31:04 +0000 Subject: [PATCH 5/6] build: mark timeout ratchet self-test phony --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index db7aa7004aa..a406543fbad 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ .DEFAULT_GOAL := help -.PHONY: help preflight-fix ensure-codegen build-release-bins lint-upsert codegen build clean testgen testgen-check bootstrap-check verify verify-fix fmt-fix lint-fix test-all test test-xs test-s test-m test-l test-xl test-small test-medium test-large test-extra-large test-integration test-external check clippy fmt fmt-check test-fix check-fix clippy-fix bootstrap bootstrap-dry build-all build-all-dry design design-dry gist gist-dry gist-diff gist-diff-dry gist-recent gist-recent-dry infra infra-dry readme readme-dry workflow workflow-dry ci release-doc-authority-check release-doc-authority-test manager-brief-authority-check manager-brief-authority-test +.PHONY: help preflight-fix ensure-codegen build-release-bins lint-upsert codegen build clean testgen testgen-check bootstrap-check verify verify-fix fmt-fix lint-fix test-all test test-xs test-s test-m test-l test-xl test-small test-medium test-large test-extra-large test-integration test-external check clippy fmt fmt-check test-fix check-fix clippy-fix bootstrap bootstrap-dry build-all build-all-dry design design-dry gist gist-dry gist-diff gist-diff-dry gist-recent gist-recent-dry infra infra-dry readme readme-dry workflow workflow-dry ci release-doc-authority-check release-doc-authority-test manager-brief-authority-check manager-brief-authority-test test-timeout-ratchet-test # Preflight: auto-fix rustc warnings before running generators preflight-fix: From 5c12be3951aa86bb0c20cfec62146fce1da64415 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 13 May 2026 08:17:29 +0000 Subject: [PATCH 6/6] test: tighten timeout ratchet wording --- ROADMAP.md | 2 +- scripts/test-check-test-timeout.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 6fc6bcfb880..2fd9cad2391 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -435,7 +435,7 @@ Tracked debt not dispatched with the 2026-04-21 lane wave (Lane 1e P3.0, SG-2c-4 - **Lane E-I — port `SubValueRelation` + inductive fields + cost algebra (M)**: port Tier 1 (structural) + Tier 2 (lattice) + Tier 3 (`CostBound` + master theorem). Requires E-T, E-C. Pre-flight: verify v3 lowers `CostBound`'s self-referential-through-`List` shape. Acceptance: carrier types ported with round-trip tests; no lens row moves on E-I alone because consumer-visible facts still wait for E-P producer/consumer wiring. - **Lane E-P — per-call descent-evidence provenance (M)**: producer coverage gate #76 receipt is landed as `v3_compiler::dag::per_call_descent_evidence` for the current ratcheted lowered callable surface (live `TransformTarget::Callable` edges; per-argument evidence vector; arithmetic, structural sub-value, preserved-value, and fail-closed unknown/absent cases; `TransformNode` stays unwidened). v2 stores this class of fact on `ExprCall.descent_evidence` (`src/v2/00_core.dag:199`); v3 derives it off-substrate for now. Requires E-T, E-C, E-I. Remaining acceptance for the broader lane: cost lens consumption and same-source v2/v3 cementing beyond the already-wired complexity recurrence consumer. - **Lane E-M — `MethodSemantics` port-or-subsume (S–M)**: **closed via M-b structural subsumption.** Transitive facts (`CollectionSizeEffect` / `CostShape` / `AlgebraFieldTemplate`) remain algebra-declaration facts; v3 method-like calls dispatch through `TransformTarget::{Callable, FieldProject, Operator}` and typed declaration/effect metadata. No `src/v3/std/method_semantics.dag`, no Rust mirror, and no `ExprMethodCall` attachment point. -- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the original exemption list. **Landed partial:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Manifest bridge landed:** `scripts/slow-test-exemptions.txt` and `TEST_TIMEOUT_MAX_EXEMPTIONS` are retired; `scripts/check-test-timeout.sh` now reads structured warn policy from `scripts/test-node-wall-clock-ratchet.jsonl` and fails closed for over-budget libtest tokens absent from that JSONL, with `scripts/test-check-test-timeout.sh` wired through CI/Makefile to pin the consumer contract pending #102 projection from modeled `TestNodeCostDimension` timing facts. **D1 residual sweep 2026-05-13:** [docs/debt/slow-test-residual-sweep-2026-05-13.md](docs/debt/slow-test-residual-sweep-2026-05-13.md) verified manifest names against current libtest list and retired one now-under-budget warn row. **Still open:** fresh CI-shaped per-test timing audits, stale warn-row deletion when entries measure under 2s, and per-node duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. +- **CI ratchet architecture — PARTIAL (T-Receipts W1 second bundle)**: surfaced during the 2026-04-21 reflective analysis (`53b3110..ae8825a` range). Commits `37cd6128`, `4898983e`, `f84ed355` hardened the ratchet against CI-log instability, but `2d8396df` widened the original exemption list. **Landed partial:** classification audit [docs/debt/ci-ratchet-exemption-audit-2026-04-24.md](docs/debt/ci-ratchet-exemption-audit-2026-04-24.md) (2026-04-24 baseline) plus follow-up routing audit [docs/debt/ci-ratchet-exemption-audit-2026-05-02.md](docs/debt/ci-ratchet-exemption-audit-2026-05-02.md) (bounded scope — not a completed Phase 1 per-test timing pass). **Manifest bridge landed:** `scripts/slow-test-exemptions.txt` and `TEST_TIMEOUT_MAX_EXEMPTIONS` are retired; `scripts/check-test-timeout.sh` now reads structured warn policy from `scripts/test-node-wall-clock-ratchet.jsonl` and fails closed for over-budget libtest tokens not warn-listed in the manifest, with `scripts/test-check-test-timeout.sh` wired through CI/Makefile to pin the consumer contract pending #102 projection from modeled `TestNodeCostDimension` timing facts. **D1 residual sweep 2026-05-13:** [docs/debt/slow-test-residual-sweep-2026-05-13.md](docs/debt/slow-test-residual-sweep-2026-05-13.md) verified manifest names against current libtest list and retired one now-under-budget warn row. **Still open:** fresh CI-shaped per-test timing audits, stale warn-row deletion when entries measure under 2s, and per-node duration budgets once fresh timings exist. Dispatch brief: `docs/briefs/ci-ratchet-architecture-audit.md`. - **`IntegrationRsScan` / `integration_rs_active_line_contains` in `src/v3/compiler/tests/integration/common/mod.rs` — PARTIAL (T-Receipts; char/byte-char literal widening **PR #1856**).** Historical context (#686 / #705): the scanner was narrow enough that authors on its scan path avoided `b'\\'` / `b'"'` in favor of numeric byte constants. **Landed in #1856:** explicit `ByteCharLiteral` / `CharLiteral` states with escape-aware skipping plus lifetime vs `'…'` disambiguation and focused unit tests — byte-char and character literals no longer false-green Band-C `#[path` / `mod` needles. (Earlier ROADMAP text cited **PR #1791** for partial CI / row hygiene only; **#1856** is the live implementation receipt for the widening in `common/mod.rs`.) **Residual:** raw strings (`r#"…"#`) and byte strings (`b"…"`, `br#"…"#`) are still intentionally loud via the existing opener probe (panic in `Code`). Dissolution for that remainder: widen `IntegrationRsScan` for those forms **or** replace this scan with a structural reader. Owner: unassigned; P2 Boundary Discipline / T-Receipts bundle. - **Stale-receipt sweep in `docs/briefs/` — PARTIAL (T-Receipts W1).** The cited `DeclarationLookup` cleanup brief now carries a historical-receipt banner stating the lane is closed by SG-4b-1-fix and that `DeclarationLookup` / `find_declaration` are gone from `src/v3/lenses/variant_payload.dag`; its stale INVARIANTS refs were also updated to stable anchors. Remaining broad `docs/briefs/` sweep stays open for later post-wave stale claims. **Include:** `docs/design-pure-bootstrap.md`'s hand-maintained count ("78 hand-maintained .rs files") was stale vs. the SG-0 census — **CLOSED in this R1 PR**: all five occurrences (lines 7, 49, 82, 105, 242 of the design doc) now point at the live census, reframed as deltas against the illustrative 78-file baseline, or scoped to the non-test + TESTING residual framing. No frozen absolute count remains. - **Compiler–`std/` consolidation program — specific migrations**: end-state defined in [docs/thesis/compiler-std-consolidation.md](docs/thesis/compiler-std-consolidation.md). Each of the migrations below is a standalone lane; together they collapse the compiler-specific type surface toward the positive definition (pipeline + regen + lens-specific return-type carriers + accessor). **Ratchet:** count of `type` declarations in `src/v3/compiler/*.dag` AND `src/v3/lenses/*.dag` that are NOT in the positive-def set AND NOT exempted → 0. Positive-def: pipeline/regen types + lens-API return carriers (`Origin`, `UnusedParameter`, `ComplexitySummary`, `VariantPayloadShapeLookup` 3-variant, `TemplateArgumentBinding` semantic carrier, `LinearBranchesLookup` terminal lens-private control-flow carrier, etc.). Exempted: `parse_tables.dag` (7 types, pending SG-2c-proper per-row classification). In-ratchet: **workaround/scaffold-shaped lens coproducts with named dissolution triggers (`TemplateArgumentsMatch`, `TemplateArgumentCursor`, `NormalizedInstantiationArgs`, `NonCommutingPairLookup`)** — Lookup-pattern carriers on lens surfaces import `v3.std.lookup::Lookup` (`complexity`, `cost`, `infer_helpers`); `NonCommutingPairLookup` dissolves when typed pairwise non-commute evidence lands on `WorkflowParallelismReport`. Primary count: 4. See thesis doc table for per-file disposition. diff --git a/scripts/test-check-test-timeout.sh b/scripts/test-check-test-timeout.sh index 473dc8e32bb..50ce8abd33a 100755 --- a/scripts/test-check-test-timeout.sh +++ b/scripts/test-check-test-timeout.sh @@ -2,8 +2,8 @@ # Self-test for scripts/check-test-timeout.sh. # # Pins the T-WAD Slice 6 bridge behavior: slow-test policy comes from the -# structured JSONL manifest, and over-budget tests missing from that manifest -# fail closed. The retired slow-test-exemptions.txt count floor must not be +# structured JSONL manifest, and over-budget tests not warn-listed in the +# manifest fail closed. The retired slow-test-exemptions.txt count floor must not be # required for the consumer to run. set -euo pipefail @@ -13,7 +13,10 @@ cd "$ROOT" CONSUMER="$ROOT/scripts/check-test-timeout.sh" TMPDIR="$(mktemp -d)" -trap "rm -rf $TMPDIR" EXIT +cleanup() { + rm -rf "$TMPDIR" +} +trap cleanup EXIT MANIFEST="$TMPDIR/test-node-wall-clock-ratchet.jsonl" LOG="$TMPDIR/libtest.log"