Skip to content

Batch 17: Research runs and web tools - #33

Merged
sixvolts merged 2 commits into
mainfrom
ci/fix-17-research-web
Sep 28, 2026
Merged

sixvolts merged 2 commits into
mainfrom
ci/fix-17-research-web

Conversation

@sixvolts

@sixvolts sixvolts commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Stacked on ci/fix-16-shards (PR 12 of 16 precedes it). Merge with "Create a merge commit" (squash or rebase would re-mint untested commits), one PR at a time, bottom-up. GitHub retargets this PR when the one below it merges and its branch is deleted.

fix(research): stop and timeouts reach running turns; synthesis runs with no tools

  • Turns started with pipeline.BoundToCaller end with their caller's
    context, so Stop, the worker timeout and the run deadline cut
    research workers, the writer and synthesis.
  • Synthesis reads the evidence server-side and runs as two turns: the
    note, with no tools, written into the note by the skill; then a
    memory pass that can only save facts, whose reply is the summary.
    Evidence is treated as data.
  • A worker succeeds only if it added findings; a run with none fails
    with a message.
  • Salvage keeps only findings; run transitions retry and then fail the
    run with a message; a synthesis panic fails the run.
  • The cancel endpoint compare-and-sets and validates the run id; runs
    interrupted by a restart get a "didn't finish" message.
  • Comments and RESEARCH-SKILL-SPEC updated.

Tests cover each change.

fix(web-tools): every Brave call counts as a search, fetch_page decodes charsets, feeds don't race

  • brave_page_read and search_news count against the per-turn web search
    budget and follow the no-search classification; shards allowlisting
    them get the search grant.
  • brave.Context has its own timeout, a deterministic source order, and
    merges a page listed in several categories.
  • Feeds are parsed with a parser per fetch, with a timeout and a body
    cap.
  • fetch_page decodes the page's charset; trims cut on rune boundaries.

Tests cover each change, including the fetch transport end to end.

Testing

The icecube tiers passed on this PR's tree before a migration-lock commit was added under the stack, as the first commit of #21: Go tests without and with Postgres, Playwright without a model, and Playwright against a local model. That commit changes only internal/db/migrate.go and its test, and the db package's tests pass with Postgres at every commit of the stack. The CI run on this PR tests the head as pushed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UwpkZbULrgj6JLeSra78AT

sixvolts and others added 2 commits September 27, 2026 14:37
…with no tools

- Turns started with pipeline.BoundToCaller end with their caller's
  context, so Stop, the worker timeout and the run deadline cut
  research workers, the writer and synthesis.
- Synthesis reads the evidence server-side and runs as two turns: the
  note, with no tools, written into the note by the skill; then a
  memory pass that can only save facts, whose reply is the summary.
  Evidence is treated as data.
- A worker succeeds only if it added findings; a run with none fails
  with a message.
- Salvage keeps only findings; run transitions retry and then fail the
  run with a message; a synthesis panic fails the run.
- The cancel endpoint compare-and-sets and validates the run id; runs
  interrupted by a restart get a "didn't finish" message.
- Comments and RESEARCH-SKILL-SPEC updated.

Tests cover each change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UwpkZbULrgj6JLeSra78AT
…es charsets, feeds don't race

- brave_page_read and search_news count against the per-turn web search
  budget and follow the no-search classification; shards allowlisting
  them get the search grant.
- brave.Context has its own timeout, a deterministic source order, and
  merges a page listed in several categories.
- Feeds are parsed with a parser per fetch, with a timeout and a body
  cap.
- fetch_page decodes the page's charset; trims cut on rune boundaries.

Tests cover each change, including the fetch transport end to end.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UwpkZbULrgj6JLeSra78AT
@sixvolts
sixvolts force-pushed the ci/fix-17-research-web branch from e58a346 to ae68dc8 Compare September 28, 2026 01:47
Base automatically changed from ci/fix-16-shards to main September 28, 2026 16:05
@sixvolts
sixvolts merged commit 7a0e312 into main Sep 28, 2026
1 check passed
@sixvolts
sixvolts deleted the ci/fix-17-research-web branch September 28, 2026 16:05
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