Skip to content

fix(query): declare parent_refs/child_refs/continuation in session projection - #3350

Merged
Sinity merged 1 commit into
masterfrom
feature/query/fix-session-projection-parity-z9gh3
Jul 27, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/query/fix-session-projection-parity-z9gh3

Conversation

@Sinity

@Sinity Sinity commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes a live, currently-red parity gap between the query discovery corpus's declared session projection columns and the real SessionListRowPayload model shape, discovered while auditing polylogue-z9gh.3's closure state.

Problem

PR #3296 (near/lineage execution materialize) added parent_refs/child_refs/continuation fields to SessionListRowPayload (populated only for lineage-seeded lineage:id:<ref> pages) but never updated the discovery corpus's SESSION_COLUMNS declaration in polylogue/archive/query/discovery.py to match. tests/unit/archive/query/test_discovery.py::test_declared_projection_columns_track_public_row_payload_models — an anti-vacuity parity check added in PR #3066 specifically to catch this class of drift — is failing on current master:

AssertionError: assert ('id', 'origi...actions', ...) == ('id', 'origi...actions', ...)
Right contains 3 more items, first extra item: 'parent_refs'

This is exactly the drift class named in polylogue-z9gh.3 AC7: "a missing projection/registration/coverage/parity mapping fails one actionable check" — the check fired correctly, but nobody had fixed the drift it caught.

Solution

Added parent_refs, child_refs, continuation to SESSION_COLUMNS in polylogue/archive/query/discovery.py (present on every session row; null except on lineage-seeded pages), keeping the session-repository example's projection_columns byte-identical to the real payload model. Regenerated docs/search.md via devtools render query-discovery (mechanical: 3 new column names appended to the featured session examples' projection cell). No grammar or payload-model change.

Verification

  • devtools test tests/unit/archive/query/test_discovery.py tests/unit/archive/query/test_query_ast_schema.py → 159 passed (was 1 failed / 158 passed before this fix)
  • devtools render all --check → exit 0, all surfaces sync OK
  • devtools verify --quick → exit 0

Ref polylogue-z9gh.3

…ojection

Problem: PR #3296 (near/lineage execution materialize) added
parent_refs/child_refs/continuation fields to SessionListRowPayload for
lineage-seeded page rows, but never updated the discovery corpus's
SESSION_COLUMNS declaration to match. test_discovery.py's
test_declared_projection_columns_track_public_row_payload_models
(added in PR #3066 as an anti-vacuity parity check between declared
projection columns and real payload models) started failing on master
as soon as this drifted -- a live, currently-red gap discovered while
auditing polylogue-z9gh.3's closure state, and exactly the class of
drift AC7 of that bead names ("a missing projection/... mapping fails
one actionable check").

What changed: added parent_refs, child_refs, continuation to
SESSION_COLUMNS in polylogue/archive/query/discovery.py (present on
every session row, populated only for lineage-seeded pages) so the
non-lineage session-repository example's projection_columns stays
byte-identical to SessionListRowPayload's real shape. Regenerated
docs/search.md via devtools render query-discovery (mechanical diff:
the 3 new column names appended to the featured session examples'
projection cell).

Verification: devtools test tests/unit/archive/query/test_discovery.py
tests/unit/archive/query/test_query_ast_schema.py -> 159 passed
(previously 1 failed/158 passed). devtools render all --check -> exit
0, all surfaces sync OK. devtools verify --quick -> exit 0.

Ref polylogue-z9gh.3

Co-Authored-By: Claude <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6d464098-b882-4f56-a16e-b371ee85058f

📥 Commits

Reviewing files that changed from the base of the PR and between 64d203c and 20e9345.

📒 Files selected for processing (2)
  • docs/search.md
  • polylogue/archive/query/discovery.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/query/fix-session-projection-parity-z9gh3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity
Sinity merged commit 5922241 into master Jul 27, 2026
3 checks passed
@Sinity
Sinity deleted the feature/query/fix-session-projection-parity-z9gh3 branch July 27, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant