test(generators): lock all three tracked pipeline steps in the caching regression test#183
Conversation
…g test Generator_Caches_Output_When_Source_Unchanged asserted caching only on the EndpointBindingFlow step, leaving the other two registered tracked steps — ErrorOrContext and ResultsUnionMaxArity — unguarded by name. ErrorOrContext is precisely the step the original incremental-caching bug regressed (it captured Compilation and compared by reference; fixed 2026-04-21 in aa6cbc8 by making it value-equatable). Assert IsCached on all three so a future re-introduction of a non-value-equatable cached model is caught directly at its source step, not only transitively via the downstream EndpointBindingFlow assertion. Verified: all three assertions pass; full generator suite 156/156 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (4)tests/ErrorOrX.Generators.Tests/**/*.cs📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
tests/ErrorOrX.Generators.Tests/**⚙️ CodeRabbit configuration file
Files:
tests/**/*.cs⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
Summary by CodeRabbit
WalkthroughA single test method in GeneratorCachingTests.cs is extended with two additional cache-step assertions— ChangesGenerator Caching Test Coverage
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (7 passed)
Comment |
Why
Generator_Caches_Output_When_Source_UnchangedassertedIsCachedon only one of the generator's three registered tracked steps:WithTrackingName)ErrorOrContextResultsUnionMaxArityEndpointBindingFlow.<attr>ErrorOrContextis exactly the step the original incremental-caching bug regressed — it capturedCompilationand compared by reference, so every compilation mutation invalidated the cache. That was fixed on 2026-04-21 (aa6cbc8, value-equatable ErrorOrContext;9dbd497, migrate off AwaitableContext). The production fix is complete and correct — this PR just closes the test-coverage gap so a future regression of that exact step is caught directly, not only transitively through the downstreamEndpointBindingFlowassertion.Change
Three lines added to the existing test (same source, same single pipeline run — the testing framework accumulates the assertions and verifies them on
resultdisposal):Running the new assertions also confirms both previously-unguarded steps are in fact cached today (no latent caching defect was hiding behind the missing coverage).
Verification — complete & verified
dotnet build tests/ErrorOrX.Generators.Tests -c Release→ 0 / 0Generator_Caches_Output_When_Source_Unchanged(all 3 assertions) → pass🤖 Generated with Claude Code