Repository navigation
Conversation
Generated-by: OpenAI Codex
This branch has not been deployed
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.
Summary
A reachable preview URL does not establish that a browser loaded the document, that it contains the requested content, or that an interaction worked.
ArtifactPreviewchecks HTTP reachability from Desktop; itsloaded: falsedeliberately leaves browser verification to navigation and observation.Following the scope agreed in #5235, this change adds structured verification results and regression coverage to the existing ArtifactPreview → navigate → snapshot → click → snapshot workflow.
browser_navigatecould previously report Loaded after readingwindow.location.hreffailed, using the requested URL as a fallback. Chromium could also expose a readable, committed HTTP 200 document before its transfer failed or was stopped. Observations could survive while another navigation was starting.The existing navigate, snapshot and click tools now return structured evidence through Desktop’s existing
projectToolResult→ClientCapabilityCallResult.structuredContent→ Host/Runtime path. Unsuccessful verification produces an error outcome.statusopened,loadedurl,titledocumentIdmatchesRequestedUrlevidence,errorsnapshotclick.interactionnot_verified; a subsequent observation must establish the requested effectLoad completion and evidence lifetime
The controller derives load facts from its existing Electron events. A new navigation invalidates previous completion evidence before commit, including a same-URL reload. A committed current document requires a positive
did-finish-loadobservation.A main-frame transfer failure returns failed. Stopping an unfinished load returns invalidated. A document still loading after the existing action budget returns timeout; a document that is no longer loading but has no completion evidence remains unknown.
Observations are checked against the existing lease, view identity, committed epoch and navigation identity. Closing or replacing the view, losing admission, or navigating during an observation invalidates stale evidence. Existing partial-page display, retry and iframe behavior are preserved.
Loading alone does not verify the requested content. The acceptance flow checks the title and marker, then verifies the requested interaction through a later snapshot showing the real JavaScript counter changing from 0 to 1 with the same documentId.
Relationship to #5234 / #5254
Navigation consumes the existing
preview_preflightclassifications and reasons.url_schemes: unsupportedfor file/data URLs does not make HTTP preview unsupported. A temporarily unobserved view remains unknown.A verified loopback endpoint proves a listener on Desktop. It does not establish the identity of a service started by a remote SSH Runtime Host or prove document loading.
Scope and remaining boundary
The agreed verification chain starts with an existing registered HTML Artifact. This change preserves ArtifactPreview’s reachability contract and reuses Origin admission, leases, cancellation and the Browser lifecycle.
Artifact creation and ID discovery remain an existing integration boundary. Bash results are published before background Artifact registration, and that path does not return the newly registered artifactId to the model. The Dev acceptance therefore used an explicitly supplied, verified artifactId. It does not establish autonomous discovery of a newly created Artifact.
No new tool, capability probe, loader, generic interaction verifier, product shell server, Host wire protocol or additional compatibility epoch change is introduced by this feature. The merged main’s protocol version is retained. The file://, CSP, sandbox and authorization policies remain unchanged. Generated Files’ inline about:srcdoc CSP behavior is outside scope.
Observed result URLs omit credentials, query and fragment. Managed preview bearer paths are redacted in browser results and saved verification summaries.
Fixes #5235
Verification
Verified the merged revision
b91b6bad4, integrating upstream/main at0db5ffb7e, on 2026-10-28. Used Node 24.22.1, npm 11.19.0 and Python 3.12.12. A root lockfile installation applied all 14 existing dependency patches.npm ci --no-audit --no-fund npm run build npm test npm --workspace @maka/runtime-host run test:assistant npm run typecheck npm run lint npm run format:check npx knip --workspace apps/desktop npx knip --workspace packages/ui npm run check:renderer-architecture npm run check:e2e-budget npm run check:asf-headers npm run check:locale-hygiene npm --workspace @maka/desktop run smoke:preview:run npm --workspace @maka/desktop run smoke:browser-load-failure:runPreview 5235, markerPREVIEW_READY_5235, the real inline JavaScript counter 0 → 1, and the same documentId.Maka Dev acceptance
Post-merge GPT-6-Astra acceptance passed using an isolated Dev profile. The user submitted the prompts after CUA input proved unreliable; Codex independently checked the original Runtime tool events, model usage records and source hashes.
The HTML was registered through the existing Bash stdout-redirection recorder. Its actual artifactId was looked up read-only in Runtime records and supplied explicitly because the preceding tool result did not expose it.
All six tools completed successfully in one turn:
preview_preflightArtifactPreviewbrowser_navigatebrowser_snapshotbrowser_clickbrowser_snapshotRuntime usage records confirmed
openai-codex/gpt-6-astra. The merged commit and all 12 changed-file hashes were unchanged. This verifies the existing registered-Artifact preview chain with a supplied ID; it does not claim automatic Artifact ID discovery or that the CUA input issue was fixed.After Dev, Desktop main was cleaned and rebuilt before rerunning the focused suites: 52/52 passed.
Whole-repository results
Whole-repository
npm testcompleted with 16,928 passed, 4 failed and 41 skipped across 16,973 Node tests.The four failures were in Runtime Host:
assistant Host fallback registers a task workspace usable by ordinary Session creation and bindingchat.cwd.startsWith(home)assertionproduction Host publishes and retires an implementation child patchdurable wait consumption invalidates the collection with 66 parallel waitsan invocation-owned detached Host retires after launcher crashThe path diagnostic changed only TMPDIR, without changing source or assertions. The other three full-run failure causes remain unresolved. Individual diagnostic passes do not establish a passing full suite.
Host/Runtime/Core/Storage sources and the lockfile have no branch-specific changes relative to the merged main. No unrelated product fixes were added. This comparison is not a full unmodified-baseline test run.
The Host assistant phase skipped by the earlier failure was run separately: 84/84 passed. Python Eval completed 94 tests, 13 skipped.
Not run: full Playwright E2E, Windows/Linux GUI acceptance, packaging/release qualification or CI.
AI use
Select exactly one:
Tool(s) and scope: GPT-6.1-Sol (high) via OpenAI Codex — contributed to the implementation, regression tests and this description under my direction, ran the local checks, and inspected the original Runtime tool events. GPT-6-Astra via Maka Dev executed the preview acceptance using an explicitly supplied registered artifactId. The commit carries a Generated-by trailer.
Checklist
Does this PR entail a change in behavior?
Generated with OpenAI Codex