Repository navigation
test(sessions): cover tied-timestamp persistence gaps - #7492
Closed
jabrailkhalil wants to merge 2 commits into
Closed
jabrailkhalil wants to merge 2 commits into
jabrailkhalil wants to merge 2 commits into
Conversation
I capture fresh-reader ordering, recent-event limits and same-timestamp stale writers with strict xfails while schema alignment remains open. Related: google#7286.
jabrailkhalil
marked this pull request as ready for review
October 15, 2026 13:42
Contributor
Author
|
I integrated current main in |
copybara-service Bot
pushed a commit
that referenced
this pull request
Oct 28, 2026
Merge #7492 PiperOrigin-RevId: 1008939004
Collaborator
|
Thank you @jabrailkhalil for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 5db54a0. Closing this PR as the changes are now in the main branch. |
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.
Link to Issue or Description of Change
Related: #7286. I prepared this tests-only PR following the suggested regression-first approach.
I reproduce two persistence gaps:
(timestamp, id)ordering changes a tied-timestamp append history and its recent tail; usingevent.timestampas the revision marker lets a stale writer append after another same-timestamp commit.The file-backed tests use independent service instances, 40 events in forward/reverse ID order, recent limits
None/0/1/5/100, and same/increasing-timestamp writer controls. Only the five known failures have strict, assertion-onlyxfailmarkers. Production code, schemas, migrations, dependency manifests and tox configuration remain identical to main.The existing
test_get_session_orders_tied_timestamps_by_id[True]still requires reverse-appended IDs to reload in ID order. The new strict xfails record the opposite append-order expectation so the contract decision in #7286 stays explicit. If append order is selected, I will update or remove that existing assertion as part of the fix. The marker-less staleness fallback also selects its latest stored event by(timestamp, id); an append-sequence decision would need to cover that lookup as well as reads.Current-main integration
I integrated main
12c7bed7661ccf942f0f6d3b62bed22a23ea0a85by a normal, conflict-free merge. Current head:97d674a4e2a8f51d63eb7b59a40e0c59d8f4c1f5. The net diff remains 122 added lines in one existing test file. This PR records failures; it does not choose an ordering contract or introduce a migration.Testing Plan
Fresh Linux validation on the integrated head, 24 October 2026:
toxmatrix rantests/unittestswith three pytest workers. I used upstream CI'slancedbinstall exclusion and a dependency cutoff of2026-10-24T11:49:14Z; no test exclusions were added. The two existing non-strict xpasses are separate from this PR's strict xfails.--runxfail, exactly those five DatabaseSessionService assertions fail; there are no setup errors.uv buildpasses. A clean Python 3.14 environment installs the builtgoogle-adk 2.13.0wheel with[db]; its actual site-packages import writes four events and state to a SQLite file, closes the writer, and verifies both through an independent reader. No model or provider calls.14921b39ff8699779b673dc52d75a40678509c10. I verified its tree is identical to PR head97d674a4e2a8f51d63eb7b59a40e0c59d8f4c1f5and its parents are the exact main/head above. Tracked source remains unchanged. The new-file check also passes its official--baseline-dirmode against main. The direct branch-history run had identified upstream files acrossHEAD~1..HEAD; the actual GitHub merge context resolves that range correctly. No waiver, rule change or hook exclusion is set.The earlier Windows and Workflow replay runs are historical evidence and were not rerun for this base sync. PostgreSQL/MySQL/Spanner and an actual concurrent scheduling race are not claimed. Current-head upstream CI authorization and maintainer review remain separate gates.