Repository navigation
test(evaluator): E7 analyze_complexity root selection coverage - #1505
Conversation
…analyze-complexity-integration
…ath claim Reviewer noted the test was named *_fail_diagnostics_are_typed but only exercises DimensionOk. Renamed to preserves_typed_witness_envelope_on_ok and tightened the docstring to match what the test actually proves: the public API preserves the typed Witness<SymbolicCost> envelope on the success arm. Fail-arm typed-diagnostic discipline stays pinned by the in-module analyze_complexity_tests, which can construct ghost-port DAGs via crate-private builders the integration surface can't reach. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…analyze-complexity-integration
…itness content equality Reviewer noted the delegation test compared witness counts only; a wrapper preserving dimension_name + composed + count while changing witness contents would have passed. Strengthens the per-pair assertion: on the Inhabits arm (only arm reachable on well-typed public-API programs), assert SymbolicCost equality (PartialEq is derived). Mismatched arms or both-Violates panic so the test catches real divergence; fail-arm content equality stays in the in-module unit tests where ghost-port DAGs are constructible (Behavior does not derive PartialEq). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…analyze-complexity-integration
… import
Reviewer flagged the trailing `let _: fn(&Diagnostic) -> () = |_| {}`
as a no-op kept only to silence the unused-import warning, which sits
awkwardly with TESTING.md §2 (behavior-driven). Dropped both the
stanza and the import; the typed-Witness assertion above already
carries the typed-envelope claim. Fail-arm Diagnostic coverage stays
in the in-module unit tests where ghost-port DAGs are constructible.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…analyze-complexity-integration
…wo-bind fixture
Reviewer noted single-bind fixtures left the workflow_root arg
non-observable: a wrapper that ignored the supplied root and always
picked "the only bind" or "the first bind" would still pass.
Adds analyze_complexity_public_api_honors_supplied_workflow_root over
a two-bind program ("let a = 1 + 2\nlet b = a + 3 + 4"). For each
root, asserts the wrapper agrees with the underlying analyzer; then
asserts root `a`'s witness-spine count is strictly less than root
`b`'s, since b's reachable-behaviors slice covers a's slice plus the
additional adds. A wrapper that ignored the supplied root would
return equal counts and fail the strict-less assertion.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Findings: None. This diff only adds an integration test in Verdict: APPROVE — Narrow, regression-oriented test coverage for supplied |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
6cfd22a6· Trigger:schedule - Thinking:
168s wall
Non-blocking — Strengths
src/v3/compiler/tests/integration.rsThe added two-bind fixture makes workflow_root observable and checks the public wrapper against the symbolic-cost analyzer without introducing a second analyzer path.
✅ No blocking concerns; this is focused root-selection coverage over the existing E7 wrapper contract.
|
Review metadata
1. Story of the diffThis PR adds one E7 integration regression in 2. Invariant categories
N/A — this is implementation-only Rust test coverage; the diff adds a
Compliant — facts-flow-forward / single-authority shape is respected in the test setup: the selected root is explicitly threaded into both the public wrapper and the underlying dimension analyzer at
Compliant — the test uses explicit free-function inputs/outputs (
Finding — NON-BLOCKING, behavior-driven oracle is weaker than the stated claim.
But the surrounding claim says “the public wrapper agrees with the underlying analyzer on the same root” at
N/A — the diff references E7 in test prose at
N/A — no new scaffold, TODO, temporary bridge, deprecation marker, or parallel representation is introduced. The explanatory comments at 3. VerdictAPPROVE_WITH_COMMENTS The root-selection regression is well targeted and does make the supplied |
… to witness content Reviewer noted the per-root delegation in honors_supplied_workflow_root checked witness count only; a wrapper returning correct count but wrong contents would pass. Adds per-pair Witness::Inhabits content equality (SymbolicCost has PartialEq) matching the pattern from the main delegation test. Fail-arm equality stays in in-module unit tests where ghost-port DAGs are constructible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Verdict: APPROVE No findings. The diff adds focused integration coverage for |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
b0e5aced· Trigger:schedule - Thinking:
100s wall
✅ The PR is test-only E7 root-selection coverage, and I found no blocking or non-blocking concerns in the provided diff.
Follow-up to #1503 for PR-E E7 public API coverage.
Adds an integration test proving
analyze_complexity(dag, workflow_root)honors the supplied workflow root on a two-bind program instead of implicitly choosing the only/first bind. The test compares the public wrapper toanalyze_symbolic_cost_dimensionfor each root and asserts the second root reaches a larger witness spine.Scope: tests only in
src/v3/compiler/tests/integration.rs; no analyzer semantics, Witness/DimensionReport shapes, TenantFlow/IFC, E6 fold, substrate, runner, or fixture changes.