Repository navigation
Carry the typed answer from the daemon to every surface - #6690
Merged
Merged
Conversation
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. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
Sinity
force-pushed
the
pl-answer-boundary
branch
from
November 1, 2026 12:01
cf88e2d to
f541cca
Compare
The daemon answered with its own Response enum, which flattened empty and degraded answers into ok, dropped notes and next actions, and kept the failure kind as a string with an untyped detail object. Every edge then guessed the outcome back from payload fields such as pending, currency, incomplete and outcome, and rebuilt failures by reading detail JSON. Response and both conversions are deleted. Handlers return command_surface::Answer directly, deciding the outcome where the answer is made: writes awaiting Sinex confirmation and imports with unconfirmed user state are degraded, query answers carry their computed outcome and notes, reads over a noncurrent index are degraded with a note, and list reads that matched nothing are empty. The daemon's internal error is one Failure that wraps the shared failure; store, selection, query and query-language errors convert into it once, with position, correction, hint and the candidates of an ambiguous reference as typed fields. The store's selection refusals keep their code as StoreError::Selection, and an ambiguous ID prefix is the typed StoreError::Ambiguous. Timeout refusals name the stage from the typed request instead of re-reading serialized request JSON. The socket, HTTP, web pages, browser routes, MCP text and structured output, and CLI JSON and terminal output all pass the answer through unchanged; the CLI prints notes and candidates to stderr. The candidates field comes from the paired polylogue-sinex-common change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
The shared failure now boxes its candidates so a Result carrying one stays under Clippy's large error threshold. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
The shared query language never takes a field name for a search word (query-language README), so "test output" is refused at `output`; the quoted word still searches. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
MCP clients parse a tool's text as JSON; the notes belong to the structured answer, so only a failure's text lists them. Page and commit references are designed forms with no producer yet (query.md, references.md); they now answer not_built instead of being read as an unknown field. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
…d read paths Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Sinity
force-pushed
the
pl-answer-boundary
branch
from
November 1, 2026 12:07
f541cca to
c794291
Compare
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The daemon now returns one typed answer,
command_surface::Answer, to every surface. Before this change it answered with its ownResponseenum. That enum turned empty and degraded answers into plain ok, dropped notes and next actions, and stored the failure kind as a string plus an untypeddetailobject. The edges then worked the outcome back out from payload fields (pending,state,/user_state/pending,currency,incomplete,empty,outcome) and rebuilt failures by reading fields out ofdetail.Builds on Sinity/polylogue-sinex-common#68, merged as
149e9e2, which adds a typedcandidateslist to the sharedFailure. Cargo.lock is moved to that commit here.What changed
daemon::Response, bothFromconversions,Response::answer,protocol::answer(the code that worked out the outcome from fields), thedetail-parsingprotocol::failure(code, message, detail),query::response,execution::exit_code, thedaemon::query::Failurethat held a string kind and detail, the per-module duplicate error mappings (read::failure,language_error,cursor_failure, pagefailure), andSelectionError::detail.StoreError::PrimaryPending, which is now a degraded receipt.QueryAnswer { value, outcome, notes }). An incomplete part makes the answer degraded and names the part in its notes.daemon::Failure, which wraps the shared failure. It exists only so?can convert into it. Store, selection, query and query-language errors convert into it once, at the owner, with typed position, correction, hint and candidates.FailureKind. The product code stays inFailure::code, classified once inFAILURE_CLASSES.invalid_cursor,attachment_unavailable,embeddings_offandconfirmare now registered.StoreError::Selection. An ambiguous ID prefix is now the typedStoreError::Ambiguous, and its matches becomecandidates.textback. It sets the narrower query as the suggestion and gives the stage and SQLite step count in a note.--jsonpasses the answer through unchanged. On a terminal the CLI prints notes and candidates on stderr.interfaces.mdsays who decides the outcome and notes, and namescandidatesin the JSON error.query.mdlistscandidates.Tests
cli::query_surfaces::a_degraded_answer_keeps_its_outcome_and_notes_on_every_surfacesends a degraded query (similar:with embeddings off) through CLI--json, the socket and MCPstructuredContent. On each surface it checks outcomedegraded, exit 5, the rows, and the same notes naming the missing part. On the old code the notes were empty, so this test fails there.protocol::testswere rewritten around the explicit constructors.a_name_two_saved_queries_share_is_refusedandsaved_relation_errors_reach_the_query_error_pathnow check that ambiguity is refused asambiguousand lists both roots, throughcandidates(references.md "Ambiguity is an error").an_assertion_reference_names_the_current_revision_or_one_revision:page:andfile:references now answernot_built(query.md, references.md) instead ofunknown_field.every_surface_refuses_command_words_and_values_outside_a_set:"test output"is refused because a field name is never a search word (common query-language README). The quoted form still searches.native_hook_failures_reach_ordinary_mcp_reads_and_budgeted_pages: the previous commit's update identifies a message header by its reference.Source.messageis the containing message of a block, and a header built bySource::recordleaves it unset. Checked against the model and kept.Verification
These checks ran on head
f541cca917, rebased onee5b55eddb. Cargo.lock is at common149e9e2, which contains #68, and is no longer linked to a local checkout.fast(AgentCTL job 262): passed. It runs fmt, boundaries and clippy in both configurations.focused -p polylogue -p polylogue-store(job 263): 1455 tests, 1420 passed, 34 failed, 1 timed out, 9 skipped.93da945931, 58 failures):an_assertion_reference_names_the_current_revision_or_one_revision,every_surface_refuses_command_words_and_values_outside_a_set,a_name_two_saved_queries_share_is_refusedandnative_hook_failures_reach_ordinary_mcp_reads_and_budgeted_pages.cli::tests::literal_read_envelope_is_not_expanded_with_cli_defaults: a page read through the CLI now sends the restated call (write_out::call(&request, accepted)) instead of the literal envelope. That line came in with Fix daemon and surface test failures at their owners #6688 after the baseline commit; this PR does not touch it.mcp::tests::generated_ready_mcp_call_executes_its_exact_typed_envelope: timed out after more than 90 seconds while the host was heavily loaded. Not yet reproduced.daemon::service::read::object::tests::actual_no_effect_request_read_records_one_object_run_and_roundtrips_through_directory_import: the run outcome is not yet visible when the test reads it (object/tests.rs:115). In earlier runs a sibling test failed at the same line and then passed again, andrecordis mechanically unchanged here. It looks like a race between the finish write and the next read, but this is not confirmed.saved_relation_errors_reach_the_query_error_pathis still a baseline failure. It now passes the ambiguity check and fails later, wheresessions where cost > nonsenseis not refused at plan preparation; that is outside this change.rg '\bResponse\b' crates --type rustfinds only HTTP response types, the operation trait's associatedResponse, the Claude Code parser's ownResponsestruct, comments and fixture text. No outcome is worked out from payload fields any more.🤖 Generated with Claude Code
https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em