Skip to content

T-WAD Slice 6 — #101 test_cost_dimension_landed (Cost Dimension on test nodes) - #2761

Merged
briansrls merged 12 commits into
mainfrom
session/eager-crane-176
May 12, 2026
Merged

briansrls merged 12 commits into
mainfrom
session/eager-crane-176

Conversation

@briansrls

@briansrls briansrls commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Gate: T-WAD #101 test_cost_dimension_landed.

This lands T-WAD gate #101 test_cost_dimension_landed: test-node cost is now a first-class verification substrate fact. In the v3 authority, TestNodeCostDimension reuses the existing T-WAD timing substrate via TimingBudget and TimingMeasurement over Nanoseconds; the legacy dsl projection uses branded non-negative Milliseconds and is explicitly marked to retire or rewire in #102 slow_test_exemptions_dissolved.

P5 receipt: src/v3/compiler/tests/integration/test_runner_test.rs::test_cost_dimension_landed_on_test_node pins the new hand-Rust lowering receipt for gate #101 by compiling a TestNodeCostDimension row, checking the nested timing-budget shape, and running the referenced TestClaim through TestRunner.

Test plan

  • PASS: ctrl-build -- cargo test -p v3-compiler --test integration test_cost_dimension_landed_on_test_node -- --nocapture
  • PASS: cargo run -p v3-compiler --features bootstrap-regen-fresh --bin regen_bootstrap -- --verify
  • PASS: cargo fmt -p v3-compiler --check

@briansrls
briansrls marked this pull request as ready for review May 12, 2026 15:29

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: c9084994 · Trigger: schedule
  • Thinking: 634s wall

BLOCKING (2)

Root Cause

  • src/v3/std/verification.dag test cost was modeled as a verification-local scalar dimension instead of a projection of the existing timing substrate → reuse the timing carrier, or add an explicit typed projection, in both v3 and legacy dsl surfaces before regenerating bootstrap Rust.

ROADMAP — Verified

  • T-Workflow-As-Data timing lens: ROADMAP.md and docs/design-timing-lens.md already identify TimingMeasurement/TimingBudget/Nanoseconds as the timing substrate this PR should compose with.

⚠️ The test-node cost direction is aligned with the lane, but the carrier needs to reuse the existing timing authority before landing.

Comment thread src/v3/std/verification.dag Outdated
node: TestNodeRef
budget: Dimension<TestExecutionCost, Int>
measured: Dimension<TestExecutionCost, Int>
}

This comment was marked as resolved.

Comment thread dsl/std/verification.dag Outdated
decl: DeclarationRef
}

type TestNodeCostDimension {

This comment was marked as resolved.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 77c31b3a · Trigger: schedule
  • Thinking: 426s wall

BLOCKING (2)

Root Cause

  • src/v3/std/verification.dag new test-node edge repeats the enumerated/quantified axis without a declared terminal/scaffold decision → add the Practice 4 checkpoint with ledger/trigger or reuse the existing carrier if it is the same authority.
  • src/v3/compiler/tests/integration/test_runner_test.rs structural TestNodeCostDimension shape is still ratcheted by handwritten Rust → add the required receipt or move the assertion to generated/.dag TestClaim coverage.

ROADMAP — Verified

  • T-Workflow-As-Data timing substrate: TimingBudget/TimingMeasurement/Nanoseconds are the documented timing carrier and the v3 fields now compose with that authority.

⚠️ The timing-carrier issue is fixed, but the new substrate coproduct and expanded Rust test surface need their required receipts before landing.

assert_all_pass(&results);
}

#[test]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: This expands hand-written Rust test surface under src/v3 without a checkable P5 receipt in the supplied PR material, violating INVARIANTS.md P5.

@briansrls

Copy link
Copy Markdown
Contributor Author

Violations (could not place on specific lines):

  • src/v3/std/verification.dag:397 BLOCKING: TestNodeRef is a new substrate two-variant coproduct but has no 🟢/🟡/🔴 dissolution classification, violating modeling-discipline Practice 4/P5.

@briansrls
briansrls merged commit 4d5305b into main May 12, 2026
5 checks passed
briansrls added a commit that referenced this pull request May 12, 2026
briansrls added a commit that referenced this pull request May 12, 2026
…file

- Delete scripts/slow-test-exemptions.txt (R3 row 102 state-check).
- Add scripts/test-node-wall-clock-ratchet.jsonl: 83 {"test","policy":"warn"}
  rows migrated from the retired file (structural carrier for warn-only
  ratchet policy; aligns with TestNodeCostDimension / gate #101).
- Rewire scripts/check-test-timeout.sh: jq-backed manifest lookup, drop
  TEST_TIMEOUT_MAX_EXEMPTIONS row-count ratchet; require jq.
- Update ci.yml ratchet comments; refresh verification.dag comments for new path.
- Lane2d test rustdoc points at the JSONL manifest.

Merge: origin/main including #2761 (4d5305b).
Co-authored-by: Cursor <cursoragent@cursor.com>

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: bf8fbe18 · Trigger: schedule
  • Thinking: 346s wall

BLOCKING (1)

Root Cause

  • src/v3/compiler/tests/integration/test_runner_test.rs new hand-written Rust test surface under src/v3 lacks an allowed P5 receipt → move the receipt into the PR body or a changed planning artifact with one checkable P5 form.

⚠️ The timing-substrate fixes look clean, but the Rust-test P5 gate still needs the required receipt.

}

#[test]
// P5 receipt for R3 T-WAD gate #101 (`test_cost_dimension_landed`): until

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The added P5 receipt is still not one of INVARIANTS.md P5's allowed per-PR receipts: deleted scaffold path, SG-0 shrink, or explicit lane plus concrete ROADMAP-row deferral.

briansrls added a commit that referenced this pull request May 12, 2026
…chet)

* fix(tests): share lane2d symbolic-cost fixtures in compile cache

Unify (source, file) keys for countdown and literal/scalar-op pairs so
cached_compile_to_dag amortizes cold bootstrap. Remove three Phase-0
slow-test exemptions and lower TEST_TIMEOUT_MAX_EXEMPTIONS to 80.

T-WAD Slice 6: lane2_stage_2d cost-dimension test ratchet paydown.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(tests): restore lane2d slow-test exemptions after codex BLOCKING

Shared cached_compile keys amortize duplicate work but do not prove sole-filter
<=2s wall receipts or isolate libtest parallel contention (api-review/codex
BLOCKING on #2764). Re-list the three lane2d tests and reset
TEST_TIMEOUT_MAX_EXEMPTIONS default to 83. Document on the shared-key consts
that cache sharing is not a Phase-0 exemption dissolution receipt.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ci): Phase B gate #102 — JSONL warn manifest replaces exemption file

- Delete scripts/slow-test-exemptions.txt (R3 row 102 state-check).
- Add scripts/test-node-wall-clock-ratchet.jsonl: 83 {"test","policy":"warn"}
  rows migrated from the retired file (structural carrier for warn-only
  ratchet policy; aligns with TestNodeCostDimension / gate #101).
- Rewire scripts/check-test-timeout.sh: jq-backed manifest lookup, drop
  TEST_TIMEOUT_MAX_EXEMPTIONS row-count ratchet; require jq.
- Update ci.yml ratchet comments; refresh verification.dag comments for new path.
- Lane2d test rustdoc points at the JSONL manifest.

Merge: origin/main including #2761 (4d5305b).
Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(testing): Phase-0 ratchet + fail-closed policy after gate #102

- TESTING.md: document JSONL warn manifest, #101/#102 linkage, no
  TEST_TIMEOUT_MAX_EXEMPTIONS floor, same-PR rule for new warn rows.
- check-test-timeout.sh header: explicit fail-closed policy block.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): refresh bootstrap snapshots after verification.dag edits

regen_bootstrap --verify failed: committed bootstrap embeds span
byte ranges for src/v3/std/verification.dag; comment edits shifted
line lengths. Regenerated with bootstrap-regen-fresh.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: T-WAD Slice 6: slow_test_exemptions_dissolved (test cost-dim cuts)

* WIP: T-WAD Slice 6: slow_test_exemptions_dissolved (test cost-dim cuts)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request May 13, 2026
…3023)

* docs(r3): Ratify §1.8 gates #99 #100 #101 — T-WAD Slice 8 substrate completion

Flip three T-WAD substrate-shape gates from DECLARED → CONSUMER_LANDED + PASSING
in `docs/r3-program-plan.md` §1.8, with merged-PR receipts and consumer-test
citations. Mirror the status in the predicate-execution audit doc and the
remaining-work dependency graph note (which previously carried stale
"CLOSED-ish" / "see audit caveat" prose).

Substrate landed at HEAD (verified via git grep + ls):

- #99 `workflow_runtime_open_enum_landed` — `WorkflowRuntime = YamlStatic |
  BinaryShim | PythonShim` at `dsl/gunbc/ci_emission.dag:27`; PR #2774
  (proud-dove-838, merged 2026-05-12T23:39:42Z). Consumer: drift-guard
  integration test `gunbc_ci_github_actions_workflow_dag_matches_yaml_generator_output`
  at `t_ci_workflow_as_data_demo_test.rs:783`.

- #100 `project_github_actions_landed` — `fn project_github_actions(dag:
  CIWorkflowDag, runtime: WorkflowRuntime) -> Workflow` at `ci_emission.dag:87`
  with pinned binding `gunbc_ci_yml_workflow` at :95; PR #2774.

- #101 `test_cost_dimension_landed` — `type TestNodeCostDimension` at
  `src/v3/std/verification.dag:578` and `dsl/std/verification.dag:75`; PR
  #2761 (eager-crane-176, merged 2026-05-12T18:07:31Z). P5 hand-Rust
  receipt `test_cost_dimension_landed_on_test_node` at
  `test_runner_test.rs:287`.

Scope (per `docs/r3-actual-close-plan.md:281` Gap 7 cascade item 5 + T-WAD
scope doc): Slice 8 substrate-completion ratifications ONLY. Sibling
gates #98 (`ci_yml_hand_authority_dissolved`) and #103
(`ci_uses_affected_set_selection`) remain DECLARED — separate slices.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(r3): Address codex BLOCKING #1-3 on PR #3023 — separate ledger vs predicate-execution; fix #99/#100 consumer-test citations

(1) Audit doc: revert #99/#100/#101 rows to NOT_EXECUTED. The
`r3-close-predicate-execution-2026-05-13.md` table tracks close-ceremony
predicate execution sweep status, NOT §1.8 ledger status. Conflating the
two surfaces collapsed a deliberate distinction; ledger status now lives
solely in `docs/r3-program-plan.md` §1.8 (pointed at from the
"pending close-ceremony sweep" note in each row).

(2) §1.8 row #99: replace `gunbc_ci_github_actions_workflow_dag_matches_yaml_generator_output`
(:783, YAML→DAG byte-drift guard) with `gunbc_ci_emission_substrate_compiles`
(:818) as the substrate-compile consumer. The :783 test docstring
(`t_ci_workflow_as_data_demo_test.rs:781`) explicitly states it is NOT the
emit-back consumer of `project_github_actions`.

(3) §1.8 row #100: drop "byte-for-byte pins projection codomain" claim.
The :783 drift guard does not exercise the .dag-authoritative
projection surface. Replace with :818 `gunbc_ci_emission_substrate_compiles`
type-check of the projection signature; explicitly note the :783 guard
is YAML-authority ratchet, not projection emit-back. Per-arm body
completion remains follow-on under #98.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant