Skip to content

fix(workbench): bound Agent Document responses and keep document markdown images controlled - #234

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
wave5/231-review-fixes
Sep 1, 2026
Merged

fix(workbench): bound Agent Document responses and keep document markdown images controlled#234
ScriptedAlchemy merged 2 commits into
mainfrom
wave5/231-review-fixes

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Folds the two post-merge Codex findings on #231 (#105 stage-2 document stage).

Fixes

  1. P1 — unbounded decoded-event accumulation (runtime-routes.ts document route): the per-event and event-count limits could not prevent quadratic retained data from replacement-heavy streams, so the route now tracks the serialized response size while accumulating (separators included) against a named 16 MiB budget (agentDocumentResponseLimit — generous for real documents, small enough to keep the foreground server healthy). On exhaustion it aborts the decode via the decode stream's AbortSignal and answers with a new honest diagnostic, AB8209 (413) — never a truncated or fabricated event list. Unit-tested for both the budget rejection and the unaffected normal path.
  2. P2 — remote markdown assets (agent-document-stage.tsx + skill-markdown.tsx): the shared MarkdownProjector is now resolver-parameterized (resolveImage/resolveLink), the Skills page keeps its existing resource resolution, and the document stage resolves only data: image URIs — a markdown node referencing a remote image renders an inert placeholder (alt text + URL as text) instead of fetching it, so agent/model-produced output cannot trigger unsolicited network requests. Unit-tested: remote image → inert placeholder with no remote img src; data-URI image still renders.

Verification

  • pnpm typecheck (incl. examples), pnpm lint (865 files): clean, re-run after rebase.
  • Unit: 2,068 passed / 4 skipped. Browser: runtime-playground.e2e.test.ts 3/3 (Document tab unchanged for real runs).

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 23551c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T23:19:33.098502Z 23551c2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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