Repository navigation
test(runtime): close the invariant-suite handoff coverage gaps - #341
Merged
Merged
Conversation
Five helpers the invariant-suite handoff depends on were either named in no helper list -- so the template's real code never ran -- or shadowed by a harness stub that answered the very question under test. - #213 `captureInvariantSuiteBaseline` was in no list. It now runs, and a test tampers with the agent-writable sidecar after clearing the in-memory digests the way a durable resume does; the protected copy under run state wins. - #215 `state.changedInvariantSourcePaths` was initialized `[]` and never set, so the `src/`/`contracts/` capture at the companions call site was dead. A changed `src/` helper now has to reach the manifest and the next worktree. - #212 `invariantTestRoots` was stubbed `() => []`, which made the retry cleanup loop unreachable. It is un-stubbed against an Aave-like `tests/` fixture with no `test/` root at all. - #211 `assertSafeInvariantSuitePath` was stubbed down to an absolute/traversal check and `assertInvariantSuiteSourceBudget` to a no-op; both are un-stubbed through a new PROVENANCE_HELPERS list. A second test covers the retention path -- every existing companions fixture tombstones the ancestor file, so none of them showed an inherited-only source surviving. - #214 PUBLICATION_HELPERS did not name `listInvariantSuiteSources`, so the enumeration under test was the harness's own. With the real one loaded, an extra file dropped under `invariant-suite/` fails the publication closed. No production change: every new assertion passes against the template as it stands, and each one was confirmed to fail against a mutation of the specific line it covers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #213. Closes #215. Closes #212. Closes #211. Closes #214.
Five test gaps from the review of PR #209, which shipped no behavioral test of its own. Production code was found correct for #212/#213/#215; #211 and #214 had real harness stubs that are now un-stubbed.
Verification ran 16 mutations of
workflow.tsx; all five tests are load-bearing. Three mutations survive the suite — recorded as coverage gaps, not defects; production is untouched.fix/invariant-source-budgets) in this same test file. The conflict is textual — both sides add distincttest()blocks and git mis-merges on shared trailing boilerplate. A union resolution is correct; one duplicatedreaddirSyncbag key needs dropping.Greptile Summary
Adds load-bearing invariant-suite handoff regression coverage without modifying production behavior.
Confidence Score: 5/5
The PR appears safe to merge; the added tests faithfully exercise the intended generated-workflow handoff paths.
The change is test-only, and the new helper extraction, fixtures, constants, state bindings, and asserted failure paths align with the generated workflow behavior they cover.
Important Files Changed
Reviews (1): Last reviewed commit: "test(runtime): close the invariant-suite..." | Re-trigger Greptile
Context used: