Repository navigation
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
17ea0bd to
7105dab
Compare
7105dab to
ee12d85
Compare
ee12d85 to
d5f4f1c
Compare
|
Two things I noticed on this branch while recording the renderer-panels follow-up to #216. Both appear on this branch (
To reproduce: open Composer on this branch, load the Slack renderer and look at the Errors tab, then switch to Angular Basic. |
|
Thanks @jerelvelarde for catching these! Both regressions have been addressed and verified in commit
|
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
1a7aa25 to
f31cb32
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
f31cb32 to
d61233c
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
d61233c to
2d7e40a
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
2d7e40a to
0627313
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
0627313 to
438f41c
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
438f41c to
5e6cf26
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
5e6cf26 to
937cf4e
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
937cf4e to
45ff78e
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and deduplicate A2aChatView RPC stream - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
45ff78e to
662553f
Compare
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and add unscoped A2aChatView RPC specs - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
662553f to
b7cccb9
Compare
Define isCatalogHandshakeErrorPayload and CatalogHandshakeErrorPayload in CrossFrameValidator, re-exporting both from HostCommunication. Enforce the guard in CrossFrameValidator.validateCatalogPayload, guard the rawCatalogs sanitization loop against uncaught exceptions, and drop prototype-polluted non-catalog messages prior to recording.
Provide createMockCatalogManagement in testing/catalog-management-fake to share CatalogManagement test doubles across specs, replacing duplicate ad-hoc mocks in routes, rendered-frame, and chat specs.
…scaping, and sample build preflight
…stale draft protocol mismatch on renderer switch
- Guard prototype pollution before HostCommunication side effects - Validate MCP_REQUEST payloads and add unscoped A2aChatView RPC specs - Extract catalog-domain helpers, rename Fake helper, recover clones - Make syncCatalogDraft void and clear previousCatalogId on null catalog - Assert non-tautological Slack catalog invariants without TEST_ONLY - Update slack-renderer E2E v1.0 switch check and package.json scripts
Expose HostCommunication.isRegisteredWindow and track handshakeWindow in CatalogManagement so a detached frame remounting under the same resolvedUrl clears the stale watchdog and re-issues GET_CATALOG (calling isRegisteredWindow directly). Also ignore late A2UI_CATALOG responses from a superseded handshakeWindow. Extract CrossFrameValidator.validateOptionalObjectPayload across GET_CATALOG, GET_COMPONENT_USAGES, and GET_DEMOS, stamp protocolVersion '1.0' in stubRendererHtml when version is 'v1.0', and reuse stubRendererHtml in v09-compat-regression.e2e.ts.
b7cccb9 to
549d16f
Compare
handleRendererReady recorded the announcing window in handshakeWindow and then wrote the handshake state. When the renderer URL had changed and nothing had read the cached-catalog resource since, that write made the resource's params function run. It sees a new URL and clears the watchdog timer and handshakeWindow, on the assumption that they belong to the previous renderer. The watchdog was armed afterwards, so the new handshake ran with a timer but without its window. Two guards compare against handshakeWindow and could not match such a handshake: the source-window check in handleCatalogEnvelope accepted an A2UI_CATALOG from any window, and the takeover branch never let a replacement frame take over from a detached one. handshakeWindow is now assigned after the state writes, immediately before the watchdog is armed. No statement in between reads it.
Description
Summary
CrossFrameValidator,HostCommunication): DefineCatalogHandshakeErrorPayloadandisCatalogHandshakeErrorPayloadinCrossFrameValidator(re-exportingCatalogHandshakeErrorPayloadfromHostCommunication), validateMCP_REQUESTpayloads beforemcpManager.callTool, and drop prototype-polluted envelopes immediately after construction (beforeRENDERER_READY,CONSOLE_LOG,MCP_REQUEST, andDATA_MODEL_CHANGEside effects).CatalogManagement,catalog-domain.ts,FakeCatalogManagement): Extract puremergeCatalogsandresolveProtocolVersionhelpers intocatalog-domain.ts, guardrawCatalogscloning against non-cloneable entries, and centralize test doubles viacreateFakeCatalogManagement(usingmergeCatalogs/resolveProtocolVersionby default) across unit specs.StateSync,RawFrame,samples/react-slack-catalog): ResetpreviousCatalogIdonnullcatalog after handshake and updateStateSync.syncCatalogDraft()(void) to prevent stale draft protocol mismatches across renderer switches; addrefSchemaOverrideinsamples/react-slack-catalogto silence recursive-reference warnings with structural assertions incatalog.spec.ts.A2aChatView): Cover unscoped inline RPCs with an unrelated open Canvas (fn-unscoped-inline-1) and non-auto-opened Canvas B unscoped RPCs with Canvas A open (fn-unscoped-canvas-b) ina2a-chat-view.spec.ts.scripts/ensure-e2e-samples.mjs,utils/json.ts,shell/e2e/): Harden JSON token scanning, fix E2E mock escaping, ensure E2E sample build preflight, verify Slack-to-Angular v1.0 switching inslack-renderer.e2e.ts, stampprotocolVersion: '1.0'instubRendererHtml, and reusestubRendererHtmlinv09-compat-regression.e2e.ts.feat(samples,shell): restore A2UI v0.9 alongside v1.0 #334 restores v0.9 alongside v1.0; merge it together with this PR.
HostCommunication,CatalogManagement,CrossFrameValidator): ExposeHostCommunication.isRegisteredWindowand trackhandshakeWindowinCatalogManagementso a detached frame remounting under the sameresolvedUrlclears the stale watchdog, re-issuesGET_CATALOG, and ignores lateA2UI_CATALOGresponses from a supersededhandshakeWindow; extractCrossFrameValidator.validateOptionalObjectPayloadacrossGET_CATALOG,GET_COMPONENT_USAGES, andGET_DEMOS.CatalogManagement,887fcb08):handleRendererReadyrecorded the announcing window inhandshakeWindowbefore writing the handshake state. When the renderer URL had changed and nothing had read the cached-catalog resource since, that write ran the resource'sparamsfunction, which clearedhandshakeWindow; the watchdog was armed afterwards, so the handshake ran without its window. The source-window check inhandleCatalogEnvelopethen accepted anA2UI_CATALOGfrom any window, and the takeover branch could not replace a detached frame.handshakeWindowis now assigned after the state writes, immediately before the watchdog is armed. Five unit tests cover it: two fail without the fix on a URL change (catalog from another window ignored; takeover by a replacement frame), one fails without it on first load (catalog from another window ignored, watchdog reported), and two pass with and without it and guard the first-load path (catalog from the announcing window, and a catalog with no source window, are committed).Commits
26 files changed, 2381 insertions(+), 653 deletions(-)
Stack
Stacked PR 7/7 — base:
pr6-samples-demos-v1-0→ merge in order:pr1-e2e-stabilization(mergedb7632586)pr2-upgrade-a2ui-deps(merged900b65f6)pr3-bridge-v1-0(mergedbe5e24d3)pr4-shell-v1-0-core(mergedf82a26dd)pr5-shell-v1-0-copilot-rpc-a2apr6-samples-demos-v1-0pr7-qa-cleanuppr8-restore-v0-9-renderers(feat(samples,shell): restore A2UI v0.9 alongside v1.0, stacked on fix(shell,slack): harden cross-frame validation, catalog sync, and RPC routing #325)pr9-cancel-handshake-on-unregister(fix(shell): cancel catalog handshake when its frame unregisters, stacked on feat(samples,shell): restore A2UI v0.9 alongside v1.0 #334)Verification
Run at
887fcb08(pr7-qa-cleanupwith the handshake-window fix):corepack yarn --cwd shell ng test --no-watch: 2792/2792 passed across 119 filescorepack yarn lint,corepack yarn tsc,corepack yarn prettier:check: all exit 0Run at
e3cd9820(the same fix before three unit tests were added to it; production code identical to887fcb08):corepack yarn workspace a2ui-bridge clean && corepack yarn build,corepack yarn generate:demos:check: exit 0corepack yarn test: passes across all workspaces (scripts: 48,a2ui-bridge: 331,lit-basic-catalog: 16,ng-basic-catalog: 22,react-basic-catalog: 17,react-slack-catalog: 197,a2ui-composer-shell: 2789)--workers=1 --retries=0(e2e/slack-assistant.e2e.ts,e2e/slack-renderer.e2e.ts,e2e/demos.e2e.ts,e2e/v09-compat-regression.e2e.ts): 48/48 passed (6.1m)corepack yarn --cwd shell e2e-headless): 232/232 passed (10.1m)Unresolved observation: one demos stress run (
e2e/demos.e2e.ts --repeat-each=5 --workers=4 --retries=0) on the rebased #334 branch, which carries this fix, failed 2/90 atdemos.e2e.ts:258(header title missing after 5 s). It was not reproduced in 7 further plain runs of the same command on that branch (630/630, four of them with temporary console logging in the shell) plus 60/60 runs of that test alone, nor in 720 traced runs (4 unrelated timeouts); the pre-fix #334 tip930143a2passed 360/360 in the same session. Static analysis found no path by which the fix can stall the workspace handshake. The artifacts of the failing run were not kept; cause not established.The results below were recorded before the fix.
Run at the tip of the stack (
pr7-qa-cleanup,549d16f1):corepack yarn testpasses across all workspaces (scripts: 48,a2ui-bridge: 331,lit-basic-catalog: 16,ng-basic-catalog: 22,react-basic-catalog: 17,react-slack-catalog: 197,a2ui-composer-shell: 2787)corepack yarn prettier:check,corepack yarn generate:demos:check,corepack yarn build,corepack yarn lint,corepack yarn tsc, andcorepack yarn --cwd shell tsc --project tsconfig.spec.json --noEmitall exit 0--workers=1 --retries=0: the 6 core specs (e2e/function-rpc-journeys.e2e.ts,e2e/guest-frame-sends.e2e.ts,e2e/v09-compat-regression.e2e.ts,e2e/slack-renderer.e2e.ts,e2e/a2a-multi-frame-surfaces.e2e.ts,e2e/a2a-inline-surface-order.e2e.ts) pass (45/45), ande2e/slack-assistant.e2e.ts --repeat-each=10passes (160/160)Pre-launch Checklist