Skip to content

Fix 6 bugs across Chrome and Firefox builds - #116

Merged
esokullu merged 1 commit into
mainfrom
fixbugs2
Jun 1, 2026
Merged

esokullu merged 1 commit into
mainfrom
fixbugs2

Conversation

@esokullu

@esokullu esokullu commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

A bug-hunting pass (full test suite + parallel deep-review across every major subsystem) that fixes 6 distinct real bugs, each in both the Chrome and Firefox builds where applicable.

# Bug Impact
1 Trace tool events lost their step number (_executeToolBatch passed null to recordToolCall) Trace Compare view showed no step on tool rows
2 _emergencyTrim could emit an orphaned tool message (slice starts mid-turn) On context overflow, the recovery retry re-sent a conversation OpenAI/Anthropic reject — the run died instead of recovering
3 Offscreen recorder leaked tab/mic capture if start() threw before session was set Tab left captured + muted with no way to recover
4 Recorder stop() awaited the stop event with no timeout A wedged recorder hung the stop message and stuck the recording banner
5 Markdown code restored via String.replace(str, str) interpreted $& / $` / $' in snippets Garbled code blocks + corrupted copy output (shell, jQuery, regex)
6 HLS implicit IV BigInt(seq | 0) truncated to signed 32-bit All-zero IV for media sequences ≥ 2^31 → AES-128 segments decrypt to garbage on long live streams

Notes

🤖 Generated with Claude Code

Fix 6 bugs across Chrome and Firefox builds

- Trace tool events now carry their step number (thread `steps` through
  _executeToolBatch to recordToolCall) instead of recording null.
- _emergencyTrim: drop leading orphaned `tool` messages so the overflow
  recovery retry does not re-send a conversation the OpenAI/Anthropic
  APIs reject, which previously killed the run instead of recovering.
- Offscreen recorder: release tab/mic streams + close AudioContext if
  start() throws before `session` is assigned (was leaving the tab
  captured + muted with no way to recover).
- Offscreen recorder: stop() short-circuits an already-inactive recorder
  and adds a 5s timeout so a wedged recorder can no longer hang the stop
  message and stick the recording banner.
- Markdown rendering: restore inline/fenced code via function replacers so
  `$&`, `$\`` etc. in code snippets are no longer interpreted by
  String.replace and corrupting the output.
- HLS implicit IV: replace BigInt(seq | 0) (signed 32-bit truncation →
  all-zero IV for sequences >= 2^31) with a safe non-negative coercion,
  fixing AES-128 segment decryption on long live streams. Applied to all
  three byte-identical downloader copies; added a regression test.

Also marked TODOs #3 (resolved) and #10 (already implemented).

242/242 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webbrain Ready Ready Preview, Comment Jun 1, 2026 3:45am

@esokullu
esokullu merged commit eff5f7a into main Jun 1, 2026
2 checks passed
@esokullu
esokullu deleted the fixbugs2 branch June 1, 2026 03:49
esokullu added a commit that referenced this pull request Jul 14, 2026
…uidance

Fix Gmail whole-draft replacement guidance
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