Conversation
…rtials Found running the single agent end to end against a local stack. A tool that failed ended the whole pass. Maple's tool handlers declared `MapleToolFailure` as the tool's failure type, and the engine ends the run on a declared failure — that is how an approval-gated proposal becomes the turn's last word — so a rejected `run_sql` on the first call killed the investigation before it had read anything. Tool errors are now returned as the call's text and the model rewrites the call; only the approval gate still fails the run. A close-out's report landed as `diagnosed`. Whatever the close-out files is a partial by construction, so `SubmitDiagnosisRequest` carries `partial` and the service routes it to the inconclusive writer: low confidence, no severity, no `diagnosed_at`, no issue-side writes. A model stream that stalls now fails after two minutes without a chunk. One did, mid-sentence, on the second run; the engine's ten-minute rail never interrupted it, and the investigation sat until the 15-minute stale sweep marked it failed with nothing filed. Failing the stream hands the run to the close-out instead. Empty text deltas are dropped from the session log. One provider streamed one per reasoning token, which put two thousand empty events into a Durable Object's SQLite in a minute — and the log is what every reconnect replays.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
Stack 5 of 5 — based on the schema PR. Four fixes found by running the single agent end to end against a local stack.
What the runs showed
MapleToolFailureas each tool's failure type, and the engine ends the run on a declared failure — which is how an approval-gated proposal becomes the turn's last word. So a rejectedrun_sql(missing$__orgFilter) on the agent's very first call killed the investigation before it had read anything. This predates the stack and affects chat turns too. Tool errors are now returned as the call's result text and the model rewrites the call; only the approval gate still fails the run. Verified on the next run: alist_source_repositorieserror came back as text and the agent carried on.diagnosed. Whatever the close-out files is a partial by construction, soSubmitDiagnosisRequestcarriespartialand the service routes it to the inconclusive writer: low confidence, no severity, nodiagnosed_at, no issue-side writes.Verified
End to end on a local
alchemy devstack (api, ai, web, electric-sync) from the worktree: freeform investigations started from the hub ran as one agent turn on the chat Durable Object, the page followed them live over the investigation shape, the close-out filed a partial when the first pass died, and the stale sweep closed a run whose worker was rebuilt underneath it. Migration0058applied cleanly to a throwaway Postgres database with the lane table gone from the Electric publication. Scoped typechecks onpackages/domain,packages/backend,apps/ai; vitest for the chat tools, events, run, the tool handlers, the model instrumentation and the investigation service.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.