Repository navigation
Switch the agent side and the tests from SemanticNode to EngineNode, then remove SemanticNode (#2581) - #2668
Conversation
…then remove SemanticNode (#2581) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1zcZ5sYGFDZN9CDAwy
…o states Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1zcZ5sYGFDZN9CDAwy
Pre-merge checks:
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1zcZ5sYGFDZN9CDAwy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1zcZ5sYGFDZN9CDAwy
|
CI on 6bab8a8: every test project passes (E2E.Tests 5543, Mobile, Cli, Desktop, WinApp, NUnit and the rest). The one red job step is the Darien sample ( Generated by Claude Code |
|
Re-ran CI on main's 0585b16 (before the EngineNode work): the Dariten sample fails there too now, so the red check on this PR comes from the live site, not from this change. Details on #2670. Generated by Claude Code |
|
@coderabbitai review The PR body now names Generated by Claude Code |
) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls2e1zcZ5sYGFDZN9CDAwy
|
@coderabbitai review Pushed 6c86055: the code comment, Generated by Claude Code |
Action not completed
|
Action not completed
|
Closes #2581
What this does
Every engine and the agent side now share one node type,
EngineNode(upstream'sSemanticNode), and the port's ownSemanticNodeclass is gone.IEngineSession.PerformAsync,LocatorAction.DragTo,Screen,LocatorEngine,Expect,TestLines,FailureEvidence, the feed and the replay host take and returnEngineNode; the Web, Document, Mobile, WinApp and Desktop engines buildEngineNodedirectly; theEngineHandleAdapterconversions (SemanticNode.Of,Pair,ToNode) are replaced by oneRekey.NodeStatesstays, sinceExecutorNode.Statesis public API.Value: one node shape from engine to assertion, as in upstream, with no per-call conversion and no second set of fields to keep in step.
Behavior changes worth a look:
Screenread null as "absent".Frameis gone; a query under a node stops at a nested document by comparingFramePathlengths (LocatorResolver.EntersFrame).Emptyon located nodes with an empty box, soIsNodeVisiblereads it as upstream does.Checkedon the contract.reference/engine.mdxandwriting-an-engine.mdxdescribeEngineNode;COMPATIBILITY.mdupdated.Upstream parity
Verdict: faithful. Upstream's
SemanticNode(engine/contract.ts) has the same fields (nullable states,placeholderas an attribute). No new symbols besidesLocatorResolver.EntersFrameandEngineHandleAdapter.Rekey(.NET-only: they replace the removed conversions)..NET-only names:
EngineNode(upstream'sSemanticNode) andEngineNodeStates(upstream'sSemanticNode.states, which has no named type). Both exist since #2497 and the owner's split of #2495 into #2580 and #2581 names the target typeEngineNode: the port's ownSemanticNodeclass held the upstream name until this PR removed it. The collision is gone now, so whether to rename them to upstream's names is a public API decision: #2677. No upstream tests were added or changed; this is internal.Perform/Locatetake and return the contract nodeUpstream tests and local match
None added or changed by this work; existing ported tests were converted to build
EngineNode(same names, steps and assertions). Where a test assertedAssert.False(node.States.X)on a plain boolean, it now reads the nullable state withAssert.NotEqual(true, node.States?.X)(about 21 assertions in 11 files, mostly Desktop, WinApp and Mobile tests); an absent state is null, as upstream's optionalstatesare.Not done
docs-siteAPI pages: needs the net11 SDK, which the worker lacks. Issue Regenerate the API reference after SemanticNode was removed (#2581 follow-up) #2667.Claude session: https://claude.ai/code/session_01Ls2e1zcZ5sYGFDZN9CDAwy
Generated by Claude Code