fix(#6867): refresh artifacts after settled-session recovery - #7067
nesquena-hermes merged 3 commits into
Conversation
|
| Filename | Overview |
|---|---|
| static/workspace.js | Adds a fail-closed helper that renders artifacts only for the session owning the current pane. |
| static/messages.js | Routes stream completion and settled-session recovery through owner-scoped artifact projection. |
| static/sessions.js | Routes successful full-session loading through owner-scoped artifact projection. |
| tests/test_issue6867_artifacts_settled_recovery.py | Adds rendered regression coverage for recovery, ownership isolation, session-id rotation, and missing artifact paths. |
| tests/test_issue2655_frontend.py | Updates the existing artifact consumer-map assertions for the shared owner-scoped helper. |
| CHANGELOG.md | Adds release-note wording describing the artifact recovery and ownership fix. |
Reviews (2): Last reviewed commit: "docs(changelog): note the #6867 artifact..." | Re-trigger Greptile
🔬 Gate certification — GREEN ✅Certified head: What I ran
The fix (12 production lines)
function projectSessionArtifactsForOwner(sessionId){
if(!sessionId||!S.session||S.session.session_id!==sessionId) return false;
if(typeof _isSessionCurrentPane!=='function'||!_isSessionCurrentPane(sessionId)) return false;
renderSessionArtifacts();
return true;
}It replaces 3 unconditional Verified SOUND (reproduced by Codex + Fable + reviewer)
Minor (cosmetic, non-blocking): the guard's first line duplicates Recommendation to the next agentReady to merge. Cert fresh for sha Gate leg: threat scan → full suite w/ frozen-master baseline reconciliation → Codex reproduce (SAFE, ran the PR's Chromium recovery tests) → Fable 5 UX (SHIP-UX, code+audit) → reviewer full-diff read. The shared browser daemon was unavailable this pass; the live-behavior evidence is the PR's 8 passing Chromium recovery tests + Codex's execution + Fable's audit — a fresh reviewer screenshot is deferred to ship time. |
|
Gate-clean at the rebased head. Codex SAFE TO SHIP (ownership guards reject foreign-session and in-progress-pane repaint; This is a behavior fix (dropping stale moved/deleted dead-link rows after settled-session recovery), so a static before/after cannot faithfully show it — the proof rests on the gate + the real Playwright recovery coverage. Ready to ship pending the visible-surface sign-off. Thanks @rodboev. |
|
Shipped in experimental release exp-v0.52.233 — artifact re-projection is now scoped to the current session and pane, so a background session finishing no longer flashes its artifacts into the panel you are reading, and the current session refreshes correctly after recovery. Codex SAFE + Fable SHIP-UX + full suite green + 52 recovery tests + Nathan-approved. Thanks @rodboev! 🤖 Released by the release-manager agent. |
…esquena#7067) * fix(nesquena#6867): preserve artifact ownership across compression rotation * docs(changelog): note the nesquena#6867 artifacts-panel ownership-guard fix --------- Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com> Co-authored-by: n <a@n>
Thinking Path
What Changed
static/workspace.js: add one fail-closed current-pane authority for canonical Artifacts projection.static/messages.js: route normal done and settled recovery through that authority, using the settled session id so compression A-to-B rotation keeps ownership correct.static/sessions.js: route winning full-load completion through the same authority.tests/test_issue6867_artifacts_settled_recovery.py: cover rendered stale-row replacement, production_restoreSettledSession()recovery, compression session-id rotation, ownership races, no-state outcomes, adapters, and path safety.tests/test_issue2655_frontend.py: enforce shared-owner routing in the original Artifacts contract.Why It Matters
Moved or replaced files stop leaving dead entries in the mounted Artifacts panel after stream-end recovery. The current path appears immediately without a session switch, and background recovery cannot repaint the pane being viewed.
Verification
The headless regression drives the real settled-recovery path and asserts on the rendered Artifacts DOM. It fails on master with the old row still mounted and passes with only the replacement row. Focused checks cover done, recovery, load, stale-owner and no-state isolation, live scheduling, missing-path safety, and syntax/lint. Responsive screenshot evidence isn't included in this contribution.
Risks / Follow-ups
This changes when the existing Artifacts renderer runs, not how paths are collected or opened.
openArtifactPath()still checks existence through the workspace-scoped route. Livetool/tool_completeupdates remain on their 100 ms debounce because they are incremental rather than canonical snapshot installs.Contract Routing
docs/GUIDELINES.mdanddocs/CONTRACTS.md; no edit is needed.Upstream
Closes #6867.
Model Used
OpenAI GPT-5 via Codex CLI.