feat(#3996): keep generated media workspace-only with portable session copies - #4026
Open
aheritier wants to merge 2 commits into
Open
feat(#3996): keep generated media workspace-only with portable session copies#4026aheritier wants to merge 2 commits into
aheritier wants to merge 2 commits into
Conversation
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
August 24, 2026 15:13
9b6e49d to
8e76a13
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
August 25, 2026 08:00
8e76a13 to
871dd1e
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
2 times, most recently
from
August 25, 2026 08:32
e76fa5b to
0fe2b64
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
August 25, 2026 20:24
0fe2b64 to
d6b3c12
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
August 26, 2026 11:09
d6b3c12 to
9a926c1
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
2 times, most recently
from
September 1, 2026 16:10
426aea6 to
9a926c1
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 1, 2026 16:30
9a926c1 to
c442c63
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 1, 2026 19:58
c442c63 to
161aaa6
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 6, 2026 16:14
161aaa6 to
5b26f97
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 7, 2026 11:19
5b26f97 to
ffb1c83
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 7, 2026 11:34
ffb1c83 to
b9f0d13
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 7, 2026 16:13
b9f0d13 to
5ab1ac5
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 7, 2026 16:47
5ab1ac5 to
f5cc603
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 8, 2026 06:17
f5cc603 to
32b0b74
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 8, 2026 07:57
32b0b74 to
94da09d
Compare
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 8, 2026 17:31
94da09d to
69f32a6
Compare
Redirect absolute, traversal, home-relative and symlink-escaping targets to a sanitized workspace basename with a bounded warning. Generated media never elicits a path decision or writes externally; normal ACP and CLI turns complete without a form consumer. Preserve MIME correction, collision-safe atomic writes, partial success, owning-session provenance and workspace-only manifest authorization. Keep the pinned root-kind migration for database compatibility.
After successful workspace materialization and manifest recording, store the bytes under the owning session and final artifact identity. Add the SQLite blob table as migration 029 and place the manifest root-kind migration at 030. The workspace deliverable remains available at its requested or collision-adjusted path; the session copy enables portable resolution without embedding generated base64 in session JSON. Blob writes are all-or-error without a per-item byte cap. A failed blob write preserves the workspace file and emits a safe portability warning. DeleteSession removes both manifest and blob rows. The in-memory store mirrors add, lookup, defensive copying, overwrite, and cleanup semantics.
aheritier
force-pushed
the
workspace-media-escape-confirm
branch
from
September 8, 2026 20:35
69f32a6 to
1409e8b
Compare
aheritier
marked this pull request as ready for review
September 8, 2026 20:39
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.
What and why
Keep all generated-media writes inside the owning workspace. Absolute, traversal, home-relative, external, and symlink-escaping requests are redirected to a sanitized basename in the workspace with a bounded warning; there is no external-write behavior, confirmation/dialog/schema, or
ArtifactRootExternalpath. ACP foreground sessions complete and persist assistant text plus workspace artifact metadata without an elicitation consumer. After file and manifest recording, optionally store the complete bytes as a portable session blob without an application-level cap; blob failure warns and preserves the workspace file. Deleting a session removes manifest/blob rows, never workspace files. The root-kind migration remains for compatibility, and old unknown/external rows fail closed.Part of #3996. Review this PR against its immediate parent, #4025, rather than the aggregate stack against
main.Commit inventory
Head:
1409e8b414370be9a472cad3d889d0cc8a2316c9; parent SHA:9d7da808954352fc5fd7c54aeeacc8240c0bcc2d.e58a910c6834250df13b2a802cfc63d7bca3349e— feat: keep generated-media saves inside the owning workspace1409e8b414370be9a472cad3d889d0cc8a2316c9— feat(Epic: Gemini image output with workspace deliverables and portable session copies #3996): persist portable generated media blobsValidation
Build, test compilation, owning-package tests and the named fixture passed at this PR head.
Exact deterministic fixture command:
Matched top-level tests:
pkg/acp: 1;pkg/cli: 1;pkg/runtime: 4;pkg/session: 2;pkg/workspacemedia: 2.Deterministic scope: the named local fixture exercises this PR boundary with disposable configuration/stores and fake or loopback providers as applicable. Every listed package ran nonzero matching top-level tests.
Deferred/live scope: No active database was read, copied, migrated, or mutated. The final stack head passed build, lint, full tests, an uncached full suite, focused race tests and documentation checks in disposable environments. Remote CI is tracked by the checks below; no new paid-provider or active-database validation was run.