Skip to content

fix: preserve thread search evidence across public pages - #5988

Merged
Sinity merged 1 commit into
masterfrom
codex/thread-read-parity
Oct 5, 2026
Merged

Sinity merged 1 commit into
masterfrom
codex/thread-read-parity

Conversation

@Sinity

@Sinity Sinity commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

Preserve thread support search through the public API and MCP registry projection, before paging.

Problem

Original polylogue-5gj19 finding 42.F021 (PR #4630 discussion 3928525476) describes strong-thread search returning no rows because the SQL relation omits support evidence. The current public ArchiveStore.iter_thread_insights still searched only session identity/title/repository/branch. MCP additionally discarded the existing expression before its registry fetch.

Original 42.F118 (discussion 3928525464) describes paging roots then dropping those without profiles in the former async list adapter. The shipped public replacement from 74cc6b4 already hydrates session evidence without that exclusion; this change qualifies its actual API/MCP page behavior and removes the unused predecessor. Original 43.F114 (PR #4228 discussion 3860697570) identifies a stale paste-filter test oracle.

Solution

Search the public payload's shared support vocabulary and support level in the existing SQL selection before LIMIT/OFFSET. Forward registry text search only to descriptors declaring their existing query field, preserving reference resolution precedence. Keep search/filter/page operands in response context and retain direct offset refinement for budgeted registry pages; framed DSL pages retain q2 authority.

Remove the unused async list adapter, DTO and mapper together. Keep retained exact thread-record reads. Correct the paste refusal oracle to the actual typed field/value and retain the accepted has_paste_evidence control. Document the current search and paging contract.

Verification

  • agentctl job start polylogue pytest_focused --workspace /home/sinity/.codex/worktrees/attachment-coordinate-evidence/polylogue -- tests/unit/storage/test_thread_search_parity.py tests/unit/mcp/test_query_request_contracts.py tests/unit/mcp/test_bounded_query_transport.py tests/unit/mcp/test_reference_query_pipeline.py tests/unit/mcp/test_insight_projection_derivation.py tests/unit/storage/test_thread_profile_read_authority.py tests/unit/core/test_threads_runtime.py tests/unit/core/test_insight_registry_parity.py tests/unit/operations/test_insight_reads.py: job 9049 SUCCESS, 56 passed / 56 collected; receipt 20261005T021731Z-focused-test-1988670-1d4e7fa1.
  • agentctl job start polylogue verify_quick --workspace /home/sinity/.codex/worktrees/attachment-coordinate-evidence/polylogue: job 9050 SUCCESS, all 12 gates passed; receipt 20261005T021748Z-quick-1989117-ffac36fc.
  • devtools schema closure polylogue/storage/sqlite/archive_tiers/archive.py: IN. Land before reconvergence; no live rebuild was performed.
  • Initial route probes 9044/9045 failed because the test server replaced explicit fixture runtime config with ambient config. The corrected explicit service construction passed 9046 and the final owning selection; original failure receipts remain preserved.

Self-review

Reviewed the coherent delta once, including connected budget refinement and removed consumers.

  1. ✓ Siblings/owners: public SQL/payload vocabulary shared; API/MCP/export use the same reader.
  2. ✓ Fix: parameter ordering and descriptor-field forwarding checked; 56 controls pass.
  3. ✓ Memory/limits: filter in SQL; hydrate selected page only; no new cap.
  4. ✓ Cost: existing SQL and offset window retained; no archive-wide Python hydration.
  5. N/A interruption: no new loop or mutation; existing read lifetime retained.
  6. ✓ Ordering/races: existing ordered relation and read custody preserved.
  7. ✓ Failure classification: existing typed read/refusal paths retained; typed paste oracle checked.
  8. ✓ Outcomes: existing terminal owner retained; empty page and unprofiled readable root exercised.
  9. N/A cleanup: no new owned resource or write boundary.
  10. N/A identity/keys: no durable ID/key change; derived closure membership recorded.
  11. ✓ Lossless transforms: narrowing retains original search and advances offset; q2 controls pass.
  12. ✓ Degenerate inputs: absent term and exhausted page exercised.
  13. ✓ Consumers: both dispatch helpers, response budget owner, docs and tests updated; unused predecessor removed.
  14. ✓ Tests/stubs: real writer/API/MCP route with explicit runtime ownership; reference precedence tested.
  15. ✓ Trust: neutral synthetic fixtures only; no private archive or receipt contents tracked.

Residuals

The broader polylogue-5gj19 group remains open. F118 is qualified against its shipped replacement, not claimed as a newly introduced profile gate. Existing SQL offset/search work can scale with the selected relation; this does not claim constant-time search. No fresh-agent/model trials, live rebuild or shared Native/Runtime worktree edits.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@Sinity
Sinity enabled auto-merge (squash) October 5, 2026 02:21
@Sinity
Sinity merged commit 66568e5 into master Oct 5, 2026
3 checks passed
@Sinity
Sinity deleted the codex/thread-read-parity branch October 5, 2026 02:23
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