Skip to content

feat(#3996): render generated images from manifest-gated portable blobs - #4029

Open
aheritier wants to merge 2 commits into
gemini-direct-image-outputfrom
generated-image-inline-tui
Open

feat(#3996): render generated images from manifest-gated portable blobs#4029
aheritier wants to merge 2 commits into
gemini-direct-image-outputfrom
generated-image-inline-tui

Conversation

@aheritier

@aheritier aheritier commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

What and why

Revalidate generated-file authorization against the current manifest on every resolution, by owner, path, and workspace root. Session deletion revokes references even when workspace provenance is cached. Invalid POSIX/Windows paths and unknown/external roots are rejected before any lookup. Prefer portable blobs. Fall back only when the optional blob interface is absent or the blob is not found, and only to the owning workspace; other blob errors fail closed. Portable bytes may survive a missing WorkingDir and then use the recorded relative display path, not a verified absolute path. Legacy ordinary-file contents are not integrity-verified. Resolve bytes off the TUI Update path and preserve adjacent text.

Part of #3996. Review this PR against its immediate parent, #4028, rather than the aggregate stack against main.

Commit inventory

Head: 950d801ff3a2eb4ee5aaf56265bf6fe8faa54110; parent SHA: 8eed51894134f104fa449f2cfbe7e510a22d3956.

  • 8c2a76fad28771134b95cd1d797221403ea4f3f8 — feat: render generated images through workspace manifest authorization
  • 950d801ff3a2eb4ee5aaf56265bf6fe8faa54110 — feat: restore generated media from portable session blobs

Validation

Build, test compilation, owning-package tests and the named fixture passed at this PR head.

Exact deterministic fixture command:

go test -v -count=1 ./pkg/runtime ./pkg/tui/components/message ./pkg/tui/components/messages ./pkg/tui/page/chat -run 'TestResolveGeneratedFile|TestAppendAssistantMediaPreservesStreamedTextRendering|TestLoadFromSession.*Media|TestUpdateAssistantMedia|TestAssistantMedia|Test.*GeneratedMedia'

Matched top-level tests: pkg/runtime: 52; pkg/tui/components/message: 4; pkg/tui/components/messages: 5; pkg/tui/page/chat: 3.

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 or remote runtime was exercised. 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.

@aheritier aheritier added area/agent For work that has to do with the general agent loop/agentic features of the app area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only. status/needs-rebase PR has merge conflicts or is out of date with main labels Aug 22, 2026
@aheritier

Copy link
Copy Markdown
Collaborator Author

👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added status/needs-rebase; it'll be picked back up automatically once the conflicts are cleared.

@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 7438c97 to 2bb441e Compare August 24, 2026 15:13
@aheritier aheritier added area/testing Test infrastructure, CI/CD, test runners, evaluation and removed status/needs-rebase PR has merge conflicts or is out of date with main labels Aug 24, 2026
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 2bb441e to 105245f Compare August 25, 2026 08:01
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 105245f to d9ac92d Compare August 25, 2026 08:17
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from d9ac92d to 781cec4 Compare August 25, 2026 08:33
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 781cec4 to 5339887 Compare August 25, 2026 20:24
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 5339887 to 28ee2f3 Compare August 26, 2026 11:11
@aheritier aheritier added the status/needs-rebase PR has merge conflicts or is out of date with main label Sep 1, 2026
@aheritier

Copy link
Copy Markdown
Collaborator Author

👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added status/needs-rebase; it'll be picked back up automatically once the conflicts are cleared.

@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 28ee2f3 to f209843 Compare September 1, 2026 16:30
@aheritier aheritier removed the status/needs-rebase PR has merge conflicts or is out of date with main label Sep 1, 2026
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from f209843 to 20a7918 Compare September 1, 2026 19:59
aheritier

This comment was marked as resolved.

@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 20a7918 to 2b3832d Compare September 6, 2026 16:15
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 2b3832d to 07465fa Compare September 7, 2026 11:19
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 07465fa to c64ba62 Compare September 7, 2026 11:35
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from c64ba62 to 39a1e31 Compare September 7, 2026 16:25
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 39a1e31 to 7d74be6 Compare September 7, 2026 16:48
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 7d74be6 to 6261e50 Compare September 8, 2026 06:17
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 6261e50 to 7479fbe Compare September 8, 2026 07:58
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 7479fbe to 167f4dc Compare September 8, 2026 17:31
Resolve authorized workspace files asynchronously outside the TUI update loop using the owning session, never viewing CWD. Reject unknown or historical external roots before any lookup. Require manifest identity, containment, regular-file and opened-file identity checks. Revalidate manifest authorization on every resolution so deletion revokes references; cache only workspace provenance. Route replacements by message ID, and preserve text and unavailable placeholders for forged or missing references.
Authorize owning-session workspace references against the manifest before preferring portable blobs. Fall back to workspace files only when the optional blob interface is absent or reports blob-not-found; other errors fail closed. Portable bytes survive missing files and workspace provenance, with a recorded relative display label in that case. Generated-media reads have no application byte cap; ordinary attachment limits are unchanged.
@aheritier
aheritier force-pushed the generated-image-inline-tui branch from 167f4dc to 950d801 Compare September 8, 2026 20:36
@aheritier aheritier changed the title feat(#3996): render generated images inline via manifest-gated resolution feat(#3996): render generated images from manifest-gated portable blobs Sep 8, 2026
@aheritier
aheritier marked this pull request as ready for review September 8, 2026 20:39
@aheritier
aheritier requested a review from a team as a code owner September 8, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent For work that has to do with the general agent loop/agentic features of the app area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/testing Test infrastructure, CI/CD, test runners, evaluation area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant