Repository navigation
fix: harden result caches and query regression coverage - #588
Merged
Merged
Conversation
Co-authored-by: Savas Parastatidis <39513442+savasp@users.noreply.github.com>
Co-authored-by: Savas Parastatidis <39513442+savasp@users.noreply.github.com>
…shots atomically Co-authored-by: Savas Parastatidis <39513442+savasp@users.noreply.github.com>
Co-authored-by: Savas Parastatidis <39513442+savasp@users.noreply.github.com>
savasp
approved these changes
Nov 13, 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.
Summary
Qualify the combined changes in #579, #580, #581, #582, #583 and #585 against their query, mutation and CLR lifetime contracts. This PR is based on merged #585 (
615f5348), with no stack dependency.Fix result caches that retained constructed generic types with collectible arguments, node-label property metadata and diagnostic target keys. Respect non-default contextual reflection instead of returning a default-context cached type for the same assembly identity. Publish the discovered-type array and its assembly generation as one immutable snapshot so readers cannot mark an old scan current.
Add 19 serialization lifetime/context/late-load/warm-reuse cases, two provider-neutral TCK contracts for synchronous Count/LongCount composition and overlapping-edge delete preflight, and two AGE commit/rollback cases for derived index/aggregate state. Strengthen failed-provisioning postconditions to verify catalog rollback and subsequent CRUD. The TCK inventory grows from 502 to 504 methods. Existing AGE matrix jobs now retain Cobertura coverage alongside their test results, using the existing collector and artifact path.
Closes #587.
Coverage and design assessment
The pre-change full-provider CI artifacts at #585 head
546cd550give the baseline below. The new reports use the same Release/Linux configuration; this PR also collects AGE 1.8 coverage. Line hits are unioned across project reports by source file/line; generated files and the TCK package are excluded.These are whole-surface line measurements, not changed-line or branch coverage. That job executes AGE 1.7; the separate 1.8 matrix already executed native-path tests but did not publish coverage. The new matrix flag closes that visibility gap. The native shortest-path planner now measures 234/257 lines (91.1%), compared with 173/257 (67.3%) in the earlier report. Much of the AGE increase exposes previously executed 1.8 behavior rather than new tests; the serialization and transaction contracts add semantic protection beyond line totals. Current coverage artifacts retain the full-suite and both matrix reports. Four runtime regression groups reproduced cache failures before their fixes; the snapshot fix has a concrete publication interleaving, without a claimed deterministic runtime race reproduction.
The provider design retains useful boundaries: typed fast-path eligibility and catalog/version checks; ordinary execution when a plan is inapplicable; explicit rejection of unsupported path compositions; native paths through shared hydration; and transactional coupling of label, companion and aggregate writes. No query/storage redesign was justified. The new tests verify these compositions across the provider bindings and the transaction/maintenance boundaries that lacked direct coverage.
Test plan
18dfcc64: full provider suite, both AGE versions and three-platform package validation, CodeQL, documentation, dependency review and repository checks. Coverage artifacts for both AGE versions were downloaded and verified.Recommendations and limits
Keep differential ordinary/optimized execution and transaction/error-path tests as the acceptance criteria when broadening fast-path eligibility. Preserve the named rejection boundary for unsupported path compositions. Assess declared-index/aggregate read gains together with write amplification, maintenance cost and contention for the intended workload; historical performance benchmarks were not rerun here.
The cache tests establish result-cache lifetime/context guarantees. They do not certify complete plugin/provider/schema/serializer unloading. The existing conservative label-discovery policy can still rescan while collectible assemblies remain loaded, so plugin-heavy throughput is a workload to measure separately. No required finding is deferred and no separate architectural follow-up is needed to land these corrections.
Co-authored-by: Savas Parastatidis 39513442+savasp@users.noreply.github.com