Skip to content

fix: Repair the six tests red on master after the batch wave - #5235

Merged
Sinity merged 7 commits into
masterfrom
fix/master-reds
Sep 18, 2026
Merged

Sinity merged 7 commits into
masterfrom
fix/master-reds

Conversation

@Sinity

@Sinity Sinity commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Six tests were red on master after the 2026-09-16 wave (polylogue-3t9ea); four were real product defects, two stale test premises. All six are green.

Problem and solution, per test

  • Delegation stage check caught only FileNotFoundError, so a locked or skewed probe aborted the whole convergence pass. Now degrades to "assume work" with a daemon.stage.check_failed event, like the standing-queries stage.
  • polylogue_vector_derivation_hash takes a registered recipe hash since polylogue-crcst, but sqlite_vec_runtime still passed a model name, so every managed or pinned vector projection raised SqliteVecError. EmbeddingRecipe is threaded through the vector read binding (open_operation_read(vector_recipe=...)); this also fixes test_vec.py::test_open_vector_read_snapshot_uses_only_the_explicit_pinned_paths.
  • fix: Land the small verified closure fixes in one batch #5221 added fallback_provider is Provider.CODEX to the structural Codex state-db acquire arm; canonical_acquisition_provider aliases only the exact codex-state/codex-memories tokens, so watch sources named otherwise resolved to unknown and their goals_1.sqlite was silently excluded. Conjunct reverted on the structural arm; the source-only arm keeps it, and fix: Land the small verified closure fixes in one batch #5221's foreign state_5.sqlite guard still refuses via the structural check.
  • The MCP query-capability catalog had grown to 26,357 bytes against the 25,000-byte response budget, so _json_payload silently returned the generic over-budget envelope and MCP discovery exposed no query vocabulary at all. The resource now measures the serialized catalog and, only when over budget, applies one declared reduction (per-unit field names → field_count + explain route); 18,300 bytes now.
  • Embedding-readiness test seeded embedding_status into the anchor db while the payload reads root/embeddings.db; re-seeded into a real tier pair, contract kept, terminal/retryable split added.
  • Attachment-acquisition test's private id mirror still used NUL framing after _hash_bytes moved to length-prefixed framing; it now uses the production _attachment_id.

Gate finding (not changed here)

No required per-PR check runs pytest: verify_quick is static gates only, the CI test job is workflow_dispatch with run_full_suite, and the only broad pytest evidence is the nightly verify_all. Master going red on these was structurally invisible until the nightly. Adding a required pytest selection reverses an explicit operator policy, so it is surfaced on polylogue-3t9ea and polylogue-u9nmr for a ruling rather than changed.

Closure

sources/live/batch.py and storage/search_providers/sqlite_vec_runtime.py are IN the derived-schema closure; the identity moves. Lands before the rebuild.

Verification

  • agentctl ... verify_quick → job VQ_PLACEHOLDER
  • agentctl ... pytest_focused -- <the eight files + tests/unit/operations + tests/unit/mcp + daemon_execution> → job PF_PLACEHOLDER
  • Worker: the eight files → 262 passed; ruff/mypy clean.

Residuals

  • vector_model → vector_recipe keyword rename on open_operation_read: daemon_execution.py is the only production caller; the integration selection above covers tests/unit/operations and tests/unit/mcp.
  • The delegation check now swallows every exception into "assume work" with a warning event, matching the standing-queries precedent.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sx3uCnEiY7MXtLt4FDEYfw

Summary by CodeRabbit

  • Bug Fixes
    • Improved embedding lookup accuracy by accounting for both the selected model and vector dimensions.
    • Fixed source-tier session detection, enabling relevant workload queries to run correctly.
    • Codex state files now load when their filename and structure are valid, regardless of watch source name.
    • Unexpected materialization probe failures now remain pending, allowing terminal results to be reported instead of stopping early.
  • Improvements
    • Capability catalogs automatically reduce inline detail when responses exceed size limits while preserving field discovery links.

Sinity and others added 6 commits September 16, 2026 11:14
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7ef9cc45-0baf-4a3a-8d8b-4020f79292d1

📥 Commits

Reviewing files that changed from the base of the PR and between c384ecd and 1bf87c1.

📒 Files selected for processing (12)
  • polylogue/daemon/convergence_stages.py
  • polylogue/mcp/server_resources.py
  • polylogue/operations/daemon_execution.py
  • polylogue/operations/daemon_reads.py
  • polylogue/operations/daemon_workload_probe.py
  • polylogue/operations/operation_context.py
  • polylogue/sources/live/batch.py
  • polylogue/storage/search_providers/sqlite_vec_runtime.py
  • tests/unit/daemon/test_embedding_readiness.py
  • tests/unit/mcp/test_envelope_contracts.py
  • tests/unit/storage/test_attachment_acquisition.py
  • tests/unit/storage/test_vec.py
 _____________________________________________________________
< 🥕 I brought carrots. You brought corner cases. Let's party. >
 -------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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 marked this pull request as ready for review September 18, 2026 20:35
@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, add credits to your account and enable them for code reviews in your settings.

@Sinity
Sinity merged commit bb1d7d1 into master Sep 18, 2026
3 checks passed
@Sinity
Sinity deleted the fix/master-reds branch September 18, 2026 20:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-18T20:42:20.677321Z 1bf87c1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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