Repository navigation
Aside screenshots and PDFs are no longer lost when the script ends (#4784) - #4786
Merged
Merged
Conversation
…4784) Aside now deletes a one-shot repl session directory when the script ends and refuses every path outside it, so the old save-then-copy step always failed. Scripts that save files run through bin/gstack-aside-repl, which carries each file out over stdout and writes it to --out. lib/aside-render.ts uses the same route. The $B fallback is unchanged. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…4784) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
saveArtifact now throws on a name that is not one plain file name, each artifact line carries its byte count so a truncated line is an error instead of a short file, and a page-made data URL with a newline can no longer add an artifact line of its own in the design render. Review-Finding: p1/specialist-batched#1 reader=specialist-batched Review-Finding: p1/specialist-batched#2 reader=specialist-batched Review-Finding: p1/specialist-batched#3 reader=specialist-batched Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 25, 2026
- ### Fixed (#4786) - Screenshots, PDFs and page dumps taken in the Aside browser are no longer lost before you can see them. (#4786) - ### Fixed (#4787) - `/cso --comprehensive` can now prepare npm apps whose lockfile lists bundled dependencies, such as Next.js apps on Tailwind CSS 4. (#4787) - A first version's ruled-out line now counts only against the one reply it cites. (#4800) - A first version's plan can say the owner ruled something out, and that line now counts only when he actually said it. (#4789) - /ship's documentation check updates your repo's own docs again, including docs written as templates. (#4810) - ### Fixed (#4798) - /autoplan approval asks with more than 26 choices now label them AA, AB and so on instead of punctuation. (#4798) - /land-and-deploy no longer leaves an auto-merge request behind or deletes `main`. (#4795) - When the branch you push moved on the remote since your last fetch, the pre-push credential guard now tells you to run `git fetch` instead of failing with ENOBUFS or telling you to rotate a credential that is already on the remote. (#4794) - ### Fixed (#4796) - The pre-merge secrets check now scans an added file over 16 MiB instead of failing it unread. (#4796) - On Windows, an update no longer deletes your brain-aware skills when `python3` is the Microsoft Store alias. (#4793) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
Screenshots, PDFs and page dumps that browsing skills take in the Aside browser now reach your report folder instead of vanishing.
Aside deletes a script's working folder as soon as the script ends and refuses to save anywhere else, so the old "save, then copy it out" step always failed (#4784).
Nothing to do: skills pick up the new route on upgrade, and gstack's own fallback browser is unchanged.
What changed
Rule 8 now sends saved files out over the script's output, because Aside deletes the session folder when the script ends (#4784).
Before/after as text: Rule 8 now sends saved files out over the script's output, because Aside deletes the session folder when the script ends (#4784)
A user reported that every screenshot a browsing skill took in Aside was gone before the agent could copy it. Now any Aside script that saves a file runs through the new
bin/gstack-aside-repl --out <dir> '<script>'. The script callssaveArtifact(name, bytes), which prints the file as one line behind a random marker that only this run knows. The wrapper writes the file to<dir>/<name>and printsSAVED=<path>in its place, so image data never reaches the agent. Page text cannot forge a file because it never sees the marker. A name that isn't one plain file name makes the script fail, a cut-off line is an error instead of a short file, and an existing symlink is never written through.Every Aside script that saves a file now goes through the wrapper, and the
ASIDE_DIR=pluscpstep is gone from all of them. That covers the /browse cookbook, browser rule 8, /qa, /design-review, /canary, /land-and-deploy, /design-shotgun, /design-consultation, /devex-review and the design DOM dump. make-pdf, diagrams and design previews rendered through Aside (lib/aside-render.ts) get each file back as anARTIFACTline on the same route. The$Bfallback commands are byte-identical, and only the Aside column of its translation table names the new call.Why
"After the script ends, the screenshot path no longer exists" (#4784). On Aside CLI 1.26.1107 a one-shot script's folder is deleted when it ends, and every absolute path is refused, so the copy step could never work. The script's output is the one channel that survives the script, and a 6.07 MB full-page PNG came through it whole.
Blast radius
The change touches the generated SKILL.md files of the browsing skills, the Aside renderer and one new bin; the
$Bfallback path every Linux and Windows user runs is untouched. Script ran:test/aside-artifacts.test.tspins the$Btranslation cells byte-for-byte and checks that no generated doc still has the copy-after-the-script pattern, and a live run of the wrapper on Garry's Mac (Aside 1.26.1107.24) saved a JPEG, a PDF, an annotated PNG, a DOM dump, an element shot and a 6.07 MB PNG with correct file headers, and ignored a forged marker line.Pre-Landing Review
The first review found three small gaps in the new wrapper and renderer, all fixed in this PR: a page-made data URL could add an artifact line, a name with a space was decoded as garbage, and a cut-off line was saved as a short file. The final review of the whole PR found nothing that blocks; its notes are listed below.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
sf-61c98b179a5csecurity finding, details recorded privatelylib/aside-render.ts:398ARTIFACT lines in the design render have no byte count, so a truncated line writes a short filelib/aside-render.ts:399ARTIFACT lines in the design render have no byte count, so a cut-off line becomes a short file reported as successlib/aside-render.ts:269an eval data URL that is not strict base64 (whitespace or URL-safe characters) is now written as its literal text instead of decoded bytesbin/gstack-aside-repl:72a marker line with the wrong field count is reported as a bad namescripts/resolvers/design.ts:1the Aside DOM dump leaves an empty mktemp folder behind; the symlink check is check-then-writelib/aside-render.ts:1the live fallback render test fails when a warm browse daemon from an earlier run is reused (reproduced at the base commit)Eval Results
Paid evals skipped for this PR by ruling: the changed text runs only on the Aside path, which the Linux eval runners can't reach (they run every skill on the unchanged
$Bpath). The aside-* cases stay scheduled coverage. The live Aside route was checked on Garry's Mac instead (see Blast radius).Issues
Fixes #4784
TODOS
No TODO items completed in this PR.
Documentation
Status: current. Every doc that describes how Aside saves files already matches the new
bin/gstack-aside-repl --out <dir>route on this branch, so no edits were needed.Scope: committed, staged, unstaged and new files on
aside-screenshots-survive-the-scriptagainst base7deee429. The change: Aside deletes a script's working folder when the script ends, so files a script saves now come back over its output and the wrapper writes them to disk (#4784).Coverage debt: none found. Diagram drift: none.
Tests
bun test test/aside-artifacts.test.ts test/aside-driver.test.ts test/qa-browser-preservation.test.ts test/design-review-build-loop.test.ts test/gstack-design-detect.test.ts test/generated-bash-placeholders.test.ts test/docs-only.test.ts test/regression-issue2091-bsd-mktemp.test.ts test/skill-md-size-guard.test.ts test/parity-suite.test.ts: 456 pass, 0 failbun test test/aside-render.test.tswithout the live fallback case: 75 pass, 2 skip (live Aside), 0 failAgent notes
Refs GSTA-834, GST-3653
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=7 fixed=3 scope=frozen ledgers_read=4 dispatches=1
Gate edits: none detected (22 listed, 20 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: not planned (code class, no numeric claims); second review was in-host adversarial (Opus 5.5).
evals: no PR pass. The changed text runs only on the Aside path, which the Linux eval runners can't reach. The aside-* cases stay scheduled coverage. (Captain GStack Minder, GSTA-36, option A)
Approvals
No approvals recorded for branch aside-screenshots-survive-the-script.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix
🤖 Generated with Claude Code