Repository navigation
fix(raw-sessions): honor configured source defaults - #5632
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9b95d9bd2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb433fb2be
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Summary Fixes the tests that fail on clean master, and the two product defects behind the biggest groups of them. ## Problem On clean master (checked at `2da021c54`), 11 tests in the web reader, MCP raw-session operations, thread profiles and browser capture failed, 35 in `test_privileged_tools.py` and `test_facade_mutation_census.py`, 5 in `test_session_insight_refresh.py`, and 4 more elsewhere. Two of the causes are product defects: - **API-owned mutations were refused through the daemon.** The daemon labels every machine-protocol principal as surface `cli`. `user.*` overlay operations and `mutation.facade.*` products have no CLI route, and their actuators allow only `mcp`/`api`/`facade`. So a web-reader saved-view save, or an annotation or saved-view delete, answered 409 `SurfaceDeniedError`. Every Python-API or MCP facade write through a running daemon also failed; for example, `add_tag` returned "did not complete: failed". - **The async insight rebuild never cleared profile demand.** `rebuild_session_insights_async` replaced profiles but left the `session_profile_demand` row they satisfied. The profile therefore read `stale` forever, although its binding matched. The sync twin already acknowledges the captured revision. The remaining failures were stale tests, each against a deliberate change: - The index version counter restarted at 1, so `user_version = 1` no longer mismatches. - Raw coverage rows follow configured source order since #5632. - `session_events.summary` was retired in #5446. - Markers are consumed from source-owned accepted inputs since #5493. - #5550 deleted `_execute_facade_mutation`, which the census measured. - `add_raw` gained `prepared_artifact`. - The census wrapper gained a phase commit in #5550. - Retained preparation runs in a spawned worker since #5565, so a 3 s completion bound times out on a loaded host. - `CliRunner.output` interleaves stderr, where `--allow-no-auth` writes its warning. ## Solution - `MutationPrincipal.on_surface(...)`. The user-overlay handler and the facade product handlers now execute as the `api` surface, the public surface that owns them, whichever transport delivered the request. - The facade client lowers tuple arguments to JSON arrays before the strict request models validate them. `bulk_tag_sessions` and `post_blackboard_note` were refused before any daemon call. - The saved-view HTTP route validates its query spec strictly, so a bad field is a 400 with `field`, not a 409 failed operation. - The async rebuild deletes the exact captured demand revision for each rebuilt session. The derived-sweep census declares it and is regenerated; the regeneration also reorders the stale `daemon_ingest.py` entry. - The MCP write, run and confirm-gate tests now run against the real resident operation stack (`running_daemon_operations`). The executor spies and failure-propagation proofs therefore observe the daemon's executor. - `test_facade_mutation_census.py` is deleted. Its own retirement condition fired: the helper is gone and every facade mutation submits a declared operation. - Each stale test is realigned with the contract it tests; see the commit messages. ## Verification - `devtools test` over the 11 affected test files plus the three `test_revision_backfill.py` ids and `test_raw_observation_owner.py`: `707 passed` (receipt `20260927T193036Z-focused-test-1998248-bb6cdb4a`, pre-rebase; the rebase onto `917fcaa17` applied cleanly and touched none of these files except an unrelated appended web-reader test). - `devtools verify --quick` passed before the last two test-only edits; the hosted quick gate covers the pushed head. - Derived-sweep census round-trip re-checked on the rebased tree: identical. - `devtools schema closure`: `mutation_transaction.py` and `derived/session/rebuild.py` are IN, so this lands before a rebuild. The other changed production files are OUT. ## Residuals - The route-family declarations carry placeholder examples (`default`/`route`) that no handler accepts, for example `/api/import/explain` and `/api/webui/freshness` return 400. The example replay now covers the kernel-bound routes only; `polylogue-otmpm` tracks making the family examples real. - A pre-reset archive (index `user_version` 67) is now classified `upgrade_runtime`, because the counter restarted at 1. The old archive is inert salvage and is never opened, so this was not changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4 --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
|
Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
|
Closing out open Codex review threads on this PR (evidence checked against master at f88b4a6):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Summary
Honor the configured raw-session source set when memory search and timeline requests omit origins. Keep explicit requests for unconfigured providers visible as degraded coverage gaps, and preserve an explicitly empty service source set.
Problem
Memory and timeline defaulted to the global Claude and Codex provider list. A Codex-only service therefore attempted Claude and reported a gap despite Claude not being part of that service's configuration. An empty source tuple also fell through to host defaults.
Solution
Raw memory and timeline choose defaults from their configured sources. The request contract keeps omitted origins distinguishable from explicitly requested origins, and unavailable requested providers return a degraded source row instead of raising
StopIteration. P08 snapshot continuation work was removed from this PR because a per-file cursor roster exceeds the 8,192-byte token limit at the default-scale synthetic populations. Follow-up: Beadpolylogue-du66c.Verification
devtools test tests/unit/mcp/test_session_owner_operations.py::test_raw_memory_and_timeline_respect_explicit_source_configurationpassed ateb433fb2b(receipt.cache/verify/runs/20260927T145257Z-focused-test-4159564-2c7c36f2/run.json).devtools verify --quickpassed ateb433fb2b(receipt.cache/verify/runs/20260927T145324Z-quick-4162359-e10c2560/run.json).devtools schema closurereturnedoutfor each of the six changed source files.devtools render all --checkpassed with all generated surfaces synchronized.Residuals
This change covers source ownership for raw memory and timeline only. Search continuation snapshot ownership, large-population cursor sizing, reference scope binding, legacy cursor behavior, and stat/open races are tracked in Bead
polylogue-du66c.