Repository navigation
fix: restore session initialization query accounting - #184662
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Fixed: session initialization query accounting now recognizes the canonical compressed-payload read while retaining existing state and rollback coverage. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 27, 2026
Session initialization regression coverage now recognizes the canonical compressed-payload read while retaining exact query counts and existing state, receipt, rollback, watermark, and restart assertions.
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.
What Problem This Solves
The session-actor initialization regression tracks the exact database work needed to publish the first transcript state. It expects one payload query returning the three initialization rows, alongside the existing write, receipt, rollback, watermark, and restart checks.
The production query now selects
event_json,event_zstd, andevent_utf8_bytesdirectly so compressed payloads can be decoded by the existing payload owner without copying expanded text through SQLite. The test's SQL classifier still recognizes only the former aliased decoded expression. As a result, the query runs correctly but the test records zero payload reads and fails its accounting assertion.User Impact
This restores the reliability of the existing initialization regression. It does not change production SQL, transcript decoding, persisted data, configuration, database schema, runtime behavior, or public interfaces.
All existing behavioral assertions remain in place, including exactly one payload query returning three rows, the initialization receipt and persisted events, rollback of a refused append without a watermark, and state preservation across actor and database restart.
Why This Change Was Made
The classifier now identifies the canonical direct payload-column projection while retaining its existing guards for the sequence projection,
transcript_eventssource, and selected sequence set. That keeps the observation specific to the one bounded payload read without loosening counts or matching unrelated transcript queries.The correction stays in the test that owns this accounting contract. No new fixture, helper, test case, production instrumentation, or duplicate coverage is introduced.
Evidence
GitHub Actions run
40316438338, job121550439503, provides the original failure: the test counted zero payload queries while every other reported query count matched. Source history identifies13b0b3fb4678732d6eff8be7ae9bb601adc91a4bas the intentional query change, and both the failing test blob and canonical query-owner blob remained unchanged through the selected base.The first exact remote attempt stopped at formatting before lint, types, or tests. The authorized exact-file formatter then produced the canonical one-line layout; that transition changed no query text or behavior. On the corrected frozen candidate, changed-file formatting and lint passed, the affected
core-test-agents-sessionstype graph passed, and both complete literal files passed all 19 tests with no skips. This includes the changed initialization regression and the unchanged owner control covering identity and compressed payload decoding.The installed P0-P3 autoreview reported no findings on the semantically identical pre-format diff, with the explicit limitation that it did not independently receive the surrounding test or generated SQL. Calibrated independent review, hosted CI, and hosted review remain readiness obligations after publication.