Repository navigation
fix: repair inherited master failures and API-surface writes - #5669
Conversation
The daemon derives every machine-protocol principal as surface cli, so user.* overlay and mutation.facade.* products, which have no CLI route, were refused by their actuators' surface allowlists: web-reader saves and deletes answered 409 and every facade write through a running daemon failed. Those families now execute as the api surface. Also lower facade tuple arguments to JSON arrays before request validation, answer a malformed saved-view query with its 400 field error at the HTTP boundary, run the MCP write tests against the real operation stack, and retire the facade mutation census whose helper #5550 deleted. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
The async twin rebuilt profiles but never cleared the demand revision it satisfied, so a current profile kept reading stale. It now deletes the exact captured revision per rebuilt session, as the sync route does. Regenerate the derived-sweep census and move two test fixtures off the retired session_events.summary column and onto source-owned marker inputs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
Read JSON from stdout when a warning goes to stderr, find raw coverage rows by origin, derive schema mismatches from the current version counter, replay only kernel-bound route examples, pass the prepared_artifact keyword through a shard test double, count the census wrapper's phase commit, and make the paused-preparation completion bound a hang guard. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
|
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: 288d1d05ac
ℹ️ 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".
A saved-view query whose value the spec parser cannot coerce, such as limit="not-a-number", raised a plain ValueError that the safe handler reported as a 500. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
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 intest_privileged_tools.pyandtest_facade_mutation_census.py, 5 intest_session_insight_refresh.py, and 4 more elsewhere. Two of the causes are product defects:cli.user.*overlay operations andmutation.facade.*products have no CLI route, and their actuators allow onlymcp/api/facade. So a web-reader saved-view save, or an annotation or saved-view delete, answered 409SurfaceDeniedError. Every Python-API or MCP facade write through a running daemon also failed; for example,add_tagreturned "did not complete: failed".rebuild_session_insights_asyncreplaced profiles but left thesession_profile_demandrow they satisfied. The profile therefore readstaleforever, although its binding matched. The sync twin already acknowledges the captured revision.The remaining failures were stale tests, each against a deliberate change:
user_version = 1no longer mismatches.session_events.summarywas retired in perf(storage): Retire the derived session_events.summary column #5446._execute_facade_mutation, which the census measured.add_rawgainedprepared_artifact.CliRunner.outputinterleaves stderr, where--allow-no-authwrites its warning.Solution
MutationPrincipal.on_surface(...). The user-overlay handler and the facade product handlers now execute as theapisurface, the public surface that owns them, whichever transport delivered the request.bulk_tag_sessionsandpost_blackboard_notewere refused before any daemon call.field, not a 409 failed operation.daemon_ingest.pyentry.running_daemon_operations). The executor spies and failure-propagation proofs therefore observe the daemon's executor.test_facade_mutation_census.pyis deleted. Its own retirement condition fired: the helper is gone and every facade mutation submits a declared operation.Verification
devtools testover the 11 affected test files plus the threetest_revision_backfill.pyids andtest_raw_observation_owner.py:707 passed(receipt20260927T193036Z-focused-test-1998248-bb6cdb4a, pre-rebase; the rebase onto917fcaa17applied cleanly and touched none of these files except an unrelated appended web-reader test).devtools verify --quickpassed before the last two test-only edits; the hosted quick gate covers the pushed head.devtools schema closure:mutation_transaction.pyandderived/session/rebuild.pyare IN, so this lands before a rebuild. The other changed production files are OUT.Residuals
default/route) that no handler accepts, for example/api/import/explainand/api/webui/freshnessreturn 400. The example replay now covers the kernel-bound routes only;polylogue-otmpmtracks making the family examples real.user_version67) is now classifiedupgrade_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.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4