You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(core): enforce coverage ledger and foundational planner contracts #366
Problem\n\nCanonical issue #360 needs a fail-closed coverage gate before later test tranches can be measured honestly. The merged baseline also found foundational gaps in graphforge-ast and graphforge-plan, plus public write-extension dispatch gaps.\n\n## Objective\n\nLand the coverage ledger contract and deterministic AST, planner, and write-extension tests as the first independently reviewable tranche of #360.\n\n## Requirements\n\n- Enforce core aggregate, per-production-crate, and changed-Rust thresholds with exact HEAD and merge-base provenance.\n- Fail closed on missing, malformed, non-finite, dirty, incomplete-crate, stale-HEAD, and stale-base evidence.\n- Raise graphforge-plan above 80% with construction, reconstruction, hashing, rejection, and boundary tests.\n- Exercise AST token/span behavior and real executor write-extension dispatch, empty input, invalid child, and invalid partition behavior.\n- Preserve Rust ownership and existing BDD, TCK, persistence, recovery, and binding contracts.\n\n## Acceptance Criteria\n\n- [ ] Ledger mutation tests prove every fail-closed evidence boundary.\n- [ ] graphforge-plan is at least 80%.\n- [ ] Changed Rust lines in this tranche are at least 90%.\n- [ ] Targeted Rust suites and repository gates pass.\n- [ ] Coverage semantics are documented in docs/engineering/TESTING.md.\n\n## BDD Completion Scenarios\n\n### Scenario: Stale evidence cannot certify a change\n\nGiven a report from another HEAD or merge base\nWhen the Rust coverage gate evaluates it\nThen the gate fails with the mismatched provenance\nAnd no previous artifact is accepted.\n\n### Scenario: Foundational contracts cannot be averaged away\n\nGiven planner, AST, and write-extension success and malformed inputs\nWhen their real Rust APIs run\nThen exact results or structured errors are asserted\nAnd graphforge-plan independently exceeds 80%.\n\n## Testing\n\nRun ledger mutation tests under normal Python and optimized Python, targeted AST/plan/IR/rel/exec tests, then the standard workspace gates.\n\n## Documentation\n\nDocument aggregate, per-crate, patch, provenance, and fail-closed semantics.\n\n## Non-Goals\n\n- Completing the relational expression, storage, or facade coverage tranches.\n- Changing runtime behavior.\n- Closing canonical #360 by itself.\n\n## Related Issues\n\n- Parent and canonical close gate: #360\n- Dependency: #359\n
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Problem\n\nCanonical issue #360 needs a fail-closed coverage gate before later test tranches can be measured honestly. The merged baseline also found foundational gaps in graphforge-ast and graphforge-plan, plus public write-extension dispatch gaps.\n\n## Objective\n\nLand the coverage ledger contract and deterministic AST, planner, and write-extension tests as the first independently reviewable tranche of #360.\n\n## Requirements\n\n- Enforce core aggregate, per-production-crate, and changed-Rust thresholds with exact HEAD and merge-base provenance.\n- Fail closed on missing, malformed, non-finite, dirty, incomplete-crate, stale-HEAD, and stale-base evidence.\n- Raise graphforge-plan above 80% with construction, reconstruction, hashing, rejection, and boundary tests.\n- Exercise AST token/span behavior and real executor write-extension dispatch, empty input, invalid child, and invalid partition behavior.\n- Preserve Rust ownership and existing BDD, TCK, persistence, recovery, and binding contracts.\n\n## Acceptance Criteria\n\n- [ ] Ledger mutation tests prove every fail-closed evidence boundary.\n- [ ] graphforge-plan is at least 80%.\n- [ ] Changed Rust lines in this tranche are at least 90%.\n- [ ] Targeted Rust suites and repository gates pass.\n- [ ] Coverage semantics are documented in docs/engineering/TESTING.md.\n\n## BDD Completion Scenarios\n\n### Scenario: Stale evidence cannot certify a change\n\nGiven a report from another HEAD or merge base\nWhen the Rust coverage gate evaluates it\nThen the gate fails with the mismatched provenance\nAnd no previous artifact is accepted.\n\n### Scenario: Foundational contracts cannot be averaged away\n\nGiven planner, AST, and write-extension success and malformed inputs\nWhen their real Rust APIs run\nThen exact results or structured errors are asserted\nAnd graphforge-plan independently exceeds 80%.\n\n## Testing\n\nRun ledger mutation tests under normal Python and optimized Python, targeted AST/plan/IR/rel/exec tests, then the standard workspace gates.\n\n## Documentation\n\nDocument aggregate, per-crate, patch, provenance, and fail-closed semantics.\n\n## Non-Goals\n\n- Completing the relational expression, storage, or facade coverage tranches.\n- Changing runtime behavior.\n- Closing canonical #360 by itself.\n\n## Related Issues\n\n- Parent and canonical close gate: #360\n- Dependency: #359\n