Repository navigation
fix: workspace HTML reports fail to attach in Webchat - #178940
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesAllows explicit current-conversation sends to publish readable local HTML reports as durable Webchat attachments. Example: An agent sends implementation-plan.html from its workspace using message(action=send, media=<path>).
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a current HTML attachment failure, and review found no actionable introduced defects; the CI gate remains failed. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe current-source message owner passes local files through session-scoped read policy and media validation into the existing managed attachment store, which supplies authenticated Webchat previews and downloads. flowchart LR
A[Agent message send] --> B[Current conversation owner]
B --> C[Session scoped file access]
C --> D[HTML byte validation]
D --> E[Managed attachment snapshot]
E --> F[Webchat preview and download]
Technical reviewBest possible solution: Retain the explicit-send format admission while keeping file access, delivery authority, generated provenance, and managed attachment persistence with their existing owners. Do we have a high-confidence way to reproduce the issue? Current-main source shows workspace HTML rejected without generated provenance, and the author reports the actual message-tool regression failing on the untouched base; this read-only review ran no target code. Is this the best way to solve the issue? The change fixes format admission at the shared media owner, supplies intent only from the existing explicit-send owner, and reuses durable attachments; the extracted policy and prompt sections replace their original implementations without creating competing owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c622b70b2b4c. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +57, Tests +420, Docs +9. Total +486 across 15 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 20, 2026, 11:34 PM ET / October 21, 2026, 03:34 UTC (Revision 3). |
|
Fresh runtime proof for The production Gateway/UI build exited 0 (reported 1m13.6s): OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 corepack pnpm buildThe maintained real-Gateway browser scenario exited 0: # Compiler cache isolated to this task-owned VM.
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/home/nerfed/html-publication-review-20261021/browser-proof-cache \
node scripts/run-vitest.mjs run \
--config test/vitest/vitest.ui-e2e.config.ts --configLoader runner \
--project ui-e2e-serial-standalone \
ui/src/e2e/chat-html-publication.real-gateway.e2e.test.ts --maxWorkers=1Selected actual stdout, with the temporary checkout path removed: The maintained scenario executes real Only inference is synthetic; the child draft is seeded, not produced by live delegation. This proves the publication/delivery/browser path, not live-model tool selection or external transports. The source archive identifies the exact head; the test SHA-256 is Build output also reported an advisory startup-JS budget warning (318.8 KiB versus 317.5 KiB); the build still exited 0. This runtime proof does not assert that all CI checks pass. The separate CI dashboard-timeout investigation is continuing; no product code, assertions, or timeout budgets changed for this run. |
|
CI disposition: the dashboard timeout in run 39534093805, attempt 1, job 119007116100 is unrelated to this PR’s changed behavior. Its underlying UI cause remains unresolved. This attribution uses the actual CI merge
The disposition rests on this execution-path and effective-configuration isolation; the passing replay is supporting evidence. Original machine/cache/scheduling behavior and the runtime reason for the missed request remain unmeasured. This establishes no flaky-test frequency or observed baseline failure for the dashboard case. The composer failure separately matches scheduled main. Hosted CI remains failed, and all review/security/merge checks retain their existing enforcement. No source change or diagnostic patch is needed for this PR’s CI attribution; the bounded capture proposal below remains useful for an independent dashboard investigation. CI dashboard-timeout follow-up completed without source changes. The failed CI job tested merge I recovered the original preflight include list from that job, used a separate frozen install at the exact merge, and verified that the selected 100 filenames match the CI log exactly: 95 bundled suites and five private-server serial suites. One full replay ran in the task-owned Linux ARM64 VM: CI=true OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1 OPENCLAW_VITEST_MAX_WORKERS=3 \
OPENCLAW_VITEST_INCLUDE_FILE=/home/nerfed/html-publication-review-20261021/ci-ui-include.json \
node scripts/run-vitest.mjs run \
--config test/vitest/vitest.ui-e2e.config.ts --configLoader runner \
--maxWorkers 3 --shard 5/8Selected actual stdout: Terminal process status was 0; compiler-generation verification completed, and no timeout captures were produced. No assertions, waits, fixtures, permission checks, or product code were changed. This reproduces the test selection and worker setting, not the original machine/cache/load or exact cross-worker timing. Original cause remains unresolved. CI timed out waiting for a second Source traces the click through current provider/widget ownership checks and retained board/tab/revision/cell checks. A stale relationship could drop the action; the retained evidence cannot establish that it did. There is no evidence supporting relaxation of those checks or a speculative product patch. The smallest useful capture on a future occurrence is the existing private screenshot/mock request diagnostics, correlated with bounded facts identifying the menu target and whether the retained board tab, widget revision, and cell match at selection. Reuse the existing test-diagnostic owner; do not broadly upload private browser state. The separate composer timeout still matches scheduled main. Hosted PR CI remains red; these passes neither repair nor label the original dashboard failure “flaky” or pre-existing. Fresh HTML publication runtime proof is linked separately. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
* fix(webchat): allow explicit HTML report attachments * fix(test): register HTML publication private UI server * test: include HTML publication in Gateway inventory
What Problem This Solves
Fixes workspace HTML reports being rejected as unsupported when an agent explicitly attaches the final file to the current Control UI/Webchat conversation.
User Impact
Users can open and download a self-contained HTML report, including a parent agent’s final revision of a child draft, as a durable attachment that survives changes to or deletion of the source file. Existing read and delivery permissions still apply; no configuration changes are required.
Why This Change Was Made
The internal current-conversation send owner supplies explicit HTML publication intent. Media loading validates the bytes and the existing managed-attachment path saves the snapshot. This intent grants neither file access nor generated-file provenance. Automatic
MEDIA:replies, external channel handling, and preview sandbox/script controls retain their existing policies. Conditional Webchat guidance directs the agent to this explicit send path.Format validation and output-directive construction are extracted into focused modules, retaining one implementation and keeping the existing oversized modules within the line-growth rule. No new state, settings, or permission modes are introduced.
Evidence
Hosted CI finished with 84 successful checks and two failed browser checks; the CI gate remains red. The composer
chat.aborttimeout matches scheduled main exactly. The dashboardboard.updatetimeout is source-attributed as unrelated to this PR: the UI/RPC owners and active test setup are unchanged, the added HTML scenario is excluded in this job, and the original 100-file selection adds no competing workload. Its underlying UI cause remains unresolved. One full replay at the actual CI merge3fc21e07passed 432 tests, three workers, exit 0; this supports the attribution without establishing a repair or reproducing the original machine/cache/scheduling. No source or timeout change was made. ClawSweeper reviewede6933e63with no actionable findings.Separately, the local core test-root budget guard also fails on untouched base
863a3cdc6dc7: agents-tools 721, gateway-root 725, infra 728, plugins-platform 728 against 720. These are baseline guard failures; the affected test type graphs compile successfully.Net change against the base: +57 production lines, +418 test lines, +9 documentation lines, and two suite-registration lines. The larger media-policy/prompt diff is extraction; browser proof reuses the maintained real-Gateway harness.