Skip to content

fix(capture): ground summaries in bounded tool outcomes - #485

Merged
EyJunge1 merged 1 commit into
tickernelz:mainfrom
Phototonic:fix/bounded-capture-outcomes
Nov 4, 2026
Merged

EyJunge1 merged 1 commit into
tickernelz:mainfrom
Phototonic:fix/bounded-capture-outcomes

Conversation

@Phototonic

Copy link
Copy Markdown
Contributor

Summary

Live auto-capture previously saw tool names and inputs alongside assistant claims, without the tool results needed to qualify those claims. It now includes bounded V1/V2 textual results and invocation status in the existing summary request. The prompt distinguishes plans, attempts, failures, pending/interrupted work and observed outcomes, preserving useful failure/recovery lessons and making missing evidence explicit.

  • Sanitize before truncation; retain up to 32 real calls, with 2 KiB per result and a 16 KiB tool-evidence block (smaller under small context budgets). Preserve early context and recent attempts, deduplicate repeated part identities and label omissions.
  • Limit generated summaries to 8 KiB UTF-8, types to 64 bytes and tags to eight 64-byte values. Oversized responses use existing fallback/retry; raw update rewrites over 8 KiB add the bounded draft without changing the existing memory.
  • Exclude attachments, arbitrary metadata, synthetic/ignored parts and compaction summaries. No new raw-log store, extra verification model, configuration setting or historical migration.

These are partial excerpts, and model summaries can still be wrong. Update rewrites are size-checked before shared-client redaction, so replacement text can expand a rewrite beyond that initial 8 KiB check. Existing external-provider history retains requests and raw responses before capture validation; separate attempts remain until existing cleanup runs (seven-day default expiry). This does not bound raw provider responses or total database size, and deleting rows need not shrink database files.

Test plan

  • Exercised the change locally (or N/A for docs/meta-only)
  • Noted any follow-up or known limitations

Validation was completed in an isolated Linux cloud checkout at 17c4eb7708d460d1afc302f7968e39a08c69dc29. The exact tested patch was transferred unchanged for publication; tests were not rerun on the publishing desktop.

  • Focused capture tests: 31 passed, zero failures; 110 assertions.
  • bun test --timeout 30000: 1,162 passed, four platform-specific skips, zero failures; 8,464 assertions across 156 files.
  • bun run build, bun run check and patch-apply checks passed.
  • Synthetic persistence checks cover failure/recovery evidence, privacy across V2 block boundaries, bounded output, oversized rewrites and repeated-output/provider-history growth and cleanup. Controlled responses test wiring; illustrative summaries do not certify a configured provider.
  • Default five-second profile-runtime timeouts reproduced on untouched upstream; unrelated timeout settings are unchanged. No Windows/macOS or live-provider validation is claimed.

Checklist

  • Branch is based on main (do not open PRs from commits already on main)
  • bun test passes (or N/A)
  • bun run typecheck passes (or N/A)
  • bun run check passes (format + lint + typecheck; or N/A)
  • Docs / README updated when behavior or contribution process changes

@Phototonic
Phototonic marked this pull request as ready for review November 3, 2026 23:11
@EyJunge1
EyJunge1 merged commit 192f011 into tickernelz:main Nov 4, 2026
7 checks passed
@EyJunge1 EyJunge1 mentioned this pull request Nov 4, 2026
3 tasks done
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.

2 participants