Repository navigation
fix(pixel): a stopped turn links an earlier preview only when it continues that project - #6760
Open
Lightheartdevs wants to merge 1 commit into
Open
Lightheartdevs wants to merge 1 commit into
Lightheartdevs wants to merge 1 commit into
Conversation
Every turn is seeded with the chat's latest publication as historical evidence. A stopped turn that required a preview then linked that snapshot and carried its receipt, even when the turn worked on a different project, so Portal showed another project's website as the stopped turn's own publication. A stop (and the no-publication preview verdict) now offers the last verified preview only when this run published it or this turn continues that project: the preview target or owner-named directory is that project, or every current mutation lies in its tree. Otherwise both the link text and the receipt are dropped; the coding-stop and failed/pending check outcomes are still reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 26, 2026
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.
Problem
Every Pixel turn is seeded with the chat's latest publication (
state.workspaceLastVerifiedPreview ??= previousPreviewinobserveRun). The seeding comment says that snapshot "neither verifies current files nor grants continuation scope", but two delivery paths still used it for any turn that needed a preview:progressStopPreview(tool-loop fuse stops, the answer turn's allowed URL, anddeliveryVerificationForRun), andverificationForRun("Your last published preview is still available").So a stopped turn working on a new project linked the earlier project's preview and carried its receipt. Portal treats that receipt as the turn's own publication: it puts a publication card on the message, and that card decides which project the chat is grouped under.
Round-114 evidence (Qwen3.5-9B, main 5afd46c, mac-mini target)
The chat's turns, in order (
round-114/mac-mini/pixel-portal-evidence/):website-create: publishedsite-52af184a....website-edit("Update that same website ..."): publishedsite-6ba777bafd52589578b82c5a, relativeDirectoryfleet-qualification-6419c769b873.files-code: "In a separate workspace directory fleet-qualification-6419c769b873-calc ...". The model wrote...-calc/solve.pywith literal\n, then repeated the same write until the fuse stopped the run. It never read, wrote or published anything in the website directory.coding-v1: "In a new workspace project fleet-qualification-6419c769b873-coding ...". Writes and unittest runs happened only in...-coding, and the fuse stopped the run.Both stopped turns (
files-code.answer.txt,coding-v1.answer.txt) got the same reply:The terminal SSE chunk of both turns (
files-code.sse.bodyline 45,coding-v1.sse.bodyline 118) carriedpixel.preview={relativeDirectory: "fleet-qualification-6419c769b873", siteId: "site-6ba777bafd52589578b82c5a", ...}. That is the website's receipt, delivered as the publication of a calc turn and a coding turn.Fix
lastVerifiedPreviewForTurn(state)inplugin/tool-loop-guard.mjsreturns the last verified preview only in two cases:workspacePreviewVerifiedDirectoryis set only when this run's own publication is later invalidated.workspacePreviewDirectoryis that directory. It is set by "update that same website" continuation, a named-preview request, a successful mutation inside the published directory, or a publication attempt./workspace/...(workspaceTaskDirectory).inPublishedProjectTree. It covers sources next to a generatedpublic/output.In every other case the stop drops both the link text and the receipt.
progressStopPreviewand theverificationForRunbranch both use the helper. In that branch the coding-stop text and the failed or pending check text are now reported whether or not a link is offered. Before, they appeared only next to the historical link, so a preview-required turn with no publication and no same-project snapshot showed only the generic "did not create/verify a preview" text.The positive case is unchanged: an "Update that same website" turn that stops still offers its last verified preview and receipt.
Portal
I checked
dashboard/src/pages/Pixel.jsxand did not change the dashboard.finishAttemptsetsmessage.publication, and callssetPreview, only when apixel.previewframe parses (parseVerifiedPreviewFrame).beforePublication.conversationProjectfalls back to earlier messages.host/pixel_ingress.mjscompletionSse) emits thepixelmarker only whenverification.previewis set, so dropping the receipt in the guard removes the frame.Tests
tests/progress_finalization.test.mjsnight-garden. Run 2 in the same session then works innight-garden-calc(with a write, and before any write) ornight-garden-codingand exhausts the fuse. Both the stop delivery and the verdict have no link and no receipt. The answer-turn variant composes without the old URL.night-garden("Update that same website", and a direct edit ofnight-garden/index.html) and stops. The link and receipt are kept.callToolandverifiedPreviewtake an optional context.tests/tool_loop_guard.test.mjs/workspace/codecoding stop linkedlog-viewer-lab. They now expect no link for the other project. They add same-project cases where the link is kept (continuation prompt; a coding stop in/workspace/log-viewer-lab), and still require the coding-stop and failed-check text.expense-report/publicfor a source edit inexpense-report/, and drops it foranother-project/and for the prefix siblingexpense-report-v2/.Red check against main's plugin with these tests: 5 fail.
The positive control passes on both main and this branch.
Full Linux pixel-agent suite: head 3206 tests / 3168 pass / 0 fail. Head merged with main: same.
Composition with open PRs
git merge-treeagainst main plus each PR is clean for fix(pixel): a harness revision or continuation prompt keeps the owner's request scope #6756, fix(pixel): remove the owner's private operating contract from the workspace template #6755, fix(pixel): keep a passing show/hide proof across later passing checks of the same snapshot #6754, fix(pixel): a refused rm -rf keeps a current passing test, and the owner gets a receipt instead of guard text #6753, fix(pixel): judge an exit-0 unittest run by the runner's own summary; a coding stop takes precedence over test-command coaching #6752, fix(pixel): capsule role/name locators match Playwright's source-text names as well as Chromium's text-transformed names #6750, fix(pixel): every non-passing preview inspection returns a ready, validated next call or a measured diagnosis #6748, fix(pixel): steer preview tools to their direct route and answer wrapped control tools #6747, fix(pixel): plan within the output limit, continue a cut Portal turn once, report otherwise #6743, fix(pixel): answer after an unchanged file and check preview bytes when a result is saved #6732, fix(pixel): accept year-less event page dates the page does not contradict #6730, fix(pixel): read PDF text in the shared page reader; binary bodies are never page reads #6724, fix(pixel): let the turn continue after an in-project rm -rf is refused #6722 and feat(pixel): search and read public pages in one call (pixel_ods_search_read) #6698.🤖 Generated with Claude Code