Skip to content

Compatibility

Upstream parity target: tester-army/e2e commit ee901b333ed12352418dfb07bda5eafe32e71c8d (docs(agents): show several personas running one suite (#1258)). On 2026-10-19 the 300 upstream commits from 94ddbfe to it were checked: each commit’s title and release note against this file, and against the port’s code where the note named a behavior. A commit that only changes docs, tests of code the port lacks, dependencies, or release notes needs no entry. The sections were not re-read line by line against upstream’s source, so a statement that no commit in that range touched is as it was at 94ddbfe. The packages upstream has are in Upstream packages.

Names are C# versions of the JavaScript API: agent.act is ActAsync, screen.getByRole is GetByRole, expect(locator).toContainText is Expect.That(locator).ToContainTextAsync, and unique() is Values.Unique.

JavaScript .NET
e2e and @e2e-dev/web E2E (WebEngine is Playwright, in the same package)
NUnit [Test] E2E.NUnit.E2ETest. The fixture commits the replay cache from the NUnit result
xUnit v3 [Fact] E2E.XUnit.V3.E2ETest. The fixture commits the replay cache from the xUnit result
e2e.config.ts e2e.config.json, the same keys as JSON. E2ETest finds and applies it; fixture properties override it
Vercel AI SDK model OpenAiCompatibleModel, OpenAiResponsesModel, AnthropicModel, GoogleModel, and BedrockModel, built from provider in JSON or ModelProviders in code. See Models
e2e/oauth/chatgpt, copilot, grok, opencode-console E2E.OAuth.Subscriptions
e2e login, e2e logout, e2e models, e2e guide, e2e mcp, e2e explore, e2e init, e2e-web install E2E.Cli, a .NET tool whose command is e2e. e2e init is ported in part: see Coding agents. e2e explore is ported in part: see Explore. e2e guide [topic] prints the bundled skill, as upstream; an unknown topic exits 2. e2e-web install is e2e install: see Browser install command. e2e mcp is ported apart from project tools: see MCP server
@e2e-dev/acp E2E.Acp, AcpExecutor: a step executor over the Agent Client Protocol. See ACP
@e2e-dev/kernel E2E.Kernel, KernelProvider: Kernel hosted browsers on the IBrowserProvider seam. See Kernel
@e2e-dev/eas E2E.Expo, ExpoSimulators: see Expo Simulators
@e2e-dev/limrun E2E.Limrun, LimrunSimulators: see Limrun
@e2e-dev/github E2E.GitHub, GitHubReporter: ported in part, see GitHub reporter
@e2e-dev/browserstack E2E.BrowserStack, BrowserStackDevices: see BrowserStack
@e2e-dev/mobile/lease (agentDeviceLeases()) E2E.Mobile.Lease, AgentDeviceLeases, in the E2E.Mobile package: see BrowserStack
@e2e-dev/decision, @e2e-dev/smol, @e2e-dev/lightpanda Not ported: see Upstream packages
— E2E.TestMu.Mobile, TestMu AI mobile devices through Appium. Upstream’s @e2e-dev/testmu serves the same devices another way: see TestMu mobile
— E2E.Mobile.NUnit and E2E.Mobile.XUnit.V3, MobileAppTest: a ready base class for a device test. Not in upstream: see MobileAppTest
— E2E.Mobile.DevFlow, DevFlowAgents: .NET MAUI apps through the MAUI DevFlow agent. Not in upstream: see MAUI DevFlow
— E2E.WinApp, WinAppEngine: Windows desktop apps through Windows UI Automation. Not in upstream: see WinApp engine
— E2E.WinApp.NUnit and E2E.WinApp.XUnit.V3, WinAppTest: a ready base class for a Windows app test. Not in upstream: see WinAppTest
@e2e-dev/testmu (testmuBrowsers(), browsers.ts) E2E.TestMu, TestMuBrowsers: TestMu AI hosted browsers on the IBrowserProvider seam. Ported in part: see TestMu
— DocumentEngine, an in-memory page for hosts that do not want a browser
  • NUnit [Test], [SetUp], [TearDown], [OneTimeSetUp], and [OneTimeTearDown]
  • Assert.Ignore, [Retry], [Timeout], and [Category]
  • Screen queries: role, text, label, test id, placeholder, display value, filter (hasText, hasNotText, has, and hasNot), or, first, last, nth. A locator offers every query kind, scoped to its matches’ descendants. Every query takes a TextMatch: a string or a .NET Regex, tested against the whitespace-normalized text. A string matches the whole text, case-sensitively, unless exact is false, which makes it a case-insensitive substring, as upstream. RoleOptions carries name, checked, disabled, selected, expanded, pressed, and level, and img is read as image. A role query never matches a hidden node; the other kinds keep hidden nodes unless Visible is set, as upstream. ScrollIntoViewAsync acts on a hidden or disabled match, as upstream’s performUntil reads no state (the web engine’s Playwright call needs no visibility); every other action still waits for an enabled match. A text query leaves out a match with no box (a Rect with a zero side; a node that reports no Rect counts as boxed) when a match with a box exists, because upstream’s web tree lists no box-less node and this tree does (a zero-sized input inside a label does not stand in for the label). A label’s text is listed when its control has no box. getByLabel matches any node whose accessible name matches, as the upstream reference resolver does. On the web, upstream resolves text, label, and hasText through Playwright on the real DOM, and the port reads the same things off its tree: getByText and hasText match the element’s DOM text (every descendant’s text in place, no separator between two blocks, a button input’s value, script and style text left out), so a placeholder, a title, an aria-label, or the control a label names is no text, and the label itself answers; getByLabel matches the node’s aria-label, the elements its aria-labelledby names, and its <label> text, not its content. A regular expression is tested against that text with whitespace collapsed, where Playwright tests the raw text. Options are C# objects (RoleOptions, TextMatchOptions) instead of object literals, and filter({ hasText, hasNotText, has, hasNot }) is the overloads Filter(TextMatch) and Filter(Locator) plus Filter(hasText, hasNotText, has, hasNot), whose four parameters are optional and named (.NET-only: the named-argument form of upstream’s options object). hasNotText (tester-army/e2e#1037, a481fd3) drops a match whose subtree text matches, with hasText’s substring rules (an empty string matches everything, so it drops every match). hasNot (#1334, 6c8e71f) drops a match whose subtree resolves the inner locator, resolved inside each match as has is, and a display-value hasNot is UNSUPPORTED_CAPABILITY in the core resolver as has is. A Filter() with none of the four is INVALID_LOCATOR (filter() requires hasText, hasNotText, has, and/or hasNot). Upstream’s refusal of an unknown key (visible) or a non-object options has no port, since the parameters are typed. On iOS a plain React Native View has no children in the tree, so hasNot keeps every such row (see the mobile guide) Regular expressions use .NET syntax, not ECMAScript. GetByTestId also takes Exact, which upstream’s getByTestId does not. locator.or(other) (upstream #1049) is Or(Locator): a union expression that matches either branch once, in document order, and stays strict (LOCATOR_AMBIGUOUS; add First() when both may match). Both locators must come from the same screen and attempt, else INVALID_LOCATOR. LocatorResolver.Resolve and DeviceLocator.ResolveExpression resolve the union. Differences: the parameter is typed, so upstream’s refusal of a non-locator has no port (null is an ArgumentNullException); and upstream’s UNSUPPORTED_CAPABILITY for a display-value branch has no port, since the port’s engines resolve over their tree. Web branches with different frame-selector chains fail with UNSUPPORTED_CAPABILITY (locator.or requires both branches in the same document) as upstream’s frameSelectors does
  • Actions: tap, click (an alias of tap), doubleTap (DblClickAsync is an alias), fill (a string or a Secret), pressSequentially, press, check, uncheck, clear, selectOption, focus, scrollIntoView. They wait up to the action timeout for exactly one enabled, visible match. selectOption takes a string that matches an option value or label, or a SelectOption with exactly one of Label, Value, or a nonnegative Index (upstream’s { label }, { value }, { index }; the document engine refuses Index). Upstream’s plain string means a label only; the port keeps matching a value or a label. ActionOptions.Timeout overrides the wait per action (PressSequentiallyOptions adds Delay). PressSequentiallyAsync is composed in core as upstream’s locator.pressSequentially is (LocatorEngine.PressSequentiallyAsync, upstream’s pressSequentially in locator/engine.ts): a Focus action, then IEngineSession.TypeTextAsync (upstream’s keyboard.type) in one call, or one call per code point with a Delay, all within one action deadline. A pause the deadline cuts short ends the typing with ACTION_FAILED (typing N of M characters), and no character goes out past it. An engine that does not list focus, or declares no Keyboard, is UNSUPPORTED_CAPABILITY before any node resolves. The public LocatorAction.PressSequentially record is gone (#1159, a breaking change): an engine receives Focus, then TypeTextAsync. Differences: there is no Secret overload (upstream’s refusal of a Secret with INVALID_ARGUMENT is a compile error here), and C# types rule out a non-string text and a malformed delay; the keyboard call takes no operation context, so the deadline bounds the pauses and the calls’ starts, not the engine call itself. The web engine’s own Playwright wait still uses the configured action timeout
  • Locator reads: textContent, inputValue, getAttribute, isVisible, isHidden, isEnabled, isDisabled, isChecked, boundingBox, count, all, allTextContents. A read of one node (textContent, inputValue, getAttribute, isEnabled, isDisabled, isChecked, boundingBox) waits for its one match until the action timeout, then reads once with no retry for a value (inputValue on a node with no value, such as a heading or a button, and isChecked on a node with no checked state fail with ACTION_FAILED, as upstream, tester-army/e2e#1552 d2556bc; a field with no value reads "", and a checkable role with no state reported reads false. The port reads the state through NodeStates.CheckedReported, which Checked sets, where upstream reads states.checked !== undefined (.NET-only); the web engine reports it for a native checkbox or radio and any aria-checked node, the mobile engine when the platform spells a state, and the Windows engine for a toggle state or a radio); isVisible, isHidden, count, all, and allTextContents answer from the current screen at once. No read verifies an earlier act. textContent and allTextContents collapse each whitespace run to one space and trim, as upstream. A single-node read fails with LOCATOR_NOT_FOUND when nothing matches before the action timeout ends
  • screen.tree() and screen.debug() (commit d7ec0ec) are Screen.TreeAsync and Screen.DebugAsync. One observation of the whole screen, rendered by FailureEvidence.Listing (the trace’s screen at failure, upstream’s prepareObservation): one node per line, children indented, secrets redacted, cut at the observation byte limit (262144). A node the page does not show is left out. A step of kind screen. DebugAsync writes the text to Console.Out, where a test framework picks it up. Differences: Timeout bounds the read with a linked token and fails with OPERATION_TIMEOUT, where upstream passes it to the engine operation. A Locator has no TreeAsync, so upstream’s refusal on a locator is a compile error. On a FrameScreen they refuse with INVALID_ARGUMENT, as upstream’s do. The same commit’s change to print test output without the list reporter, and to keep stdout for --reporter json, is not ported: the port has no runner. screen-tree.test.ts is ScreenTree/ScreenTreeTests and ScreenDebugTests (not ported: the refusal on a locator, the unknown option, and sdk-types.ts’s checks, which a typed API makes compile errors); screen-tree-secrets.test.ts is ScreenTreeSecrets/ScreenTreeTests (through a session over a fake engine). run-user-output.test.ts’s two new cases are not ported with the runner change.
  • The last read of a wait gets grace (fix: give the last read of a wait the time of the slowest one, 57f9ed9, tester-army/e2e#1464). Locator.WaitForAsync, a locator Expect, and ToHaveScreenshotAsync read through a ReadWindow (Internal/Time.cs, upstream’s ReadWindow in internal/time.ts; LocatorEngine.Reads is upstream’s LocatorEngine.reads; Screen.Reads forwards to it). Each engine locate runs until the wait’s deadline plus the slowest read the wait finished (the budget IEngineSession.LocateAsync gets), capped by the test timeout (Screen.BudgetDeadline, upstream’s budget.deadline), so a screen that shows up during a slow last read passes. Time.PollReadsAsync is pollReads, and PollConditionAsync is pollCondition over a window with no cap. A read the deadline cut off is ReadWindow.CutOff: an OPERATION_TIMEOUT of a read that started with under one poll tick, or under the slowest read, left (it replaces cutOffAtDeadline). A negation counts as held only until the deadline. LocatorEngine.ResolveExactlyOneAsync and the other waiting resolves end a wait whose last read was cut off after a read that found nothing as LOCATOR_NOT_FOUND, not as ACTION_FAILED, and a retry the deadline cut off ends on the failure it was retrying (upstream’s resolveCounted and resolveOnce). An action whose deadline passed before it was sent fails with ACTION_FAILED (upstream’s lateAction). A capture of ToHaveScreenshotAsync that outlives its budget is an OPERATION_TIMEOUT the poll judges as it judges any read; the message of a failure with no capture is the last screenshot ran past the timeout. Differences: the port polls every 50 ms in the locator and 100 ms in screenshots where upstream polls every 100 ms. An engine is handed the read’s budget by IEngineSession.LocateAsync, ObserveAsync(TimeSpan, CancellationToken), and ScreenshotAsync(TimeSpan, CancellationToken) (see the operation budget bullet in the mobile section); an engine that does not override the last two (the web and WinApp engines) drops it, so the window only times its read (a screenshot is cancelled at its budget). Locator.WaitForAsync fails with LOCATOR_NOT_FOUND, as upstream. A positioned tap whose target became visible past the deadline is ACTION_FAILED too (LocatorEngine.PerformWithinAsync, upstream’s performWithin). Tests: Time/PollConditionTests (the five pollReads and ReadWindow its), LocatorWaitFor/ASlowLastReadTests, LocatorEngine/LocatorEngineResolveRetryContractTests and LocatorEnginePerformContractTests (‘never sends an action whose target resolved past the deadline’), and ScreenshotAssertions/ToHaveScreenshotTests (the two capture-timeout its).
  • locator.waitFor with attached, detached, visible (default), and hidden, as WaitForAsync(new LocatorWaitForOptions { State, Timeout }). The timeout defaults to the action timeout. LocatorWaitForOptions is named apart from agent.waitFor’s WaitForOptions. A timeout fails with LOCATOR_NOT_FOUND (locator did not become <state>: <locator>), and a passing waitFor verifies an earlier act, as upstream (verifies: true is Screen.NotifyVerified). The timeout carries Details as upstream’s does (the locator, what it asked for, and how long it waited; see Trace page)
  • Locator expectations: visible, hidden, attached, enabled, disabled, checked, selected, expanded, focused, text, contained text, value, attribute, accessible name, and count. They poll until the assertion timeout, or the matcher’s own timeout. Not inverts a matcher, which then passes after 1000 ms of continuous truth (or the whole budget when it is shorter). Text matchers take the same TextMatch as queries, ignoreCase, and a list form. The boolean flags are visible, attached, enabled, and isChecked (checked is a C# keyword)
  • toHaveScreenshot as Expect.That(Screen).ToHaveScreenshotAsync(name, options) and the same on a locator, with Not and Expect.Soft(locator); see Visual comparison
  • expect.soft for every locator expectation, as Expect.Soft(locator), including .Not and the per-matcher timeout. An ASSERTION_FAILED is kept and the body runs on; any other error still throws. E2ETest records each one on the NUnit result, as inside Assert.EnterMultipleScope, so the test fails when the body ends and lists every failure. E2E.XUnit.V3.E2ETest keeps them on the session and fails the test when it is disposed. As upstream, a failed soft assertion outranks a skip: Assert.Ignore or Assert.Inconclusive after one fails the test in NUnit, and the message keeps the skip reason beside the failures. In xUnit v3, Assert.Skip after one fails the test the same way. Other hosts set E2ESessionOptions.OnSoftFailure or call E2ESession.CloseSoftFailures
  • expect(browser) as Expect.That(Browser): ToHaveURLAsync (a string or a Regex, with ignoreCase and timeout), ToHaveTitleAsync (a TextMatch, with timeout), and ToHaveClassAsync(locator, TextMatch), .Not, and Expect.Soft(Browser). Like the locator matchers, a passing one verifies the previous act, and .Not passes after 1000 ms of the opposite. A read that outlasts the matcher’s deadline ends it, so a page that stops answering fails at the assertion timeout
  • expect.poll as Expect.Poll(read, options), with Timeout, Interval, and Message. A read that throws is retried. The matchers are ToBeAsync, ToSatisfyAsync, and .Not; E2E.NUnit adds ToMatchAsync for any NUnit constraint, such as Is.GreaterThan(3). The default timeout is 5 seconds, not the configured assertion timeout, because the poll does not see the running test, and it does not stop at the test deadline unless a cancellation token is passed (a Timeout of zero waits for that token)
  • A call’s Timeout of TimeSpan.Zero sets no deadline of its own, as timeout: 0 does upstream (feat(e2e): timeout 0 means no step deadline, d2953bb, tester-army/e2e#1554). Locator actions, WaitForAsync, locator and browser matchers, ToHaveScreenshotAsync, Screen.TreeAsync and DebugAsync, Browser.GotoAsync, WaitForResponseAsync, WaitForDownloadAsync, and WaitForDownloadsAsync wait until the test deadline instead of failing at once. A negative TimeSpan is TestException INVALID_ARGUMENT on every one of them (it was ArgumentOutOfRangeException on some); an infinite TimeSpan is negative, so it is refused too. Time.CheckStepTimeout, StepDeadline, and StepBudget (Internal/Time.cs, .NET-only; upstream’s checkStepTimeout and stepTimeout) hold the rule. Upstream hands an engine author stepTimeout and builds the operation from it; the port hands an engine a TimeSpan budget, so StepBudget gives it what is left of the test deadline (at most a day, and a day when nothing bounds the test). Expect.Poll has no attempt: with Timeout = TimeSpan.Zero it polls until the cancellation token ends, and with a token that cannot end it throws ConfigurationException INVALID_CONFIG (upstream: outside a test). A negative PollOptions.Timeout (an infinite one is negative) and a zero or negative PollOptions.Interval throw ConfigurationException INVALID_CONFIG before the first read, as upstream’s checkOptions in expect/poll.ts does (PollExpectation<T>.CheckOptions; the messages report milliseconds, and Timeout.InfiniteTimeSpan reads Infinity). Upstream’s NaN and Infinity cases have no TimeSpan value. Not ported: the contributed-fixture FixtureOperation.timeout rule and withTimeout taking an infinite budget, because the port has neither.
  • agent.act, agent.assert, agent.waitFor, agent.extract. ActOptions has Params, Timeout, MaxSteps, MaxModelCalls, and Agent; AssertOptions has Params, Timeout, and Agent; WaitForOptions has Params, Timeout, Interval, MaxModelCalls, and Agent; ExtractOptions has Timeout and Agent. See Agents
  • Act tools observe, scroll, scroll_to, and back. They are offered when the engine declares EngineCapabilities.Scroll or EngineCapabilities.History. scroll_to with a target scrolls it into view. With text, it pages the viewport, or the target list, until a node reading the text is listed, then scrolls it into view. It reads each screen once when it has visibly scrolled, and reads again until it holds still otherwise (tester-army/e2e#1570, 34f85c3: Reading.ReadPage, PageMoved, and PageLanded, with SettleOptions<T>.SettledWhen and ObservationFeed.ObserveAsync(mode, name, settledWhen, token), upstream’s look(mode, settledWhen)). A page has landed when a third of its lines, two at least, are new and it is no sparser than the page before; a page that reads the same, differs by a line or two (a counter), or is thinner (rows still drawing) is read until it holds, and so is one whose rows differ by a clock-like value alone. A single changing time value (12:05) beside other text does not count as the list moving, so a clock ticking beside a list no longer delays its end: the call fails with LOCATOR_NOT_FOUND after a few swipes, not 800 screens later. The page a swipe is compared with is read from the tree alone (each node’s name, text, and place); the scroll position that earlier ports added to it is not part of it, as upstream. It stops when the screen stops moving
  • Replay cache for a verified act: role, name, test id, and path. Modes are self-finalized, agent-concluded, and missed
  • Values.Unique and Secret. Values.Unique rejects an empty or whitespace value, and a value that spells a placeholder (it contains {{param:). A secret value has at least 6 code points: Secret.Create throws INVALID_ARGUMENT, a config secret INVALID_CONFIG, and Credentials.User INVALID_CONFIG for a short E2E_USER_*_PASSWORD. The values of the secrets an act received in Params are redacted from every later prompt of the attempt, including the assert, waitFor, and extract statement and the agent’s system and context. A secret filled through a locator, or read with Secrets.Get and never passed to act, is not added to that list. Redaction matches any case, JSON escapes, HTML character references, percent encoding, and collapsed inner whitespace. A known marker is never rewritten. The same secrets are redacted from the node names and test ids an act records as targets and end anchors in its replay cache entry, and a target, on replay or from the model, is matched against the screen in that redacted form. The same secrets are redacted from the failed matcher messages of locators and Expect.That(Browser), a toHaveScreenshot failure, a locator.waitFor timeout, the soft-failure aggregate, and the messages of the inner exceptions under them. Upstream redacts error text once, at its report boundary (serializeError), which the port has not, so each of these places redacts its own text. The aggregate redacts when the test ends, so a secret the attempt learned after a failure was kept is covered. expect.poll has no session, so a poll failure redacts the secrets of every live session in the process, as upstream’s setErrorRedactor does for the process. A cause with a secret in its message is rebuilt with the redacted text and keeps its type and code when it is an EngineException, AgentException, or ConfigurationException, otherwise it becomes a TestException with code ERROR, and loses its stack trace. A failed secret fill in WebEngine reports the Playwright message with the value and its fragments of 8 or more characters redacted. A node name cut at 256 characters, and a text or value cut at 512, that ends with the leading part of a secret (8 characters or more, or half of a shorter secret) shows that secret’s marker in its place, as upstream’s redactCut does, in the model’s snapshot, the recorded targets and anchors, and the locate result. StreamRedactor and Redactor.HoldFrom (upstream’s SecretLedger.holdFrom, with maxFormLength as MaxFormLength) hold back the tail of text written in pieces so a value split across two writes is still caught. The port’s Redactor plays upstream’s SecretLedger here (the port’s own SecretLedger only wraps one for the MCP server), so StreamRedactor takes a Redactor (or a SecretLedger), and it takes bytes as a ReadOnlySpan<byte>. Upstream uses them for what user code prints: a test worker’s stdout and stderr, and the e2e mcp process’s output. The port has no worker. e2e mcp replaces Console.Out and Console.Error with writers into McpOutput (Mcp/Output.cs, upstream’s mcp/output.ts): what user code prints reaches the operator’s stderr through one StreamRedactor over the process’s SecretLedger, with WithholdDuringAsync (upstream’s withholdDuring, held while a config loads and withheld with a [warning] withheld N bytes line when the load fails), DuringCallAsync (upstream’s duringCall, releases a tail without a newline when the last tool call ends), Log, Report and End. .NET-only: McpOutputWriter and OutputStream (upstream patches process.stdout.write), and SessionHostOptions.Secrets (upstream’s processSecrets is a module global). An error nobody caught (AppDomain.UnhandledException) is logged redacted and ends the server with exit code 1. An unobserved task exception (TaskScheduler.UnobservedTaskException, which fires only when the GC finalizes the task) is logged redacted and does not end the server, since .NET never ended a process for it; upstream ends the server on an unhandled rejection except abandoned and stray ones, which the port has not. .NET-only: the StreamRedactor constructors that take a Func<Redactor> or a SecretLedger, so it sees secrets registered after it was created. The server’s own messages are redacted whole where they are written
  • app.open, app.back, app.restart, app.clearState, and app.baseUrl (App.BaseUrl, with no trailing slash as upstream #1479: $"{App.BaseUrl}/api/users" joins with one slash, and OpenAsync still resolves a relative URL against app.url as declared, so a base path keeps its last segment only with a trailing /; Urls.BaseUrlOf is upstream’s baseUrlOf), and the context platform. app.restart and app.clearState reopen the base URL inside their own step, as upstream’s steer, so no app.open step follows them
  • The browser fixture subset: goto, reload, back, forward, url, title, waitForURL, evaluate, waitForResponse, route, unroute, unrouteAll, cookies, setCookies, clearCookies, setViewport, emulateMedia, addInitScript, keyboard.press, keyboard.type, keyboard.down, keyboard.up, and mouse.move, wheel, down, up
  • press keys are checked in core, as upstream’s requireKey (internal/keys.ts, Keys.RequireKey) does: Locator.PressAsync checks the key before the node is resolved (in LocatorEngine.CheckAction, upstream’s checkAction), and the agent’s press and pressKey check it in the dispatcher before the action is committed. A key outside the grammar (KeyGrammar.Parse, upstream’s parseKey: zero or more modifiers and one key joined by +) is INVALID_ARGUMENT on every engine, where the mobile and Windows engines alone refused it with UNSUPPORTED_CAPABILITY (those checks stay, as upstream’s engines keep theirs). Locator.PressAsync no longer throws an ArgumentException for an empty or blank key: "" is INVALID_ARGUMENT like any key outside the grammar, and " " is a space character key. Browser.Keyboard.PressAsync takes any Playwright key (Alt+KeyA), as upstream’s browser.keyboard does, and is not checked. The agent’s press still refuses an empty or blank key first with press requires a key (a .NET-only pre-check).
  • Agent budgets: ActOptions.MaxSteps, ActOptions.MaxModelCalls, and WaitForOptions.MaxModelCalls. A per-call budget can only lower the agent’s configured one. A higher or non-positive value throws INVALID_ARGUMENT
  • An act past its action budget ends STEP_BUDGET_EXHAUSTED, blocked. The model is told and may still conclude: a passing verdict, or a failure without a code, becomes the budget error. Replayed actions draw on the same budget. navigate, back, scroll, and scroll_to take a slot; observe does not. An act whose tool loop uses every model turn without a done call ends STEP_NO_CONCLUSION, a failed verdict, as upstream’s does (see the tool loop bullet); an executor that records one model call more than the budget allows still ends STEP_BUDGET_EXHAUSTED, blocked (agent.act exhausted its model-call budget of N)
  • As upstream, an act guards against a model that repeats itself. The same call with the same input 3 times in a row, or a sequence of 2 to 4 calls twice, adds a warning. 5 identical calls, or a sequence 3 times, offers the model only done, so it still writes its own verdict. The done call never counts. The failure streak is upstream’s checkFailureStreak (LoopGuards.CheckFailureStreak, tester-army/e2e loop-guards.ts at f4be1c4): 3 failed calls in a row add a notice, 5 offer the model only done, and a call that worked starts the count over. Differences: the loop knows from each tool’s result whether the call failed (GuardToolResult), so it does not parse result text (isFailedResult and extractToolResults are not ported, and the its of the failure streak describe that read text are not ported). The thresholds are upstream’s LoopGuardThresholds and DEFAULT_LOOP_GUARD_THRESHOLDS (LoopGuards.DefaultLoopGuardThresholds), and CheckLoopGuards and CheckFailureStreak take an optional thresholds argument; the loop passes none, and the type is internal, so no public option exposes it. A turn with no tool call counts as a failure. An executor’s transcript is kept only under E2E_DEBUG=1, as upstream keeps it under --debug.
  • ActResult.ModelCalls (0 for a full replay) and ActResult.Actions (replayed and live actions, counting failed attempts)
  • AgentException.Blocked and AgentException.Explanation (the same text as Message)
  • OpenAI-compatible tool calling
  • A Values.Unique value is recorded as upstream’s placeholder, {{param:<pointer>}} for the value as typed and {{param:<pointer>|<encoding>}} for another spelling (CacheKeys.TemplateText, CacheKeys.ExpandText, CacheKeys.ParamPointer; PlaceholderPrefix is upstream’s PLACEHOLDER_PREFIX). The pointer is RFC 6901 and reaches a value at any depth of the params (/name, /a~1b, /owner/tags/1): ActParams.ValidateParams is upstream’s validateParams and lists each Values.Unique with its pointer, in dictionaries, lists and arrays (a value inside a plain object is found under the serializer’s property names, which the key’s pointers may not match). An entry written before this used U+0001 slots (\u0001name|uri\u0001); replay policy version 5 (and 6) keeps those entries from being read, so the step records again. A placeholder a call cannot fill (it names a param the call did not mark, an encoding the codec does not know, or a value that encoding cannot spell, as an unpaired surrogate has no uri spelling) makes the entry a miss as invalid-entry, as upstream’s expandText and expandTrace do. The entry is expanded whole when it is read (CacheKeys.ExpandTrace, upstream’s expandTrace, over Trace.MapTraceText, upstream’s mapTraceText in cache/trace.ts), so the replay runs the expanded copy and a passing replay keeps the entry as stored. The texts it maps are the typed or selected value, the navigated URL, the scroll text, the upload paths, the target descriptors (Name, TestId), the anchors (Name, Text, TestId, Placeholder, Value), and the start and end routes; the marker of a secret fill is a name, not text, and is left alone, as upstream’s typeSecret maps its target only. An end anchor that names a unique value is recorded with its slot like any other text (upstream’s describeDelta skips none). A recording made before this lacks that anchor. A replay of it can hand the step back at the end check, because the screen’s alert or status naming the unique value is now an anchor the entry does not hold, and the step then records again (an anchor-recording change; upstream’s REPLAY_POLICY_VERSION in cache/relocate.ts is bumped for matching-rule changes, and its anchor changes such as #1447 did not touch it, so this change adds no bump of its own: the policy version stays at 6, which the placeholder grammar change set). A step records its texts raw, as it saw them (redacted), and the finished entry is templated once (CacheKeys.TemplateTrace, upstream’s templateTrace): it returns no entry when a text already spells a placeholder or two marked params share a spelling (SpellingsDistinct, upstream’s spellingsDistinct), and the step then writes no recording. A target named through Values.Unique is found again because the replay looks it up expanded. An action’s recorded Summary is templated like the other texts (upstream’s mapTraceText maps summary); the port records no verdict summary, so that part of upstream’s summary templating has nothing to template. RecordedAction.Within and RecordedTarget.Within are templated like the other descriptor texts (upstream’s DESCRIPTOR_TEXT_FIELDS lists within). An anchor’s TestId and Placeholder are templated now too, as upstream’s DESCRIPTOR_TEXT_FIELDS say; a recording whose anchor held a unique value there was written with the value as it was. The key and the format of an entry are the same, and the replay policy version is not bumped. An anchor is compared with the screen’s own anchors after the entry is expanded, so both hold this run’s text. A param key that holds }}, a line break, or | does not round-trip, as in upstream’s regex and parsePlaceholder. Under cache.strict, a call whose unique value cannot be spelled in an encoding the entry uses fails as REPLAY_STALE with the reason invalid-entry. Each value is looked for in recorded text in up to five spellings, each with its own placeholder: as typed, percent-encoded as a URL path spells it (|uri, encodeURIComponent, so a space is %20), form-encoded as a query spells it (|form), as the slug an app derives for a record path (|slug: lowercase, letters and digits kept, every other run one dash, none at either end; a value whose slug is empty has none), and on one line (|flat, upstream’s flat encoding from #1452, TextRules.Normalize as upstream’s normalizeText). The flat slot is for a multi-line value, which the screen and the end anchors show on one line; a replay fills it with this run’s value on one line, so the end check looks for it there and no longer misses. A spelling equal to one already taken is not given a slot. As upstream’s templateText does with its literal segments, CacheKeys.TemplateText never looks for a value inside a slot it wrote a moment earlier: a shorter value, such as ull, is not found in the slot of a longer one. CacheKeys.ExpandText fills every placeholder in one pass (a regex, as upstream’s expandText is one regex pass), so a filled value is never read again. CacheKeys.TemplatesCollide (upstream’s templatesCollide, the param-collision check) takes the params as ActParams.ValidateParams reads them and compares every one of those spellings against every unmarked scalar leaf at any depth (a string, a number as its JSON text, a flag as true or false, a secret’s kind, name and purpose), so a plain "Ada Lovelace" param next to Values.Unique("Ada\nLovelace"), or a 7 inside a list next to a marked 7, is not recorded. The port’s CacheKeys.TemplateText and CacheKeys.ExpandText do this where upstream’s templateText, expandText and ENCODERS (cache/template.ts) do. Upstream’s docs/cache.mdx line is mirrored in skills/e2e-dotnet/references/agent.md; the docs site has no cache guide.
  • E2E_CACHE_DIR replaces cache.dir as upstream’s does: it resolves from the config directory, a leading ~ or ~/ is the home directory, a blank value is ignored, and the cache mode stays as configured. E2E_NO_CACHE=1 (or true) is upstream’s --no-cache (noCache of the run options, cli.cache = 'off' in run/runner.ts, resolved in config/resolve.ts): ReadCache turns the cache off whatever the config says, in CI too, even beside a cache.store, and a directory override leaves it off. The name is .NET-only (the test host has no flag); the modes test Partial_no_cache_overrides_the_config_... is partial until the run and report seam of upstream’s runExisting is extracted (#1336); --cache-dir (#1337, cli.cacheDir of config/resolve.ts, resolveCacheDir) is CliOverrides.CacheDir and, for the test host, the .NET-only variable E2E_CACHE_DIR_OVERRIDE: it wins over E2E_CACHE_DIR and cache.dir, a leading ~ is the home directory, a blank value is INVALID_CONFIG (--cache-dir must be a non-empty path; an empty variable is unset), WithCacheStore refuses it beside a store (--cache-dir names a file store directory, but cache.store replaces the file store; drop one), and Output names --cache-dir in the overlap errors (CacheConfig.DirectorySource). e2e cache --cache-dir passes the same override to E2EConfig.Load, so it now reads ~ and refuses a blank value as a run does. Not ported: --cache-dir on e2e run (the port has no such command). ReadCache is upstream’s resolveCacheConfig and reads both through the config’s environment, so a host config reads them as well.
  • A passing locator expectation, agent.assert, or agent.waitFor after act verifies it, and a verified act is written. Locator reads and agent.extract verify nothing. agent.assert, waitFor, and extract always run live. As upstream, verification stops when the test fails, so a check in a derived [TearDown] after a failure records nothing.
  • Replay runs back and a viewport scroll as recorded, re-finds a scrolled list before each repeat, and pages again for a scroll_to text. Consecutive identical scrolls are recorded as one action with a repeat count. observe is not recorded. A recorded list scroll (and a scroll_to with a list) keeps the share of the viewport the list covered (spans, 0 to 1, from the node’s box and the viewport the engine reports, as upstream’s viewportShare). As upstream, a list that covered at least half the viewport (MAIN_LIST_SHARE) and cannot be re-found scrolls as the viewport does, for that repeat and every later one, and a smaller region (or a recording with no share) stops the replay. Every engine reports a viewport (Observation.Viewport): the web engine and the document engine as before, and DeviceSession and WindowSession the size of the screen they measure every rect against (the known viewport, and the window’s size in points), so the fallback works on the mobile and Windows engines too. Upstream’s mobile surface returns the same size as its observation’s viewport; the Windows engine has no upstream. A mobile size is rounded to whole points, since TraceViewport is integral. The live scroll and scroll_to re-find a list the tree renumbered as upstream does (resolveScrollTarget, samePlace: the node itself, its descriptor, or the same-role node whose box overlaps the old one by at least half), and a lost list that covered at least MAIN_LIST_SHARE of the viewport scrolls as the viewport.
  • e2e cache ls, stats, and clear (#1347, tester-army/e2e cli/cache.ts) are E2E.Cli CacheCommand (Run is upstream’s cache; ResolveCacheDirectory, ReadContents, List, Stats, Clear, RemoveTemporaries, WarnAboutSkipped, FormatAge, and FormatBytes are upstream’s functions; CacheDirDescription is CACHE_DIR_DESCRIPTION). .NET-only: CacheCommand.Run’s cwd and env arguments (test seams), and the --cache-dir flag, which lives on e2e cache alone because the port has no e2e run to share it with. Differences: AGE is the entry file’s last write time, since the port’s entries carry no createdAt; INSTRUCTION is the digest (Identity.InstructionDigest) of the instruction the entry stores, where upstream stores the digest in recordedFor.instructionDigest; the TEST column is the entry’s test title; the config is e2e.config.json (no .ts discovery); the refusal of a custom cache.store is not ported, since the config file cannot name one. Tests: CliCache/ ports 12 of the 13 it of cli-cache.test.ts (not ported: ‘refuses a custom store it cannot enumerate’); ‘records one entry per target and lists both’ in TraceCacheReplay/ now asserts the listing.
  • When a replay ends in end-mismatch and the agent repairs it with more actions, the entry is evicted instead of rewritten; the next clean run records the flow again.
  • The key holds the cache schema, the replay policy version, the test, the engine (its IEngine.Name, never its version, as upstream since e77c17a; the key also holds the platform), the instruction, the params, the agent’s name, a SHA-256 digest of the agent’s context with the known secrets redacted, and the repeat index. Another agent, or a changed context, records again. The repeat index counts per agent and context. Replay policy version 6 re-keys every entry, so the first run after the upgrade records them again: an entry recorded before version 5 may hold a page load as its delta, or a unique() value as the old U+0001 slot (see the placeholder grammar below).
  • A recording checks the step’s delta, as upstream: up to eight nodes that appeared and up to eight that went away, alerts and status messages first, each with its value (never a secure field’s), secrets redacted from names and values, and its checked, expanded, pressed, and selected states. A node counts as gone only when no node on the end screen still matches its anchor. A replay passes on its own only when the end route matches, every appeared node is present, every gone node is absent, at least one of those changes happened during the replay (counted from the first screen the replay saw on the route it ended on), and no alert shows that was not there before and that the recording never saw. The web engine does not observe Next.js App Router’s route announcer (the next-route-announcer element), so its title echo never counts as an alert. A value the replay typed counts as a change only when the step changed nothing else. An alert’s dates, times, durations, and ids are read as placeholders. A step that changed no node and stayed on its route records nothing, and an entry read for an act that then passed with nothing to record is evicted.
  • As upstream, each side lists alerts and status messages first, then leaves, then containers. It skips text that reads differently on every run (ids, durations, dates, ISO 8601 instants, clock times, bare numbers, and a count that is the data rather than the step’s result) while a stable anchor remains. An anchor is a visible node with a name, a text, a test id, or a placeholder, and records its role, name, text (when it differs from the name), test id, placeholder, input purpose, value, and states. A node the other fields identify is matched without its test id, so a test id that changed between renders is forgiven; a node with only a test id is matched by it. The screen a step passed on is read once it holds still. Upstream reads a recording’s delta from the step’s settled start screen, and measures a replay’s evidence from the replay’s start. The port reads both from the screen the step’s first action was resolved against: a page that shows a loading state for a few hundred milliseconds after load holds still long enough to pass a held-still look, and a delta read from it is the page load, which a replay finds again before its own effect renders. A step that resumes a replay reads its delta from the screen the replay’s first action was taken on.
  • Older recordings and unique-value anchors. A recording made before an end anchor could hold a Values.Unique value lacks that anchor. If the screen now shows an alert or alertdialog naming the value, Anchors.Mismatch reports it as an unrecorded alert and the end check fails (end-mismatch): the step hands back and records again, and under cache.strict it fails as REPLAY_STALE. A status (or any other role) the entry does not hold is not checked: when the entry’s other anchors hold, the replay passes without reading the unique value in that status. Clear that entry from .e2e/cache/ so it records again when that status must be checked.
  • Known limitation, as upstream (alertShape, cache/anchors.ts): an alert is compared with its volatile parts masked as # (AlertShape, the VolatileSpans: ISO 8601 instants, countdowns, dates, and a minted-id-like token, a run of 12 or more letters, digits, _ or - that holds both a letter and a digit). Now that an alert naming a Values.Unique value is kept as an anchor, two different values that mask the same way compare equal: a unique value shaped like an id (E2E-20260101-ab12) replays against an alert that shows another such value, and the replay can finish on the wrong alert. The port keeps upstream’s masking; a value that must be checked exactly should be shown in a non-alert node. Upstream behaves the same, so it is not changed here.
  • A recorded action holds the key of the container its node sat in, as upstream’s within (cache/trace.ts, Placement in agent/actions.ts): RecordedAction.Within, written as within in the entry. AgentActions.ContainerKey is upstream’s containerKey and AgentActions.ParentsOf its parentsOf (Agent/AgentActions.cs, for agent/actions.ts): the first leaf text of the nearest row, listitem, article, group, region, dialog, or tabpanel the node sits in, else that container’s own label, bounded to 80 characters, and nothing when that says no more than the node’s own name or when the container is a list of twin rows named after whichever renders first. The text is read redacted. The dispatcher records it for the node verbs (tap, double-tap, fill, clear, press, select, check, uncheck, upload, scroll into view), taken from the newest look that listed the node, and TraceRecorder.DescribeTarget redacts it again and bounds it. A replay finds the node with Relocate.RelocateDescriptor (see below): a node whose container key differs is no candidate, so the same “Delete” in another row is never taken, and a row that is gone is target-not-found. An entry recorded before this holds no key and replays as it did. A recorded action also holds upstream’s position (TracePosition, RecordedAction.Position and RecordedTarget.Position, written as position: { index, of }): where the target stood among the controls its own description matched on the screen it was acted on, recorded by ActionDispatcher.PlacementOf (upstream’s placementOf) through Relocate.DescribePosition (Cache/Relocate.cs, upstream’s cache/relocate.ts), and read back as upstream’s readPosition: two integers, the count from 1 to Trace.MaxTracePositionOf (1000), the index below it; a stored position that is not one makes the entry invalid-entry. The descriptor also records the node’s text when it differs from its name (RecordedAction.Text, which a scrollUntil and a tool gap keep for their own text), its placeholder, and its inputPurpose (TraceRecorder.DescribeTarget, upstream’s describeTarget). The summaries read them back (DefaultAgent.Describe, upstream’s describeForSummary): tap button "Delete" in "Budget draft", tap button "Set up" (2 of 3). Relocate is upstream’s cache/relocate.ts (RelocateDescriptor, DescriptorTiers, TierView, FieldsEqual, IsRelocatableDescriptor, MaxPositionedTwins, and the test id shapes), takes the live Observation and the Redactor where upstream takes a map of redacted nodes, and names nodes by their reference. A replay relocates every node action, drag end, scrolled list, and bare-point container with Relocate.RelocateDescriptor (Replay.Relocate, upstream’s relocate in agent/replay.ts; Replay.RelocatePair is relocatePair and Replay.Retryable is retryable; ObservationFeed.Relocate and Refound are feed.relocate and refound, which describe the stale node with TraceRecorder.DescribeTarget and relocate it). It tries the strict tier, then the semantic tier (a test id the app generated is forgiven when the other fields still identify the node), then the test id shape, and takes exactly one match, or the recorded position when its count is the live count. Ambiguity ends the replay at once (target-ambiguous), except for a descriptor with a position: a form still rendering shows fewer twins than the recording counted, so the replay looks again (raw looks, until ReplayTimeout) and ends with the last failure. An anonymous node (a role only) is relocatable only by a place counted alone or inside a named container (Relocate.IsRelocatableDescriptor); otherwise it is target-not-found, and a bare point recorded inside such a container is replayed as a bare point on a viewport of the recorded size (upstream’s pointEnd). The end anchors use the same tiers (Anchors.AnchorIn and Anchors.AppearedIn, upstream’s anchorIn and appearedIn): an anchor that appeared is found on any tier, so a minted test id matches any node of its shape; one that went away stays exact (never the shape tier); an anchor known only by a minted test id is volatile; and the set key is the anchor’s loosest tier. Port-only: Relocate.NodeOf (the port names nodes by their reference where upstream looks the id up in its map of nodes), Replay.DescriptorOf (the port’s actions carry the descriptor fields flat), and ObservationFeed.FindLike, which relocates through RelocateDescriptor and also returns the candidates of an ambiguity for the act tools’ LOCATOR_AMBIGUOUS. Not ported: the selector. A node counts as appeared only when no start node has its set key (Anchors.Describe), as upstream’s describeDelta compares. An older build ignores a position it finds in an entry, which fails closed: it matches by role, name, and test id as before. The replay policy version stays at 6, as upstream’s: it did not change with within, and an entry without a key or a position is still valid under it.
  • Recorded action summaries (#1283, tester-army/e2e agent/actions.ts describeAction, cache/recorder.ts, cache/trace.ts). Every recorded action holds RecordedAction.Summary (upstream’s summary): redacted, bounded (Trace.MaxTraceSummaryChars, 300, upstream’s MAX_TRACE_SUMMARY_CHARS) prose such as tap the point (400, 260) on img "Map", written by AgentActions.DescribeAction (upstream’s describeAction) when TraceRecorder records the action. A typed or selected value, key, URL and upload path pass through the redactor and are quoted to 40 characters; a secret fill reads fill secret "name" into .... A point action’s summary names the listed node that held it even when the trace drops an anonymous one (tap the point (400, 260) on group). A gap reads tool seed_cart, and a run-time value gap tool type (run-time value) (upstream’s DERIVED_GAP_SUMMARY). A scrollUntil says its page count (RecordedAction.Screens, internal and never stored, upstream’s screens). A folded scroll keeps the first summary. A summary never poisons the trace (it is redacted, not a replay input). Trace.MapTraceText maps it, so a unique value in it is templated and expanded; one that cannot be mapped makes the entry null as upstream’s does. Differences: an entry stored before this holds no summary and is still read (upstream refuses an entry without one); a summary over 300 characters is invalid-entry (upstream’s readBoundedText). Not done: the OnAction event and the hand-off notice still read DefaultAgent.Describe, not the recorded summary, so their prose can differ from upstream’s describeAction (for example fill reads as its kind, and a scroll as scroll down x3); sharing the one function is #1344. Checked against upstream: a stored summary is only read as bounded text, never compared with its action (trace-read.ts:188); the trace schema stays trace-1 (trace.ts:27); a secret fill quotes the secret’s name with no redaction (actions.ts:283, quote at actions.ts:395).
  • ActResult.Cache carries ReplayedActions, TotalActions, and NotRecorded (param-collision), as upstream’s step cache detail does. It also carries Detail, as upstream’s step.cache.detail does. On a step that read an entry it carries RecordedBy, the model that recorded it, as upstream’s step.cache.recordedBy does (see Trace page). For a replay that stopped at an action it names the action as the hand-off notice does, with DefaultAgent.Describe rather than the recorded summary (at action 2 of 3, tap button "Apply", then : and the first line of the error when the action threw). After an end-mismatch it names the recorded nodes that did not show (missing alert "Acme Notes"), the ones that did not go away (still showing ...), the alerts the recording never saw (unrecorded alert ...), or that the outcome already showed before the replay acted. A store whose read throws, or that returns an entry of another schema or with no actions, is a miss with invalid-entry. As upstream’s step-cache.ts does (outcome.executed === 0), a replay that stops before it performs any action is a miss whatever stopped it, action-failed and action-uncertain included: outside cache.strict the executor starts from the top with no hand-off notice, and under cache.strict a miss other than gap, no-entry, truncated, or an invalid-entry from a store whose read threw fails the step with REPLAY_STALE (StepTraceSession.ReplayEntryAsync, FailIfStale). Tests: TraceReplay/ReplayThroughTheActTests “A first action that fails is a miss, not a hand-off” and “A first action that may have committed is a miss, not a hand-off” (.NET-only: upstream has no it for this).
  • Only the first attempt replays. A [Retry] attempt runs live and still records, and its acts report missed with reason retry. Each [Repeat] iteration is a first attempt.
  • A recording that opens with navigate replays from any route. Any other recording needs the start route.
  • A location on the app’s own origin (the origin of app.url) is recorded and compared as its path, query, and fragment (CacheRoute.AppLocation, upstream’s appLocation in cache/route.ts), so a recording made on one port or host replays on another, as when app.url uses port 0. Any other origin stays part of the route. The session applies it where upstream’s host does in observe (screenOf, agent/act.ts), through StepCacheOptions.AppOrigin (.NET-only). A recording made before this holds its full origin in route and endRoute: it misses as wrong-context on the first run and is re-recorded. An agent navigate to a full URL on the app is recorded without the origin (CacheRoute.AppNavigation, upstream’s appNavigation), so the step replays where the app runs then; anything else stays as given, and so does a URL with credentials or a rest that would not open the same URL. The model’s link lines and the executor tree cut an app link the same way, so a path that opens with a doubled slash stays whole. .NET’s Uri rejects a run of extra slashes after the scheme that the web’s URL parser skips (http:////host/x), so AppNavigation removes them before it parses; AppLocation still keeps such a URL as given. A recording made before this holds the full URL in its navigate action: re-record it to follow the app to another origin.
  • At the end of an attempt that passed, failed, or was skipped, verified acts are written and the unverified acts that recorded or replayed are evicted. An act that missed the cache and then failed leaves its key alone. A model outage or a cancelled test writes and evicts nothing, unless an assertion also failed on the app: then the unverified acts are evicted. An act is reported evicted only once the store deleted its entry (see “Recording outcome” under Trace page).
  • An entry that a verified replay finished, or that already holds the same flow, is not rewritten, except to write in the step fields an older entry lacks.
  • As upstream, the screen is read by one settle policy per action, for live acts and replays. After a tap, a key press, a select, a check, a navigation, or a back, the next settled look waits up to 2 s for the screen to leave the shape the action was resolved against, then reads until two looks 75 ms apart agree, for at most 1 s. After a fill it waits for the change only; after a scroll, up to 500 ms; after a secret fill, for no change. Node references, focus, and clock-like values do not count as a change, and after an action an empty document does not count as a settled screen. Upstream also counts a screenshot as the shape; the port counts the scroll position instead, so a scroll that moves no node still ends the change wait. An act’s start, the screen after each action, each page of a scroll_to with a text (read once when it has visibly landed, see the act tools above), and the recording’s end screen are held still; a replay settles the look before each action as the previous action’s policy asks, takes a held-still look between the repeats of a scroll, and reads the end state raw.
  • A replay waits up to ReplayTimeout (15 s; a .NET-only fixture property, not a config key) for each recorded target and for the end route. The recorded end state then gets what Replay.VerifyEndState (upstream’s verifyEndState) gives it: the settling backoff (looks 100, 300, 600, 1000, then every 3000 ms apart) inside ReplayTimeout, then, up to the entry’s endWaitMs, a look every second, while the step clock keeps 20 s in reserve for a hand-off. An entry records endWaitMs as the time from its last action (or the executor’s verdict after a hand-off) to the staging read, plus a 10 s margin, at most 120 s; an entry without it waits for the backoff only. A target is still looked for every 20 ms, where upstream backs off.
  • FileStepCache.Write is upstream’s FileCacheStore.write (cache/store.ts): it writes the entry through AtomicWrite.WriteFileAtomic, a sibling temporary file moved over the entry file, so a crashed or concurrent writer leaves no torn entry, and two writers on one key leave the last write, as upstream’s store documents. Upstream’s store awaits writeFileAtomic; IStepCache.Write is synchronous, so the port uses the synchronous twin (upstream’s writeFileAtomicSync, which its CLI and telemetry stores use). Windows-only difference: a POSIX rename replaces the target in one step, but Windows refuses a move over a file that another move is replacing (ERROR_ACCESS_DENIED) or that a reader holds open (ERROR_SHARING_VIOLATION). Upstream’s rename does not retry, so there the losing writer throws and the recording is lost. The port retries such a move up to ten times with a growing pause (about 90 ms in all) before the error is the writer’s, so the write lands and the step reports Saved where it would have reported NotWritten. A denial that lasts, such as a read-only target, reports the same error after the same wait; any other error reports at once; on other systems the retry never runs. .NET-only names: AtomicWrite.MoveAttempts, AccessDenied, SharingViolation, and RetriesMove (the Windows errors and the retry), Utf8 (the encoding both twins write with), and TemporaryPath (upstream’s temporaryPath).
  • Truncated recordings (tester-army/e2e trace-recorder, trace-cache and step-cache tests, #1187). A recording that cannot be stored faithfully is flagged CacheEntry.Truncated (upstream’s truncated) and never replays: Decide.DecideTraceReplay answers miss with the reason truncated (before the start-path check), so the executor runs the step from the top with nothing replayed, also under cache.strict (truncated is not a stale reason, as upstream’s STALE_REASONS omits it), and FileStepCache.UnderAnotherKey never counts a truncated entry as the recording a changed key hid (upstream’s rekeyed.ts). The entry is still written, as upstream writes it. TraceRecorder (upstream’s TraceRecorder) poisons the trace in four cases: an action past the cap (Trace.MaxTraceActions, 50, upstream’s MAX_TRACE_ACTIONS; the constructor’s maxActions is upstream’s option of that name, and a scroll that folds into the one before it does not count), a replay input the redactor would alter (a typed, selected or navigated value, a key, an upload path, the text a scrollUntil pages toward, and the start and end routes: a registered secret in it) or one over Trace.MaxTraceInputChars (4,096; upstream’s verbatim, which keeps a redacted, bounded copy for documentation and never replays it), and a targeted action whose descriptor no replay could re-find (Relocate.IsRelocatableDescriptor: an unnamed twin that no named row or lone place tells apart, upstream’s require). A secret fill holds its marker (<secret:name>), a name, so it is not a replay input and never poisons the trace. A secret value typed through Fill is poisoned, not stored: the entry holds the redacted copy and Truncated. The store’s read also refuses an entry over a cap, as invalid-entry (upstream’s readActionTrace, readAnchors, readStates): more than 50 actions, a typed value, URL, scroll text or route over 4,096 characters, more than Trace.MaxTraceAnchors (8) anchors on a side of the delta, and anchor states that are not Trace.TraceAnchorStates (checked, expanded, pressed, selected), each once, in sorted order, never empty. Decide.OpensWithNavigate skips leading project-tool gaps as well as a resize, as upstream’s opensWithNavigate does. Differences: CacheEntry.HasValidCaps, RecordedAction.HasValidInputs and RecordedTarget.HasValidStates are .NET-only names for the read checks, which sit beside the port’s other HasValid* checks (the port validates at the replay, not in a reader); TraceRecorder.Record(RecordedAction) returns a copy, since a poisoned input is stored in its redacted form; Finalize takes the routes unredacted and redacts them itself (upstream’s anchorPath), so the caller no longer does; Trace.IsSecretMarker is internal now, for the recorder. Not ported: the checks of fields the port has no counterpart of (verdict summary, executor, createdAt, an action with no target). Tests: TraceRecorder/TraceRecorderTests (the three recorder its), TraceCache/DecideTraceReplayTests (the two decideTraceReplay its), TraceCache/Trace1EntryTests (the cap and anchor state rejections, at the session seam like the resize ones), StepCache/StepTraceSessionTests (“misses a truncated entry”), and the cache.strict tests of StepCache/ (“still runs live … a recording too long to replay”, and the truncated half of “runs live when the only recording is truncated or records no step”). .NET-only: Keeps_a_secret_fill_marker_without_poisoning_the_trace (the port’s marker is a fill value, upstream’s typeSecret has its own field).
  • Secret fill policy events (#1331, upstream’s authorizeSecretFill, agent/secrets.ts). ActionDispatcher.AuthorizeSecretFill records one policy event on the step for each decision, through Phases.RecordPolicyEvent (the mechanism of upload.path): secret.registered (denied, AUTH_CREDENTIAL_UNAVAILABLE), secret.sink (denied, POLICY_DENIED: a disabled field or one that is not editable), secret.purpose (denied, POLICY_DENIED) and secret.fill (allowed). A live fill records them on each authorization (the stale retry authorizes again); a replayed fill (ActReplayHost) authorizes once, before its fill, so it records one set. An event holds a name, a decision and a code, never the value. Upstream passes a SecretFillHost and resolves the value inside authorizeSecretFill; the port keeps its provider call after the authorization. Upstream’s unavailableCode has no counterpart: the port always uses AUTH_CREDENTIAL_UNAVAILABLE. AgentInputStale/SecretFillStaleRetryTests asserts the secret.fill count and stays Partial_ (no action origin, no credentials, no replay of a cached fill through a project runner); AgentSecrets/AuthorizeSecretFillTests asserts the secret.sink event and stays Partial_ (no plaintext read to count).
  • A replayed secret fill looks the secret up among the secrets the step’s params declare, through the dispatcher’s own lookup (ActionDispatcher.DeclaredSecret, upstream’s this.options.secrets.get(name) in typeSecret, agent/action-dispatcher.ts), so a marker the step did not declare fails with POLICY_DENIED (secret "<name>" was not declared in this step's params; only declared secrets can be filled), as a live type_secret does (#1330). It was AUTH_CREDENTIAL_UNAVAILABLE (Replay needs secret ...). The replay misses as action-failed. Test: TraceReplay/ReplayThroughTheActTests.A_secret_marker_the_step_did_not_declare_misses_as_action_failed (.NET-only: no upstream it covers a replayed undeclared secret).
  • cache.mode read-only replays but never writes or evicts, including the end-mismatch eviction. off neither replays nor records. Under cache.strict, a stale recording fails the act with REPLAY_STALE and stays in place; a strict run never writes or evicts, and its retries replay. A no-entry miss fails too when the cache directory holds a recording of the same step under another key. Entries record the step as the test, the engine, the instruction, the params digest, the repeat index, and the agent; the port stores the target id (TargetId) as upstream does and also the engine, which upstream does not, and the instruction text where upstream stores its digest. Only an entry that records the whole step counts, and, outside cache.strict, a verified whole replay in read-write mode writes the missing fields into an older entry. A custom IStepCache is not checked. The message names what changed between the entry’s keyedBy and this run’s key context, as upstream’s keyContextChanges does, and says “the runner, the engine, the app, or the agent’s context” for an entry with no keyedBy. The message ends with upstream’s advice (staleAdvice in cache/context.ts, built by CacheContexts.CreateAgentCacheContext into AgentCacheContext.Strict.Advice and handed to the step cache as AttemptScope.StrictAdvice): re-record it with a read-write run with cache.strict set to false, then and commit the changed entry under <dir> for a cache directory inside the project (shown relative to the project root, with / separators) or ; the run writes the new entry under <dir> for one outside it (absolute), or ; the run writes the new entry to the configured cache.store when a store replaces the directory. cache.dir and E2E_CACHE_DIR change the directory it names. Differences: the port has no --strict-cache flag (the internal CliOverrides.CacheStrict stands in for it, so only code can turn it on and the advice then reads without --strict-cache, as upstream’s), so cache.strict is the only knob a user can turn on; AgentCacheContext has no claimKey, staged, or strict.recordings (AttemptScope claims keys, the step session lists the cache directory). TraceCacheConfig/ReplayStaleAdviceTests ports the three REPLAY_STALE advice its; the second names a --cache-dir outside the project through CliOverrides.CacheDir.
  • The entry’s file name is upstream’s traceCacheKeyHash (cache/identity.ts): the SHA-256 of the RFC 8785 canonical JSON of a trace-1 key (buildTraceCacheKey) of the test, target, engine name and contract version, app identity, instruction digest (instructionDigest, normalized by normalizeInstruction), params digest (paramsDigest), repeat index (createCallIndexer, counted per agent name and redacted context), agent, agent context digest, and replay policy version. The port’s key differs from upstream’s in these parts only: project is the digest of the empty projectId (the port has no projectId); appIdentity is upstream’s targetIdentity (Sessions.TargetIdentity): the digest of the target app’s resolved identity (the declared app.identity, else the URL’s origin and path as declared, a free port still :0, else the bundle id, else the build path) and environment; an app that declares neither keys on its URL and its host’s default environment, so recordings made before app.identity and environment (which keyed on the empty declaration) miss as no-entry and must be re-recorded; a fixture that overrides BaseUrl keys on that URL; testId is the test title, not <file>::<title path>; targetId is the target’s name and engineName the engine’s IEngine.Name (the port has no engine manifest). IEngine.Name (upstream’s engine.name) is a default interface member that returns Platform; MobileEngine names itself mobile as upstream’s does, so its key and the report’s run.targets[].engine read mobile where they read ios or android, and an earlier mobile recording misses as no-entry. The replay policy version is not bumped, as upstream did not bump it for a key change (e77c17a dropped the engine version from the key with a changeset only). WebEngine is web, DocumentEngine document, WinAppEngine windows; policyVersion is the port’s own 6: version 5 followed the placeholder grammar of cache/template.ts, so an entry written with the earlier U+0001 slots is never read, and its step records again; version 6 keys a secret param as upstream’s validateParams projects it, so the next run records those steps again. Params are projected before the digest as the port’s cache has always projected them: a Values.Unique value is its placeholder, {{param:<pointer>}} (upstream’s templateParams, CacheKeys.TemplateParams, over the tree ActParams.ValidateParams projects; no params digest as the empty object) and a Secret is {"kind":"secret","name":<name>,"purpose":<purpose>} (its purpose only when it has one), never its value; a number is written by .NET’s shortest round-trip form, which matches ECMAScript’s for the values a param holds. The entry stores keyedBy (TraceKeyContext) as upstream does; an entry with a malformed keyedBy still reads, without it. Recordings made before this key (the port’s former text-hash key) are not read and are not migrated: they miss as no-entry and must be re-recorded. Under cache.strict they do not fail as REPLAY_STALE either: the check matches the step by its recorded params digest, which the old entries hold in the old form, so the step runs live.
  • The entry stores targetId (CacheEntry.TargetId, upstream’s recordedFor.targetId; bounded to MAX_TRACE_DESCRIPTOR_CHARS on write like Test and Agent, and a blank, over-long, or non-text value makes the entry invalid-entry as upstream’s readProvenance does) next to its flat Test, Instruction, ParamsDigest, CallIndex, and Agent (upstream nests them under recordedFor): the target’s name, masked like the test title, provenance a replay never reads; an entry recorded before it was stored holds none and reads as before. The port has no e2e cache ls, which lists it. The occurrence fields (ParamsDigest, CallIndex, Agent, upstream’s recordedFor.paramsDigest, callIndex, agent) are optional on read, and a confirmed whole replay of an entry that lacks them writes them in (E2ESession.CompleteProvenance, upstream’s completeProvenance); a read-only run leaves it untouched. TraceCacheModesTests.Partial_caches_by_default_and_CI_demotes_... (#1287) now starts from such an entry and proves the CI-demoted replay leaves the file as it was; it stays partial only for the missing runExisting (#1336).

ToHaveScreenshotAsync compares the viewport, or one locator’s box, against <test file>-snapshots/<name>-<target>-<os>.png, with upstream’s names, OS suffixes (darwin, linux, win32), tolerance rules, retries until the screen matches or holds still, masks, and failure images. The pixel comparison is upstream’s (the pixelmatch threshold and anti-aliasing rules) over PNGs read and written with SkiaSharp. The ported testbed PNGs are upstream’s. Differences:

  • A 16-bit PNG is read from its chunks (ImageOps.ReadSixteenBitPng, .NET-only: Skia cannot hand out 16-bit samples) and each sample is scaled to 8 bits with upstream’s rounding (ImageOps.Narrow). Chromium writes 8-bit PNGs. Everything else upstream’s decode reads (tester-army/e2e#1587, 34ccc5f) the port reads the same: gray at 1, 2, and 4 bits per sample, a palette at any depth with its alpha, and a gray or RGB image’s transparent color (tRNS), compared at the image’s own bit depth, so a 16-bit color is matched at 16 bits and its pixels come out with alpha 0. A PNG cut inside its end chunk, or whose end chunk has data or a wrong CRC, throws, as upstream’s decoder does (ImageOps.EndsWithIend, .NET-only: Skia decodes such a file). Bytes after a whole end chunk are accepted, as the decoder stops there. ImageOps.EncodePng throws on a pixel buffer that does not fill the image, as upstream’s encodePng does. Not ported from that change: the IMAGE_CODEC_UNAVAILABLE error and screenshot-codec.test.ts (SkiaSharp ships its native library in the package, so there is no addon to fail to load).
  • DocumentEngine throws UNSUPPORTED_CAPABILITY. MobileEngine over agent-device captures the masked screenshot with normalizeStatusBar on, so the status bar is held fixed; the TestMu (Appium) and MAUI DevFlow clients ignore it and show the device’s real status bar.
  • The test file is the file the call is compiled in ([CallerFilePath]), not a runner’s test entry. A call in a helper stores beside the helper. A build that rewrites source paths (DeterministicSourcePaths) breaks it.
  • The update flag is E2E_UPDATE_SNAPSHOTS=1, or the fixture property UpdateSnapshots, in place of --update-snapshots (-u). There is no CLI flag or config key.
  • Failure images go to .e2e/results/<result>/attempt-<n>/ (the fixture property ResultsDirectory moves it). They are not attached to a step, because the port has no step report. A screenshot written earlier in the run is tracked per process, not per run directory.
  • Expect.That(screen) is the only screen matcher, and Expect.Soft(screen) (SoftScreenExpect, with Not) keeps its ASSERTION_FAILED as upstream’s expect.soft(screen) does. Expect.That(frameScreen).ToHaveScreenshotAsync (the scope Browser.FrameLocator returns) fails with INVALID_ARGUMENT, as upstream’s does, and TreeAsync and DebugAsync on it do too (screen.tree reads the whole screen; call it on screen).
  • Secure fields are covered by the engine (Playwright masks, in every frame, including a field inside a closed shadow root, which the engine reaches through the e2e-closed= selector engine it registers with Playwright before it opens a browser, and again in the default context of a browser it attaches to over CDP, because Playwright seeds custom selectors only in newly created contexts; upstream’s registerCdpSelectors) and by painting the observed secure nodes. A closed root made by declarative shadow DOM (<template shadowrootmode="closed">) is parsed, not attached, so the hook never sees it and the mask cannot reach it, as upstream. The record counts as present when the init script defined it on the global (Symbol.for("e2e.closedShadowRoots") in globalThis), not by instanceof WeakMap, so a page that replaces WeakMap keeps its closed roots tracked (upstream #1448). Upstream’s cdp-recovery test masks password fields in light and closed shadow DOM before and after reconnect ports in full (CdpSessionRecoveryTests.Masks_password_fields_in_light_and_closed_shadow_DOM_before_and_after_reconnect), pixels included. Upstream’s cdp-selectors.test.ts ports in full except one check (CdpSelectorsTests): the duplicate-tolerance test ports as written, against a fake message channel (CdpSelectors.ISelectorChannel, a .NET-only seam over Playwright’s internal send, as upstream stubs _channel); the unsupported-context test is Partial_ because the message names only the secure-field masks (the port’s locators do not use its selector engines). Upstream counts masked regions against secure nodes before it keeps the image; the port counts them (EngineScreenshot.MaskedRegionCount), and a vision judgment compares them (see Agents).
  • Breaking, upstream #1437 (94e6e76): the pixel taint is gone. A secret fill no longer turns off screenshots for the model: Vision = On and Only, an executor’s ObserveAsync(Pixels), the MCP screenshot tool, and the e2e explore findings keep working after a sign-in. Removed: StepExecutorContext.PixelsTainted, the internal Exposure (upstream’s SecretExposure), SavedSecrecy.Tainted, and the PIXEL_TAINTED code, which VisionDegradation (E2E namespace) and Vision = Only no longer produce. E2E.Reports.VisionDegradation.PixelTainted stays so a report an earlier version wrote still reads, as upstream’s schema keeps the value for old results. A screenshot masks secure fields only, and secret values are still redacted from all text. A generic secret in a plain input, or a value the app shows outside a secure field, is in the screenshot and reaches the model provider: use test credentials. The port has no SECURITY.md; upstream’s change to it is covered here, in the README, and in the skill. Upstream’s pixel fallback after a failed tree capture (pixelFallback) is ported (see Vision on act), and so are the point tools (see Point tools).
  • After a secret fill, ToHaveScreenshotAsync, the assertion screenshots, and the failure screenshot stay on, as upstream since 58a5cec. A model’s screenshots stay on too since 94e6e76 (#1437): the port has no pixel taint, so nothing is withheld after a fill. They mask secure fields only. ToHaveScreenshotAsync fails with POLICY_DENIED and keeps no screenshot when the engine masked fewer regions than the screen lists secure nodes, or does not say (EngineScreenshot.MaskedRegionCount is null), as upstream’s pixelsProvenMasked does. The failure screenshot applies the same condition, but leaves the image out of the report instead of failing.
  • The name is a string? and the options a ScreenshotOptions object, so an unknown option and a non-locator mask cannot be written.
  • Locator boxes inside an iframe are in the top-level viewport (past the frame’s border and padding), where they used to be relative to the frame, as upstream’s change for this feature does.
Setting Default Upstream
Test timeout (timeout) 120 s Same
launchTimeout 60 s Same
actionTimeout 30 s Same
assertionTimeout 5 s Same
cleanupTimeout 30 s Same
maxModelCalls 25 Same
maxSteps (actions per act) 25 Same
judgmentTimeout (assert, waitFor, extract) 30 s Same
waitFor interval 3 s. After the first judgment, the judge runs again only on a changed screen Same
act timeout 30 s (StepTimeout, .NET-only) The test timeout
Replay wait 15 s (ReplayTimeout, .NET-only) 15 s for the end route and the settling backoff; the end state then waits for the recorded endWaitMs
expect.poll timeout 5 s The assertion timeout

E2EDefaults holds these values, except the expect.poll timeout (PollOptions); E2EConfig, E2ESessionOptions, and E2ETest start from it.

A test failure’s message carries its causes as upstream’s messageWithCauses (ErrorSerializer.MessageWithCauses, internal/errors.ts, #1208): the inner exceptions follow the message, innermost last, a message already present is not repeated, an AggregateException lists its members once each, joined by ; (fetch failed: ECONNREFUSED; connect ECONNREFUSED ::1:3000), and a cause with an empty message contributes its code. Upstream’s docs and skill say nothing about the cause chain (messageWithCauses appears only in packages/e2e/src/internal/errors.ts and its test; the ECONNREFUSED mention in docs/reference/engine-protocol.mdx and the AggregateError mentions in docs/reference/runner.mdx are about other things), so SKILL.md and the guides do not change. Differences: .NET keeps a cause’s code in Exception.Data["code"] (an exception has no code property), the walk stops after an aggregate (its InnerException is only its first member, which the aggregate already lists), and upstream’s non-Error cause (outer: text) has no counterpart because an InnerException is always an Exception; ClassifyErrorTests.Partial_Appends_the_cause_chain_... is Partial_ for that reason.

A locator reports an engine failure as upstream’s translateLocatorError (LocatorEngine.TranslateLocatorError, over ErrorSerializer.TranslateEngineError, upstream’s translateEngineError, internal/errors.ts) does, with the engine error as InnerException and the locator’s description added to the message (#846): NOT_ACTIONABLE and ACTION_MAY_HAVE_COMMITTED are ACTION_FAILED, OPERATION_TIMEOUT is ACTION_FAILED (operation timed out: <locator>), NODE_STALE and FRAME_NOT_FOUND are LOCATOR_NOT_FOUND, FRAME_AMBIGUOUS is LOCATOR_AMBIGUOUS, and INVALID_STATE is APP_NOT_OPEN. CANCELLED is an EngineException of that code (operation cancelled), UNSUPPORTED_CAPABILITY is a ConfigurationException (category configuration), and ENGINE_FAILURE, any other engine code, and an error that is no e2e error are an EngineException ENGINE_FAILURE (category infrastructure), each with the original error as InnerException, as upstream’s translateEngineError wraps them (#885). A recorded fixture step maps the engine error it throws the same way (FixtureRecording.Translated, upstream’s translated in run/fixture-recording.ts), with in <api> <label> as the suffix, so a timeout reads operation timed out in browser.goto <url>, ... in browser.waitForResponse "foo.css", or ... in app.open /orders (#1068, #1120). It covers every Browser step, every App step, and the device fixture’s steps (EngineFixtureContext.RunOperationAsync, upstream’s FixtureRecorder.run); a Browser, App, or fixture outside a session runs the call bare, like the surface upstream’s engine tests call. Browser.OnDialogAsync and the download waits ask for the browser session inside their step, so an engine with no browser is a ConfigurationException there as in GotoAsync. A caller’s cancel on a web session is an EngineException CANCELLED (operation cancelled), as upstream; screen and locator steps keep their own mapping (translateLocatorError). Differences: an OperationCanceledException is returned as it is, so a caller’s cancel stays a cancel. The port applies the translation to the locator’s resolve (including the resolve over an observation) and to its actions; it has no read by reference to translate. LocatorEngine (Locator/LocatorEngine.cs, upstream’s locator/engine.ts, #994) owns the resolve, the retries, the deadlines, the engine events, and the operation context a call carries (OperationContext.Test); Screen and Locator pass it their query. Differences: its session is the set of calls in LocatorEngineOptions (.NET-only: the attempt reads the screen through its scope), a locate answers the nodes themselves so read, readNow, readAllNow, and tryRead read a resolve and have no session.read to go stale, fillSecret is not an engine method (a secret fill is an engine action); pressSequentially is LocatorEngine.PressSequentiallyAsync (#1159), and DeadlineFor is upstream’s deadline (Deadline is the type’s name). LocatorEngine/ ports the read retry, resolve retry, perform, readAllNow, reads that do not wait, translateLocatorError, visible queries, isNodeVisible, and locator failure candidate counts (LocatorFailureCandidateCountsTests) describes; not ported: the its that need session.read to go stale (read retry 1 to 3, read contract, readAllNow stale and failure, readNow stale between resolve and read), secret fill (no engine fillSecret), AttemptBudget.capped (no AttemptBudget), and the cross-realm describe (no second module registry in .NET). A filtered locator that matches nothing or too many lists the candidates each filter step left (tester-army/e2e#1416, 79e2e13d3365): LocatorExpression.FilterSpine() is filterSpine (locator/expression.ts), and LocatorEngine.CandidateCountsAsync is candidateCounts, read by NotFoundAsync (notFound in resolveCounted) and AmbiguousAsync (singleOf, which replaces assertSingle), one immediate resolve per prefix of the chain under one 500 ms budget (StepCountBudget, STEP_COUNT_BUDGET_MS; Deadline.Min is Deadline.min). A walk that cannot finish says walk stopped after N of M steps, a read that fails drops the list, and a cancel surfaces as cancellation. Differences: the port’s failure messages are its own (<locator> matched 0 nodes.), so the list follows on a new line (candidates left after each filter step, counted after the failure:) where upstream continues after ; . The five filterSpine its are in Expression/LocatorExpressionsTests. An action whose engine call finds a retryable stale node resolves the locator again and repeats the action while its deadline remains, as upstream’s performUntil does; an action that may have committed is never repeated. An action whose deadline passed before it was sent is not sent: it fails with ACTION_FAILED (operation timed out before the tap was sent: <locator>), as upstream’s lateAction (#869). Tests: LocatorEngine/TranslateLocatorErrorMappingTableTests (the translateLocatorError mapping table describe; the seven rows with the port’s codes are Partial_) and the perform its of LocatorEngine/LocatorEnginePerformContractTests. All six perform its are ported; marks every action it performs with the test origin runs on the LocatorEngine itself (ScriptedLocatorEngine, upstream’s makeEngine), and a .NET-only test checks that E2ESession wires that origin to the engine a test’s step reaches (OriginRecordingEngine).

  • locator.secondaryTap, longPress, hover, dragTo, and swipe (locator/screen.ts) are Locator.SecondaryTapAsync, LongPressAsync(LongPressOptions), HoverAsync, DragToAsync(Locator), and SwipeAsync(SwipeOptions), with the engine actions LocatorAction.SecondaryTap, LongPress, Hover, and DragTo beside the existing Swipe. tap, doubleTap, and secondaryTap take ClickOptions { Modifiers } (upstream’s ClickOptions, a subclass of ActionOptions); the ActionOptions overloads of TapAsync, ClickAsync, DoubleTapAsync, and DblClickAsync stay, so existing calls compile. Modifiers on an engine without EngineCapabilities.TapModifiers are UNSUPPORTED_CAPABILITY inside the step, before the node resolves; the step label ends with Shift, as upstream’s. longPress takes a whole number of milliseconds from 100 through 10000 (ArgumentOutOfRangeException, upstream’s INVALID_ARGUMENT). dragTo resolves the drop locator inside the retry (Locator.ResolveExactlyOneAsync, upstream’s resolveExactlyOne) and refuses a locator of another screen with INVALID_LOCATOR.
  • Engines: the web engine clicks right for secondaryTap, clicks with a delay for longPress (500 ms by default, upstream’s DEFAULT_LONG_PRESS_MS), hovers, and drags with the pointer (hover the source, press, hover the target, release; upstream uses Playwright’s dragTo when both sides are locators). The mobile engine maps longPress, hover, and dragTo onto the DeviceSession commands that already existed and refuses secondaryTap. The Windows engine maps all four onto its pointer inputs. The document engine refuses all four.
  • Declared kinds: each engine session declares the locator action kinds it takes (IEngineSession.ActionKinds, upstream’s session.actions, default all of EngineActionKinds.Locator, upstream’s LOCATOR_ACTION_KINDS) and the pointer kinds (PointerActionKinds, upstream’s session.pointerActions, default none). The screen refuses an undeclared kind with UNSUPPORTED_CAPABILITY before it resolves the node (Screen.CheckAction and CheckPointerAction, upstream’s checkAction and checkPointerAction). The web engine declares all eight pointer kinds, the mobile engine the kinds it maps, and the document engine only swipe, tap, and the other node actions it implements. PressSequentiallyAsync is checked as the focus kind and the Keyboard capability, as upstream’s pressSequentially is.
  • Pointer points: Screen.TapAtAsync(Point) and Screen.SwipeAsync(SwipePathOptions { From, To, Duration }) act at a viewport point with no locator (screen.tapAt and screen.swipe({ from, to })). Locator.TapAsync(TapOptions { Position }) taps the point of the node’s box the position names, measured from its top-left corner inside its border (SemanticNode.Origin, upstream’s origin: a document element’s padding box, or the unclipped corner of a box a frame clipped; the web page script reads it, WebEngine.PlaceBox keeps it through a frame, upstream’s placeBoxInFrame), after it scrolls the node into view and waits for a visible box (Locator.PerformWithinAsync, Screen.PerformAtAsync, DispatchAtAsync: upstream’s performWithin, performAt, dispatchAt). A point must be finite and nonnegative; a swipe Duration is a whole number of milliseconds from 16 through 10000. tap takes no modifiers together with a position, as upstream. The web engine rounds points to whole pixels and drags through a midpoint (WebEngine.DispatchPointerActionAsync, upstream’s dispatchPointerAction). A swipe in a direction at a point (PointerAction.Swipe) is a wheel gesture sized by the viewport. Screen.SwipeAsync(SwipeOptions) with a direction stays the viewport swipe. Upstream’s refusal of an unknown option key has no port: options are typed.
  • Tests: LocatorActionOptions/ ports locator-action-options.test.ts (the modifiers describe without its non-array and unserializable cases; the two longPress its; the verb theories for every verb the port has) and ScriptedActions/ the action kinds of scripted-actions.test.ts (with the selectOption object forms). FixtureRuntime/CoordinateInputTests ports ‘coordinate input’, SelectOptionShape/ the selectOption shape cases, Actions/DispatchPointerActionTests the dispatchPointerAction describe (the two paced cases and the render wait are Partial_: they read real time, not a fake clock), and LocatorEngine/LocatorEnginePerformContractTests the positioned-tap deadline case. .NET-only: PerformTests of the mobile and Windows engines run the new actions through PerformAsync. E2E.NUnit.Tests/Pointer/ ports all six its of the testbed’s pointer.e2e.ts: PointerTests the five outside the describe (tapAt, a tap and a click position, the hidden-node position tap, and the two path swipes) and RawPointerInputTests the raw mouse one.

E2EHost (OpenAsync, upstream’s openHost, run/open-session.ts) opens isolated per-test sessions for a runner of your own, and E2EHost.OpenSessionAsync is upstream’s host.openSession (#757). OpenHostOptions and OpenSessionOptions are upstream’s, with the members in C# casing: Cwd, Config, Target, Env, Headed, OnNotice, and Name, Timeout, Agent, OnStep. The signal of both is the CancellationToken argument. The session is E2ESession, which gains upstream’s hosted members: RunId, AttemptId (public now), Target, Fixtures, ArtifactsDir, TracePath, Steps(), and CloseAsync(). E2EHost.CloseAsync and both DisposeAsync are upstream’s close and [Symbol.asyncDispose]: close is idempotent and returns the failures, and disposal throws them as an AggregateException, even for one. Internal, upstream-named: SelectTarget.Select (selectTarget, select-target.ts), PublicOwnership.ReserveHostedRun (public-ownership.ts), and OpenSession.RedactOpening, RegisterStaticSecrets and LoadHostConfig (redactOpening, registerStaticSecrets, loadHostConfig).

Differences:

  • C# has no free function, so the type that openHost returns owns OpenAsync. A config file cannot hold a live engine, so OpenHostOptions.EngineFactory (.NET-only) builds the engine of the selected target (a web target gets a WebEngine by default), Config takes an E2EConfig value, and ConfigPath (.NET-only) takes the file, because C# has no string | object (passing both is INVALID_CONFIG). e2e.config.json still rejects engine.
  • Steps() returns E2E.Reports.ReportStep, and OnStep gets E2E.Reports.StepProgress (with StepProgressPhase, StepActivity and StepProgressIdentity), where upstream’s are StepRecord and StepProgress: the port keeps the recorder’s own records internal, and StepProgressWire (.NET-only) reads the public form from the report’s JSON, as ReportSerializer does for Report. ReportStep stands in for StepRecord.
  • CloseAsync returns IReadOnlyList<Exception> where upstream returns SerializedError[], which is internal here; E2EException.Code carries the code. It returns the soft assertion failure (one ASSERTION_FAILED), STEP_NOT_AWAITED (the recorder’s AbandonRunning; the session’s operations are then cancelled), and the cleanup failures the session’s disposal threw (the first, as E2ESession.DisposeAsync reports it).
  • The engine starts and is disposed for each session (the port’s IEngine.StartAsync is upstream’s worker init and startAttempt together), so the host’s close disposes nothing. A session whose cleanup failed (the engine’s dispose threw) makes the host refuse the next one with WORKER_PROTOCOL, as upstream does after a failed endAttempt; a soft failure or a step nobody awaited does not. Only hosted sessions do this: explore and mcp attempts keep their host usable.
  • ReserveHostedRun never fails: upstream’s only failure is a running suite, and the port has no suite runner (reserveSuiteRun is not ported).
  • TracePath is where the trace page is written when the session closes, whatever the trace mode, as upstream’s (the failure screen and the video still follow the trace and video modes). The page and Report() are HostTrace.WriteHostTraceAsync’s (upstream’s writeHostTrace, called from E2ESession.WriteTracePageAsync for a hosted session): a standalone page, with no report.json written and no retries joined. The attempt’s directory is <results>/<test>/attempt-1, where upstream’s is results/host/<segment>; two sessions with one name share it. A page that cannot be written leaves Report() null and tells stderr, where upstream records a cleanup failure in close(). A hosted session emits test-started, step, and test-finished on the process’s events like any session (see Run events); no run fixture is involved, so a host that subscribes (RunEvents.Subscribe is internal: only reporters of a run fixture can) gets them through its own OnStep.
  • Fixtures is the session’s TestContext; there is no test.extend, so no fixtures type argument.
  • Timeout is a TimeSpan?; zero, negative, or infinite is INVALID_CONFIG. An opening failure is rethrown as a fresh ConfigurationException, EngineException or E2EException with the redacted message and no inner exception or stack; a cancel stays an OperationCanceledException.
  • A config with several targets and no Target fails with TARGET_REQUIRED, through SelectTarget (upstream’s selectTarget). The MCP server uses it too, with pass target to open_session, or start e2e mcp --target <name>. Explore explores the first target, with upstream’s notice, when no --target names one. E2EConfig.Target (.NET-only) is the only target or throws TARGET_REQUIRED; MobileAppTest and WinAppTest read it, so they need a config with one target. An E2EFixture names its target by overriding TargetName.
  • A host’s sessions use the config’s cache and the target’s trace and video. E2E_DEBUG, E2E_AI_TRACE, and E2E_UPDATE_SNAPSHOTS are not read or settable on a host yet. artifacts.store and cache.store are the config’s ArtifactStore and Cache.Store (see below), which a host’s sessions use.
  • Tests: OpenSession/HostOpenSessionTests is describe('host.openSession') of open-session.test.ts: Opens_a_config_value_resolved_against_cwd_with_AsyncDisposable_sessions and Cancels_a_fixture_call_still_running_when_the_session_closes are whole; two are partial and renamed (Partial_Opens_the_target_with_its_fixtures_streams_steps_and_closes_each_owner_once: no gadget fixture, the port’s engine counts; Partial_Returns_cleanup_failures_from_close_and_throws_them_from_session_disposal: the engine counts). Needs_a_target_when_the_config_declares_several_and_opens_the_one_named is whole. .NET-only: OpenSession/SelectTargetTests, OpenSession/OpenHostTests (PublicOwnership and RedactOpening).
  • The e2e command-line tool apart from login, logout, models, guide, and mcp: the custom runner, [E2ETest] discovery, --grep, test.only, and the JSON report
  • @e2e-dev/mobile apart from its snapshot model and engine (see Mobile snapshot model and Mobile engine)
  • e2e upgrade, the update notice, e2e run --watch, e2e run --max-duration, e2e feedback, and upstream’s Claude and Codex plugins (plugins/e2e, .claude-plugin). The port has no runner, and ships its skill with npx skills add
  • The other upstream packages and what they do: see Upstream packages
  • Vision on act is ported (the point tools are in the next entry): the screenshot tool, a fresh screenshot after every action once the step shows pixels, the opening screenshot for a screen with nothing to tap, the Observation.TreeUnavailable look (upstream’s kind: 'pixels', asked for with ObserveOptions.PixelFallback), and the stale-screen and stale-screenshot elision of the request (TranscriptCompaction, upstream’s transcript-compaction.ts, tester-army/e2e#258 c553b61, #677). The built-in agent prints full screens, so a result carries the screen and the screenshot note, and the image rides a user turn after the tool results (ToolLoopResult.Pixels), where upstream’s rides the result. act takes no schema or vision option: ActOptions is typed, so upstream’s UNSUPPORTED_CAPABILITY for them cannot occur. The screen presenter of a session over MCP has no screenshot half. app.screenshot() is ported as App.ScreenshotAsync: see App and browser fixtures. Video is ported on the web engine and on MobileEngine with agent-device’s own recording: see Video. Vision on judgments is ported: see Agents. ToHaveScreenshotAsync is: see Visual comparison
  • Model reasoning on step events, #1196 (tester-army/e2e agent/executor.ts, agent/usage.ts): the reasoning a turn returns rides its model event as Reasoning, for an executor turn (ExecutorModelCall.Reasoning, set by ToolLoop and StepRecorder.AddModelCall) and for a judgment call alike, and the list reporter prints its excerpt (ListSteps). ModelResponse.ReasoningText is upstream’s StepResult.reasoningText: each provider fills it from the reasoning text it returned (Anthropic thinking blocks, Responses reasoning summaries, Gemini thought parts, Bedrock reasoningText, chat reasoning_content/reasoning), so an unsigned Anthropic thinking block shows in the report although it is never replayed. ModelUsage.ReasoningField is upstream’s reasoningField: the text is trimmed, redacted, and cut to ModelUsage.MaxReasoningChars (600, upstream’s MAX_REASONING_CHARS); a turn with no reasoning leaves the field out of the report. The AI trace keeps the full text. The port has no ModelCallTracker; ToolLoop and the judgment call pass ReasoningText on directly.
  • The dismiss_keyboard tool and the dismissKeyboard executor verb (#1014, tester-army/e2e f4be1c4): dismiss_keyboard in AgentTools.GrammarToolDefinitions (upstream’s dismiss_keyboard in createGrammarTools, agent/primitives.ts), run by ActTools; IExecutorActions.DismissKeyboardAsync and ExecutorVerb.DismissKeyboard (upstream’s dismissKeyboard of ExecutorActions and target.verbs), run by ActionDispatcher.DismissKeyboardAsync (upstream’s dismissKeyboard). The trace records dismissKeyboard (RecordedAction.Kind), Replay replays it as given, SettlePolicy settles it like a key, and ActionName.DismissKeyboard reports it to OnAction (upstream’s actions.ts summary is dismiss the keyboard). Upstream offers the verb when the engine defines the optional keyboard.dismiss hook; C# has no optional member to test, so IEngineSession.CanDismissKeyboard declares it (.NET-only, false by default, like CanLocate) and IEngineSession.DismissKeyboardAsync is the hook (a default member that refuses with UNSUPPORTED_CAPABILITY, so no engine breaks). DeviceSession is the one engine that says true, and its hook runs the dismissal under the keyboard dismiss input budget, as upstream’s keyboard.dismiss does. IExecutorActions.DismissKeyboardAsync is a default member that refuses with UNSUPPORTED_CAPABILITY (.NET-only), so a custom executor context written before it keeps compiling. A session over MCP lists dismiss_keyboard after back where the engine can dismiss, and it answers with the reason a test hides the keyboard only when it covers the next control instead of a test line (upstream’s test-lines.ts). Like upstream’s, the tool tells the model nothing about the keyboard leaving and does not expect a change. Not ported: the decision executor’s dismiss_keyboard (packages/decision, offered while keyboardVisible), which the port does not have. Tests: the keyboard lines of engine.test.ts’s verbs it are Engine/CreateEngineSessionTests.Partial_Derives_the_keyboard_and_pointer_verbs_from_the_declared_hooks (partial: the port has no createEngineSession or open verb, so it checks ActContext.VerbsOf); the dismiss_keyboard input of agent-grammar-tools.test.ts is checked in AgentGrammarTools/TheGrammarToolsHaveClosedSchemasTests (the port’s schemas are not closed); mcp-test-lines.test.ts in McpTestLines/SessionTestLinesTests; the dismissKeyboard of trace-replay.test.ts’s host in TraceReplay/TestHost; the keyboard dismiss row of the mobile engine.test.ts input-budget it now calls the engine’s hook (IEngineSession.DismissKeyboardAsync); and agent-act-pixel-tools.test.ts already checks that no dismiss_keyboard is offered without the hook.
  • The resize_viewport tool and the resize executor verb (#1035, tester-army/e2e#1524 cba5e0e): resize_viewport in AgentTools.GrammarToolDefinitions (upstream’s resize_viewport in createGrammarTools, agent/primitives.ts), run by ActTools with ExpectChange: false as upstream’s acting; IExecutorActions.ResizeAsync and ExecutorVerb.Resize (upstream’s resize of ExecutorActions and target.verbs), run by ActionDispatcher.ResizeAsync (upstream’s resize). The size is whole CSS pixels from 200 to 4096 per side (Geometry.ViewportLimits, upstream’s VIEWPORT_LIMITS; Geometry.RequireViewportSize, upstream’s requireViewportSize); a size outside them is INVALID_ARGUMENT and takes no action slot. The step’s viewport becomes the new size (upstream’s attachViewport, with scale 1). The trace records resize with its Size (RecordedAction.Size, upstream’s ResizeAction.size; an entry whose size is outside the limits is a miss), Replay replays it as given, Decide.OpensWithNavigate passes over a leading resize, SettlePolicy settles it like a scroll, and ActionName.Resize reports it to OnAction (summary resize the viewport to 390x844). Upstream offers the verb when the engine defines the optional session.resize hook; C# has no optional member to test, so EngineCapabilities.Resize declares it (.NET-only, as History is for session.back) and IEngineSession.ResizeAsync is the hook (a default member that refuses with UNSUPPORTED_CAPABILITY). WebEngine declares it and sets the viewport as Browser.SetViewportAsync does, then hands the trace the screen. IExecutorActions.ResizeAsync is a default member that refuses with UNSUPPORTED_CAPABILITY (.NET-only), so a custom executor context written before it keeps compiling. A session over MCP lists resize_viewport after back where the engine can resize, and answers with the reason set 390x844 with the engine fixture's viewport call instead of a test line. ExecutorObservation.Viewport (internal) is now set on the executor’s observation, as upstream’s viewport is. The document engine and the device engines do not resize, so the port’s tool list of the default-executor test (AgentActWithTheDefaultToolLoopAgentExecutorTests, which runs on the document engine) stays as it was. Not ported: the engine protocol’s session/resize method and the manifest schema (the port has no engine protocol, #873), the decision package’s test helper, and the engine.test.ts defineEngine key check (the port has no defineEngine). Tests: AgentActVerbs/ (the resize flow and its it; the engine-name line of the record-then-replay it is not ported, as the port’s replay records no engine events), AgentAct/AgentActResizeTests, AgentGrammarTools/TheGrammarToolsHaveClosedSchemasTests (partial: the port’s schemas are not closed), Engine/CreateEngineSessionTests, TraceCache/ (the leading resize in DecideTraceReplayTests; the limits in Trace1EntryTests), TraceRecorder/TraceRecorderTests (the recording, and the stored size check as a partial), TraceReplay/ReplayTraceTests, McpTestLines/SessionTestLinesTests, and the tool list and count in McpServer/E2EMcpTests.
  • Point tools (#632, tester-army/e2e#1284 90e6fb8, with drag_at of upstream main): tap_at, hover_at, drag_at, type_at, press_at, and select_at in AgentTools.CreatePointTools (upstream’s createPointTools and POINT_TOOLS, agent/primitives.ts), run by ActTools.PointToolAsync. A point is read off the latest screenshot (ScreenPresenter.LatestScreenshot, upstream’s latestScreenshot) and scaled by PointTap.ImagePointToViewport; PointTap.HitTest is hitTest, and DescribePointAction, DescribePointDrag, and DescribePointHit are upstream’s. The executor gets TapAtAsync, HoverAtAsync, DragAtAsync, and HitTestAsync (ActionDispatcher.Points.cs: pointVerb, pointDrag, hitTest); the bare point goes through IEngineSession.PerformAtAsync when the engine declares the pointer kind (tap, hover, dragTo), else a tap acts on the control by id. The trace records tapAt, hoverAt, and dragAt with the point, the viewport (RecordedAction.Viewport), and the place inside the node under it (RecordedAction.Under, RecordedPointPlace: upstream’s within); Replay.PlacePoint and PlaceWithin are placePoint and placeWithin, and a viewport of another size hands off with viewport-changed. hover_at and drag_at are offered when the engine takes the bare point or lists the node verb (hover, dragTo in ActionKinds), as upstream’s POINT_VERBS pairing decides; on an engine without the bare point a hover acts on the listed control by id, and a drag between points on two different listed controls is joined by id (ActionDispatcher.DragOntoAsync, upstream’s dragOnto, shared with the drag verb), while a drag inside one control or from a point on nothing listed is UNSUPPORTED_CAPABILITY. Differences: a port tree lists the page’s top-level nodes with no root for the page, so a point inside a named top-level node is placed in it, where upstream skips its root; there is no twin position among look-alikes (the port records none), so an ambiguous place hands off; the failure lead of a point tool carries the error code (select_at (30, 30) failed: ACTION_FAILED: ...), where upstream’s code-less error reads without one; the replay of a recorded point emits no step engine event, as no other replayed verb does. Tests: AgentPointTap/ (the 12 its of agent-point-tap, one partial), TraceReplay/ReplayTraceBarePointTapsTests and ReplayTraceBarePointDragsTests (the bare-point hover it of replayTrace is in ReplayTraceTests), TraceRecorder/TraceRecorderBarePointTapsTests and TraceRecorderBarePointDragsTests (the eight its of trace-recorder.test.ts, all Partial_: the port records no summary (hardkoded/e2e-dotnet#1283) and no truncation flag (#1187), and its typed entry cannot hold a field of the wrong JSON type; TraceRecorder.Record(kind, PlacedPoint, viewport) and Record(from, to, viewport) are upstream’s record of a point action, with PlacedPoint and the recorder’s withinOf; a stored place whose fx or fy is outside 0 to 1 is a miss, as upstream’s isFraction), and the point its of AgentActPixelTools/ and AgentTraceCache/ on the canvas and repeats pages. AgentActPixelTools/ has all the its of agent-act-pixel-tools; AgentActVerbs/ has the repeated press its and the bare-point hover of agent-act-verbs. Keyboard (#632, IEngineSession.TypeTextAsync, upstream’s keyboard.type, with PressAsync for keys): ActionDispatcher.TypeTextAsync and PressKeyAsync are upstream’s typeText and pressKey, recorded as typeText (Value, Replace) and pressKey (Key) and replayed by Replay (ReplayHost’s ActReplayHost.TypeTextAsync and PressKeyAsync). type_at and press_at on a point on nothing listed tap it to focus it and go through the keyboard (ActTools.FocusAtAsync, upstream’s focusAt); a listed input under the point is filled by id, and a node the engine cannot fill takes the value through the keyboard (ActTools.TypeIntoNodeAsync, upstream’s typeIntoNode, TypedThroughKeyboard). A fill with no target types into the focused field. Differences: the port’s tool is fill, where upstream’s is type, so the descriptions say fill; IEngineSession.TypeTextAsync is a default member that refuses with UNSUPPORTED_CAPABILITY (an engine that declares Keyboard implements it; the default keeps custom engines compiling); the options of typeText are TypeTextOptions (C# has no inline types); dismissKeyboard is not ported (#1014). The press tool takes times (AgentTools.MaxPressTimes, upstream’s MAX_PRESS_TIMES, 20): the first press goes to the node and the rest to the focused field through PressKeyAsync, one action each. The repaint report (#1012, screen-update.ts at f4be1c4): once the step shows pixels, the built-in agent compares each fresh screenshot with the one the model held (ScreenPresenter.Attach returns upstream’s PixelEvidence, the digest of the image bytes, as pixelDigest does) and the listing with the one it read (by the shape AgentObservation.Shape gives). A listing that stood still under a moved screenshot opens the screen with listed nodes unchanged; the screenshot changed. Read the effect off the image ..., and one that stood still under the same image after an action that should have changed it says had no visible effect (ScreenPresenter.RenderUnchanged, upstream’s renderUnchanged). With no listed control to act on, no control is blamed. Point verbs expect a change by default, as upstream’s acting, except type_at on a node typed through the keyboard. The note replaces the screen as upstream’s does; the none and unavailable texts are the presenter’s. Reports_a_moved_screenshot_under_an_unchanged_listing_and_blames_the_control_only_when_the_image_stood_still_too is a whole port: the first miss reads as the changed #n status "Hit" ... diff line.
  • Upstream’s docs site pages that have no counterpart in the port: the page objects page (docs/page-objects.mdx, moved to /page-object-model in d30114a), e2e feedback and the docs/reference/cli.mdx text about its opt-out variables (4c1e2e8), and examples/ with its registry (b3ae3a4, 38b802d, a29edcb, b54646f). The migration guides (docs/migrate/*.mdx, 8537abc) are ported: see Migration guides. The docs site has .NET-only guides for upstream’s five example apps of caf51eb (tester-army/e2e#1497: i18n, file upload, location, biometrics, deep links), under Examples. They are not ports: that commit only adds registry entries that link to separate repositories, so there was no guide text. Each page writes C# tests for the upstream app. The self-healing deep dive (6fa99ea) is ported as the Self-healing tests section of the guide, since the port has no docs pages for the cache, the trace page, or executors to link to. Known gap: only e2e explore prints a run summary, since it is the one command that feeds a run to ListReporter (see List reporter): the Cache 4 replayed · 1 handed off · 1 missed row is Format.CacheText over Format.StepsCacheTally (E2E.Cli, upstream’s cacheText and stepsCacheTally of report/format.ts), which an exploration, with its cache off, never fills, and a test run does not print (#799)
  • Parallel workers and serial suites
  • test.fail and the fail test option (tester-army/e2e#1539, 732ea8a): a test expected to fail, whose product failure passes and whose pass fails with UNEXPECTED_PASS. It lives in upstream’s test registry, scheduler, retry, and reporters (settleExpectedFailure runs on a finished attempt), and the port has none of them. NUnit and xUnit v3 own the verdict and the retries, and neither has an expected-failure outcome, so a port would need a new public API of its own
  • Playwright’s page tests in the testbed suite (tester-army/e2e#1505, bdf769b) are ported in slices (hardkoded/e2e-dotnet#1060), as the playwright category of tests/E2E.NUnit.Tests, against the playground’s /content route and Playwright’s test assets (Apache-2.0, Testbed/playwright/, with Playwright’s LICENSE and NOTICE). A test upstream marks { fail: 'reason' } keeps its assertions inside the test-only Helpers.ExpectedToFailAsync, which passes while the body fails and fails once it passes. Ported so far: check, wait-for-url, locator-list, selectors-text, fill, select-option, set-input-files, filechooser, click, click-scroll, elementhandle-scroll-into-view, and keyboard. Upstream’s select-option test marked fail (a bare string selects by label only) passes in the port, which matches a value or a label, so it has no marker. A missing file reports .NET’s Could not find file, where upstream shows Node’s ENOENT.
  • Serial groups (upstream tester-army/e2e#1056, #1470): serial runs, group retries, and skipping the rest of a group after a failure belong to the test runner, which is NUnit or xUnit here, so the port keeps no serial groups. The schema has serialAttempt.cutRetry and the serial verdict is read from it, but nothing in the port writes a serial attempt: see Report document
  • The out-of-process engine protocol (upstream tester-army/e2e#1232, #873): the port has no runner and no worker pool, so there is no engine process to talk to. An engine is written in .NET against IEngine
  • Telemetry
  • Engine docs, ported in part (tester-army/e2e docs/writing-an-engine.mdx and docs/reference/engine.mdx, #1205): written as docs-site/src/content/docs/docs/writing-an-engine.mdx and reference/engine.mdx, in the port’s IEngine and IEngineSession. Upstream’s defineEngine, validateApp, workers, reuseSignal, engine-declared secrets, contributed fixtures with requires, the shared helpers (parseKey, resolveExpression, pollCondition, and the rest), and the engine protocol have no public port; the pages say so in a “Not in the port” section. The agent’s verbs follow the engine’s action kinds only for the pointer verbs (tracked in #1278); the helpers and validateApp are tracked in #1279. Upstream’s skills/e2e/references has no engine page, so skills/e2e-dotnet has none either.
  • Errors page, ported in part (tester-army/e2e docs/reference/errors.mdx and skills/e2e/references/debugging.md, f185ca8, #1203): docs-site/src/content/docs/reference/errors.mdx lists the exit codes, every agent code the port raises (AUTHENTICATION_FAILED and STEP_NO_CONCLUSION included, from AgentError.CategoryByCode), and the session codes (SESSION_MISMATCH, SESSION_EXPIRED, SESSION_INVALID, SESSION_UNAVAILABLE, SESSION_CONTRACT), and the debugging guide’s code table has a row for each. Not in the port: ONLY_IN_CI (the selection step checks for a focused test in CI, but NUnit and xUnit have no test.only, so no public path sets one) and RUNNER_BUSY (no suite runner and no run_tests tool; the iOS device layer’s RUNNER_BUSY is another code). The runner codes of features the port lacks (CONFIG_*, WORKER_*, TEST_TIMEOUT, the e2e mcp session codes) have no row.
  • STEP_NOT_AWAITED, the error that fails a test body, hook, or fixture teardown that returns before its expect.poll finished, and cancels that poll. The step recorder has AbandonRunning and records a step the test did not await as STEP_NOT_AWAITED, but no fixture calls it, only a hosted session’s E2ESession.CloseAsync (see Hosted sessions), and expect.poll is not a step. Nothing cancels a poll the test does not await, so it keeps reading until its timeout or the CancellationToken passed to it. The compiler warns (CS4014) only for a bare, un-awaited Task call in an async method
  • toMatchSchema of the value expectations: there is no Standard Schema in .NET. Validate with the schema library of your choice, then check the result with Expect.That(...). Value expectations are otherwise ported: see Value expectations
  • The built-in junit, json, and markdown reporters and the onEvent hook. The GitHub pull request comment is ported in part: see GitHub reporter. The reporter seam is ported in part: see Reporters. The trace page is ported in part: see Trace page

The tests of upstream commits adcfc2ba, c9445ce6, a13e119c, 1731e0d8, fe2c3450, and 5b6a731e that the port does not run, and why. The tests that follow upstream are in the PRs #517 (adcfc2ba, c9445ce6), #521 (a13e119c), #516 (fe2c3450), #510 and #511 (5b6a731e). 1731e0d8 changed nothing the port has.

Ported in part (the test name carries Partial_ or a PARTIAL suffix):

  • keeps the first verdict: a later complete_step cannot turn a failure into a pass and refuses a blocked verdict without a blocking error code and leaves the step open for a real one: the loop’s own done keeps no state and sends no result text (the public VerdictTool does both, see Agents), so the tests check what the loop does instead (the step outcome, the model-call count, and the text of the rejections) and not the verdict result text upstream reads
  • replays the typing, hands off at the renamed button, and tells the model what already ran (Partial_Hands_off_at_the_renamed_button_after_the_typing_and_tells_the_model_what_already_ran): the port does not check that the entry the lenient run leaves keeps the renamed button’s old name, because it rewrites the entry after a hand-off
  • refuses $sink before reading the plaintext: the port has no plaintext resolver to count reads and records no policy decisions
  • never sends a secret value to the model: runs on a scripted model, not a real one
  • diverges with target-not-found when relocation never matches: no observations == 9 check, because the port retries every 20 ms up to ReplayTimeout
  • masks a password inside an iframe in artifact screenshots and observed pixels: the port has one screenshot path
  • pins the id of a non-ASCII title path and rejects an empty name, or an empty, repeated, or blank-entry agent list at registration: a .NET test has one title, and [Agent] takes one name
  • uses CI defaults for retries, workers, trace, and video: the port has no workers, and its trace default is deliberate (see Defaults)
  • refuses both spellings side by side, and an explicit path that does not exist: the port has one config file name and throws INVALID_CONFIG
  • refuses another screen's locator or a non-locator before any engine call (locator-union): Or(Locator) is typed, so only the other screen’s locator can be refused

Not ported, because the feature is not in the port:

  • No live window (ListReporter is ported in part: see List reporter); no JUnit report renderer or summary.md writer (the Markdown page is ported: see Trace page); no serial groups, workers, shards, runner, e2e run, or e2e list; no JavaScript config loader; no test.extend; no telemetry; no wordmark; no projectId; no runWithRetries: the report-list tests apart from those named under List reporter, report-junit, report-markdown, cli-run, cli-boot, config-load, parallel-workers, extended-fixtures, telemetry-*, wordmark, project id of target-identity, and retry tests, and the three report-status tests about the last attempt of a serial group
  • The four toMatchSchema its of expect-values (no Standard Schema); the toMatch rejects a predicate, toMatch gives the same answer on every test of a global or sticky regexp, and compares a non-index key on an array its of expect-values cannot happen (ToMatch is typed, a .NET Regex keeps no lastIndex, and an array has no named keys); the waitForResponse, route, and unroute predicate tests and the an option ... does not take is refused tests cannot happen, because C# overloads are typed
  • No withStallGuard or realmSlot: the tool-loop-stall and realm-slot tests
  • The streak guard (#632, see Point tools): the pixel-evidence messages of agent-screen-update, and act-validation’s names schema and vision as capabilities act does not have (ActOptions cannot carry them). Judgments (assert, waitFor, extract) do not ask for the pixel fallback
  • No module-error explainer (diagnose), no defineEngine (binds validateApp, prepare, finish, and fixture factories to the spec)
  • No stalled-reader pixel fallback in semantic-fallback (#1230): the eight its of the unit describe('semantic capture fallback') and reserves capture time and takes fresh masked pixels are not ported; keeps abandoned reader IDs distinct from new nodes, frames, and located refs is Partial_ (no abandoned reader; a located ref is the observation’s own, so the check that it differs from a fresh id is dropped). No handle-owning capture in observation-capture (#1231): its seven unit its (the stalled-stage theory, the budget its, the cancelled mask probe, the concurrent publish order, and the replaced page) are not ported
  • The MCP config has no project tools: the three mcp-server and mcp-session-host tests about several targets and project tools, which need a custom engine handle in the config. The declared-verbs part is covered by SessionHostTests.Catalogs_only_the_verbs_the_engine_declares
  • No --trace flag or retry runner, so the trace-modes test (records retries only under on-all-retries, --trace wins) cannot run. No runner or report, so the report-schema parts of trace-cache-replay cannot run either. The record-then-replay describe of trace-cache-replay (TraceCacheReplay/TraceCacheEveryFlowRecordsOnTheFirstRunAndReplaysWithoutAModelOnTheSecondTests) runs each flow as a session over the real web engine and one cache directory (FlowsApp is the fixture app’s pages, TraceCacheFlows is helpers/trace-cache.ts). passes every flow on both runs and reports both in the schema is Partial_ (no report to validate), and replays every step on the second run with zero model calls is Partial_ (the replayed step’s explanation is Replayed recorded actions., not upstream’s zero-turn summary: #1281)

Left for other work:

  • detectVcs and the error stacks test: covered by #496

tests/unit/ids.test.ts (#1153) ports to tests/E2E.Tests/Ids/. Ids.ValidateTitle is validateTitle and Ids.Uuidv7 is uuidv7 (internal/ids.ts); nothing in src/ calls ValidateTitle yet. ResultIdTests pins upstream’s bytes through Ids.ResultId. TestIdsTests has two Partial_ tests, since a .NET test has one title and not a title path (AttemptReport.TestId is testId); prefixes setup IDs is not ported (no setupTestId, no setup tests), and drops undefined object members of canonicalJson is not ported (a JsonNode has no undefined).

Upstream’s --debug prints the run’s phase timings and a table of agent steps on stderr, and keeps each planned step’s transcript. A test run has no --debug flag, so the .NET-only variable E2E_DEBUG=1 (or true) stands in for it, and a fixture can override the Debug property. e2e explore --debug is the flag itself (ExploreOptions.Debug; the variable turns it on too). E2ESessionOptions.Debug carries it to the session.

  • DebugTrace (internal, Internal/DebugTrace.cs) is upstream’s internal/debug.ts: Record, Time (async, rethrows), Summary, and the static Table and FormatMs. It has Off for a caller that has no trace. It has no Drain and no Merge, because the port prints per test and has no worker channel to ship a snapshot over. debug.test.ts is Debug/DebugTraceTests.
  • The phases are session.launch (the engine’s start), test.body (from the start of the session until Complete or dispose), session.close (the engine’s disposal), and the agent’s agent.observe, agent.model, and agent.action (Phases, internal; upstream agent/phases.ts, where instrumentPhase also records step events). agent.cache is declared upstream and used nowhere, so the port omits it. Upstream also has config.load, engine.prepare, engine.init, app.start(...), collect, and scheduler: the port has no such phase, because it has no runner, no app process, and no engine prepare step.
  • The table is written to stderr when each session is released, once per test, where upstream prints one table for the run. The title is the same, [e2e debug] phase timings (wall ...).
  • The agent step table is DebugSteps.AgentStepTable (internal, Report/DebugSteps.cs), upstream’s agentStepTable in report/debug-steps.ts: one row per agent step in execution order, with the step’s time, the time in its model, observe, and action events, its model calls, tokens in and out, the share the provider served from its prompt cache, and its cost. A via column appears when the steps named several models. It is written to stderr after the phase table when each session is released, from that session’s step records (upstream takes the run’s results and serial groups). Differences: StepModelInfo has no provenance (endpoint, adapterVersion, policyVersion), and IAgentModel.Name spells provider and model together, so a step’s label is that name alone unless an executor reports a provider. The model column sums the step’s Model events, one per model call (StepRecorder.AddModelCall). The observe and action columns sum the step’s Observation and Engine events (see Trace page). cached and cost read - unless the provider or an executor reports them in ExecutorModelCall. Every built-in provider returns the cache read tokens (and the write tokens, where it has them) in ModelCallUsage, and ToolLoop and the agent’s own loop (Agent.cs) pass them on. The AI trace still writes only the input and output tokens. Bedrock and Anthropic report the cached tokens apart from the input tokens, so the port adds them back into InputTokens, as the AI SDK does (convertAmazonBedrockUsage: total: inputTokens + cacheReadTokens + cacheWriteTokens), and upstream’s ModelUsage.record reads that total. Google counts the cached tokens inside promptTokenCount already. The OpenRouter cost is the field upstream’s readCost reads (metadata?.['openrouter']?.['usage'], then cost). A count that is negative or not whole is dropped, as upstream’s tokenCount does. Only an OpenAI-compatible endpoint reports a cost, and only when it sends usage.cost, as OpenRouter does. Upstream’s readCost also reads the AI Gateway metadata; the port has no gateway. debug-steps.test.ts is DebugSteps/AgentStepTableTests (both it; the first is partial: the port has no serial groups, so its third step is a second attempt’s). .NET-only: ModelCallUsage (the per-call usage a model returns, in ModelResponse.Usage; upstream reads the AI SDK’s usage object; a breaking rename of the port’s former public ModelUsage, whose name is now upstream’s accumulator, see Model usage), the agent step table case of SessionDebugTests, ModelCallUsageTests and Provider_usage_carries_the_cache_split_and_the_cost_when_reported.
  • An executor’s AttachTranscript text is kept as transcript-<n>.txt only under debug. .NET-only: SessionDebugTests, and the debug-on and debug-off cases of AttachedTranscriptTests.

Upstream’s --ai-trace writes every model call of the run to <output>/ai-trace.json, in the AI SDK devtools shape ({ runs[], steps[] }) that npx unbox-ai reads. One run is one agent step, and one step is one model round trip. A test run has no --ai-trace flag, so the .NET-only variable E2E_AI_TRACE=1 (or true) stands in for it, a fixture can override the AiTrace property, e2e explore --ai-trace is the flag itself (ExploreOptions.AiTrace; the variable turns it on too), and E2ESessionOptions.AiTrace carries it to the session.

  • AiTraceRecorder, AiTraceCollector, AiTraceScope, AiTraceRun, AiTraceStep, AiTraceDocument, withAiTraceScope and withAiTraceStep (as AiTraceScopes.WithAiTraceScope and WithAiTraceStep), and stringify (as AiTrace.Stringify) are upstream’s internal/ai-trace.ts (all internal, Internal/AiTrace.cs). The recorder keeps upstream’s rules: a run per step, a nested run per tool, steps numbered without collisions, the prompt as sent with the system prompt in front, and inline media replaced by [binary N bytes omitted]. Its drain is Drain(all).
  • Upstream’s recorder is an AI SDK telemetry integration, so registerAiTraceRecorder and dispose’s removal from the SDK’s list have no port. The recorder’s onStart, onStepStart, onLanguageModelCallStart, onLanguageModelCallEnd, onStepEnd, onEnd, onError, and executeTool are methods (OnStart, …), and AiTraceModel.CompleteAsync (.NET-only, Agent/AiTraceModel.cs) fires them around each model call. Both places that ask a model for a turn, the tool loop and the judgment path, go through it, so a custom executor with a model of its own is traced too. A custom executor that calls a provider directly is not seen. Upstream’s AI SDK keeps a generation open while its tools run, so a generation a tool starts is a child of the step that called it. The tool loop does the same: AiTraceModel.BeginAsync leaves the step and the generation open, the loop runs every tool of the turn through ExecuteTool (via the .NET-only AiTraceTurn.ExecuteToolAsync), and the step ends (OnStepEnd, OnEnd) after the tools ran. A path that has no tools (the judgment path) still ends the generation as soon as the model answers. No tool of the port starts a model call today, so the link only shows when a custom tool does.
  • The scope comes from StepRecorder, as upstream’s steps.ts does: each step enters the attempt’s scope and narrows it to its api and label. The attempt’s scope is built by the session (the test title is also its TestId). The port has no worker, so there is no drain over a channel: the session drains its recorder when it is released, the process adds it to one AiTraceCollector per file, and it rewrites the file at most every 2 seconds and when it exits.
  • The file is ai-trace-<process id>.json next to the results directory (.e2e/ by default), not ai-trace.json. A test run can use several processes (one per test project), and each rewrites only its own file. Open it with npx unbox-ai <file>.
  • What the model sees is redacted by the same redactor as the request, and the trace redacts it again on the way in: text, tool arguments, the response, and a failure message. Screenshots are byte counts. The port’s ModelCallUsage has the cache read and write tokens but no inputTokenDetails object, so usage has no inputTokenDetails. The response has no id. provider is the model class without Model, such as Anthropic.
  • A tool call’s provider metadata (ModelToolCall.ProviderMetadata, #1310) is traced as the SDK holds it: providerMetadata on the tool-call part of the step’s content, and providerOptions on the same part in the prompt and in response.messages. Every string in it is redacted. The step end’s own providerMetadata (StepResult.providerMetadata) is ModelResponse.ProviderMetadata (#1348), traced as providerMetadata of the step’s output, redacted the same way, and left out when the provider attached none. Differences: only OpenAiCompatibleModel fills it, and only with the billed cost the response reports (usage.cost): { "gateway": { "cost": "<n>" } } for the gateway provider and { "openrouter": { "usage": { "cost": <n> } } } for openrouter, the two shapes upstream’s readCost reads. The AI SDK’s other providers also report fields here (such as Anthropic’s usage and cacheCreationInputTokens, OpenAI’s responseId, Google’s usageMetadata), which the port’s providers do not fill (#1329, follow-up #1348).
  • Tests: ai-trace.test.ts is AiTrace/ (13 of 14; “registers through the SDK loader and tolerates a missing SDK” is skipped, since there is no SDK; “records the status and the body of a provider error the SDK could not parse” goes through OpenAiCompatibleModel and expects the port’s The model provider failed: HTTP 400: ... message). ai-trace-media.test.ts is AiTraceMedia/ (3 of 3). agent-ai-trace.test.ts is AgentAiTrace/ (2 of 3, partial: the model is the port’s ScriptedModel, so the model id is scripted and the provider Scripted, and there is no run outcome, so the test reads the file; “–ai-trace on child-process workers” is skipped, since the port has no workers). .NET-only: AiTraceModelTests (redaction, screenshots, concurrent tests, a tool call’s provider metadata).

The packages in tester-army/e2e at the target commit, and what the port has:

Upstream Status Notes
e2e (packages/e2e) Ported in part Everything under Ported and the sections after it. The runner, the built-in reporters, e2e run, e2e upgrade, and telemetry are not ported: see Not ported. The hosted session (e2e/runner’s openHost) is ported in part: see Hosted sessions
@e2e-dev/web Ported WebEngine in E2E: see Web engine
@e2e-dev/mobile Ported in part E2E.Mobile: see Mobile snapshot model, Mobile engine, and, for the /lease subpath, BrowserStack
@e2e-dev/eas Ported E2E.Expo: see Expo Simulators
@e2e-dev/limrun Ported E2E.Limrun: see Limrun
@e2e-dev/browserstack Ported E2E.BrowserStack, with the lease helper in E2E.Mobile: see BrowserStack
@e2e-dev/acp Ported E2E.Acp: see ACP, with the differences listed there
@e2e-dev/kernel Ported E2E.Kernel: see Kernel
@e2e-dev/testmu Not ported A mobile device provider for TestMu AI, through agent-device. E2E.TestMu.Mobile serves the same devices with Appium: see TestMu mobile, and what still differs
@e2e-dev/decision Not ported decisionFilter (see Test filters, where the filter seam it plugs into is ported) and a decision-model executor: a model that picks one action from a grammar (taps, points, vision). The port has the executor seam (IStepExecutor, see Agents) but no such executor
@e2e-dev/smol Not ported A browser provider that runs each browser and the app in a branchable smol machines microVM. The port has the provider seam (IBrowserProvider, see Web engine) but no such provider
@e2e-dev/lightpanda Not ported A browser provider for the Lightpanda headless browser. Upstream added it on 2026-10-15 (b41afa2), after the earlier target. The engine drives Chromium only
@e2e-dev/github Ported in part E2E.GitHub, GitHubReporter: a reporter that posts the run as a pull request comment. It folds a --last-failed rerun into the run it selected from (merge.ts): see GitHub reporter

A config that selects a decision model or smol cannot be written in e2e.config.json, and it fails at load with INVALID_CONFIG instead of being ignored (E2EConfig):

  • Decision models are an executor. Upstream takes executor: decision(...) in agents.<name>. The port rejects the key with config key "executor" is not supported by the .NET port: an executor is code, so set AgentOptions.Executor. A custom executor in code works, but the port ships no decision executor. provider accepts only the names in Models, so a provider of decision is rejected with the list of valid names.
  • smol is a browser provider on the target (web({ browser: smol() })). The target accepts name, platform, app, trace, and video. A browser key is rejected as an unknown target key, and an engine key as not supported by the .NET port. To use a provider, set WebEngineOptions.Browser in the fixture’s CreateEngine. The port ships KernelProvider and TestMuBrowsers there, and none for smol.

Expect.That(value, message) is upstream’s expect(value, message?) (packages/e2e/src/expect/values.ts, #1248): ToBe, ToEqual, ToMatchObject, ToBeTruthy, ToBeFalsy, ToBeNull, ToBeUndefined, ToBeDefined, ToHaveLength, ToHaveProperty, ToContain, ToMatch, ToBeGreaterThan, ToBeGreaterThanOrEqual, ToBeLessThan, ToBeLessThanOrEqual, and ToBeCloseTo, with Not and the message opening every failure. The failure is an ASSERTION_FAILED TestException. Expect.Soft(screen, value, message) is expect.soft(value, message?). Expect.Any, Anything, ObjectContaining, ArrayContaining, StringContaining, and StringMatching are the asymmetric matchers. What differs:

  • undefined is Expect.Undefined (#1368, .NET-only: C# has no undefined, so a test passes this value). null is only null: ToBeNull takes null alone, ToBeUndefined takes Expect.Undefined alone, ToBeDefined takes everything but Expect.Undefined (so null is defined, as upstream), and a failure reads undefined for it. ToEqual ignores a member that holds Expect.Undefined, as upstream ignores an undefined property (ToMatchObject does not), and Expect.Anything() matches neither null nor Expect.Undefined. Code that read a missing .NET value as undefined (Expect.That(text).ToBeUndefined() on a null string) now fails: use ToBeNull.
  • Values compare by structure, whatever their class: a record equals an object (or a string-keyed dictionary) with its property names; an IDictionary is a Map, an ISet<T> a Set, and any other IEnumerable an array. A number is read as JavaScript reads it (NaN equals NaN, 0 is not -0, and an int equals a double of the same value). ToHaveProperty reads a public property or field by its name, in any case when the exact case finds nothing, and a string’s Length and characters. The JavaScript-only values (Symbol, a sparse array, a primitive’s wrapper methods) are not read (#1369).
  • Expect.Any(typeof(int)) reads in a failure as Any<Int32>. Any of a number type matches every number type.
  • Expect.Soft(screen, value) takes the screen that names the session, where upstream’s expect.soft(value) finds the running attempt on its own. There is no soft ToMatchSchema.
  • ToMatch takes a string (a substring) or a Regex; expect.poll keeps its own matchers (ToBeAsync, ToSatisfyAsync, and ToMatchAsync with an NUnit constraint on E2E.NUnit).

Skill text: start near the screen, fix from the trace page

Section titled “Skill text: start near the screen, fix from the trace page”

skills/e2e-dotnet ports upstream’s 74c2b73 (#1311, start each test near the screen it covers) and c5e3248 (#1309, “Workflow: fixing a failed test”). Differences:

  • The port has no test.extend fixture, and its saved sessions are NUnit and xUnit v3 only (see Session store), so “Start near the screen under test” names [E2ESetup] and [E2ESession] and otherwise signs in and seeds data in the framework’s per-test setup (NUnit [SetUp], xUnit v3 InitializeAsync) with an HttpClient, and Browser.SetCookiesAsync hands the cookies to the browser. On a device it is Device.OpenLinkAsync.
  • The test runner prints the exception, not upstream’s failure block, so the port has no ❯ at, ❯ on screen, or ❯ trace lines. The skill points to the exception’s Code, message, and Details, and to the trace page’s ## Screen at failure (its URL and Closest to what the locator asked for). The trace page, ## Screen at failure, and screen-at-failure.txt exist as upstream.
  • Expect.Soft, Values.Unique, App.OpenAsync, and Device.OpenLinkAsync stand in for expect.soft, unique, app.open, and device.openLink. In CI the cache is read-only unless the config sets a mode (E2EConfig), where upstream’s default records nothing there. Upstream’s core-concepts.mdx and coding-agents.mdx have no counterpart.
  • Upstream’s ci/norrix.mdx has no counterpart: Norrix runs the Node e2e run command on a build machine, which the port’s test projects cannot do. The NativeScript testID note of mobile.mdx is in docs-site/src/content/docs/get-started/mobile.mdx. Both come from tester-army/e2e#1567 (commit 65ebc7d).

Upstream’s 4982d8d (#1333) documents that the browser engine’s semantic tree leaves out the content of a frame from another site, so agent steps there need browser.frameLocator and vision, and an agent.act whose only change is in that frame records no replay. The port does not take the text, because the behavior does not exist here: the web engine reads every iframe’s document through Playwright, same-origin or cross-origin, and puts it under the iframe node (see Web engine), so the agent sees and acts on that content. Browser.FrameLocator exists, and it resolves over that same tree. The changes to skills/e2e-dotnet/references/{agent,debugging,writing-tests}.md and docs/ are skipped because the behavior they warn about does not exist here.

skills/create-verification-skill/ ports upstream’s skill of the same name (commit d85702a2, feat(skills): create-verification-skill generates a verify-<app> skill on e2e (#981)). Like upstream, it is not bundled in E2E.Cli and e2e guide does not read it; install it with npx skills add hardkoded/e2e-dotnet --skill create-verification-skill. Differences:

  • The steps use what the port has. The launch is the target’s app.command or the app started by hand, the doctor is a smoke test run with dotnet test --filter, and the evidence is the dotnet test result and the test’s own checks, since the port writes no report or trace page, and a video only when video is on.
  • The generated bug bash fan-out is ported (see Bug bash). A feature’s charters are slug|target|agent|charter lines, as upstream’s, and step 4 of the skill runs one with e2e explore. Only the --session part of a signed-in charter is dropped: a charter that starts signed in names its credential, because the port has no saved sessions.
  • Not ported: npx e2e init as the setup step (the port’s e2e init scaffolds the test project too: see Coding agents), e2e list as a config check, --output for proofs, and the .gitignore line for .e2e/proof/. The generated skill adds .e2e/bugbash/ to .gitignore, as upstream’s does.
  • The example under references/example/ is verify-todomvc for samples/TodoMvc, in place of verify-playground for upstream’s apps/testbed, which the port does not have. It has three features (adding, completing, filtering), not the playground’s three (todos, forms, login).
  • Upstream added no tests for this skill, so none are ported.

skills/migrate-to-e2e/ ports upstream’s third skill (e6885dc, feat(skills): add migrate-to-e2e (#1109), and 6609428). Install it with npx skills add hardkoded/e2e-dotnet --skill migrate-to-e2e; like upstream, it is not bundled in E2E.Cli. Differences:

  • The source runners are Playwright .NET, Selenium .NET, and Appium, with upstream’s Node ones (Playwright, Cypress, Detox, Maestro) kept. The e2e side is an NUnit or xUnit v3 test project run with dotnet test, in place of e2e.config.ts, *.e2e.ts files, npx e2e init (the port’s e2e init creates the test project), e2e run --repeat-each 3, and e2e list.
  • The migration guides are ported: see Migration guides. The skill reads the guide for the source runner first, as upstream’s does. The TesterArmy section of SKILL.md keeps its inlined MCP commands and agent-call names in C#, and points to the testerarmy guide’s “Port the project” and “Map each step” tables. The hand-over offers an issue at hardkoded/e2e-dotnet in place of e2e feedback.
  • Not ported: the plugin copy (plugins/e2e/skills/migrate-to-e2e), since the port has no plugin; the AGENTS.md and CONTRIBUTING.md lines about it map to CONTRIBUTING.md here.
  • Upstream added no tests for this skill, so none are ported.
  • docs-site/src/content/docs/coding-agents.mdx ports upstream’s docs/coding-agents.mdx for the commands the port has.

docs-site/src/content/docs/migrate/ ports upstream’s docs/migrate/*.mdx (index, playwright, selenium, cypress, detox, maestro, testerarmy) as read at 7b1b8b27 (8537abc7, tester-army/e2e#1441; b81b7d75, tester-army/e2e#1411; d52e9b01, tester-army/e2e#1468; a60310f9, tester-army/e2e#1508; f6d0679f, tester-army/e2e#1361). They keep upstream’s file names, headings, and order. Each guide’s tables use the port’s C# names, and the sidebar has a Migrate group. Differences:

  • The playwright guide maps Playwright for .NET (PageTest, ContextOptions(), Page.GetByRole(AriaRole...)), where upstream maps Node Playwright. Playwright .NET has no playwright.config.ts, so the config tables map BrowserNewContextOptions, .runsettings, and the environment variables instead of testDir, webServer, projects, and reporter. The selenium guide maps Selenium for .NET, where upstream’s example is Java. The cypress, detox, maestro, and testerarmy guides keep their source runners and write the target in C#, in a new .NET test project beside the old suite.
  • Every code sample has an NUnit form, and an xUnit v3 form where the two differ. A short NUnit and xUnit table in the overview replaces upstream’s test, describe, hook, tag, and retry names.
  • Upstream’s SetupPrompt card (a copyable prompt) is a text block named “Agent prompt”. The prompts use e2e init --yes, e2e guide, e2e login, and dotnet test --filter in place of npx e2e init --yes, npx e2e guide, npx e2e login, and npx e2e run.
  • Upstream’s CardGroup and Card components are lists of links, and AccordionGroup is a heading for each table.
  • No counterpart in the port, marked missing or by design in the tables: e2e run and e2e list (use dotnet test), the tests, workers, output, --shard, --watch, --changed-since, --repeat-each, --max-failures, and --update-snapshots flags and keys (the framework owns selection, retries, and parallelism; --last-failed is the E2E_LAST_FAILED variable and the LastFailed member of the run fixture, see Test filters), describe options (serial, skip, retries, timeout), test.extend fixtures and base.extend page objects as fixtures (a page object takes Screen and Browser in a [SetUp] or InitializeAsync), several targets in one run (the port runs one), the HTML and markdown run summaries, unique() as a free function (Values.Unique), credentials entries for TOTP (secrets hold values, not code), and the inbox credential. A row names a feature with Not yet where the port has a symbol missing from its locator set, such as the tap position, TapAt, and the screen-level Swipe.
  • The detox, maestro, and testerarmy rows that use ToHaveScreenshotAsync on a device say the port documents the matcher for the web engine only. Nothing in the port runs it on a device.
  • The prompt’s step to port .detoxrc.js and config.yaml into one device target relies on E2E_MOBILE_PLATFORM and E2E_MOBILE_APP_PATH to switch between iOS and Android, since e2e.config.json holds one target (see MobileAppTest).
  • The snippets were written against the port’s public API and compiled by reading, not run. The docs site build checks the pages, not the C#.
  • No tests: upstream added none for these pages, and no src/ symbol changed.

Upstream’s bug bash (skills/e2e/references/bug-bash.md, last changed in 94e6e765 and b292019b, tester-army/e2e#1139, at 7b1b8b27; docs/bug-bash.mdx, 71bbb23e) is a procedure for a coding agent, not a runner feature. The “bug-bash config” is a file the agent writes in the user’s project, and the “fan-out” is a shell loop of xargs -P 4 e2e explore. Nothing in src/ backs either, so the port is the guide topic bug-bash (skills/e2e-dotnet/references/bug-bash.md) and the docs page Bug bashes. Differences:

  • The config is e2e.bugbash.config.json. The port’s config is JSON, so it cannot spread the project’s config (...base), cannot import a gateway(...) model, and is a copy with the keys a bug bash changes: a target without app.command, credentials, and the three agents (default, skeptic, fuzzer) with maxSteps and maxModelCalls of 40, a context, and a system. An agent inherits nothing from default, so each repeats the model and the context. The credentials leave the password to E2E_USER_<NAME>_PASSWORD.
  • There is no tests key. The repro tests live in the test project’s BugBash folder, tagged bugbash ([Category("bugbash")] or [Trait("TestCategory", "bugbash")]), and dotnet test --filter "TestCategory!=bugbash" replaces e2e run --exclude-tag bugbash. A repro test runs with dotnet test --filter "FullyQualifiedName~BugBash.<Class>".
  • e2e explore --output <dir> puts report.json beside <dir>, so the fan-out passes --output .e2e/bugbash/<slug>/results. --reporter exits 2, so there is no summary.md; the log holds the Findings. --session exits 2: a charter that needs an account names its credential and the explorer signs in with fill_secret.
  • The docs page drops upstream’s demo video, ShowMore, and CodeGroup blocks (one package manager, dotnet), and the card links to pages the docs site does not have. e2e list is not ported, so no command checks e2e.bugbash.config.json.

e2e init is ported (upstream packages/e2e/src/cli/init.ts and init/*.ts at f4be1c45; Init and E2E.Cli/Init/*). It scaffolds e2e.config.json, a test project, installs the skill into .agents/skills/e2e-dotnet (and .claude/skills/e2e-dotnet, a symlink to it when both are chosen), registers the MCP server in .mcp.json, .cursor/mcp.json, and .codex/config.toml (TOML, edited in place with Tomlyn so comments and other settings stay; Codex loads it only in a trusted project), and appends bin/, obj/, and the .e2e/ outputs to .gitignore. It never overwrites an existing config, refreshes a damaged or stale skill copy, merges into an MCP file without touching other servers, settings, or its indentation, and does not write through a symlink (a linked skill directory, a linked MCP file, or a linked parent is reported and skipped). Flags are upstream’s --yes, --engine, --gateway, --endpoint, --skills, --mcp, --example, --install, and --no-install, and the .NET-only --framework. Differences:

  • The prompts are hand-rolled on the console (ConsolePrompts, in place of clack’s multiselect, select, text, and confirm): a numbered list, a reply of numbers or names, Enter for the default, q or the end of the input to cancel. Every flag skips its question, and --yes takes the default of each question left. Without a terminal and without --yes, a run exits 2. The wizard asks the engines, the gateway (and the endpoint of openai-compatible), the skill locations, and the MCP locations; asks to replace a symlinked skill directory with a copy or a link (declined by default, never under --yes); shows the plan and asks to apply it. Cancelling a question, or declining the plan, writes nothing and exits 0. Unlike upstream, the gateway question does not say it adds AI SDK v7, and the engines question says that none gives the default target, since the port has no packages to add and no HTTP-only tests.
  • The project file and the example test stand in for upstream’s package.json and tests/example.e2e.ts. A directory with no .csproj gets <DirectoryName>.csproj with the packages of the framework (E2E and E2E.NUnit, or E2E.XUnit.V3; E2E.Mobile.* for the mobile engine) at the CLI’s version (a stable x.y.z becomes the NuGet range [x.y.z,x.(y+1).0), a prerelease is pinned exactly, and a version-less build uses 0.*), and an ExampleTests.cs. A directory with one .csproj gets only the references it lacks, and its formatting is kept; several .csproj files exit 2. NUnit is the default, since the get-started pages lead with it; --framework xunit picks xUnit v3, and an existing project keeps the framework it uses. The web example opens APP_URL and checks that Browser.Locator("body") is visible, as upstream’s example does.
  • --install runs dotnet restore (upstream runs the package manager), with a 10-minute limit; the question asks “Install dependencies with dotnet restore?” and --yes answers no. There is no browser install step: the Playwright browsers install on first run, as the web guide says. A failed restore exits 2 after the files are written.
  • --example takes the folder name of a sample under samples/ (E2E.Sample, E2E.XUnit.V3.Sample, TodoMvc; upstream’s list is its example apps). It downloads the GitHub tarball of the tag v<version> and falls back to main, extracts the folder with System.Formats.Tar (upstream has its own tar reader), turns each ProjectReference into a PackageReference at the CLI’s version, and sets the target framework. The ExamplePreset has an id and a hint only; upstream’s project, script, and build fields have no use here.
  • Not ported: the wordmark, continueWith (upstream’s e2e explore hand-off), the addScripts step (test:e2e), the package-manager detection, and the tsconfig.json note. The closing line is Next: [cd <directory>, then ][e2e login <provider>, then ]dotnet test.
  • The config is JSON. agents.default names a provider, a model, and system, where upstream writes the import and construction of an AI SDK model; the gateway vercel is provider gateway. A subscription gateway names the sign-in as the next step, as upstream does. The openai-compatible gateway writes baseUrl. There is no comment above the model, since JSON has none.
  • --engine takes web or mobile (iOS on macOS, Android elsewhere), and one of them: the port’s scaffold writes one target (e2e.config.json accepts several, by hand). none writes no targets, which keeps the default web target.
  • The .gitignore entries are the paths the port writes: bin/ and obj/ (in place of node_modules/), .e2e/results/, .e2e/cache/, .e2e/report.json, and .e2e/ai-trace-*.json. The .e2e/cache/ note about committing replays is not printed, since the docs site has no such page.
  • The skill is e2e-dotnet, and the MCP entry is {"command": "e2e", "args": ["mcp"]} (the installed tool, where upstream’s is npx e2e mcp). An MCP entry upstream would call current is rewritten once here when it still says npx.
  • Codex’s .codex/config.toml is read and edited with Tomlyn (CodexConfig, upstream’s codex-config.ts, which uses toml-eslint-parser). Like upstream it replaces or inserts only command and args and keeps comments, line endings, and other settings; ToJson, Parse, KeyParts, KeyText, and KeyValuesOf are .NET-only helpers over the Tomlyn tree, and ServerCommand, ServerArgs, and IsToml in McpConfig stand in for upstream’s SERVER_ENTRY. Upstream’s integration it that starts the server from the generated Codex config through npx with an offline npm cache is ported as a partial test: it starts the server from the generated entry with an e2e shim on the PATH and lists the tools, without network access. The port has no npm and no npm cache, so that part has no counterpart. Tomlyn 2 parses TOML 1.1, where upstream’s parser is pinned to 1.0, so a .codex/config.toml using 1.1-only syntax is accepted here. Known difference kept from upstream: when .codex/config.toml has no mcp_servers and begins directly with a table header (for example [features] on the first line), the launch keys are appended inside the last table, because upstream’s setLaunchValue (codex-config.ts, if (offset === 0) offset = text.length) cannot tell a first table at offset 0 from a missing newline. The result is valid TOML, but Codex does not see the server; put a comment or a root key above the first table.
  • On Windows without the symlink privilege, the link from .claude/skills is written as a copy with a warning. Upstream uses a junction.
  • .NET-only symbols: Frameworks, FrameworkPreset, and InitOptions.Framework (the choice between NUnit and xUnit v3; upstream has one runner), InitOptions.RunInstall and InitOptions.ExampleHandler (test seams in place of mocking the package manager and the download), Init.ProjectNameOf, Init.RootNamespaceOf, and Init.RestoreAsync (the project name, namespace, and restore of a .NET project), PackageProject (the .csproj read and written in place of package.json), ExampleDownloadError and ExampleCopyCancelled (typed errors in place of upstream’s thrown Errors), WatchedStream (the 30-second idle limit on the download), InitLog (the plain lines in place of clack’s log), InitOptions.ReadSkillFiles and InitOptions.Windows (test seams in place of mocking readSkillFiles and os.platform), Engines.GetEnginePresets(darwin) (the same seam), InitFlags.Parse (the flags are parsed by hand in place of commander), InitResult and InitRunOutcome (upstream’s strings and InitOutcome, without telemetry), and Skill.MissingSkillMessage.
  • Ported tests are under tests/E2E.Cli.Tests/CliInit (upstream cli-init.test.ts, both files), CliGuide (installs the skill into both agent directories with init --yes of cli-guide.test.ts) and InitGateways (init-gateways.test.ts). The ported its that run only in part carry the prefix Partial_ and say what they leave out. InitVersions (init-versions.test.ts, as DependencyRangeTests) and InitExamples (init-examples.test.ts, over a built tarball). Not ported: the its of integration/cli-init.test.ts that load the generated project and run it (“runs the generated browser example against any page without a model key” and the engine-less and two-target loads: the port has no in-process project loader, so a generated project was built and run by hand), and every it of cli-init.test.ts that needs a prompt, continueWith, two targets, or the TypeScript scaffold; the list is on E2eInitTests and the other classes of that folder.

The port installs the skill with npx skills add hardkoded/e2e-dotnet and registers the MCP server with claude mcp add e2e -- e2e mcp when e2e init is not used. The bug-bash config and its fan-out are ported: see Bug bash.

E2E.Mobile.NUnit.MobileAppTest and E2E.Mobile.XUnit.V3.MobileAppTest derive from E2ETest and make a device test one using and one config file. Upstream declares a device in e2e.config.ts and its runner owns the engine and the hosted device. The port’s adapters do, so these classes do it. Every symbol here is .NET-only. Differences:

  • e2e.config.json accepts "platform": "ios" and "android". A device target takes app.bundleId and app.appPath, as upstream’s app. It takes app.command and app.readyUrl too (see Config), and app.identity, app.environment, app.launchArguments, and app.permissions. MobileTargetEngine, MobileAppTest, and WinAppTest hand launchArguments and permissions to the engine’s app (MobileApp.LaunchArguments and Permissions, which every fresh launch applies); a permission name that DevicePermission does not know is INVALID_CONFIG (upstream’s assertPermissions). A Windows target takes launchArguments but not permissions. A web target takes identity, environment, and permissions (grant only): the session grants them on every context of the attempt (upstream’s web validatePermissions in permissions.ts and the context grant in surface.ts), through E2ESessionOptions.Permissions and EngineStartOptions.Permissions. The names are checked when the attempt starts, with the browser the engine runs (a provider or Connect takes Chromium’s), where upstream checks at config load in validateApp. WebEngine.ValidateApp(AppConfig, targetName) is upstream’s web validateApp (device keys refused, app.url required, app.permissions checked for the engine’s browser, Chromium’s names for a provider), and the target-app.test.ts tests port in full against it. The port’s config load does not call it: a web target without app.url still loads, since the fixture supplies the URL. The port still runs one target.
  • E2E_MOBILE_PLATFORM and E2E_MOBILE_APP_PATH win over the config, so one project can run on iOS and Android. E2E_MOBILE_DEVICE, E2E_MOBILE_PROVIDER (local, limrun, devflow), E2E_DEVFLOW_PORT, and E2E_DEVFLOW_APP are .NET-only.
  • A hosted run leases one device on the first fixture and releases it when the process ends, because the adapters have no hook after the last test. A killed process is covered by the provider’s hard timeout (15 minutes for Limrun).
  • MobileAppHost is one source file, compiled into both packages. HostedDeviceProviders (the provider each E2E_MOBILE_PROVIDER name makes) is a second, compiled into both packages and into E2E.Cli. CreateMobileOptions, AppId, AppPath, Platform, and AttachesToRunningApp are the members a test project overrides or reads.

E2E.Mobile ports the pure logic of @e2e-dev/mobile: the projection of an agent-device accessibility snapshot onto SemanticNode (SnapshotProjection), locator expressions and agent-device selectors over it (DeviceLocator, AgentDeviceSelector), error translation (DeviceErrors), links, screenshot masking, and the shared helpers (DeviceSupport). The client, pool, provider, and engine are in Mobile engine. Differences:

  • agent-device is a Node package. AgentDeviceError stands in for its AppError, and AgentDeviceSelector reads the selector grammar of parseSelectorChain and applies the term rules of listSelectorChainMatches to the raw nodes, for the target’s platform (the keys id, role, text, label, value, appname, windowtitle, and the flags visible, hidden, editable, selected, focused, enabled, hittable).
  • An AMBIGUOUS_MATCH failure (several devices match and no selector narrows it) keeps agent-device’s message, code, details, and hint, and DeviceErrors adds one sentence to the text: Set MobileOptions.Device to a device id, or boot exactly one device. Upstream adds nothing. AmbiguousMatchTests covers it and has no upstream counterpart.
  • SemanticNode.States holds plain booleans, so it cannot tell an unchecked switch from a node with no checked state. ProjectedNode.States keeps the states the platform reported, and ProjectedNode.Selector keeps the id= hint upstream puts on the node.
  • A filter with hasText honors the exactness of its text pattern, as upstream’s matchesText does. Locator.Filter(TextMatch) is a substring match (upstream’s toTextPattern(hasText, { exact: false })), so a locator test sees no difference. TextMatch holds no exactness, so the expression carries it: LocatorExpression.HasTextExact (.NET-only; default false) makes HasText equal the text, as upstream’s exact('About') does in locate.test.ts. HasNotTextExact is the same for HasNotText. A Regex ignores it. The core resolver (Screen) reads it too.
  • A role query has no hidden state. Role queries skip hidden nodes, as upstream’s do.
  • Link parsing reads a URL with System.Uri, after the whitespace rules a browser applies.
  • MaskPng decodes with ImageOps.DecodePng like the rest of the port, so it reads gray, gray with alpha, RGB, and 16-bit PNGs as 8-bit RGBA and refuses a PNG with no end chunk (ImageOps.DecodePng walks the chunks to a whole IEND, which Skia would not insist on), as upstream’s parser does (tester-army/e2e#1587, 34ccc5f).

MobileEngine ports engine.ts, options.ts, bindings.ts, pool.ts, provider.ts, surface.ts, actions.ts, device.ts, and tools.ts. It implements IEngine and declares every capability, video included. DeviceSession is the surface, DeviceActions (the IDeviceActions the engine uses by default) turns a node and an action into commands, Device is the device fixture, and MobileTools is the agent tool pack. The eas, limrun, and browserstack providers are ported (see Expo Simulators, Limrun, and BrowserStack); a provider’s own recording (DeviceProvider.record) is IDeviceProvider.RecordAsync (see Provider recording). Differences:

  • agent-device is a Node program. IDeviceClient stands in for upstream’s createAgentDeviceClient: a call is namespace.method with an options object, as upstream’s client names them. AgentDeviceRpcClient implements it over the daemon’s HTTP JSON-RPC 2.0 (POST /rpc, method agent_device.command, GET /health). The wire format was read from agent-device 0.21.22’s code and checked against a running 0.21.22 daemon for devices, boot, close, session_list, prepare, and snapshot. A running 0.21.25 daemon was checked for GET /health (protocol 2) and session_list. A running 0.21.29 daemon answered GET /health (protocol 2, version 0.21.29), session_list, and devices in the same envelope, and its daemon.json still carries httpPort, token, and version (it adds capabilities and plugins, which the client ignores). The 0.21.26 to 0.21.29 release notes list no change to the RPC envelope or to the commands the engine sends; the changes that touch the engine are in its commands (a coordinate fill that names no text input is refused on iOS, a find focus match behind the visible keyboard is refused, an alert dismiss picks a listed decline, and a delayed launch confirmation is surfaced), and none of them was exercised on a device. The 0.21.30 to 0.21.35 release notes likewise list no change to the RPC envelope or to the commands the engine sends (they add gesture and hardware-button commands the engine does not use, a typed reason on apps and logs refusals, a 404 for an expired resource id, and iOS and Android snapshot and fill fixes, an unscoped boot that picks the newest of several shut-down devices, and an iOS return press with nothing focused that keeps the runner session). The 0.21.36 release notes likewise list no change to the RPC envelope or to the commands the engine sends (they fix provider lease recovery and release in the daemon, a blind iOS fill-point lookup, iOS snapshots past 64 accessibility levels, and Safari and SpringBoard alert prompts); a 0.21.36 daemon started on macOS and answered session list through agent-device’s own CLI, but the port’s RPC client was not run against it; no 0.21.35 daemon was reached from the Windows host this was read on, where a daemon does not start (0.21.29 fails the same way). It is not a documented protocol, so the version is pinned (AgentDeviceVersion.Pinned) and the client checks rpcProtocolVersion and the daemon version. DeviceCommands turns each call into a command, positionals, and flags. The calls the engine makes today are covered. A call it does not know is refused.
  • A local daemon needs Node 22.12 or newer. The first call starts it the way agent-device’s own CLI does (npx --yes agent-device@0.21.36 session list --json, with AGENT_DEVICE_DAEMON_TRANSPORT=http), in the state directory ~/.agent-device/e2e-dotnet, and it keeps running after the command. E2E_AGENT_DEVICE_BIN names an agent-device.mjs to run in place of npx. A missing Node, a Node that is too old, an agent-device that does not start, and a daemon of another version fail with INVALID_CONFIG and the recovery. Starting a daemon on Windows is not verified.
  • MobileOptions carries the app (App: bundle id, build path, launch arguments, permissions), the target name, and the device choice as three properties (Device, Devices, Provider; at most one), because the port has no target config for a device yet. Permission names and states are enums, so an unknown one cannot be typed; a cast number still can, and Device.SetPermissionAsync refuses it with INVALID_ARGUMENT before any device command (upstream’s assertPermission in surface.ts: the unknown key message with the nearest name, and the must be one of grant, deny, reset message). Upstream’s typo hint (camra), undefined state, and non-string name have no enum counterpart; the port test Partial_Refuses_a_setPermission_name_or_state_it_does_not_know_before_any_device_command_and_still_sends_a_valid_one checks the cast-number cases only. Settle and SettleMilliseconds stand in for settle: number | false.
  • The core engine contract has no prepare, finish, init, or worker slot. MobileEngine.PrepareAsync and FinishAsync take their own info records, and StartAsync(MobileStartInfo) starts the worker of one slot. StartAsync(EngineStartOptions) starts slot 0 of the target. Bindings travel from prepare to a worker through MobilePrepareResult.Env, as upstream’s environment variable does. In one process the pool also keeps them.
  • app.open() is OpenAsync: it launches the pinned app fresh. A deep link or any absolute URL is refused. EngineStartOptions.BaseUrl is refused as upstream refuses app.url.
  • DeviceSession.BackAsync(OperationContext, CancellationToken) settles for the agent and not for a test, as upstream’s back(operation) does. Device.BackAsync (the fixture) is a test’s step too: it runs with the test origin and does not settle, as upstream’s device.back does.
  • The core session has no attempt hooks, pixel observations, or artifact directory. So DeviceSession is one attempt (it registers on the engine until it closes), and ScreenshotAsync returns the masked, status-bar-normalized PNG for toHaveScreenshot instead of writing numbered files. A secure field that cannot be masked still withholds the image with ENGINE_FAILURE.
  • DeviceSession.LocateAsync(LocatorExpression, TimeSpan timeout, CancellationToken) is upstream’s locate (surface.ts), so a locator or Expect on a device resolves in the engine. It snapshots with interactiveOnly: false, runs DeviceLocator.ResolveExpression, and binds the matches in a separate map capped at 2048 (the oldest goes first; an older ref is NODE_STALE). It hands the capture it matched against to EngineStartOptions.Screen, and tells EngineStartOptions.Environment the platform and device once, when the session starts. Differences: timeout is the budget left (upstream’s operation.timeoutMs), since the core session has no operation context; the expression is one flat record (LocatorExpression) where upstream’s is a union of query, filter, index, union, selector, and frame; and the port’s refs carry no revision, so upstream’s rejectSupersededLocate has no port (a device mints a new id for every projection, so a later locate never reuses a ref). Core retries a retryable EngineException of a locate until the wait’s deadline, as resolveOnce does.
  • Upstream’s operation budget for reads (fix(mobile): bound reads by the operation budget, 57f9ed9, tester-army/e2e#1464) is ported for the snapshots a locate and a keyboard dismissal take. InputBudget.ReadAsync (upstream’s read) runs a snapshot with what is left of the budget, and InputBudget.Remaining is remainingMs. A locate runs under a budget of its own timeout (DeviceSession.InputBudget(label, timeout), upstream’s inputBudget(label, timeoutMs)), so a device that stops answering fails the locate with OPERATION_TIMEOUT, which a locator reports as ACTION_FAILED, where it held the step until the test timeout. A sparse capture’s retry the budget cannot fit returns the sparse capture, and a capture the budget abandoned is not taken again. A relocation before an action, and the snapshots of the keyboard dismissal, run under the input’s budget. device.dismissKeyboard now has a budget too (actionTimeout), as upstream’s has. The observation and the screenshots are bounded too (#892). IEngineSession.ObserveAsync(TimeSpan timeout, CancellationToken) and ScreenshotAsync(TimeSpan timeout, CancellationToken) carry upstream’s operation.timeoutMs (a public API change, like LocateAsync’s timeout): they have a default that drops the budget and calls the overload without it, so an engine that bounds nothing keeps compiling (.NET-only). DeviceSession overrides them. ObserveAsync runs its snapshot and its viewport probe under one InputBudget('observe'), ScreenshotAsync its snapshot and its capture under one InputBudget('screenshot'), so a device that stops answering fails with OPERATION_TIMEOUT and the screenshot cannot take a fresh budget. The core callers pass what they have: Screen.TreeAsync its timeout, a locator resolve over an observation and ToHaveScreenshotAsync the budget of the read window. Calls with no timeout (the agent’s looks, failure evidence, ObserveAsync(CancellationToken)) get ActionTimeout. IDeviceActions.ScreenshotAsync(DeviceSession, TimeSpan, CancellationToken) takes the timeout too; the overload without it stays, and the one with it defaults to it (.NET-only), so a caller-provided MobileEngine.Actions that defines only the old member keeps compiling. An infinite timeout (Screen.TreeAsync with none) gives an InputBudget that never expires and bounds no wait (.NET-only: upstream’s budgets are numbers of milliseconds). ScreenshotArtifactAsync(label, TimeSpan timeout, ct) is artifacts.screenshot(label, operation); the overload without a timeout runs under ActionTimeout. IEngineSession.ObserveAsync(ObserveOptions? options, TimeSpan timeout, ct) is upstream’s observe(operation, { pixels, comparable }) (ObserveOptions { Pixels, Comparable } is EngineObserveOptions; a public API change). With Pixels, Observation.Pixels (an EngineScreenshot: upstream’s pixels and maskedRegionCount) carries the screen’s image, with every secure field covered and the status bar normalized when Comparable; the default drops the options and returns the tree alone (.NET-only), as an engine that takes none does. DeviceSession.CapturePixelsAsync is capturePixels: it takes the screenshot under the observation’s budget, rethrows OPERATION_TIMEOUT, and costs the observation its image (not the step) for any other failure or a secure field it cannot prove covered. The agent still takes its screenshot through Capture, so ObservationFeed does not use Observation.Pixels yet. A read the caller cancels is CANCELLED (InputBudget.ReadAsync), as the command reports it. The InputBudget parameter of SnapshotAsync and SnapshotOrEmptyAsync stays nullable, where upstream’s is required. Tests, in Engine/ObservationTests: ‘bounds screenshot by operation budget’, ‘rethrows OPERATION_TIMEOUT from capturePixels during observe’, ‘shares one budget across observe steps so screenshot cannot take a fresh budget’, ‘captures pixels on request, masks every secure node, and degrades to tree-only when it cannot’, and ‘holds the status bar in a fixed state for a screenshot taken for comparison, and only then’ and ‘withholds the pixels of a screen with a secure field when the image cannot be read or decoded’ (now run through ObserveAsync with Pixels). Tests: in Engine/ObservationTests, ‘bounds a snapshot by the operation budget’, ‘returns a sparse capture when the budget cannot fit a retry, instead of timing out’, ‘bounds the snapshots of a keyboard dismissal by its budget, and reports one cut off after the drag as possibly committed’, ‘lets a slow snapshot run for the whole timeout the locate gets’, and ‘takes no second snapshot for a capture the budget abandoned’; in Support/SupportHelpersTests, ‘runs a read with what is left of its budget, and reports one cut off after an input as possibly committed’. These run on real timers of a few hundred milliseconds.
  • Upstream’s Android locate (fix(mobile): keep locator polling through unreadable android snapshots, 4fe6baf) is ported. A snapshot agent-device cannot read yet (details.androidSnapshotHelperFailureReason of empty-helper-output, system-window-only, or content-poor-app-window, the message Android snapshot helper returned insufficient foreground app content) matches nothing in a locate, so a locator or Expect keeps polling until its wait runs out, and a locate whose capture leaves no budget fails with ENGINE_FAILURE and that message. DeviceErrors.IsUnreadableCapture reads the reason off the AgentDeviceError that the translated EngineException keeps as its InnerException. An observation, such as the agent’s next turn, still fails on it at once, as upstream’s.
  • Upstream’s iOS locate (2b2b845, tester-army/e2e#1281) is ported. Just after OpenAppAsync, RestartAsync or OpenLinkAsync, a snapshot that iOS refuses with details.runnerErrorCode of APP_NOT_RUNNING (DeviceErrors.IsAppNotRunning) matches nothing in a locate (locator waits and Expect only; an observation still fails at once), like an unreadable Android capture, until a snapshot succeeds (DeviceSession._launching, upstream’s launching). A wait that runs out while the app is still down fails with ENGINE_FAILURE and that reason. An app that exits after its first readable screen still fails at once.
  • Upstream’s Android test id match without the <package>:id/ prefix (feat(mobile): match Android test ids without their package prefix, 2791786) is in DeviceLocator, which DeviceSession.LocateAsync now calls, so Screen.GetByTestId("greet") matches <package>:id/greet on Android when nothing matches the full id.
  • The run and the attempt reach the engine (tester-army/e2e OperationContext.runId and attemptId, engine/contract.ts; #1293): E2ESession mints the attempt id before the engine starts and hands it, with the run id, to EngineStartOptions.AttemptId and EngineStartOptions.RunId (upstream’s EngineAttemptContext.runId and attemptId); EngineSession (the adapter, upstream’s createEngineSession) stamps OperationContext.RunId and OperationContext.AttemptId on the context of every call that takes one (PerformAsync, PerformAtAsync, SwipeAsync, BackAsync, ResizeAsync). .NET-only: the two are init properties with an empty default on the record (OperationContext.Test and Agent are shared values, so they hold none, and a context built before the ids existed still compiles). Not ported: the calls that take no context (OpenAsync, ObserveAsync, PressAsync and the rest) carry no ids, nor signal or timeoutMs (#1366, #1235); EngineContract/RunnerEngineContractTests.Partial_Threads_a_consistent_live_OperationContext_through_every_engine_call is partial for that reason.
  • Who acts is OperationContext.Origin (upstream’s operation.origin, contract.ts): a test’s step is OperationContext.Test, the agent OperationContext.Agent. The agent settles after each action. A test never settles and waits out a transition (TransitionMilliseconds) for a control that arrived with the last action. DeviceSession implements the overloads with a context (PerformAsync, PerformAtAsync, SwipeAsync, BackAsync) and IDeviceActions has the same default members for PerformAsync and SwipeAsync. DeviceSession.Origin and ActionOrigin shipped in v0.8.0, so they stay as [Obsolete] for one release: DeviceSession.Origin only decides the members that carry no context (default agent), and ActionOrigin is OperationOrigin. The fixture methods LongPressAsync, HoverAsync, DragToAsync, and SwipeAsync(node, direction, momentum) are a test’s own steps, so they never settle (they did, by default, before). Real test steps run through the Screen, which now passes the test origin, so on a device they stop settling, as upstream’s do. The core LocatorAction has no long press, hover, drag, or swipe momentum, so LongPressAsync, HoverAsync, DragToAsync, and SwipeAsync(node, direction, momentum) are methods of DeviceSession. PointerAction and Point moved to the core E2E.Engine namespace (upstream’s PointerAction), and DeviceSession.PerformAtAsync(point, PointerAction) is the engine contract’s IEngineSession.PerformAtAsync; the mobile session declares ActionKinds and PointerActionKinds for the kinds it takes. ScrollIntoView and Select are UNSUPPORTED_CAPABILITY.
  • Upstream’s mobile ref generations (fix(mobile): pin each action's ref to the snapshot it came from, eeacc8a, tester-army/e2e#1413, and fix(mobile): reject stale refs after transition refresh, 4af1aa8, tester-army/e2e#1300) are ported. RawSnapshot.RefsGeneration (upstream RawSnapshot.refsGeneration) travels through ProjectedSnapshot.RefsGeneration into NodeBinding.RefsGeneration, and DeviceSession.ActionTarget (actionTarget) sends @<ref>~s<generation> when the capture reported one, so agent-device refuses a superseded ref (ref_generation_mismatch, a retryable NODE_STALE). DeviceSession.Current is current: DragToAsync takes both refs from the newest capture, finding a binding again where it was (SamePlace) and failing with NODE_STALE before sending when no node is there. RelocatedAsync throws NODE_STALE when the fresh snapshot lists no such control, where it used to act on the binding as it was. _latestScreen is upstream’s latestScreen, the projected screen of the newest capture.
  • Device is a plain class (session.Device) with ...Async methods that take a cancellation token per call. Each Device call is a resource step named device.<method>, with upstream’s label (the state, mode, permission, orientation, pose, or alert action; the build path or the link with its query and fragment cut; <n> chars for clipboard text), through EngineFixtureContext.RunOperationAsync (.NET-only, upstream’s FixtureRecorder.run); a Device on a session no test harness started runs unrecorded. The call is not wrapped in the action timeout, as upstream’s is. appearance, network, alert, and biometric results are enums. A permission name or state cannot be unknown, so the INVALID_ARGUMENT check for one is not needed.
  • The sample (samples/MobileApp.E2ETests) derives from MobileAppTest (see MobileAppTest). It launches the app with Device.OpenAppAsync, because the core App.OpenAsync needs a URL, and reads the Device fixture from MobileEngine.ActiveSessions, because the core session does not expose the engine’s session. It was run against an iPhone 17 simulator. The Android path is not run.
  • MobileTools.Create returns AgentTools by name (the port’s defineTool), with Platforms as the strings the engines report (ios, android). Pass MobileTools.Create(engine) as the agent’s tools (AgentTools on E2ETest), and the agent offers open_app, swipe, and alert on the platforms of the engines it was built from. open_app without an app returns to the target’s app, and refuses with INVALID_STATE when the target pins none. ai-imports has no counterpart: there is no ai package.
  • agent-device takes no abort signal, so a cancelled command keeps running. Upstream’s surface tracks those commands and makes the next attempt wait for them. The port does not: each attempt has its own session and client.
  • The key grammar is KeyGrammar in the core (E2E.Engine, upstream’s parseKey), shared by the mobile and Windows engines.
  • Video is DeviceSession.StartVideoAsync and StopVideoAsync (upstream’s startVideo and stopVideo of AgentDeviceSurface), over recording.record (command record, with quality: medium, recordingScope: device, and hideTouches when MobileOptions.VideoTouches is false). The file is video/video.mp4 in MobileStartInfo.ArtifactsDir (upstream’s artifactsDir; EngineStartOptions.ArtifactsDir fills it). A recording is marked before the device is asked, so a start that outlived its budget is stopped when the session is disposed, as is one whose stop failed (upstream’s endAttempt and dispose). A recording the device finalized elsewhere is moved into place. A screen-recording stop in flight is shared (ScreenRecording.Stopping, upstream’s stopping of ScreenRecording in surface.ts, #1559 8f425b1): a later StopVideoAsync and the session’s close wait for it instead of sending a second stop, a caller whose token is cancelled leaves the stop running and gets CANCELLED, and a stop that fails is dropped so the next caller or the close sends it again. The close sends the stop on the client it holds, not through the shared task (StopQuietlyAsync), since the session has no client left by then. Tests: Engine/VideoTests ports the three new it of describe('video') (#1559): ‘shares a pending recording stop with another caller and attempt cleanup after cancellation’ (it does not check the sessions.close counts across a next attempt: the port’s session is one attempt), ‘retries a stop that rejects %i promise turns before cleanup after its first caller cancels’ (the port’s turns are Task.Yield calls), and ‘does not send a new recording stop for a caller that was already cancelled’. A session is one attempt, so upstream’s startAttempt cleanup (sessions.close of a leftover recording) has no port, and the in-flight commands outlive the session on the engine (see In-flight commands). Closing a session does not wait for a recording start that outlived its budget before it stops the recording (upstream’s endAttempt settles the in-flight commands first), so the daemon may see the stop while the start still runs. The device provider’s recording (LeaseRecording) is in Provider recording. The agent-device parameters were read from upstream and the 0.21.25 daemon’s command table; on an iOS 27 simulator with Xcode 27.1 the daemon accepted the start, and its stop timed out in xcrun after 30 s, so a recorded file is not yet seen end to end.
  • VideoTests (describe('video') of engine.test.ts) are ported in full on a scripted client; “records and stops on the pinned $platform device after closeApp ends the previous session” runs the second attempt as a new session. ManifestTests declares the video capability.
  • Upstream’s keyboard drag start (fix(mobile): start the iOS keyboard-dismissing drag clear of controls, 787a5d5, tester-army/e2e#1305) is ported. Keyboard.KeyboardDragStart in Keyboard.cs is upstream’s keyboardDragStart in keyboard.ts (the class name is the module’s, since C# has no free functions). DeviceSession.KeyboardTop is upstream’s keyboardTop, and RawSnapshot.KeyboardFrame carries the keyboard fact’s frame it reads. SnapshotProjection.ScreenKinds is exported as upstream exports SCREEN_KINDS. DismissKeyboardAsync drags from that point, and a screen with none fails with UNSUPPORTED_CAPABILITY before any drag. Tests: five its of describe('device fixture') in Engine/DeviceFixtureDismissingAKeyboardThatHasNoDismissKeyTests. Not ported: ‘dismissing the keyboard over choice controls leaves them as they were’ (apps/mobile-benchmark/tests/device.e2e.ts), which needs the mobile benchmark app, a React Native app the port lacks.
  • Upstream’s device.unstable_raw (feat(mobile): device.unstable_raw exposes the test's agent-device session, c3c4238, tester-army/e2e#1380) is Device.UnstableRaw. Upstream’s DeviceSession interface (device.ts) is RawDeviceSession, a .NET-only name, because the port’s DeviceSession is the surface (upstream’s AgentDeviceSurface) and a public type of that name exists. Its client is the session’s IDeviceClient (the port’s stand-in for AgentDeviceClient), selection is DeviceSelection, and platform is MobilePlatform. BoundDevice (surface.ts) is internal, set by the boot from the id and device of the devices.boot answer (DeviceSession.BoundDevice, upstream’s boundDevice), and cleared when the session closes. Reading UnstableRaw, or Client of a handle taken earlier, after the session closed is INVALID_STATE. The client is DeviceCommands.Translate, which refuses a method it does not list, so DeviceMethods.AppsList (apps.list, the daemon’s apps command) is added for upstream’s reference example; the other methods of upstream’s client stay unsupported until code calls them. Tests: the three it of describe('unstable_raw') in Engine/DeviceFixtureUnstableRawTests; the first is Partial_, since the port’s fixture has no map of declared operations for expect(declared).not.toHaveProperty('unstable_raw'). Not ported: unstable_raw reaches the test session through agent-device (apps/mobile-benchmark/tests/device-fixture.e2e.ts), which needs the mobile benchmark app, a React Native app the port lacks.
  • Upstream’s known-viewport fix (fix(mobile): keep the known viewport when the app reads smaller than the screen, 7674a2c, tester-army/e2e#1291) is ported. DeviceSession.Project learns a snapshot’s viewport only when it is plainly the screen’s: the first one the session reads, the one it knows, or that one rotated (SameScreen, upstream’s sameScreen; two sizes within a point are one screen, since rects from the tree carry fractions). ViewportForAsync (upstream’s viewportFor) checks a tree of any other size against the device’s screenshot, in either orientation, before it replaces the known one: a screenshot reports the portrait size even in landscape, so it confirms a size but cannot pick the orientation. The size it checks against is DeviceSupport.LogicalScreenSize (upstream’s logicalScreenSize): the screenshot’s logical dimensions, else its pixel dimensions over its density. A simulator’s screenshot reports those; a real device’s reports neither, so there the tree’s size is taken as it comes. A screenshot that fails during that check fails the observation, as upstream’s does. TraceScreen and MaskedScreenshotAsync size the trace screen and the secure-field masks by the known viewport, not the tree’s. On iOS, a swipe from a sheet’s grabber can pull down Notification Center, and the app’s tree behind it reported a third of the screen (130x281 on a 390x844 device), which misplaced every rect and tap after it. Upstream records this only in its changeset; its skill references and docs say nothing about it, so SKILL.md and docs/ have nothing to mirror. Tests: in Engine/ObservationTests, ‘keeps the known viewport for an app drawn smaller than the screen, and follows a rotation’ (new) and ‘measures the screen in the viewport the snapshot publishes, and in its tree when it publishes none’ (split into two harnesses, as upstream’s); in Engine/DeviceFixtureDismissingAKeyboardThatHasNoDismissKeyTests, ‘drags at the centre of a screen rotated since the last observation’ (new), since the keyboard drag measures its start through ViewportForAsync too.
  • Upstream’s input budget (fix(mobile): bound each input by its budget, 14b77d3, tester-army/e2e#1073) is ported. An input (a tap or other node action, a point action, typing, a key, back, a keyboard dismissal, and the node LongPressAsync, HoverAsync, DragToAsync, and SwipeAsync the port has in place of upstream’s longPress, hover, dragTo, and swipe actions) runs its device commands under InputBudget (DeviceSupport.cs, upstream’s support.ts): with no budget left the input is not sent and fails with OPERATION_TIMEOUT, an input that does not answer in time fails with ACTION_MAY_HAVE_COMMITTED, one sent with almost no budget left still gets 250 ms to answer, a hold (a long press or timed swipe) at least as long as the budget left is refused with NOT_ACTIONABLE, and each command of a multi-command input (a key on an unfocused field) is sent on its own. Launches and artifacts are unbounded. Snapshots are bounded since #869 (see the next bullet). Differences: upstream reads the budget per call, from operation.timeoutMs, which is the call’s timeout or actionTimeout. The port’s session calls carry no timeout, so every input gets DeviceSession.ActionTimeout, which MobileStartInfo.ActionTimeout sets (EngineStartOptions.ActionTimeout fills it), as the web engine’s operations get the action timeout. DeviceSession.InputBudget is upstream’s inputBudget and DeviceSession.SendInputAsync its sendInput. InputBudget’s track is an Action<Task> that registers the task (upstream’s returns the promise it is given); see In-flight commands. The OperationContext.signal doc change in docs/reference/engine.mdx and contract.ts has no counterpart: the port has no OperationContext. Tests: in Engine/ObservationTests, ‘ends %s, hung on %s, at its budget as possibly committed’ (a theory of the same seven entries; the screen swipe is a perform on the root), ‘sends nothing once a settling target spent the budget, and no keystroke once a focus tap used it up’, and ‘refuses a long press that holds longer than its timeout leaves, before sending it’ (also on the node LongPressAsync); in Support/SupportHelpersTests, ‘sends an input with what is left of its budget, and reports one cut off as possibly committed’. These run on real timers of a few hundred milliseconds, where upstream’s fake timers do not wait. ‘lets a locate outlive its budget’ was replaced in #869.
  • Upstream’s Compose Multiplatform text fields on iOS (mobile reads Compose Multiplatform text fields on iOS, 75ae2ab, tester-army/e2e#1427) are ported in part. SnapshotProjection.ProjectSnapshot reads the placeholder an empty iOS field folds into its label (upstream’s foldedPlaceholder in nodes.ts, FoldedPlaceholder here): for an empty (no value), editable, non-secure iOS field that reports no placeholder of its own, whose only child is a StaticText with no children, and whose label is a non-empty name, then , , then that child’s text, that text is the field’s Placeholder, the child is left out of the tree, and the name is the label before , (a non-empty ContentDescription stays the name, and that label is then the Text). A field of any other shape keeps its label and children as reported. The private record Folded is a .NET-only name for upstream’s inline { label, placeholder, child } object. Test: ‘reads the placeholder an empty Compose Multiplatform field folds into its label’ in Nodes/SnapshotProjectionTests. mayTakeText and NodeBinding.takesText (nodes.ts, surface.ts) are ported (#850): SnapshotProjection.MayTakeText and NodeBinding.TakesText, set in Bind from the node with its children. DeviceActions.PerformAsync refuses a fill or clear whose node does not take text with UNSUPPORTED_CAPABILITY (the message of upstream’s refuseFill, RefuseFill here), before the action and again on the binding found by a fresh snapshot taken just before typing (upstream’s relocated; DeviceSession.RelocatedAsync, with the transition wait split out as WaitForTransitionAsync, upstream’s waitForTransition). Tests: ‘Acts_on_an_unclassified_iOS_field’, ‘Rejects_an_unclassified_iOS_element’, and ‘Rejects_an_unclassified_iOS_element_that_gained_a_control_before_typing’ in Engine/InputFreshnessTests. Differences: a fill or clear now reads the field again, so it costs one more capture.snapshot than before. Upstream’s relocated input flag is ported with #751.
  • Upstream’s mobile input revalidation (fix(mobile): revalidate input bindings before fill and clear, b309bcd, tester-army/e2e#1410) and keyboard transitions (fix(mobile): reobserve targets after keyboard transitions, bdd7315, tester-army/e2e#1297) are ported. DeviceSession.RelocatedAsync takes forInput (upstream’s input flag of relocated; input is the InputBudget here). With it, a truncated or sparse capture, a node the capture no longer lists, or a changed InputPurpose, Disabled, Secure, or Hidden is a retryable NODE_STALE before anything is typed, and DeviceActions.PerformAsync sets it for fill and clear. ProjectedSnapshot.KeyboardVisible (set in Project from KeyboardShowing) and NodeBinding.KeyboardVisible stand for upstream’s ProjectedScreen type (ProjectedSnapshot & { keyboardVisible }), which C# has no intersection type for. LatestScreen and MarkAction(ProjectedSnapshot?) replace LatestIndex and the index-based MarkAction (upstream’s latestScreen and markAction(before: ProjectedScreen)), and WaitForTransitionAsync acts at once on an unmoved control only when the keyboard state of the screen before the action equals the control’s. DeviceErrors.StaleOr also maps target_still_moving with details.dispatched: no to a retryable NODE_STALE. The agent-input-stale.test.ts file of #1410 is already ported in part (AgentInputStale/SecretFillStaleRetryTests); its replay half still needs a project runner, credentials, and the secret.fill policy event, which the port lacks. Tests: the input freshness its in Engine/InputFreshnessTests, the three keyboard its in Engine/DeterministicActionsTests, and ‘retries a moving target only when no input was dispatched’ in Errors/ErrorTranslationTests.
  • Upstream’s WebDriver element-type fix (fix(mobile): read XCUIElementType class names as their XCTest types, 3f9a7d8, tester-army/e2e#1133) is ported. SnapshotProjection.NormalizeKind is upstream’s normalizeKind in nodes.ts: it drops ^XCUIElementType(?=[A-Z]) (XcuiElementTypePrefix, a .NET [GeneratedRegex] for upstream’s inline regex) before it maps the type, so the XCUIElementTypeButton that agent-device’s WebDriver runtime reports on hosted Appium clouds reads as Button. DeviceSession.KeyboardShowing is upstream’s keyboardShowing in surface.ts: it routes node types through NormalizeKind, so an XCUIElementTypeKeyboard counts as a shown keyboard. Upstream records this only in its changeset; its skill references and docs say nothing about it, so SKILL.md and docs/ have nothing to mirror. Tests: in Nodes/SnapshotProjectionTests, ‘reads the XCUIElementType class names a WebDriver session reports as the native XCTest types’; in Engine/DeviceFixtureDismissingAKeyboardThatHasNoDismissKeyTests, ‘reads an XCUIElementTypeKeyboard from a WebDriver session as a shown keyboard’.
  • Upstream’s held-device skip (mobile: skip booted devices another agent-device session holds, 9e53c40, tester-army/e2e#1379) is ported. BootedDevices (DevicePool.cs, upstream’s class in pool.ts) skips a booted device whose inventory entry has a claimedBy.session that is not one of this target’s own slot sessions, logs the skipped ones, and fails prepare with a non-retryable ENGINE_FAILURE when every booted device is held. BootedDevice is upstream’s interface of that name, as a record. LifecycleTests.Skips_a_booted_device_another_agent_device_session_holds_keeps_one_its_own_slot_session_holds_and_fails_when_every_booted_one_is_held ports the lifecycle it of engine.test.ts, whole.
  • Not ported: the tool-pixels test (needs the full runner and a scripted model).
  • Engine/DeviceFixtureTests ports ‘refuses an openApp permission name it does not know before any device command’ as Partial_: DevicePermission is a closed enum, so the unknown name is a cast number, and device.openApp({ permissions }) refuses it with INVALID_ARGUMENT before any command (DeviceSession.OpenAppAsync, upstream’s assertPermissions call in openApp). It also ports ‘labels openApp and openLink steps without the link query and setClipboard by length’ (the port reads the labels off the recorded steps; upstream reads them off the declared operations).
  • Engine/LifecycleTests ports ‘refuses a second startAttempt while one runs and treats cold cleanup as a no-op’ as Partial_. A second MobileEngine.StartAsync for a worker slot (target and slot) whose session has not closed is INVALID_STATE (MobileEngine.ClaimSlot and ReleaseSlot, upstream’s this.attempt check in startAttempt). The cold endAttempt and dispose have no counterpart: an attempt is the session and its dispose, and the engine has no worker-level cleanup (issue #1420).
  • The provider example (docs/examples/mobile/device-cloud-provider.ts) is docs/examples/mobile/DeviceCloudProvider.cs (DeviceCloudProvider.CloudDevices), compiled into E2E.Mobile.Tests and tested by ProviderExample/ProviderExampleTests. Its leasesFactory argument is .NET-only (it stands in for upstream’s vi.doMock of agentDeviceLeases). ‘leases with the token, the selectors, and a summary, and releases through the same leases’ is Partial_: IAgentDeviceLeases.ReleaseAsync takes the lease alone, so the release context upstream asserts is not passed on.

ExpoSimulators (the E2E.Expo package, namespace E2E.Expo) ports @e2e-dev/eas: hosted iOS simulators and Android emulators from Expo, leased through Expo’s GraphQL API over HttpClient, with no SDK. The provider is its own package, E2E.Expo, which depends on E2E.Mobile, as upstream’s @e2e-dev/eas is a package of its own. It keeps a private copy of the shared HttpClient, so E2E.Mobile exposes nothing extra for it. Pass it as MobileOptions.Provider. The sessions, the queue and startup limits, the idle backstop, the EXPO_TOKEN or eas-cli login, and the project id from the app config follow upstream. Differences:

  • Upstream renamed easSimulators() to expoSimulators() and kept easSimulators() and EasSimulatorsOptions as deprecated aliases (tester-army/e2e#1517). The port renames EasSimulators to ExpoSimulators and EasSimulatorsOptions to ExpoSimulatorsOptions and keeps no alias, a breaking change for .NET callers. The provider name is expo-simulators and its configuration errors start with expoSimulators. The package is E2E.Expo, not E2E.Eas, a breaking change for .NET callers, while upstream keeps @e2e-dev/eas.
  • Options are the ExpoSimulatorsOptions record, so an unknown option key is a compile error and upstream’s rejectUnknownKeys has no counterpart. A bad combination (BuildId with ApplicationArchiveUrl, an idle limit not below the duration) is INVALID_CONFIG from the constructor.
  • A dynamic app config (app.config.ts and its siblings) is evaluated by running the project’s own expo config with node from the path of the process, so it needs Node. A static app.json needs nothing.
  • The request’s cancellation is a CancellationToken. A cancelled read of the app config is an OperationCanceledException; upstream wraps it as “could not read the Expo app config”.
  • A device request always carries the project root, so upstream’s check for an engine that passes none has no counterpart.
  • The sessions client checks the shape of each Expo answer as upstream’s easSessions() does: an answer that is JSON but lacks the fields an operation reads fails with Expo: unexpected response to <operation>, and an answer that is not a GraphQL object is Expo: HTTP <status>, no data. All 7 its of client.test.ts are ported (Client/EasSessionsTests). One difference: the port also replaces the Expo token or session secret with ***** in the error text it builds from Expo’s answer, which upstream leaves to its report-boundary redactor.

LimrunSimulators (the E2E.Limrun package, namespace E2E.Limrun) ports @e2e-dev/limrun: one hosted iOS simulator or Android emulator per worker slot, created, polled to ready, driven through an agent-device daemon the provider starts for it, and deleted on release. Pass it as MobileOptions.Provider. The key and base URL (LIMRUN_API_KEY, LIMRUN_BASE_URL), the instance spec, the daemon environment, the retained lease, the 20-second heartbeat, and the cleanup follow upstream. The client has the lease commands the provider needs: leases.allocate, leases.heartbeat, and leases.release (DeviceMethods), sent as agent-device’s agent_device.lease.* JSON-RPC methods. Differences:

  • The provider is its own package, E2E.Limrun, which depends on E2E.Mobile. Upstream’s @e2e-dev/limrun is a package of its own too. The package keeps private copies of two small E2E.Mobile internals (the argument builder and the shared HttpClient), so E2E.Mobile exposes nothing extra for it.
  • Limrun’s REST API (/v1/ios_instances and /v1/android_instances: create, get, delete) is called over HttpClient, with no @limrun/api SDK. Like upstream’s configuration of the SDK, it retries nothing and gives each request 60 seconds.
  • Upstream forks a Node process per device, so the daemon and its lease client get the instance’s credentials without changing the runner’s environment. The port starts the daemon itself, with exactly the run’s environment plus the instance’s (AgentDeviceDaemon.LocalAsync with an environment), and runs the lease and install calls in the runner. AgentDeviceDaemon.StopAsync runs agent-device daemon stop --clean.
  • Upstream pins agent-device as a dependency of @e2e-dev/limrun, at the engine’s version (0.21.36), and checks that the installed one matches. The port always starts the pinned release (AgentDeviceVersion.Pinned), so nothing is installed by hand. It only checks that the engine asked for that release, and the daemon’s own version check runs when it starts.
  • The lease request leaves out providerCredentialFingerprint. The daemon only compares it with the credentials of a daemon that was already running, and the port starts a fresh daemon with the right credentials for every device.
  • Options are the LimrunSimulatorsOptions record, with enums for the device models, so an unknown option is a compile error and upstream’s rejectUnknownKeys has no counterpart.
  • Upstream’s Limrun page (docs/integrations/limrun.mdx) is ported as docs-site/src/content/docs/integrations/limrun.mdx, with the port’s C# names. Upstream has no examples/with-limrun directory at 7b1b8b27: its examples/examples.json lists a limrun entry that links to the partner repository limrun-inc/testerarmy-e2e-limrun (a SwiftUI and a Jetpack Compose greeting app, both built remotely on Limrun), and docs/examples/limrun/ holds two snippets (e2e.config.ts, greeting.e2e.ts) that the Limrun page includes. The page’s “Test an app flow” section (the greeting.e2e.ts snippet) is ported in limrun.mdx as a C# test for the greeting form of samples/MobileApp, which already has that flow (GreetingTests). The partner repository is not ported: it holds two native apps the port cannot build or host here, and a .NET example would be a second project, with two native apps to build, for a service the port cannot reach in tests. samples/MobileApp is the port’s mobile example, and its greeting form is the app the snippets drive.
  • Not verified against a live service: the lease wire format was read from agent-device’s code (the agent_device.lease.* methods and their params in the daemon, and the client that writes them), and Limrun’s REST calls from the @limrun/api 0.59.0 source. No test reaches Limrun or a daemon.

BrowserStackDevices (the E2E.BrowserStack package, namespace E2E.BrowserStack) ports @e2e-dev/browserstack (packages/browserstack, upstream commit 64432f1, tester-army/e2e#1307, which is after the parity target above): BrowserStack App Automate real Android and iOS devices, one per worker slot, as an IDeviceProvider for MobileOptions.Provider. Each slot gets its own agent-device daemon, which runs the session through agent-device’s built-in browserstack provider; releasing the lease stops the daemon, which ends the session. Taken from upstream: the options, the INVALID_CONFIG checks (blank values, NetworkProfile with CustomNetwork, a plain http build, NoResignApp off iOS, an app on the target as well), the https build uploaded once per run, endpoint, and account (the log names the upload by its bs:// id only), a local build resolved against the project root, the session name e2e-<run id>-<target>-<slot> (a given SessionName gets -<slot> when the target has more than one slot), RecordAsync finding the session by build and name through the App Automate API and linking its video_url as video/mp4, BROWSERSTACK_API_ENDPOINT (an http(s) URL with no query, fragment, or credentials), and the errors that never repeat the credentials or a signed app URL. Differences:

  • The lease helper upstream adds in the same commit (@e2e-dev/mobile/lease: agentDeviceLeases(), daemon.ts, driver.ts, heartbeat.ts, moved out of @e2e-dev/testmu) is ported into E2E.Mobile as E2E.Mobile.Lease. AgentDeviceLeases is agentDeviceLeases() and IAgentDeviceLeases is its AgentDeviceLeases type (the I prefix is C# casing). AgentDeviceLeaseOptions, AgentDeviceLeaseRequest, and LeaseSelectors keep upstream’s names and fields. LeaseSelectors lists the provider* keys as properties, where upstream picks them from the client configuration. PrepareHome takes a CancellationToken beside the home path.
  • Upstream runs the allocation in a child process (driver.ts) so each daemon gets its own environment. The port starts the daemon itself with that environment (AgentDeviceDaemon.LocalAsync, which already runs agent-device as its own process) and calls leases.allocate from the runner, so LeaseDriver has no child process. The allocation gets a 15-minute bound the daemon’s own deadline also enforces. The shutdown report of daemon stop --json comes from AgentDeviceDaemon.StopReportAsync (internal; StopAsync is unchanged) and goes through AssertSessionsEnded as upstream’s does: a release fails unless agent-device lists the granted lease as released, and a retried release only cleans up once the stop confirmed.
  • The allocate request of the port’s client now carries the device selectors (platform, target, device, the provider* capabilities, osVersion, imageTag, physical) beside the lease fields, as agent-device’s client spreads them into the params (read from agent-device 0.21.35). Limrun sends none, so its requests are unchanged.
  • The helper checks that the engine asked for the pinned agent-device (AgentDeviceVersion.Pinned), as LimrunSimulators does, because the daemon it starts is that release. Upstream’s testmu provider checks its plugin against the version instead, and upstream’s BrowserStack provider checks nothing.
  • A lease is allocated and renewed under a named session (upstream’s leaseSession, e2e-lease- and the first 8 hex digits of the SHA-256 of the state directory), because agent-device refuses a provider lease to a client that names none. The lease requests of the port’s client now carry the client’s session as session (read from agent-device 0.21.36’s lease writer). Upstream sets it on the client configuration and, for Limrun, also on the binding’s client. The port passes it as the client’s session instead, and keeps it out of a binding’s client, where session is reserved for the engine (DeviceBindings). LimrunHeartbeat derives it again from the binding’s stateDir. The named session is not checked against a live provider.
  • Options are the BrowserStackDevicesOptions record, with an enum for Orientation (BrowserStackOrientation), so an unknown option and a wrong type are compile errors and upstream’s rejectUnknownKeys has no counterpart. BrowserStackDevices is the name of upstream’s browserstack() (the port names a provider class, as LimrunSimulators is limrun()), and BrowserStackDevicesOptions is BrowserStackOptions.
  • The request’s cancellation is a CancellationToken. A cancel stays an OperationCanceledException, also inside the API lookups, where upstream throws an Error saying “cancelled”. A request that gets no answer within its bound is a TimeoutException. Errors name the build and session as upstream’s do.
  • The credentials reach the daemon’s environment and nothing else: the lease’s Client, the log lines, the errors, and BrowserStackCredentials.ToString() leave out the access key (a test checks the first three; the last is .NET-only, because a record prints its members). E2E.Cli does not reference E2E.BrowserStack, so e2e explore and e2e mcp cannot lease a BrowserStack device, and nothing registers the key as a Secret: upstream’s CLI loads the provider from the config, and the port’s tool ships only Limrun and DevFlow (see Mobile engine). E2E_MOBILE_PROVIDER does not name browserstack either; set the provider in code, as for EAS.
  • Upstream’s docs/integrations/browserstack.mdx is ported as docs-site/src/content/docs/integrations/browserstack.mdx, with the port’s C# names. Its docs/examples/mobile/browserstack.config.ts and browserstack.e2e.ts snippets are not ported as files: they run the Wikipedia sample app on a Pixel 7, which the page shows as C#. Upstream’s icon and Open Graph images are not ported.
  • Not verified against a live account: no test reaches BrowserStack. A real agent-device 0.21.35 daemon accepted the port’s allocate request and sent it to BrowserStack, which answered “Invalid username or password” to fake credentials, and the lease directory was removed afterwards. Whether a session starts, installs the app, and ends on release is read from agent-device and upstream’s code only. BrowserStackLiveTests runs the whole path and is skipped without BROWSERSTACK_USERNAME, BROWSERSTACK_ACCESS_KEY, and BROWSERSTACK_APP.
  • Tests: tests/E2E.BrowserStack.Tests/BrowserStack/BrowserStackTests ports the its of describe('browserstack()'), and Recording/BrowserStackRecordTests and Recording/UploadAppFromUrlTests the two describes of recording.test.ts. Three are partial (Partial_ prefix) because a typed record cannot hold a non-string: the blank-value rows for the string options and for Project, Build, and SessionName, and the NetworkProfile with CustomNetwork row (not the non-boolean NoResignApp row). Not ported: the it for an option the provider does not take (a record has no unknown keys) and the rows with a missing or non-string value. The it for the lease options is ported over an internal factory argument, because the constructor builds AgentDeviceLeases itself. tests/E2E.Mobile.Tests ports lease.test.ts (Lease/AgentDeviceLeasesTests, over a fake ILeaseHost, .NET-only: upstream mocks the daemon.ts and heartbeat.ts modules), lease-daemon.test.ts (LeaseDaemon/LeaseDaemonTests; its first two its run the real agent-device daemon stop, so they need Node and npx), lease-driver.test.ts, and lease-heartbeat.test.ts. .NET-only: BrowserStackDotNetTests (the plain http build, which upstream checks without a test, and the credentials ToString) and BrowserStackLiveTests.

agent-device takes no abort signal, so a command a cancel or a timeout abandoned keeps running on the device. Upstream’s surface keeps them in inflight (track, settleInflight) and its startAttempt waits for them before it opens anything, so a ghost tap never lands in a retry. The port has the same behavior:

  • DeviceSession.Track is upstream’s track: CommandAsync, ActAsync (upstream’s perform registration), and every InputBudget register the device command until it settles. DeviceSession.SettleInflightAsync is settleInflight, and DeviceSession.StartAsync calls it first, with the caller’s token, as startAttempt does: a command that never settles fails the start as CANCELLED once the token ends, and the boot never goes out.
  • Differences: upstream’s surface is the worker, so it holds the set. The port’s session is one attempt, so MobileEngine.InflightOf(target, slot) holds the set of a worker slot (InflightCommands, .NET-only) across the attempts that drive it. A command that fails after its caller left is read once and never reported. The set is keyed by target, slot, and the lease or device the binding names, so an engine reused for another run does not wait on a released device’s commands. The wait is also bounded by E2EDefaults.LaunchTimeout when the caller’s token never ends (ENGINE_FAILURE). Upstream’s client takes no abort signal, so an abandoned command is still running when it is tracked. The port’s HTTP client would abort its request on a cancel and end the tracked task while the daemon may still run the command, so DeviceSession.Client is a TrackedClient (.NET-only): it calls IDeviceClient.CallAsync with a token the caller cannot cancel, tracks that call itself, and the caller leaves by racing it, so a cancel still surfaces as CANCELLED at once. Once the caller has left, the request has E2EDefaults.LaunchTimeout to answer (the bound of the next start’s wait) and is aborted after that. An aborted request that ends without a successful answer leaves daemon completion unconfirmed: InflightCommands blocks later attempts for that target, slot, and device with a non-retryable ENGINE_FAILURE for the lifetime of that engine. A request that fails after the caller left counts as unconfirmed unless the failure is an error the daemon itself reported (AgentDeviceError.Reported, .NET-only); a transport or client-side failure is unconfirmed. A client that ignores the abort and successfully answers still confirms completion. The DevFlow client sequences its own steps and implements the .NET-only ICancellableDeviceClient and is not detached (Appium keeps its tracked, detached path), so a cancel stops its following steps, such as the lease claim after the DevFlow status read. TrackedClient accepts a .NET-only TimeProvider for testing this deadline. A command that is not cancelled is not bounded, as before. Test: Engine/SessionHooksViewportSwipeLocationArtifactsTests, ‘Keeps_a_cancelled_command_in_flight_until_the_daemon_answers_even_when_the_client_honours_its_token’ (.NET-only), and Engine/TrackedClientTests, ‘Blocks_later_attempts_after_an_abort_without_daemon_confirmation’ and ‘Allows_the_next_attempt_when_a_client_ignores_the_abort_and_confirms_completion’ (.NET-only). Closing a session (upstream’s endAttempt or dispose) does not settle the in-flight commands.
  • Tests: Engine/ObservationTests, ‘keeps a timed-out input in flight: the next attempt waits for the device command to settle’, and Engine/SessionHooksViewportSwipeLocationArtifactsTests, ‘waits for an abandoned command to settle before the next attempt starts and its launch goes out’. Both wait on a command the test releases, not on a timer, apart from the 200 ms input budget of the first.

IDeviceProvider.RecordAsync(lease, context, ct) is upstream’s DeviceProvider.record. When an attempt records video and the slot rides a provider’s lease, DeviceSession.StartVideoAsync calls it in place of agent-device’s recording, with the lease as it traveled to the worker (DeviceProviders.TravelledLease, upstream’s travelledLease: the id and the declared fields, never what a derived lease class kept) and a ProviderRecordContext of RunId, TargetName, AttemptId, and Env. DeviceProviders.RecordLeaseAsync is recordLease: a failure is ENGINE_FAILURE naming the provider and the lease, a failure met once the token was cancelled is CANCELLED, and a token already cancelled never reaches the provider. StopVideoAsync ends the recording with ProviderRecordings.StopProviderRecordingAsync (upstream’s stopProviderRecording) into a VideoFile or a VideoLink; the recording is marked at once and cleared when the provider confirmed the stop, before what it wrote is checked; a stop shared by concurrent callers runs once. Closing the session stops a recording still marked, best effort. DevicePool.Recorder is pool.recorder, and LeasedDevices.Recorder is recorder. Differences:

  • Upstream’s record is optional, and a provider without one records with agent-device. A C# interface member has no absence to test, so the default RecordAsync returns null and a provider that returns null records with agent-device, as IBrowserProvider.RecordAsync does. LeasedDevices.Recorder is always the provider. Upstream’s asDeviceProvider check that record is a function and isProviderRecording’s check for a startedAt and a stop have no port: the types say it. The context’s signal is the CancellationToken parameter.
  • MobileStartInfo.AttemptId (upstream’s EngineAttemptContext.attemptId) names the recording’s attempt. EngineStartOptions.AttemptId fills it, and a new id is made when it is absent. A run through the test host sets no RunId yet, so ProviderRecordContext.RunId is empty there.
  • Upstream’s worker outlives its attempts and keeps what an attempt could not stop: a provider recording whose stop failed is retried at the next startAttempt (which then blocks), a native recording that could not be confirmed stopped resets the leased session before the next attempt, and a worker disposed while the lease is reused keeps its session. The port’s session is one attempt that always ends its agent-device session: a recording whose stop failed is retried once, when the session closes, and then abandoned, and nothing is retained for the next attempt. Providers must clean up their recordings when they release a lease.
  • Tests: Provider/DeviceProviderRecordingTests ports 10 of the 22 it of describe('device provider recording'). Eight follow upstream: ‘records through the provider instead of agent-device, from the worker, with the lease id and the declared lease fields’, ‘reports a recording the service keeps as a link’, ‘keeps the agent-device recording for a provider without record’, ‘keeps the agent-device recording for a worker without a lease, when no prepare ran’, ‘names the provider and the lease when record fails, and has nothing to stop at attempt end’, ‘cancels a start whose budget ran out, and stops the recording that came up anyway at attempt end’, ‘never asks the provider to record for an operation already cancelled’, and ‘keeps a recording whose stop failed, so endAttempt stops it once more’. Two are partial (Partial_ prefix): ‘stops a provider recording without closing its leased session when the worker is disposed mid-attempt’ (the port closes the session, so it checks the stop only) and ‘clears a confirmed provider stop before rejecting its invalid artifact’ (it checks the stops, not the reuse of the session). Skipped: ‘refuses a provider whose record is not a function’ (the type says it), and 11 that need a worker that survives attempts and retains a recording or its session: ‘keeps a reusable leased session when the provider recording still cannot stop during disposal’, ‘finishes a retained provider recording before the next attempt records in the same worker’, ‘blocks the next attempt while its retained provider recording cannot stop and preserves its owner’, ‘does not begin another attempt or record when a retained provider stop wait is cancelled’, ‘resets a leased session whose native recording still cannot stop after endAttempt’, ‘resets an unconfirmed native recording before another attempt in the same worker’, ‘fails the next attempt when its native recording reset cannot close the session’, ‘keeps an unconfirmed native recording after its stop wait was cancelled’, ‘preserves a session after native stop succeeded even when moving its artifact fails’, ‘retries an unconfirmed provider stop after endAttempt during disposal’, and ‘shares a pending provider stop and closes on reuse revocation before the stop resolves’. .NET-only: ‘keeps the agent-device recording for a provider that records nothing of this device’ (a provider whose RecordAsync returns null).

Device.Locator(string selector) is upstream’s device.locator: a Locator over a selector expression, which DeviceLocator answers with the agent-device selector grammar (see Mobile snapshot model). Upstream builds it with EngineFixtureContext.locator. The port has EngineFixtureContext (public, Locator(LocatorExpression) only) and IEngineFixtureHost (.NET-only): E2ESession hands the context to an engine session that implements the interface, once the attempt’s Screen exists, and DeviceSession keeps it for its Device. Device.Locator on a session no test harness started (an engine used on its own) is INVALID_STATE. The other members of upstream’s EngineFixtureContext (fixture, app, timeouts, signal, operation, attachArtifact, attachViewport, screen, expectable) have no port: the port’s fixtures take their own tokens, and record their steps through EngineFixtureContext.RunOperationAsync. Upstream’s engine test has no it for locator; Engine/DeviceFixtureTests has a .NET-only test, ‘mints a locator from an agent-device selector on the attempt’s screen’.

KernelProvider (the E2E.Kernel package, namespace E2E.Kernel) ports @e2e-dev/kernel at the port’s parity commit: kernel() from provider.ts, the Kernel client from client.ts (KernelBrowsers, kernelBrowsers, KernelBrowserParams, KernelReplayParams), and envValue from env.ts. It is a WebEngineOptions.Browser provider: Name is kernel, AcquireAsync creates a browser, ReleaseAsync deletes it, SweepAsync deletes the run’s active browsers, Downloads reads a download back through the browser filesystem, and RecordAsync records a Kernel replay. Lease tags, the 600 s idle timeout, the cancelled-request delete, the sweep message, and the replay.mp4 replay with its retried download follow upstream. Differences:

  • Upstream’s function kernel(options) is the class KernelProvider (a type named Kernel would clash with the namespace). KernelOptions is a record that extends KernelBrowserParams, as upstream’s interface does.
  • There is no Kernel .NET SDK (no package from Kernel on NuGet; Kernel publishes Node, Python, and Go SDKs). The client calls Kernel’s REST API with HttpClient, the API key as a bearer token, and replaces @onkernel/sdk: POST /browsers, DELETE /browsers/{id} (404 counts as deleted), GET /browsers?status=active&tags[k]=v (paged by X-Has-More and X-Next-Offset), POST /browsers/{id}/replays, POST .../replays/{replayId}/stop, GET .../replays/{replayId} (Accept: video/mp4), and GET /browsers/{id}/fs/read_file?path=. The base URL is https://api.onkernel.com/, or KERNEL_BASE_URL from the run’s environment (the SDK reads it from the process environment). The SDK retries a failed request twice; the client retries nothing, since a retried create could allocate a second browser. The SDK keeps one client per API key; the client here is stateless, so the provider builds one for each request. An error answer becomes a KernelApiException with the SDK’s message, trimmed (401 Invalid or disabled API key).
  • Upstream types the create-browser body as the SDK’s BrowserCreateParams. KernelBrowserParams has properties for stealth, headless, gpu, timeout_seconds, profile, proxy_id, viewport, and tags (Stealth, Headless, Gpu, TimeoutSeconds, Profile, ProxyId, Viewport, Tags), and Extra, a JSON object for any other field by its wire name (proxy, extensions, region, …), which the properties win over, so the run’s tags and timeout stay. Upstream’s replay is a boolean or the start-replay body; the port has Replay (default true) and ReplayParams. Scope is null for the default, BrowserProviderScope.Worker.
  • The web engine calls RecordAsync for an attempt that records video (see Video): the replay is the attempt’s video/replay.mp4, and a headless browser, or Replay = false, gets the engine’s screencast. A download the browser took (Browser.WaitForDownloadAsync, see below) is read from the provider’s Downloads when the lease serves them (Downloads.SaveDownloadsToAsync, tested in ProviderDownloads/). The provider tests both against a fake Kernel; the recording is not checked against a live Kernel.
  • Not verified against a live Kernel, because no KERNEL_API_KEY was available. The endpoints, field names, and paging headers were read from the @onkernel/sdk 0.113.0 source (browsers.ts, replays.ts, fs.ts, core/pagination.ts, client.ts), the version upstream pins. The wire format may differ from what is written here; a first run against a real account is the check.
  • tests/E2E.Kernel.Tests ports packages/kernel/tests/unit/kernel.test.ts: Kernel/KernelTests.cs for describe('kernel()') and Kernel/KernelRecordTests.cs for describe('record'), 15 of the 16 it. The 16th, “keeps the idle timeout backstop for an undefined option from a JavaScript config”, has no C# counterpart: an unset TimeoutSeconds is null, and “creates a browser with the run tags and the idle timeout backstop” checks it. Two have the suffix PARTIAL_ in the name: “fails without an API key in the run environment and reuses one SDK client per key” (no SDK client to reuse; the test checks that each request carries the key of its run) and “records a Kernel replay of the browser …” (a call has no signal of its own to compare with the step’s). The mocked-SDK harness is FakeKernel, a fake HttpMessageHandler. RestApi/KernelRestApiTests.cs has six .NET-only tests of the REST requests (base URL, create body fields, a JSON error body, paging), which no upstream it covers.

AcpExecutor (the E2E.Acp package, namespace E2E.Acp) ports @e2e-dev/acp (tester-army/e2e#960, 0410fc9): an IStepExecutor that runs agent.act and agent.assert steps on a coding agent that speaks the Agent Client Protocol on stdio. It starts the agent, opens one session per attempt, and serves the built-in action tools and the verdict tool to it as an MCP server on 127.0.0.1. Every action goes through ctx.Actions, so the runner authorizes, counts, and records it, and cached steps replay as the built-in agent’s do.

  • Upstream’s acp({ command, args, ... }) is AcpExecutor.Create(command, args, options); claudeCode(options) and codex(options) are AcpExecutor.ClaudeCode(options) and AcpExecutor.Codex(options) (presets.ts is the internal Presets). AcpAgentOptions (Env, Model, System, Name) and AcpOptions (adds Mode and SessionMeta) are records. The step is done with a code, as the port’s verdict tool, not upstream’s complete_step with errorCode. The tools are the port’s AgentTools.CreateGrammarTools, so the agent gets fill and fill_secret, not type and type_secret.
  • Upstream uses the ACP and MCP TypeScript SDKs. There is no .NET ACP SDK, so E2E.Acp has an internal JSON-RPC peer over newline-delimited JSON (JsonRpcConnection), an internal ACP session (AcpSession, AgentLaunch), and an internal MCP server over HttpListener (McpToolServer, stateless Streamable HTTP, a random path segment, a request with an Origin header is refused). StepTools builds the served tools from upstream’s tools.ts; its per-step gate runs batched action calls one at a time, so a call queued behind done is skipped. These are .NET-only.
  • Permission requests fail closed: an unknown request is answered cancelled. A tool of the agent’s own (read from the adapter’s marks and the tool kind, never from the agent’s text) ends the step with POLICY_DENIED.
  • InternalsVisibleTo E2E.Acp on E2E reaches ctx.Host.Scope.Redactor and ReplayHandOffReasons, which upstream’s package imports from e2e. .NET-only.
  • Node is required for the presets. Like upstream, they run the adapter from the install they find in node_modules, walking up from the working directory (the bin of its package.json, with a link resolved at the package folder), never npx <name>. Upstream starts it with the running Node (process.execPath); the port runs node from the PATH, since a .NET process has no Node of its own. The adapters are npm packages, so a .NET project needs a package.json with npm install -D @agentclientprotocol/claude-agent-acp or @agentclientprotocol/codex-acp. The Codex preset lists your MCP servers with codex mcp list --json (30 s limit, process tree killed on a timeout or cancel) from the @openai/codex the adapter depends on, or from CODEX_PATH. A pnpm-style link in a folder above the package, not at the package, is not resolved.
  • .NET-only in Presets.cs: CodexListTimeout (upstream’s inline 30_000), ResolveCodexBin (upstream’s inline createRequire(...).resolve), RunAsync (upstream’s execFileAsync with timeout; it also kills the process tree on a timeout or cancel, as the repo rules require), and the local StartAsync (upstream’s .then chain). The Codex list is shared by every caller, and each caller waits on it with its own cancellation token (upstream has no token). The error for a failed list adds the process’s stderr.
  • The agent’s environment has no variable named E2E_SECRET_* or E2E_USER_*, in any casing, from this process or from Env; the codex mcp list call gets the same environment. Secrets in any other variable reach the agent, as upstream warns.
  • On Windows, a command for AcpExecutor.Create must be an executable, not a .cmd shim: nothing goes through a shell.
  • The tool names the agent sees differ from upstream: fill and fill_secret for type and type_secret, done for complete_step, with the port’s code for errorCode.
  • Upstream moved the ACP guide into subscriptions.mdx (#1488), a page the port has no counterpart for. The guide is docs-site/src/content/docs/features/acp.mdx.
  • tests/E2E.Acp.Tests ports packages/acp/tests/executor.test.ts into Executor/, all 31 of its its (the secret-stripping it included), against tests/E2E.Acp.Tests.Agent, a scripted fake agent (a console app, so no Node). Four tests are Partial_: the serial-group test (the port’s attempt memory is per attempt, not shared by serial members), the read-only assertion test (the document engine has no hover, so it uses scroll), the tool-list-once test (no step lacks a tool), and the attempt-ends-while-starting test. The runtime-error test is Partial_ too: the port’s action budget answers the agent in text, so the error comes from an OnAction hook, and the runner does not count the cancelled turn as a model call.
  • tests/E2E.Acp.Tests/Presets/AgentPresetsTests.cs ports the three its of presets.test.ts. The adapter in its tests is a Node script that starts the scripted agent, so the tests need Node on the PATH, as the presets do. The tests change the working directory and the environment, so they run in one serial collection (WorkingDirectoryCollection, .NET-only).
  • tests/cli.test.ts (3 its) is not ported: it runs the e2e CLI with an acp() executor in e2e.config.ts. The port’s config file is JSON and cannot hold an executor (an executor is code), so the CLI cannot run one. tests/live is covered by samples/AcpSample, a real-model test by hand, not by CI.

E2E.TestMu.Mobile drives TestMu AI real and virtual mobile devices through Appium. Upstream has @e2e-dev/testmu (commit 88ed717), a testmu() device provider that leases a device for each worker slot and drives it through an agent-device daemon (daemon.ts, driver.ts, heartbeat.ts, sessions.ts). The port does not port it. It talks to TestMu’s hub with Appium instead, so every type here is .NET-only. The package depends on E2E.Mobile and holds an IDeviceClient over a W3C WebDriver session on TestMu’s hub (https://mobile-hub.lambdatest.com/wd/hub), with the flat LT:Options capabilities TestMu documents. It is a preview: no provider leases a device yet, and the page source is not converted to a snapshot yet, so capture.snapshot fails with NOT_IMPLEMENTED (UNSUPPORTED_CAPABILITY in a test). What it does:

  • E2E.Mobile gets one new public interface, IDeviceClientSource, which has no upstream counterpart. A MobileOptions.Provider that implements it makes the IDeviceClient for each session, in place of the agent-device client. A worker in another process builds its engine from the same options, so its provider object makes the client there. What the client needs to find the leased device travels in DeviceLease.Client, which reaches the worker as DeviceConnection.Client. Any other provider is unchanged.
  • Supported: launch and terminate an app, deep links, tap, double tap, long press, fill, type, swipe, pan, drag, scroll, screenshot, home, back, native alerts, the keyboard (Enter and dismiss), orientation (portrait and landscape), and the clipboard. A ref finds the node’s rect in the newest snapshot, and a tap lands on its centre. A ref of an older snapshot is stale (NODE_STALE).
  • Refused as UNSUPPORTED_OPERATION, which a test sees as UNSUPPORTED_CAPABILITY: permissions, appearance, biometrics, location, wifi and airplane mode, clearing app state, the keychain, hover, folding, the foreground app, installing a build from a test, and launch arguments except on an iOS relaunch. The provider will install the app when it leases the device.
  • sessions.close does nothing. The engine closes at the end of every attempt, and the next attempt drives the same device, so only the provider’s release will end the session.
  • fill taps the field and writes to the focused element, because a snapshot ref is not an Appium element id. back on iOS taps the first button in the navigation bar, as agent-device does, and fails when the screen has none; Android uses the system back.
  • settle options are ignored: the engine settles on observe. normalizeStatusBar is sent on for the masked screenshot an observation takes, but the Appium client ignores it (Appium cannot normalize the status bar), so a screenshot shows the device’s real status bar.
  • The package is in CI’s pack step but not in the release workflow until the provider lands. Not verified against a live account: every wire detail was read from TestMu’s and Appium’s documentation, and the mobile: script names and arguments were not sent to a real hub. The unit tests use a fake hub. Among them: whether the hub accepts the LT:Options-only capabilities without a top-level platformName, the session id field, and which mobile: commands it forwards.

What still differs from upstream’s @e2e-dev/testmu

Section titled “What still differs from upstream’s @e2e-dev/testmu”

E2E.TestMu.Mobile serves the same TestMu AI devices another way, so it is a client, not a port. Compared with upstream’s device provider (provider.ts, daemon.ts, driver.ts, heartbeat.ts, sessions.ts):

  • No IDeviceProvider leases a device: upstream’s testmu(options) (device, osVersion, app, deviceType, project, build, sessionName, orientation, geoLocation, timezone, language, locale, appiumVersion) has no counterpart. Nothing uploads the build from app, names the dashboard session (e2e-<run id>-<target>-<slot>, with the project and the build), or releases the session at the end of a run. The package opens its session from a TestMuSessionRequest a caller builds.
  • No RecordAsync: upstream’s record finds the lease’s session on the dashboard (findSession) and returns its video URL (sessionVideoUrl) as a video/mp4 link, with the session’s start time. The seam is ported (see Provider recording), and nothing on TestMu’s side feeds it. The client refuses recording.record, so a TestMu device has no video.
  • No agent-device daemon or plugin: upstream starts one daemon per slot with @agent-device/testmu, checks its version (assertDriverVersion), keeps the lease alive with a heartbeat (LEASE_TTL_MS), and allocates with retainOnClose. The port has no heartbeat.
  • Upstream commit 64432f1 (tester-army/e2e#1307) makes a TestMu AI device release fail the run when agent-device cannot confirm it ended the session (testmu-strict-release), through the shared lease helper. The port has no TestMu AI provider to release, so the change has no counterpart. The helper itself is ported: see BrowserStack.
  • The page source is not converted to a snapshot, so a test cannot observe the screen (capture.snapshot is NOT_IMPLEMENTED).
  • Credentials: upstream reads LT_USERNAME and LT_ACCESS_KEY from the run’s environment (testmuCredentials); this package takes the hub credentials from its request.

E2E.Mobile.DevFlow drives a .NET MAUI app through the MAUI DevFlow agent, the HTTP server Microsoft.Maui.DevFlow.Agent runs inside the app in Debug builds (builder.AddMauiDevFlowAgent()). Upstream has no counterpart, so every type here is .NET-only. The package depends on E2E.Mobile and holds an IDeviceClient over the agent’s /api/v1 API plus the provider, DevFlowAgents, an IDeviceProvider and IDeviceClientSource to pass as MobileOptions.Provider. It is a preview: it attaches to an app that is already running, and the device-side verbs are not there yet. What it does:

  • DevFlowAgents.AcquireAsync finds the agent (DevFlowAgentsOptions.Port, else the one agent of the platform and AppName a running DevFlow broker lists at port 19223, else port 9223), waits ConnectTimeout (60 s) for its status, checks the platform (status.device.platform, where the agent writes it) and the app’s package id against the target, and claims the agent’s mutation lease as holder e2e, so the DevFlow Inspector and the MCP server see who drives the app. The agent answers a claim with 200 and says who holds the lease; one another host holds fails the run naming the holder. The lease travels to the worker in DeviceLease.Client (host, port, leaseId, label). Release gives the lease back and leaves the app running. A worker without a binding finds the agent on its first call, with the platform devices.boot names, and claims a lease of its own there. The broker is never started from here. One agent is one running app, so a target with more than one worker slot is INVALID_CONFIG.
  • The agent lets a lease lapse ten seconds after the holder was last heard from, and refuses a mutation under a lapsed lease with 409 reason: lease. So, as Microsoft’s own AgentClient does, every request that changes the app claims the lease again first (a claim the holder has is a heartbeat). A 409 lease on an action names the holder from the agent’s details, or says the lease lapsed when there is none.
  • capture.snapshot reads GET /ui/tree?envelope=true and flattens it into the snapshot the engine projects. The agent answers 409 capture-changed-during-read when the screen moves during the read, as it does while an animation runs, so the tree read and the hit-test are tried up to four times with a short wait before they fail. MAUI types become agent-device kinds (Entry is text-field, Label is static-text, Switch is switch); a type without a mapping keeps its name in kebab case (vertical-stack-layout), and the agent’s own link, heading, and listitem roles win over the type. The AutomationId is the identifier GetByTestId reads. A field’s text is its value; a password field reports password: true and no value, because the agent writes [REDACTED] in place of the text and never sends the plaintext. A switch, check box, or radio button reports checked. displayed and opacity give visibleToUser. The viewport is the window’s bounds. interactiveOnly keeps the interactive, labelled, and identified elements and re-parents their children.
  • Actions carry the element id and the captureEpoch of the tree the ref came from: tap (a tap at a bare point hit-tests the point first, GET /ui/hit-test, since the agent’s tap takes an element), double tap (gesture doubletap), long press (gesture longpress, 1 s by default), fill, clear (a fill with empty text), type (the agent’s key with text on the field that has the focus, read off a fresh tree, and key: "text", a name that is no key, so a typed delete or enter is appended rather than pressed), Enter (key on the focused field), a screen scroll (gesture swipe on the page the other way, half the viewport by default), a node swipe and scroll, a pan, back (POST /ui/actions/back, which pops the navigation, a modal, or a Shell route), the app’s theme (PUT /device/app/theme for device.setAppearance), the foreground app (the agent’s status), and screenshots (GET /ui/screenshot?scale=native, with the logical size from the window’s bounds).
  • apps.open checks that the agent runs the app the target names and answers its identity. A relaunch, launch arguments, deep links, install, close, home, alerts, orientation, folding, the clipboard, the keyboard dismiss, hover, a drag between nodes, a long press or pan at a bare point, and every device setting but the theme are refused as UNSUPPORTED_OPERATION, which a test sees as UNSUPPORTED_CAPABILITY. sessions.close does nothing. settle options are ignored: the engine settles on observe. normalizeStatusBar is ignored.
  • Errors: a 409 (a stale capture, a changed tree), an element the agent does not find, or a ref the newest tree does not have is COMMAND_FAILED with reason: ref_not_found, a retryable NODE_STALE; a 501, a 404 that names no element, and the not_supported and unsupported-capability codes are UNSUPPORTED_OPERATION; a mutation lease another host holds names the holder; an agent that does not answer is SESSION_NOT_FOUND (INVALID_STATE), with the hint that the app may not be running. The agent answers { success: false, error, reason } rather than the RFC 7807 body its spec shows, so both shapes are read.
  • E2E_DEVFLOW_TRACE=1 prints each call to the agent (method, URL, status) to stderr, since loopback calls skip a system proxy such as Proxyman. Bodies are not printed: they hold typed text.
  • The sample (samples/MobileApp) registers the agent under #if DEBUG and runs the same tests with E2E_MOBILE_PROVIDER=devflow against the app you launched. The two tests that send the app to the background or relaunch it are inconclusive in this mode.
  • The package is in CI’s pack step but not in the release workflow until the device-side verbs land. Not verified against a running app: every wire detail was read from the agent’s source and spec in dotnet/maui-labs at main (the 0.1.0-preview.13 packages). The unit tests use a fake agent. Among the things to check on a device: the window bounds as the viewport on iOS and Android, whether role is set on MAUI elements, the key action with text, the lease body, and the broker list.

E2E.WinApp drives a Windows desktop app through Windows UI Automation, with the library behind the winapp ui command of the Windows App CLI (Microsoft.Windows.SDK.BuildTools.WinApp.UIAutomation), in the test’s own process. Upstream has no desktop engine, so every type here is .NET-only. The package follows the shape of E2E.Mobile: WinAppEngine is the IEngine (Platform windows, capabilities observation, actions, keyboard, scroll, screenshot, and pinned app; no location, history, video, or tap modifiers), WindowSession the IEngineSession, UiaProjection the projection into the shared node model, WindowActions the action mapping, WindowKeys the key grammar, WinAppErrors the error table, Window the fixture, WinAppTools the agent tools, and WinAppTargetEngine the one that reads a TargetConfig. The library is reached through one seam, IWindowDriver, whose only implementation, UiAutomationDriver, is the only type marked [SupportedOSPlatform("windows")]; the rest of the package builds and is unit-tested on any platform (tests/E2E.WinApp.Tests, with a scripted driver). What it does:

  • A windows target takes app.appPath (the executable to launch, relative to the config folder; E2E_WINAPP_APP_PATH overrides it) and app.bundleId (the process name). With a path the engine launches the executable itself (WindowProcess: no shell, ArgumentList, stdout and stderr pumped into the attempt’s app log, a visible top-level window awaited within LaunchTimeout, the process tree killed on timeout, cancel, or close). With a name alone it attaches to the running app and never ends it. app.open() has no URL to open, so it relaunches the app; restart and clearState relaunch too, and nothing is deleted. A URL passed to open is UNSUPPORTED_CAPABILITY.
  • An observation inspects the main window and every other visible window of the process (a WinUI flyout, menu, or combo box list opens in a popup window of its own), nests the flat element list the library returns by depth, and projects UI Automation control types onto the browser roles (Button is button, a ToggleSwitch class is switch, Edit is textbox, a PasswordBox class is a secure textbox with no value, List/ListItem, ComboBox, Tab/TabItem, Window is window for the app window and dialog for a ContentDialog, popup, or flyout; an unmapped type is its name in lower case). The test id is the AutomationId. Boxes are logical pixels, relative to the main window, read through the window’s DPI. Refs are the library’s selector slugs, bound for the session in a bounded list, since UI Automation identity is stable across inspections: an element the library no longer finds is NODE_STALE.
  • Actions prefer the control’s own pattern: tap invokes, selects, toggles, or expands an invokable control and clicks the middle of any other; fill and clear use the value pattern and fall back to focus, Ctrl+A, and typed text for a control that refuses it (a RichEditBox); press and type focus the control, bring the window forward, and send keys through SendInput, which reaches the foreground window only (WinUI controls are windowless and drop posted messages); a window that cannot come forward is NOT_ACTIONABLE; select expands a combo box, observes again, and selects the option by name, value, or automation id; check and uncheck use the toggle pattern (a radio button is selected and cannot be unchecked; nothing is sent when the state already matches); a swipe turns the mouse wheel over the node for up and down, and uses its scroll pattern for left and right or when the desktop cannot take input. On the screen it turns the mouse wheel over the largest scrollable control (the pattern steps by a share of the whole extent, too coarse to land a row of a long virtualized list in view; six notches move a screen or so), scrolls that control by pattern when the desktop cannot take input, and turns the wheel over the window when there is none (up and down only: a sideways swipe with nothing to scroll is NOT_ACTIONABLE). A sensitive fill never puts the value in a message. The session also offers hover, long press, drag, a right click, and typed text.
  • A screenshot is the main window, encoded as PNG by the package’s own PngEncoder (the CLI tool strips the Skia natives), with every secure field painted black; a secure field without a box withholds the image.
  • Window is the fixture: OpenAppAsync (the app under test, with Relaunch, or another running app by name), CloseAppAsync, ForegroundAppAsync, ListWindowsAsync, ResizeAsync, MaximizeAsync, RestoreAsync, MinimizeAsync, and AlertAsync, which answers the dialog the newest observation saw: accept presses its PrimaryButton (else a button named OK, Yes, Confirm, Accept, Save, or Continue), dismiss its CloseButton or SecondaryButton (else sends Escape). WinAppTools.Create(engine) gives the agent open_app and alert, scoped to windows.
  • Errors: a launch that fails or shows no window is ENVIRONMENT_UNAVAILABLE; a vanished element is a retryable NODE_STALE; an offscreen control, a refused value, and a lost foreground are NOT_ACTIONABLE; an app the engine cannot find is INVALID_STATE (with the hint to call app.open()); anything else the library reports is ENGINE_FAILURE. A caller’s cancel is CANCELLED. The engine never produces OPERATION_TIMEOUT.
  • e2e explore and e2e mcp take a windows target (TargetEngines.Create gets a windows factory the way it gets a device one; WindowsTargets in the CLI builds the engine on Windows and is INVALID_CONFIG on another host). Pattern actions work with the window anywhere; keys, clicks, drags, and the wheel need an unlocked, interactive desktop with the window in the foreground.
  • Not there: App.BackAsync (UNSUPPORTED_CAPABILITY: a desktop app has no history), video, tap modifiers, popup windows in screenshots, a deep-link tool, and the clean-up of the app’s data on clearState. A packaged (MSIX) app starts through a broker and exits at once, so it is attached by app.bundleId, not launched.

apps/WinAppBenchmark is upstream’s apps/mobile-benchmark rebuilt as a WinUI 3 app with Microsoft.UI.Reactor: 19 of its 25 scenarios, with the same names and the same AutomationId where upstream has a testID. Not ported, because the surface is mobile-only: Permission Prompt, Photo Picker, Stripe PaymentSheet, Apple Pay, Apple Pay Billing Address, and WebView Accessibility. The README of the app lists each change made to fit a desktop window.

apps/WinAppBenchmark.E2ETests ports upstream’s apps/mobile-benchmark suites (smoke, login-form, flows, flows-lists, controls, device, device-fixture, and tests-agent/scenarios), one directory per upstream file and one class per describe. They are real-model tests of the Windows category, so CI builds them and does not run them. Not ported: the tests of the six scenarios the app lacks, the fixtures a desktop window lacks (appearance, clipboard, home, network, location, biometrics, keyboard), describe('refusals') (the Windows engine declares the verbs it checks), the placeholder query, and the pointer-point test (tapAt, a tap position, screen.swipe). The agent scenarios Broken Accessibility, Vision Only, Flattened Registration Form, Flattened Login, and Gestures are declared and skipped with a reason, as upstream declares a gap: agent.act gives the model the tree only, never a screenshot, and it has no long press. The test project README lists each test that differs from its upstream it.

apps/WebBenchmark is upstream’s apps/web-benchmark/app rebuilt as an ASP.NET Core Blazor Web App instead of a copy of the Next.js project: the catalog (ExamplesCatalog, upstream’s examples.ts, with every slug, name, description, and planted bug in upstream’s order), the home page at / (every scenario as a link whose data-testid is its name), and one page per scenario at /e/<slug> (a static header with the back link and the name, then the scenario as an interactive component that connects before it shows, as a client-rendered React one only shows once it runs). The DOM each scenario exposes is upstream’s: its data-testids, texts, roles, and inline styles. The app runs with dotnet run --project apps/WebBenchmark on port 4280, upstream’s port. It is being ported in pieces (#1149): only Login Form is a page so far; the other catalog entries are listed on the home page and answer 404 until their component lands. control-inventory is still served as a static copy by tests/E2E.NUnit.Tests (its tests are ported there); it moves into the app with its own piece. Upstream has no tests/ file for file-round-trip and new-tab-flow.

apps/WebBenchmark.E2ETests ports upstream’s apps/web-benchmark/tests suites, one directory per upstream file. It hosts the app in process on a free loopback port (BenchmarkTest), where upstream’s e2e.config.ts starts pnpm run start through app.command, because the NUnit adapter does not start app.command. The tests are locator-only and run in the normal CI test run. So far: Smoke (smoke.e2e.ts, whole). Not ported yet: the other tests/*.e2e.ts files with support.ts and canvas.ts, and tests-agent/ (login-form, planted-bugs, scenarios, unique-cache).

E2E.WinApp.NUnit and E2E.WinApp.XUnit.V3 add WinAppTest, a base class over E2ETest for a windows target, the way MobileAppTest serves a device target. It reads AppId (app.bundleId) and AppPath (E2E_WINAPP_APP_PATH, else app.appPath) from the target, builds a WinAppEngine from CreateWinAppOptions(), hands the agent WinAppTools, sets the step timeout to 90 seconds, and relaunches the app before each test (WinAppHost.OpenAsync, shared by both adapters from src/Shared). Window is the session’s fixture. The base class adds no [Category].

TestMuBrowsers (the E2E.TestMu package, namespace E2E.TestMu) is the port of upstream’s testmuBrowsers() (packages/testmu/src/browsers.ts, with dashboard.ts and web.ts, commit 92f8cb0), ported in part. It is a WebEngineOptions.Browser provider for the TestMu AI (formerly LambdaTest) web grid. Upstream’s mobile device provider is a separate part of the same package (see TestMu mobile). Taken from upstream: the Edge --user-data-dir=remote-debug-profile-edge entry in browserOptions (appended to the given ones, kept if a --user-data-dir= is already there), the idleTimeout default of 600 seconds, the project default of e2e, the session name e2e-<run id>-<target>-<slot> (a per-attempt lease is e2e-<run id>-<target>-attempt-<attempt id>), the Windows 11 default for Platform, the credentials read trimmed with a blank value counted as unset (the error names each missing variable), and the validation of Capabilities at construction (INVALID_CONFIG for a nested LT:Options, browserName, user, accessKey, name, a browserOptions that is not an array of strings, and a number JSON cannot encode). Not taken: the /puppeteer CDP URL (the port keeps the Playwright-protocol endpoint, below), the browserName check (the port also lets pw-chromium through), and the unknown-key check (a record has no unknown keys). The port keeps the seam’s names (IBrowserProvider, BrowserLease) and adds only the provider, TestMuBrowsers, and its options record, TestMuBrowsersOptions. Only the web grid is covered; TestMu’s real devices are not. Differences from a provider like upstream’s kernel:

  • It calls no TestMu API. AcquireAsync builds wss://cdp.lambdatest.com/playwright?capabilities=<JSON> from browserName, browserVersion, and LT:Options (platform, build, name, user, accessKey, and the options that were set). The grid starts the session when the engine connects. The lease’s Protocol is Playwright: the grid answers Playwright’s own protocol on this URL, not CDP, so the engine dials with Chromium.ConnectAsync and opens its own browser context, because the browser has none. ReleaseAsync calls nothing, because the grid ends a session when its connection closes (checked against a real account). SweepAsync is the interface default.
  • The TestMu dashboard shows these sessions without a Passed or Failed mark. TestMu marks a session through its Automation API or a lambdatest_action call, which needs the test result, and e2e passes no test result to a provider (upstream’s BrowserReleaseContext has none either). The provider also does not look up the session id.
  • The credentials are LT_USERNAME and LT_ACCESS_KEY, or the aliases TESTMU_USERNAME and TESTMU_ACCESS_KEY, read from the run’s environment. The access key is part of the endpoint, so the lease id is the session name (e2e-<run id>-<target>-<slot> or e2e-<run id>-<target>-attempt-<attempt id>), which is what progress lines print. The engine puts no endpoint in an error or a log line, and Playwright drops the query string from the URL it prints when a ws:// or wss:// connection fails, so a refused connection does not show the key (a test checks it). Each lease endpoint is about 650 bytes, and a worker’s leases travel in one environment variable capped at 16384 bytes, so a target with more than about 20 worker slots fails at prepare.
  • Checked against a real account: ConnectOverCDP on this URL fails with Protocol error (Browser.getVersion), Chromium.ConnectAsync works, and closing the connection ends the session. TestMuLiveTests repeats that through the engine and reads the session’s end from TestMu’s Automation API. It is skipped without LT_USERNAME and LT_ACCESS_KEY. Mobile devices are not covered.
  • Behavior change: a Capabilities entry named name, user, or accessKey used to replace the provider’s value. It is now refused with INVALID_CONFIG, as upstream does.
  • TestMuBrowsersFunctionTests (Browsers/) ports the its of upstream’s browsers.test.ts for the Edge flag and the validation. Two are partial (Partial_ prefix): the Edge it that also checks upstream’s build (run-1; the port’s is e2e-<run id>) and browserVersion inside capabilities, and the rejection it.each, of which the rows for user/accessKey, name, nested LT:Options, browserName, browserOptions (a string, [1], null) and a value JSON cannot encode are covered. The project and idleTimeout defaults are checked in the .NET-only TestMuBrowsersTests, because the upstream it that checks them also checks the /puppeteer URL and the Windows 11 default together with build: run-1 (the port’s build is e2e-<run id>). The its for the session name and for a missing or blank credential are ported. Not ported: the /puppeteer URL (the port’s endpoint differs), the lease id without spaces, undefined values keeping the defaults (C# has no undefined), the unknown-key, browserName, non-object capabilities, Date, Map, function, BigInt and cycle rows (a typed record and JsonNode cannot hold them), the log line (the port logs nothing), the credentials taken from process.env (a test would change the process environment, which the live test reads). The other TestMuBrowsersTests and TestMuLiveTests are .NET-only, in tests/E2E.TestMu.Tests.

Upstream’s e2e-web command (packages/web/src/cli.ts) has one subcommand, install. It runs the pinned Playwright CLI. The port has it as e2e install [chromium|firefox|webkit ...] [--with-deps], in the tool that already ships the Playwright driver. It installs Chromium when no browser is named, forwards the options before the browsers, exits with the Playwright code, prints usage for -h or --help anywhere, and exits 2 for an unknown option or browser. As upstream, the install runs with PLAYWRIGHT_SKIP_BROWSER_GC=1 unless the user set it. The engine launches the browser WebEngineOptions.BrowserName names (Chromium, Firefox, or WebKit; Chromium by default). Upstream’s browser option is a name or a provider; C# has no such union, so the port keeps the provider in Browser and the name in BrowserName. Connect and a provider attach over CDP, so Connect with another browser is INVALID_CONFIG.

Upstream’s command lives in the web package (e2e-web, from @e2e-dev/web), apart from the e2e command. The port is one tool, and WebEngine is in the E2E package, so the command is e2e install in E2E.Cli, the one place the Playwright driver ships. The code follows upstream’s split: E2eWebCli.MainAsync is main and CliIo is its CliIo (E2eWebCli is named for the command; a method called Main would be taken for an entry point), WebEngine.RunPlaywrightCli is runPlaywrightCli, and BrowserConnection.BrowserNames and IsBrowserName are BROWSER_NAMES and isBrowserName.

Not ported:

  • A command named e2e-web, and npx, bunx, and pnpm exec usage lines. dotnet e2e install is the local tool form.
  • Upstream’s exit code 2 for a missing or unknown command. e2e exits 1 for both, as it does for every command.
  • Forwarding SIGINT and SIGTERM to the installer and the 128-plus-signal exit code. Microsoft.Playwright.Program.Main runs in this process. Ctrl+C in a terminal reaches its driver in the same process group; a SIGTERM sent to e2e alone does not.
  • install.test.ts (ensureBrowsersInstalled) is the first-launch install of the engine, not the command. The port covers it in E2E.Tests/Install, and upstream’s own checks of the installed-browser cache and of the run’s environment have no counterpart: the port leaves that to Playwright’s install (see Web engine).

Ported from upstream packages/e2e/src/mcp at commit ee901b333ed12352418dfb07bda5eafe32e71c8d (docs(agents): show several personas running one suite (#1258)), apart from what is listed below. e2e mcp serves over stdio with the server name e2e, the tools, resources, and logging capabilities, and upstream’s four fixed tools with their names, descriptions, and closed argument schemas. Stdout carries only the protocol; every other write goes to stderr, and the MCP SDK logs nothing. The flags are --config, --target, --headed, a hidden --headless, and --max-sessions (1 through 16, default 4). A session is headless by default; open_session takes headed to show the browser or hide it, and --headed makes headed the default for a session that does not say (upstream commit dc2afca). A bad command line exits with 2, a disconnect or a signal with 0, and an unexpected error with 1. The resources e2e://guide and e2e://guide/<topic> serve the bundled skill; an unknown topic fails with UNKNOWN_TOPIC.

A session is an attempt on the config’s target with an engine of its own: a Chromium WebEngine for a web target, or a MobileEngine for an ios or android target (see Device sessions below), or a WinAppEngine for a windows target (see WinApp engine), so parallel agents each drive their own browser, device, or app (a windows target with only app.bundleId attaches to one running app, which they share). open_session loads e2e.config.json fresh, claims the config (CONFIG_IN_USE for another config while a session is open), and fails UNKNOWN_TARGET for a target the config does not declare, CONFIG_NOT_FOUND for no config (an explicit config that does not exist names the resolved path and the working directory a relative path resolved against, as upstream #1478; E2EConfig.ExplicitConfigNotFound is upstream’s explicitConfigNotFound, shared with e2e explore --config), SESSION_OPEN when no slot is free. call and tools name a session, or fail NO_SESSION or SESSION_REQUIRED. A session ends on close_session, after 30 minutes without a call, or after 4 hours. It never reads or writes the replay cache. Every configured secret is a secret of the session: any output, error, log line, and the close summary shows its value by name (<secret:name>). type_secret fills a secret into an editable field (a password secret needs a password field), and screenshot keeps attaching the masked PNG after a fill (upstream #1437): it masks secure fields only, so a value the app shows elsewhere is in the image.

The catalog is what the testing agent’s tools do, so a coding agent acts as the model of an act does: observe, tap, double_tap, long_press, right_click, hover, type, press, select, check, uncheck, clear, drag, scroll_to, scroll, navigate, back, screenshot, type_secret, and locate. scroll_to and scroll need EngineCapabilities.Scroll, back needs History, screenshot needs Screenshot, and type_secret needs a credentials entry or a secrets entry (tester-army/e2e#704, 3dc4ec9, read at 7b1b8b2: Session.cs passes E2EConfig.AllSecrets, as upstream’s secretParams does). The opening text adds a Credentials: line before the Secrets: line, with each credential’s name, username, and password secret (<name>.password); the password value is never printed. A test line spells a typed credential username as Credentials.User(name).Username and a type_secret of <name>.password as Credentials.User(name).Password (TestLineFills, upstream’s TestLineFills). navigate allows http and https only (POLICY_DENIED for any other scheme).

Differences:

  • Node ids and diff results (tester-army/e2e#231, b9f032b, added ScreenPresenter; the session has shared it since #181, afde198): observe lists #id role "name" ... lines under Current screen (revision b3, path /, 12 nodes):, and an action answers with its lead, the test line, and what changed since the screen the agent last received (Screen changes since revision b3 (now revision b4, 12 nodes): 1 added, 1 changed., then added, changed … (was: …), removed lines), as upstream’s ScreenPresenter (agent/screen-update.ts) does. ScreenPresenter is Agent/ScreenUpdate.cs: the first screen whole, a later one as the difference keyed by node id, focus left out of the comparison, the whole screen again past 60 changed lines or half of it, no removals against a truncated listing, and the note when an action closed the on-screen keyboard. An unchanged screen reads Screen unchanged since revision …, or No listed node changed within the wait after this action … after an action that should have changed it (expectChange is false for scroll, scroll_to, type_secret, and a press that only moves focus, as upstream). A failed action reports the changes after its tap n9 failed: LOCATOR_NOT_FOUND: node n9 is not on the current screen; re-observe for the newest ids lead. The built-in agent uses it too (#1022): DefaultAgent.PresenterFor makes one presenter per step, shared by the opening prompt (Open) and the tools (Present), with the pixel half (Attach, PixelEvidence, the screenshot the model holds). Transcript compaction and the overflow shrink find a whole screen by Current screen (revision , as upstream’s FULL_SCREEN_PATTERN. Differences: the session has no screenshots on act of its own, so its presenter has no pixel half (the “No screenshot can be taken” text, the unchanged-screen cases that compare images); the lines are FailureEvidence.Listing’s (SnapshotText.FormatNode: states each in its own bracket, a secure field as secure), and the listing is cut at the default observation limit (262144 bytes), where upstream cuts at the agent’s maxObservationBytes. A custom executor’s ExecutorObservation.Text is the same lines (see Custom executors (#1022) below). Node ids are the engine’s refs (SemanticNode.Ref), unchanged. Custom executors (#1022): ExecutorObservation.Text, which an executor reads from ObserveAsync and Start, is the #id role "name" ... listing, one node per line, cut at the observation byte budget (see Agents), as upstream’s text; ExecutorTarget takes the id with or without the #. A custom executor that parsed the earlier Screen (route): text with [ref=…] lines breaks and reads the id after # now. The listing has no Screen ( heading: the route is ExecutorObservation.Path. The presenter (the Current screen and diff results) stays the built-in agent’s and the session’s, as upstream’s screen-update.ts does; a custom executor gets no diff results. .NET-only: the judgment path (assert, waitFor, extract) prints a Screen (route): line before the same listing, where upstream wraps its text in <observation revision=… viewport=…>; OverflowShrink.FullScreenPattern still matches that line.
  • The grammar is the port’s: type and type_secret take text and secret; uncheck and clear are tools of their own. Upstream’s point tools (tap_at, hover_at, drag_at, type_at, press_at, select_at) are served as upstream’s grammar offers them, from AgentTools.CreateGrammarTools: the session’s screenshot notes the shot and the viewport on the session’s ScreenPresenter (Attach), which the point tools read their points against (before a screenshot they answer with the line that says to take one). On an engine with a keyboard type takes an optional target and replace, and a type with no target has no test line (the value went to the focused field). long_press, right_click, hover, and drag are, and a coding agent over MCP gets each one only where the engine declares its action kind (longPress, secondaryTap, hover, dragTo), as act does. dismiss_keyboard is a tool only where the engine can hide its keyboard (IEngineSession.CanDismissKeyboard: the mobile engine).
  • locate writes the Screen call a test uses (Screen.GetByRole("button", "Save")) and upstream’s codes LOCATOR_NOT_FOUND and LOCATOR_AMBIGUOUS.
  • As upstream, a locate with a status, alert, or listitem name that matches nothing points at Screen.GetByRole(role).Filter(text) and Screen.GetByText (spelled as GetByRole(role).filter({ hasText }) upstream), and an exact: false query is not told to loosen the match again (upstream #1147, 5e9597c): the advice says “an” before a role that starts with a vowel (an alert, a status), and for an exact: false query it keeps the option in the text call, Screen.GetByText("Saved.", exact: false) (getByText(q, { exact: false }) upstream). The web engine names those three roles from their content, so there the name also matches; the advice still holds, since the text matches either way.
  • Test lines (upstream #1317, 9ceb071): every action answers with the Screen or App call that repeats it, after the first line of its result, and the read-only test_lines tool returns them as a draft test body. The code is C# (await Screen.GetByRole("button", "Save").TapAsync();, Secrets.Get(name), Filter(text), Nth(i), new RoleOptions { Visible = true }, App.OpenAsync(path)), and SessionTestLines (Mcp/TestLines.cs) is upstream’s SessionTestLines (mcp/test-lines.ts). Differences: the port’s tree carries a node’s test id, so GetByTestId is the last query tried for a node, where upstream reads the id off the live node; the port resolves each locator through the engine’s LocateAsync (2 s each, binding only the matches, so a device keeps the agent’s node ids valid) when the engine has one, else on one fresh look at the screen per node with LocatorResolver, where upstream spends one engine resolve on each (the cap of 10 tries stays); the live look comes in the port’s resolver order, so the twin of a shadow root is told apart by its place in that order and never by the box it kept; there are no credentials, so a fill names Secrets.Get(name) only; a type that fell back to the keyboard does not exist, because the port’s type always fills; a locator tap takes no modifiers, so a tap or double_tap with modifiers prints No test line:; a press has no times. The web engine names a list item from its content, so a row is found by that name (GetByRole("listitem", "Offer B Reserve")) before it is found by Filter(text). The draft ends with a line that tells the agent to add an Expect after each step, where upstream also names the credentials and secrets imports. The session catalog reads the newest observation from the agent’s observation feed, where upstream wraps the step context. Not ported with it: the reserved tool name (the port has no project tools), the telemetry event of an MCP session. The drafted lines run as a test class of a project built in a temporary directory with dotnet test (DraftedTestRun), where upstream runs them with its runProject.
  • The fixed tools check their arguments with a strict check of the JSON Schema subset tool schemas use, since the .NET MCP SDK does not validate them. The messages are zod’s, so an unknown argument reads Invalid arguments for tool <name>: Unrecognized key: "<key>", as upstream.
  • run_code (upstream #1316, 6b41857) is not ported. It parses and runs TypeScript test statements (mcp/code-parse.ts, code-surface.ts, run-code.ts) with a surface that matches the test API. C# cannot be evaluated without a compiler or scripting host, so the tool, its LEFT_OUT reasons, and the mcp-code-parse tests have no counterpart. The agent writes the Test line: an action printed into the test and runs it with dotnet test.
  • run_tests (upstream #1520) is not ported. Upstream’s fifth fixed tool runs e2e run in its own process and returns the command, the exit code and its meaning, and what the run printed; it takes files (files, directories, globs, or file:line; without it, every test the config discovers) and the e2e run flags (config, target, grep, grepInvert, tag, excludeTag, lastFailed, changedSince, headed, workers, retries, repeatEach, maxFailures, actionTimeout, noCache, updateSnapshots), and fails RUNNER_BUSY while a run is in progress (mcp/run-tests.ts, mcp/test-outcome.ts, mcp/output.ts, and the “Run tests next to a session” section of docs/mcp-server.mdx). The port has no e2e run: a suite is run by dotnet test, which the agent runs in its own shell, and a dotnet test wrapper would be a tool upstream does not have (documented, not built). The upstream tests #1520 added or changed have no counterpart. tests/integration/mcp-run-tests.test.ts, describe('e2e mcp run_tests'): “lists run_tests beside the session tools”, “runs one file as e2e run does, with progress per line”, “runs one test by file:line”, “runs the whole suite and reports a failure as the run result, with the secret redacted”, “keeps the end of an output too long for one result, and bounds each progress line”, “returns a selection that matches nothing as an error result”, “refuses a file that reads as a flag, an empty target list, and raw flags”, “runs beside an open session and leaves it open”. tests/unit/mcp-run-tests.test.ts, describe('runArguments'): “runs every test with no arguments”, “puts each value in its option word and the files after –”, “takes the server’s config, target, and headed unless the call names its own”. tests/integration/mcp-server.test.ts: “serves five fixed tools and the guide resources” (the port serves four). tests/unit/cli-signals.test.ts, which cover the run’s interrupt: “climbs the whole ladder on its own once the parent closes its IPC channel”, “climbs at once when the parent was gone before it armed”.
  • Running a test in a session (upstream #1315, 3d2c362), ported in part. open_session takes test, the full name of one NUnit test (Namespace.Class.Method; upstream names file:line), and the config takes testAssembly (.NET-only: upstream collects tests from its tests globs), the built test assembly. The tool runs the test in its own process and stops on the screen where it passed or failed; the opening text leads with Test "<name>" ended without failing after <time>; N steps ran. or failed after ... (timed out for TEST_TIMEOUT), and for a failure the error code and message, At <file>:<line>:<column> (the line the failure unwound through, else the failing step’s) with the code frame around it (CodeFrame, E2E.Cli, upstream’s codeFrame), URL at failure:, the nodes nearest a failed locator, and the last 15 steps (TestOutcome.Describe, Mcp/TestOutcome.cs, upstream’s describeTestOutcome in mcp/test-outcome.ts). The session’s test lines continue the test (TestLineOptions.TestRan, upstream’s testRan): test_lines reads Test lines from this session's actions after test <name> stopped. A name that selects several tests fails TEST_AMBIGUOUS and a test with [E2ESession] fails SESSION_TEST_UNSUPPORTED, both before anything boots (SessionTests.SelectOne, over ISessionTestRunner.Select, upstream’s selectStandaloneTest). The tool names no test framework: SessionTests.Load (Mcp/SessionTests.cs) loads the assembly and finds an ISessionTestRunner (Run/SessionTests.cs, .NET-only seam) in the E2E.* package it references; NUnitSessionTestRunner (E2E.NUnit) runs the test with NUnitLite by its full name. E2ETest offers its session to SessionHandover at teardown, so the host owns it and completes and disposes it at close_session. The replay cache works as configured for the test, and settles at close with the test’s failure. Differences: afterEach hooks and fixture teardown run before the hand-over, not at close_session: the outcome has no phase or secondary errors (Also failed), the time includes set-up and tear-down, and the text does not say passed or skipped itself (a pass, a skip, and an inconclusive test read ended without failing); the messages name tests by full name, not file:line, and TEST_AMBIGUOUS has no target; SESSION_TEST_UNSUPPORTED covers a saved session only (the port has no serial groups or several agents), and the setup test itself runs; the assembly loads once per server, so a rebuilt test needs a restart; a [Retry]/[Repeat] test hands over the session of its first attempt; target and headed are refused with test (INVALID_ARGUMENT); a test that skips or is inconclusive reads ended without failing; the fixture reads its own config (the nearest e2e.config.json), not the session’s config. Not ported yet: xUnit v3 and file:line. CodeFrame draws a wide glyph as one column (Format.VisibleWidth), where upstream counts two. Tests: McpTestRun/OpenSessionTestOverE2eMcpTests in E2E.NUnit.Tests (four it of describe('over e2e mcp'), all Partial_, plus one .NET-only; the rest of mcp-test-run.test.ts waits on hardkoded/e2e-dotnet#1409, #1410, #1411, #1412, and test.fail is not ported), McpTestLines/SessionTestLinesTests (the continuation it), CodeFrameWidth/CodeFrameTerminalColumnsTests (the three it of code-frame-width.test.ts, Partial_: the terminal width is passed in, and the CJK and emoji caret rows are left out), and in E2E.Cli.Tests (.NET-only) McpSessionTest/SessionTestsTests and McpTestOutcome/TestOutcomeTests.
  • The server instructions name e2e.config.json, E2ETest classes, and dotnet test in place of e2e.config.ts, tests/*.e2e.ts, and npx e2e run.
  • Writing a test while walking the flow (upstream #1312, 9d884f5): the server instructions, the e2e mcp help text, the skill (mcp topic and workflow steps 2 and 3), and the coding-agents guide tell the agent to create the test file before open_session and add each step as it takes it: an Agent.ActAsync goal before it walks the goal’s path, or the Test line: an action printed, then, once the outcome shows, an Expect.That on a located locator or an Agent.AssertAsync. An action with no repeatable line answers No test line: and the reason, and test_lines returns the draft so far with a // comment for it. The port differs in one way: the workflow names the class per target (E2ETest for web, MobileAppTest for iOS and Android, WinAppTest for Windows) and how each opens its screen (App.OpenAsync(path), Device.OpenLinkAsync or the launch screen, the relaunch WinAppTest does before each test when the target names app.appPath, else attaching where the walk left off). That per-target split is .NET-only. The coding-agents guide has no “How an agent writes and runs a test” section or separate MCP server and reference pages, so only its “Let the agent use the app” paragraph changes.
  • The guide has upstream’s eight topics, written for .NET, plus writing-tests-nunit and writing-tests-xunit, one per test framework. explore describes Explore.ExploreAsync, and explore and bug-bash describe the bug bash as the port runs it.
  • The 2026-07-28 MCP revision deprecates logging. The server still declares it and sends its log lines, as upstream does.
  • A session’s engine is its own, so sessions never share an engine instance, and ENGINE_IN_USE happens only for a device (see Device sessions below). The credential registry upstream installs for a run (setSecretRegistry, holdSecretRegistry) is SecretRegistry.Hold here: a session holds E2EConfig.Credentials from its start to its disposal (E2ESessionOptions.Credentials, internal; E2EFixture and E2EHost pass the config’s), and the newest registry held answers Credentials.User. Upstream’s live option is not ported.
  • The e2e tool ships the Playwright driver of every platform (about 215 MB) and none of the SkiaSharp native libraries, since it never compares screenshots. Chromium installs on the first session, as for a test.
  • Device sessions: open_session on an ios or android target builds a MobileEngine on a local simulator or emulator (see Explore). The catalog leaves out navigate for an engine that declares PinnedApp, as the engine has no URL to open; before the first observation the session launches the pinned app fresh (TargetEngines.LaunchesPinnedApp, then App.OpenAsync), as upstream’s launchesPinnedApp does (upstream #1252, 3bd32ef). The summary adds App: <bundleId or appPath>, launched fresh., and the open_session description names the pinned app. It installs no build, so a local device target needs app.bundleId. The launch is bounded by the session’s time limit, as upstream bounds it by the attempt’s timeout, and a cancel of the request during the launch surfaces as CANCELLED. A device runs one app, so a second session on a device target fails with ENGINE_IN_USE (upstream’s code for two sessions on one engine instance; the port builds an engine per session, so SessionRegistry.ClaimEngine claims the device, .NET-only) until the first closes. Hosted devices are not ported yet. A windows target builds a WinAppEngine the same way (WindowsTargets.Create, E2E.Cli), on Windows only (INVALID_CONFIG elsewhere), and launches the executable app.appPath names or attaches to the process app.bundleId names before the first observation.
  • The screenshot path (tester-army/e2e#1481, f078364). screenshot takes an optional path, a .png inside the project (SessionCatalog.Screenshot, SaveScreenshotAsync is upstream’s saveScreenshot in mcp/catalog.ts). It saves the engine’s masked artifact (IEngineSession.ScreenshotArtifactAsync, upstream’s session.artifacts.screenshot) to the path and returns Saved to <absolute path> beside the image. A path outside the project root (through a symlink too), a hidden file, or one under a hidden directory is POLICY_DENIED, as for the agent’s upload. SessionCatalog.Create takes projectRoot and attemptDir, upstream’s CatalogOptions.projectRoot and attemptDir. The port has no saveScreenshot option on a shared grammarTools (agent/primitives.ts): its catalog builds screenshot itself, so the option lives there. A path that does not end in .png fails in the tool with INVALID_ARGUMENT (call screenshot: path: a .png file), since the argument check has no pattern. The port has no run_code, so upstream’s LEFT_OUT reason and the mcp-code-parse case have no counterpart. The port writes the file through a temporary name and moves it. Test: McpServer/E2EMcpTests, the saved, .jpg, and refused-path assertions of upstream’s opens a session with its catalog ....
  • open_session names the app (tester-army/e2e#1483, 0b84d35). The summary says the config was read with the MCP server’s environment, and AppLines.For (Mcp/AppLines.cs, upstream’s appLines in mcp/app-lines.ts) prints App: <href> with (port N, assigned for the declared port 0) for a free-port url, and Process: app.command "<executable>" (ready at <url without userinfo or query>; env <names>; inherits <names>; cwd; log), or Process: none for a target with no app.command. Urls.PrintableUrl is upstream’s printableUrl. The session resolves the declared app on the port it was started on (TargetApps.ResolveTargetApp) to read the readiness URL and the assigned port, where upstream’s target already holds them. ranTest is not a parameter, since the port has no open_session {test}. ManagedProcessHooks.Starting and Ready take the readiness URL (upstream’s starting and ready hooks). Tests: McpSessionHost/SessionHostTests (names the app command it started and the port it assigned, without args or env values; it runs the test app under the test host, since an apphost may be refused by the machine) and Urls/PrintableUrlTests.
  • start_recording and stop_recording (tester-army/e2e#612, 04a12619). SessionRecorder (Mcp/Recording.cs) is upstream’s SessionRecorder in mcp/recording.ts, with Describe(FinishedRecording) as describeRecording and Tools() as recordingTools. The catalog lists both tools when the engine declares EngineCapabilities.Video, and the session records only between them (the attempt’s own video is off). Each recording moves out of the attempt directory into <project root>/.e2e/videos/<session>/<n>[-<name>][-part<n>].<ext>; close_session and the idle and time-limit closes save a recording still running and list its files. Differences: the port has no output config, so the directory is always under .e2e in the project root; upstream’s tainted (the session’s pixel taint) is true here once type_secret filled a secret, since the port has no pixel taint, so the secret warning in Describe appears after a type_secret and not after other secret fills; the name’s pattern is checked by the tool, not by the argument schema; the engine’s calls are bounded by cleanupTimeout and the call’s cancellation token. .NET-only hardening: a video path that leaves the attempt’s directory fails the stop with ENGINE_FAILURE. e2e init also ignores .e2e/videos/, as upstream. Tests: McpRecording/SessionRecorderTests is mcp-recording.test.ts (the nine it; the tainted one sets the flag the callback reads); McpServer/E2EMcpTests ports the recording it of mcp-server.test.ts and its catalog list; McpSessionHost/SessionHostTests ports two it of mcp-session-host.test.ts (“records only between start_recording and stop_recording, and saves a recording still running at close”, “lists no recording tools when the engine records no video”), with FakeEngine writing video/fake.webm as upstream’s fake engine does.

Not ported:

  • The project’s own tools (defineTool, toModelOutput), custom engines, mobile tools, and per-session telemetry.
  • Redaction of what user code prints: a config is JSON, so no user code runs in the server.
  • e2e init registers the server (see Coding agents); by hand, use claude mcp add e2e -- e2e mcp or a .mcp.json entry.

E2ESessionOptions describes the default agent with Model, Judge, AgentExecutor, AgentSystem, AgentTools, AgentContext, MaxSteps, MaxModelCalls, JudgmentTimeout, and ProviderOptions, and names the others in Agents (an AgentOptions per name). E2ETest fills both from agents.<name> in e2e.config.json. A call picks an agent with its Agent option; an empty or unknown name throws INVALID_ARGUMENT (unknown agent "x"; configured: default, ..., with ; did you mean "y"? when one configured name is near, as upstream). Each agent starts from the defaults and inherits nothing from another. Settings are checked when the session starts and fail with INVALID_CONFIG.

  • A test or a class picks the agent for its calls with [Agent("name")] (upstream’s agent option of test and describe). The closest pin wins: a call’s Agent, the method, the class, a nested class’s enclosing class, then E2E_AGENT (the port’s --agent, one name; a pin wins over it, as upstream). An unknown name fails the test with INVALID_ARGUMENT when the session starts, where upstream fails at collection. [AgentContext("...")] is upstream’s agentContext: the layers join outer to inner with newlines and follow the agent’s own context, for every agent a call picks, and the cache key sees the joined text. .NET-only symbols: AgentAttribute, AgentContextAttribute, E2EFixture.RunAgent, E2ESessionOptions.Agent and TestAgentContext, and TestAgentOptions (internal). Not ported: a list of agents (agent: ['buyer', 'admin'], one result per agent), because NUnit and xUnit have no collection step to fan a test out; the serial-group and setup-test rules that go with it; and --agent listing several names. E2EConfig.AgentNames is upstream’s agentNames and E2EConfig.Agent is its agent (the first of them); config resolution takes the selected names as CliOverrides.Agents (internal, upstream’s cli.agents) and rejects an unknown one with INVALID_CONFIG (unknown agent "x"; configured: ...; did you mean "y"?). A non-blank E2E_AGENT is read as cli.agents (one name) when code passes none, so an unknown E2E_AGENT fails when the config loads with INVALID_CONFIG, and E2EConfig.Agent is that agent. The fixture still also hands it to the session as E2ESessionOptions.Agent.

  • judge judges assert, waitFor, and extract, and defaults to the model. act always uses the model

  • system is appended to the built-in act rules. Judges never see it

  • context (at most 16384 UTF-8 bytes) is told to every model call: after the act rules as Project context:, and to judges inside <project-context>

  • maxSteps and maxModelCalls are 1 through 100, 25 by default

  • judgmentTimeout (30 s) bounds assert, waitFor, and extract unless the call sets Timeout. A per-call timeout must be positive; a waitFor interval is 100 ms through 60 s

  • providerOptions is a dictionary of JSON objects by provider. It rides every ModelRequest, and OpenAiCompatibleModel adds the fields under its Provider key (openai by default) to the chat-completions body as given, so write the wire names (reasoning_effort, not reasoningEffort). It cannot replace model, messages, or tools. Every other client does the same with its own key (anthropic, google, bedrock, azure, xai, openrouter, gateway) and refuses its own core fields. As upstream, requests to OpenAI (and Azure over Responses) carry store: false and a prompt cache key per system prompt, and Anthropic requests carry cache breakpoints on the system prompt and the newest message; provider options win over both

  • assert and extract make one model call and one repair round. waitFor judges at once, then again only after Interval and on a changed screen, and every call, repairs included, counts against MaxModelCalls. It ends STEP_TIMEOUT (waitFor timed out; last judgment: ...) or STEP_BUDGET_EXHAUSTED (waitFor exhausted its model-call budget; last judgment: ...)

  • As upstream, the judge prompt says a value shown in more than one place holds only when every place agrees, unless the statement names the place or is about some item among several. The wording follows upstream, with “instruction” as “statement”. The judge answers with upstream’s agent-judgment-2 object (see below)

  • Judgment grammar (Agent/AgentProtocol.cs, internal; upstream’s agent/protocol.ts). assert and waitFor judge through structured output, as upstream does: the model answers one agent-judgment-2 object (protocolVersion, explanation, then verdict: holds, fails, or inconclusive) that AgentProtocol.ValidateJudgmentResponse checks. holds passes, fails is ASSERTION_FAILED, inconclusive is ASSERTION_INCONCLUSIVE. The judge has no done tool, no tool at all. An answer that is not JSON or does not match gets one repair round (a <previous-attempt-rejected> turn with the validation issue), then MODEL_OUTPUT_INVALID (The judge did not answer with an agent-judgment-2 object: ...). AgentProtocol.JudgmentSchema is upstream’s JUDGMENT_SCHEMA, with explanation before verdict. ModelRequest.Schema and SchemaName are upstream’s ModelCall.schema and schemaName, .NET-only in their place: the port’s models take a ModelRequest, not a ModelCall. Breaking for a custom IAgentModel, which must honor Schema (return the JSON object as ModelResponse.Content; Tools is empty). The providers: chat completions send response_format json_schema, Responses text.format, Google generationConfig.responseMimeType and responseJsonSchema; Anthropic and Bedrock, which have no such field, offer one json tool and force it (the AI SDK’s own fallback) unless the request thinks, when the tool is only offered. OpenAiCompatibleModelOptions.JsonSchemaResponseFormat (.NET-only, default on) leaves response_format out for a server that rejects it; the judge’s prompt still asks for the object. Chat completions and Responses send strict: false, because strict mode refuses maxLength; the agent checks the answer itself. ModelResponses.Judgment and ModelHttp.StructuredAnswer/JsonToolName are .NET-only (a scripted judge answer; the forced-tool answer as content). Not ported: upstream’s extractSchema and validateExtractResponse (the agent-extract-2 envelope). extract still answers through its extract and done tools, so its inconclusive outlet is the done tool.

  • Closed grammar tool inputs (AgentTools.SchemaTool, upstream’s schemaTool in agent/primitives.ts). A grammar tool call that carries a field its schema does not declare is refused and never runs; the refusal is the call’s result (failed: Invalid input for tool tap: Type validation failed: Value: {...}. then Error message: [{"code":"unrecognized_keys","keys":[...],...}], the AI SDK’s text over a zod issue), it counts toward the failure streak, and in a batched turn the other calls still run. Differences: only undeclared fields are refused (the tools read their own values, so a wrong type is the tool’s own failure); the schema sent to the model does not carry additionalProperties: false; project tools (AgentTool) and the done tool are not closed (upstream’s defineTool closes nothing, and its verdict tool drops a code a passed verdict carries instead of refusing it). Tests: AgentPolicy/ToolCallsOutsideTheVocabularyTests.

  • ExtractAsync<T>: the type argument is the schema, in place of a Standard Schema. The judge gets the JSON schema of T (JsonSchemaExporter), and the answer must deserialize into T with required members and nullable annotations respected. A failure gets one repair round with the validation error, then MODEL_OUTPUT_INVALID (extracted data failed schema validation: ...). A judge that says the data is not shown ends ASSERTION_INCONCLUSIVE (nothing to extract: ...)

  • tools (AgentOptions.Tools, AgentTools on the default agent) are project tools the model is offered beside the agent’s own. As upstream’s defineTool, an AgentTool declares mutates and platforms: a tool is offered only on the platforms it names, and a mutating tool takes an action slot. Its output is redacted and cut at 16384 characters. A name the agent already uses (observe, done, navigate, back, scroll, scroll_to, or a verb) is refused with INVALID_CONFIG. Differences: the tool is an AgentTool built with its schema as a JsonObject and a delegate, since the port has no defineTool, AI SDK tool, or toModelOutput; a tool that wants upstream’s getToolContext takes the second constructor, whose delegate gets an AgentToolContext (ObserveAsync, AttachScreenshotAsync), and the first constructor keeps working; and upstream’s reserved names for tools it adds elsewhere (complete_step, locate, the recording tools, report_finding) have no counterpart. Upstream records a mutating tool as a gap in the trace, and so does the port: a recording holds an action of kind tool with the tool name, a replay runs the actions before it and then hands the step to the model, and the step is never replayed whole. Older versions of this port cannot read that action and run the step live. As upstream, a recording that stops at such a gap (reason gap) is not stale: a strict cache run replays what it can and runs the rest of the step live. The recording keeps the tool’s name only, never its arguments

  • tap, double_tap, and right_click take an optional modifiers list (Shift, Control, Alt, Meta, ControlOrMeta) on an engine that declares EngineCapabilities.TapModifiers, as upstream’s tap, double_tap, and right_click do on an engine that declares tapModifiers. The web engine declares it. The device engines and the document engine do not, and refuse the field with UNSUPPORTED_CAPABILITY. The held keys are recorded as modifiers of the tap, doubleTap, or secondaryTap action and replayed from the cache. An entry whose modifiers is empty, repeats a key, or sits on another action is a miss (invalid-entry). The grammar tools close their schemas (see Closed grammar tool inputs), so a tool called with a field its engine does not declare is refused by the schema as unrecognized_keys, as upstream’s closed schema does, and UNSUPPORTED_CAPABILITY is left to a field the schema declares.

  • A typed value the run derived is recorded as a gap, not replayed (upstream’s derivedReason, agent/derived.ts; Derived.DerivedReason, Agent/Derived.cs). ActionDispatcher checks the value of a TypeAsync fill and of a TypeTextAsync against the step’s instruction, its params (as the executor reads them, a Unique as its value), and what the step’s screens showed (ObservationFeed.ShownText, upstream’s shownText, kept redacted as upstream keeps the prepared capture; PixelsShown says a screenshot went to the model). A value the instruction or params spell out replays. Otherwise the first rule that fits names the gap’s RecordedAction.Derived (DerivedReason, upstream’s type of that name in cache/trace.ts, spelled pixels, whole-node, minted-token, or date in the entry): Pixels once the model was shown a screenshot, WholeNode when a node’s name or text is exactly the value, MintedToken when a one-token value with a digit appears as a word of its own in shown text, Date for a date or clock time. TraceRecorder.RecordDerivedGap is upstream’s recordDerivedGap: the gap is a tool action whose text is type (run-time value), and a replay stops at it like any project-tool gap (reason gap). A value the model composed itself replays. A replay types the recording’s own values, so it never records a gap (the port commits a replay through ActReplayHost, so upstream’s replayingTrace check has no counterpart). E2ESession’s check for an unchanged flow ignores derived, as upstream’s flowOf does. The MCP session tool path (Agent.RunToolAsync) builds its dispatcher with no instruction or params and records no trace, as upstream’s interactive step records none. Tests: AgentDerived/DerivedReasonTests (the ten its of agent-derived.test.ts) and, .NET-only, AgentDerived/DerivedReasonWireTests (the enum’s wire spelling) and AgentObservation/ObservationFeedTextTests (the feed’s redacted shown text, .NET-only). Known gap: a replay that stops at the gap does not report the rule (upstream’s ReplayOutcome.derived and step.cache.derived, the report schema, and the its that assert them) (#1250).

  • act also offers a double_tap tool, which upstream does not have. Without it, the agent cannot open a control that reacts only to a double-click, such as a TodoMVC label that opens its editor. It runs the locator doubleTap, and the replay cache records it as doubleTap. Upstream and older versions of this port cannot replay that entry, so they run the step live

  • ActOptions.OnAction is upstream’s onAction: a hook that runs after each action once the screen settles, for replayed actions too. Upstream 7b1b8b2 (tester-army/e2e#1500) types the event as a union keyed by action, with tapAt.point, hoverAt.point, and dragAt.from/to, and adds ActionName and ActionDetails. The port keeps ActionEvent(Index, Action, Summary, Source) unchanged (no break) and adds derived sealed records for the three point actions (TapAtActionEvent, HoverAtActionEvent with Point; DragAtActionEvent with From, To; upstream’s actionEvent is AgentActions.EventOf), plus the ActionName enum and ActionEvent.ActionName. Differences, all .NET-only: Action stays a string (the port’s own names: fill, clear, uncheck), so ActionName maps them (fill and clear read Type, a secret fill TypeSecret, check and uncheck Check); a mutating project tool reads ActionName.Tool with ToolName (upstream puts it in action as a template-literal type); ActionDetails has no counterpart because the derived records are the narrowing. A Point is a value, so upstream’s copy of the points (so a hook cannot move what the trace cache records) holds by construction. A replay reports the points it dispatched (ActReplayHost.Dispatched) while the step still records the action as read. Tests: the new agent-act-on-action it is AgentActOnActionTests.Partial_exposes_dispatched_viewport_points_and_isolates_hook_mutations_from_replay (partial: the hook cannot mutate a value Point, so the mutation check is dropped and the test checks the events of the recorded run and of the replay); the hook assertions that agent-act-pixel-tools adds are in the tapAt and dragAt tests of AgentActPixelVerbsTests and the two listed-nodes-only classes; sdk-types has no counterpart (the compiler checks the C# types). The hook is an ActionHook delegate returning a Task, and the event’s source is the ActionSource enum (Model, Replay). Upstream’s check that onAction is a function has no counterpart, since the delegate type says it. A hook that throws fails the step (ACTION_FAILED, agent.act onAction failed: ...) and leaves the step’s recording alone. Upstream takes a screenshot from the hook with app.screenshot, which is not ported, so the port’s tests record the events and the screen the hook reads. Tests: agent-act-on-action.test.ts is AgentActOnAction/ (6 of 6, plus one .NET-only test for a replayed step whose hook never completes; the first is renamed and partial: it does not check that each hook step holds one screenshot artifact. The others record the hook’s events in a list where upstream takes an app.screenshot step, and check the same behavior). The act-validation it “takes an onAction function and refuses any other value” is skipped: a delegate cannot be anything but a function. .NET-only: AgentException.FromActionHook (internal), where upstream has an ActionHookError subclass, because AgentException is sealed

  • act params are checked as upstream: JSON-safe values, at most 32 levels deep, no cycle, and at most 64 KiB once a Secret is projected to its name and purpose and a Values.Unique to its value. The instruction is at most 8192 UTF-8 bytes. Each limit throws INVALID_ARGUMENT with the upstream message before any model call. A value reached twice through different paths is not a cycle

  • Params on AssertAsync and WaitForAsync (upstream #1463, 7372b0a): the same rules as act, INVALID_ARGUMENT when invalid, and the message names the call (agent.assert params contains a cycle). The judge reads the statement, then a Parameters: {...} line with the params as JSON: a Values.Unique value as its string, a Secret as {"kind":"secret","name":...,"purpose":...} and never its value, and every string redacted, keys included. The line counts against the input budget. A custom executor gets them in Step.Params; an assert step names its secrets but cannot fill them (POLICY_DENIED), and the attempt does not learn their values. Differences: upstream also refuses params that are not a plain object, which a C# dictionary cannot be. ActParams.Validate, ValidateParams, and RedactParams (upstream validateParams and redactParams in act-validation.ts) take the call name as upstream does; RedactParams is new and ActContext.ProjectParams uses it. The prompt’s Statement: ... text stands for upstream’s <instruction> fence, so the line follows the statement. Tests: JudgmentParams/ (upstream judgment-params.test.ts; the invalid-params test is partial) and ActValidation/RedactParamsTests

  • Vision on AssertAsync, WaitForAsync, and ExtractAsync is a VisionMode (Off, On, Only) in place of upstream’s false, true, and 'only', and an undefined value throws INVALID_ARGUMENT. On sends a masked screenshot beside the tree, and Only sends the screenshot alone, with a note that no tree is attached on purpose. The screenshot is sized for the model (long side at most 768 pixels) and its note names the regions masked for security. An engine that captures no pixels or masking the engine cannot prove (fewer masked regions than secure nodes in the tree, or no count at all) takes the image away and the judgment goes on with the tree; Only has no tree to go on with, so it fails with POLICY_DENIED that names MASKING_UNPROVEN or UNSUPPORTED_CAPABILITY, before any model call. The judge’s system text says an attached screenshot is data, as upstream’s policy does. WaitForAsync takes a screenshot with each look and counts a changed picture as a changed screen. An inconclusive judgment made from the tree alone ends with the hint to pass Vision = VisionMode.On, firm once a judgment of the attempt has received pixels and conditional before (“if the engine captures pixels”), and none when pixels cannot help: the engine declares no Screenshot capability, or an earlier request for pixels was degraded. The hint’s words name the C# option

  • AssertOptions.Screenshot (on by default) keeps the redacted viewport after the verdict, a passing one too, under .e2e/results/<result>/attempt-<n>/screenshots/<n>-assert.png, and AgentException.Screenshot names it on a failed judgment as a path relative to the project root, where upstream names it relative to the artifacts directory. An engine that captures no pixels keeps none. A secret fill does not stop it: the screenshot is the project’s own artifact. Taking it never fails the judgment. The port’s step record has no visionInput, visionDegraded, visionOnly, or pixelBytes on a step, no vision.pixels or assert.screenshot policy events, and no observation revision in a pixels-only request

  • executor (AgentOptions.Executor, AgentExecutor on E2ESessionOptions and the fixtures) replaces the built-in agent for act and assert. The socket is IStepExecutor: Name, and Version, Cache, Model, and Judge with defaults, so a hand-rolled executor writes Name and RunStepAsync(context, cancellationToken). The token is upstream’s signal; the context’s Attempt.CancellationToken is upstream’s attempt.signal. StepExecutorContext is a class a test can build and override: Step, Attempt, Target, ReplayedPrefix, Model, ProviderOptions, Ledger, AgentContext, Budgets, Actions, ObserveAsync, AttachTranscript, and AttachScreenshotAsync. An executor is code, so agents.<name>.executor in e2e.config.json stays INVALID_CONFIG and names AgentOptions.Executor. As upstream, System and Tools are refused beside an executor, and the Model and Judge an executor brought are the agent’s, for the judgments too. An entry that names another is INVALID_CONFIG (agents.default.model (gpt-5.4) and the executor's own model (gpt-5.4-mini) differ; configure the model in one place). Two models are the same when they are one instance or share a Name, where upstream compares the provider and the id

  • The Ledger text an act reads is upstream’s serializeLedger over the attempt’s step records: 1. app.open passed :: / per completed step, then observed: <handoff> when it has one ( recorded in an earlier run: <handoff> for a step the cache replayed whole, upstream’s PriorStep.replayed, #1434), up to 8192 bytes, newest kept, with [n earlier step(s) omitted] first. A failed step is in it, with its status. Each label and handoff is stripped of ANSI sequences and control characters and cut to 256 and 700 bytes. A step is recorded for agent.act, agent.assert, agent.waitFor, agent.extract, a locator action and locator.waitFor, an expect matcher on a locator, the browser, or the screen, and app.open, app.back, app.restart, and app.clearState. The Browser and Device fixture calls are steps (see App and browser fixtures); expect.poll is not a step yet. The records are internal, and the report writes them as the attempt’s steps. A replayed act hands later steps the text the replay returns (Replayed recorded actions.), where upstream hands them the verdict the recording run wrote, because the port’s cache entry keeps no verdict, so the line reads recorded in an earlier run: Replayed recorded actions.

  • The tool loop’s turn policy is upstream’s (agent/tool-loop.ts): with five turns left (WindDownTurns) it adds a wind-down notice, and with two or fewer (ForcedConclusionTurns), after a loop-guard stop, or when the remaining step time falls under a quarter of the step’s budget, capped at 60 s (ClockWindDownMs, ClockWindDownFraction, never on the first turn), it offers only done and, on a low clock, asks for a verdict. A call to another tool on such a turn is answered <tool> did not run: only done is available now. Call done with your verdict. and costs the turn. ToolLoopExecutor.ToolCallsOnlyRule (upstream’s TOOL_CALLS_ONLY_RULE) is in the instructions from the first turn, and TextReplyNotice (TEXT_REPLY_NOTICE) answers a reply with no tool call. A step that runs out of turns returns a failed verdict with STEP_NO_CONCLUSION (the agent used N of M turn(s) without calling done), where the port used to throw STEP_BUDGET_EXHAUSTED; the model-call budget still throws it for an executor that records past MaxModelCalls, and the action budget (MaxSteps) is unchanged. Differences: the tool is done, not complete_step (deliberate, see the tool names above), so the notices and the rule name done. The loop sends ModelRequest.ToolChoice (ModelToolChoice, the AI SDK’s ToolChoice; port-only name for the SDK type): the loop’s mode (toolChoice) decides it, as upstream’s prepareStep returns toolChoice: this.toolChoice, or { type: 'tool', toolName: 'complete_step' } on a forced turn when the mode is required. The loop starts in required, as upstream does. The wire forms are the AI SDK’s (Anthropic any or { type: 'tool', name }, OpenAI required or { type: 'function', ... }, Gemini ANY with allowedFunctionNames, Bedrock any or { tool: { name } }); a request with no choice still sends auto. A provider option can no longer replace tool_choice (Anthropic, chat completions, Responses) or toolConfig (Google; Bedrock already reserved it): it fails with INVALID_CONFIG, like the other fields the client sets (port-only guard, since the port builds the body by hand). The AiTrace records the choice as asked ({ type: 'required' }). ModelResponse.Warnings (ModelWarning, upstream’s CallWarning) carries what a provider changed: AnthropicModel and BedrockModel send auto and warn unsupported/toolChoice for a forced choice while the model thinks (both providers refuse a forced tool then; the AI SDK’s provider decides this per model). A model that refuses a forced choice is asked again with auto (ToolChoice.IsForcedToolChoiceRejected, upstream’s isForcedToolChoiceRejected in agent/model/tool-choice.ts: an HTTP 4xx whose message matches one of upstream’s patterns, such as Claude Fable 5.1’s tool_choice: type "tool" and "any" are not supported for this model, DeepSeek’s thinking mode, or Meta Muse Spark’s auto-only message, read through the exception chain), on the same turn budget and the same instructions (FreeToolChoiceRetry, upstream’s freeToolChoiceRetry); the refused request is not a model call. So is a forced turn that came back as a finished reply without a tool call (IsForcedToolCallSkipped, upstream’s isForcedToolCallSkipped; the port reads it off the response through ToolChoiceViolationException, where the AI SDK throws AI_ToolChoiceViolationError), and a provider that reports a toolChoice warning (IsForcedToolChoiceDowngraded, NoticeToolChoiceDowngrade) continues the step with auto. Each of the three remembers the model (ToolLoopExecutor.FreeToolChoiceModels, upstream’s FREE_TOOL_CHOICE_MODELS), so later steps on it start in auto. Upstream’s WeakSet is keyed by the SDK model object, which a worker builds once and shares; the port builds a provider model per session, so a model object the caller owns (ScriptedModel, a custom IAgentModel) is held weakly by object, and a built-in provider model (any disposable IAgentModel) is remembered for the process by its type and model id, whatever the endpoint. Deliberate .NET-only difference. Differences: the port’s failure message carries the response body (HTTP 400: {body}), where upstream reads responseBody apart, and the AI SDK’s RetryError (Errors, LastError) is carried as the InnerException of the AgentException that ModelHttp.SendAsync throws once its retries are spent (#1311; the AgentException keeps its code, ProviderStatus, and message, which are the last attempt’s, because it is sealed and public and callers match it), and ToolChoice.IsForcedToolChoiceRejected follows LastError as upstream follows cause ?? lastError; upstream’s isForcedToolCallMismatched and recordThrownTurn have no counterpart, since a model returns the wrong-tool or prose reply as a response the loop already records as a turn and answers (<tool> did not run: only done is available now), where the SDK throws on it. The loop’s notices to the model carry upstream’s prefixes and wording with done for complete_step and code for errorCode: [SYSTEM NOTICE] for the going-in-circles warning, the failure-streak warning and the wind-down notice, [SYSTEM] for the loop-guard stop and the low-clock notice, and the loop records upstream’s loop guard warned before turn N: <reason> and the step was stopped before turn N: <reason> notes on the turn. The loop-guard stop keeps its per-turn PrepareMessages stop, which does not persist across turns. Tests: ToolLoopToolChoice (ToolLoopForcedToolChoiceTests, ToolLoopDowngradedToolChoiceTests, ToolLoopForcedConclusionAnsweredWithAnotherToolTests (whole: a tool call carries ModelToolCall.ProviderMetadata, upstream’s providerMetadata of a tool call part, and the refused call goes back with it), IsForcedToolChoiceRejectedTests, IsForcedToolCallSkippedTests).

  • ToolLoop.CreateToolLoopExecutor and DefaultAgent.CreateBuiltInAgent are public. Differences: ToolLoopExecutorOptions.Tools returns a list of ToolLoopTool (a ModelTool and a delegate that answers a ToolLoopResult), where upstream’s returns an AI SDK ToolSet; BuildPrompt answers a string, where upstream’s can answer a whole message history; the chassis adds done, where upstream adds complete_step; there is no maxTurns to remove. ToolLoopHelpers has GuardAsync, Concluding, and ReportHardStop, and the loop guards every tool call itself. The built-in agent drives the context the runtime builds, so it runs as a step’s executor or inside a custom executor that passes its context on, and not on a context built by hand

  • Upstream’s grammar-tools-export changeset (ffed34e, tester-army/e2e#960) exports the built-in agent’s tools. The port has AgentTools.CreateGrammarTools(StepExecutorContext, GrammarToolsOptions?) (upstream’s createGrammarTools(ctx, { guard })), AgentTools.CreateVerdictTool() with VerdictTool (Tool, Verdict, Concluded, Execute), AgentTools.VerdictRules (VERDICT_RULES), DefaultAgent.BaseRules (BASE_RULES), and the existing StepExecutors.IsRuntimeHardStop. Differences: the grammar tools are ToolLoopTools (a ModelTool and a delegate), where upstream’s are AI SDK tools, and AgentTools and VerdictTool were internal before; GrammarToolsOptions.Guard takes the body as Func<Task<string>> and answers a string (body => helpers.GuardAsync(body) runs a tool under the loop’s policy), where upstream’s is generic; the built-in agent passes no guard, since the loop already ends the step on a hard stop. The done tool stays done (not complete_step) and takes code (not errorCode), so VerdictRules names done. The built-in rules were one text; they are now BaseRules (the action guidance) and VerdictRules, and ToolLoop appends VerdictRules after the executor’s guidance and the project context, as upstream’s chassis appends VERDICT_RULES, so every loop executor, the built-in one included, sends the verdict rules last. VerdictTool.Execute keeps the first accepted verdict, answers Step concluded. or The step already concluded., drops a code sent beside passed and says so, and refuses a blocked verdict without a blockable code; ToolLoop uses the same policy through a stateless internal member, so the loop’s own done answers the same text (Step concluded., or the note that a code sent beside passed was ignored, which names the code only when it is from the closed set, and says a code was ignored without echoing any other). A call to a tool the step does not offer is answered failed: Model tried to call unavailable tool 'click'. Available tools: observe, tap, fill, done. (the list is the step’s own tools, so it varies with the engine and the project tools), the AI SDK’s NoSuchToolError text that upstream’s agent-policy and loop-guards tests read, with done for complete_step; the turn records it as [click] failed: .... ToolOutcome.Finish takes the dropped code (droppedCode, .NET-only: upstream’s tool answers the text itself, and the port’s loop reads the text off the stateless outcome). ScreenOutput has no counterpart: the port’s tool answer, ToolLoopResult (Content, Failed, Pixels), is public and carries the text and the screenshot. The screen presenter and onActionFailed stay internal (ScreenPresenter, ActTools). AgentTools members the port had made public by mistake (MaxScrollTimes, ModelErrorCodes, IsReserved, Project, ExtractFor, and the others) are internal now. The internal definition builder CreateGrammarTools(EngineCapabilities, ...) is GrammarToolDefinitions (.NET-only, since the public name belongs to upstream’s). Tests: SdkTypes/SdkTypesTests is the new lines of tests/types/sdk-types.ts as reflection checks (the four Partial_ ones check a shape the type checker checks upstream); AgentGrammarTools/CreateGrammarToolsTests is .NET-only (a loop that spreads the grammar tools beside its own, the guard, the verdict tool).

  • The verbs are the ones the port’s engines have: TapAsync, DoubleTapAsync, and SecondaryTapAsync (all take ClickOptions, whose Modifiers need Target.TapModifiers, as upstream’s tap(target, { modifiers }) needs target.tapModifiers), LongPressAsync, HoverAsync, DragAsync (upstream’s longPress, secondaryTap, hover, and drag; Target.Verbs lists them by the action kinds the engine declares in IEngineSession.ActionKinds: longPress, secondaryTap, hover, dragTo), TypeAsync, TypeSecretAsync, ClearAsync (upstream clears with type), PressAsync, SelectAsync, CheckAsync, UploadAsync (upstream’s upload), ScrollToAsync, ScrollUntilAsync, ScrollAsync, NavigateAsync, and BackAsync. TypeTextAsync (with TypeTextOptions.Replace) and PressKeyAsync are upstream’s typeText and pressKey, listed when the engine declares Keyboard. DismissKeyboardAsync is upstream’s dismissKeyboard, listed when the engine can hide its keyboard (IEngineSession.CanDismissKeyboard, with Keyboard); it is a default member of IExecutorActions that refuses with UNSUPPORTED_CAPABILITY, so an existing implementation keeps compiling. Target.Verbs follows the engine’s capabilities: the scroll verbs need Scroll, Back needs History, Upload needs EngineCapabilities.Upload (.NET-only name for the upload verb an upstream engine lists; the web engine declares it). A node is named by its ref (new ExecutorTarget("e12"), the [ref=e12] of a line), where upstream names n42. Actions and looks run in call order, mutating project tools included, and a mutating RunToolAsync body that calls an action or a look waits behind itself, as upstream’s does. A verb checks its argument before it takes a slot (INVALID_ARGUMENT), but the port has no key grammar, so PressAsync takes any non-blank key

  • ObserveAsync answers Text, Truncated, KeyboardVisible, Path, and Revision, and with ExecutorObserveOptions Tree (a list of root ExecutorNodes, redacted, with no value or selection on a secure field, a link target absolute and cut as a line cuts it) and Pixels (the masked screenshot sized for the model, or PixelsWithheld, a VisionDegradation). Revision is upstream’s revision (Observation.Revision, null when the capture carries none); it has no Viewport and no framePath, since the port has none. ReplayedPrefix carries the actions as the text the hand-off notice lists, ReplayHandOffReason adds the port’s ActionBudget and InvalidEntry, and has no viewport-changed. A replay that meets ACTION_MAY_HAVE_COMMITTED stops as action-uncertain and names the action, which the built-in agent’s notice repeats. KeyboardVisible is upstream’s keyboardVisible (commit 5fce7b2): Observation.KeyboardVisible carries the engine’s measured on-screen keyboard state to ExecutorObservation.KeyboardVisible, and the mobile DeviceSession sets it from the capture’s keyboard fact (visible is true, absent is false, and an unmeasured capture leaves it null). The web engine measures none, so it is always null there. Not ported: the part of that commit in @e2e-dev/decision (dismiss_keyboard and the page fingerprint), and the sdk-types.ts checks, which the C# types make. Tests: FixtureRuntime/ProjectToolDispatchTests and E2E.Mobile.Tests’ Engine/ObservationTests.

  • The runtime owns the budgets and the clock. RecordModelCall throws STEP_BUDGET_EXHAUSTED past MaxModelCalls, and a verdict never outranks a hard stop: a passed one over a spent budget, a timeout, or a code-less failure after one ends with the runtime’s code. An executor that ignores its token gets one second to unwind after the step is stopped, and then the step settles without it. The closed verdict grammar is upstream’s: an empty summary, an unknown code, a passed verdict with a code, or a blocked one without a blockable code is MODEL_OUTPUT_INVALID, and so is a runtime code the runtime did not record. A thrown error that is no agent error becomes ACTION_FAILED, as upstream’s toAgentError does, and a cancel by the caller stays an OperationCanceledException. The message of a failed or blocked verdict is upstream’s agent.act failed: <summary> or agent.act blocked: <summary> (agent.assert for an assert). The step keeps the bare summary as its explanation, as upstream does. A hard stop (Step timed out, a spent budget) that ends the step with no verdict, or over a passed or code-less one, has a message with no prefix (the reason, then the verdict’s summary if there is one); a coded failed or blocked verdict gets the prefix, also after a hard stop

  • AssertAsync on an agent with an executor goes to it as a step of kind Assert, with the agent’s budgets and JudgmentTimeout. An assert is never cached, and a passing one verifies the acts before it. Vision is refused with UNSUPPORTED_CAPABILITY, since the executor decides what its model sees, and Screenshot keeps its evidence after the verdict, bounded by the action timeout: a capture that outlives it is dropped and the verdict stands. WaitForAsync and ExtractAsync keep the judge, which is the executor’s Judge or Model. ExecutorCache.Off never replays or records, and takes no look before the step. A step with the cache on that cannot read its first screen (no app opened) still runs, and records nothing

  • TypeSecretAsync fills a secret the step’s params declared, and refuses with POLICY_DENIED any other name, a disabled or non-editable field, and a field whose purpose does not fit a password secret. A secret the attempt does not know is AUTH_CREDENTIAL_UNAVAILABLE. The built-in agent’s fill_secret goes through the same check, so its refusals read as the dispatcher’s messages and not as Secret fill refused: .... ExecutorStep.Params is JSON: a Secret is its name and, when set, its purpose, and every string and key that holds a secret value the attempt knows is redacted. ExecutorAttempt has the session’s TestTitle as TestId, a fresh id per session, and Index as the attempt number minus one; ExecutorStep.Index counts the agent steps of the attempt, where upstream’s counts every step. AttachTranscript and AttachScreenshotAsync write under the attempt’s results directory (transcript-<n>.txt, screenshots/<n>-<label>.png), and, as upstream, only under E2E_DEBUG=1. AttachTurns keeps the step’s last 12 turns on the step record, redacted, as upstream’s attachTurns does, and the tool loop reports every turn it takes with the same clips. Its loop notes cover the events the port’s loop has (a reply without a tool call, a shrunk history); upstream’s others (a forced tool choice, the wind-down notice, a resent stalled request) have no counterpart. Deliberate difference: upstream clips a turn’s text and then redacts it, so a cut can split a secret and leave a part the redactor no longer matches. The port redacts first and clips after, both in the loop and again in AttachTurns, which also enforces the bounds itself (the last 12 turns, 8 calls of 200 characters, an outcome of 2048) for any executor. A clip never splits a surrogate pair. The loop does not yet attach its debug transcript. The port has no step events

  • The act tools word their results as upstream’s acting does (agent/primitives.ts: ActionLabel, failureLead). A success leads with the label’s Done line and then the screen: Tapped #e12., Double-tapped #e12., Typed into #e12., Filled secret "name" into #e12; its value is masked in every observation., Pressed Enter on #e12. (on the focused field with no target), Selected "x" in #e12., Checked #e12., Unchecked #e12., Navigated to /path., Navigated back., Scrolled down. (Scrolled down 3 screens.), Scrolled down until "x" was in view., Scrolled into view #e12., Observed.. A failed action keeps the screen and leads with its attempt, then the error’s code and message: tap #e12 failed: LOCATOR_NOT_FOUND: .... The attempt names the port’s tool (fill, fill_secret, double_tap), where upstream’s are type and type_secret. #e12 is the node’s ref where upstream has its id (.NET-only: the port’s node ids are refs); a call that names its control by role and name has no ref before the lookup, so a failed lookup leads with the name. clear has no upstream tool, so Cleared #e12. is the port’s own. The tool loop’s own refusals (an unknown tool, malformed arguments, a spent budget) and project tools keep the port’s failed: ... wording; they are the loop’s, not acting’s. The prepaid action slot stays: a call whose control cannot be found is resolved before the dispatcher runs, so the slot is taken first to keep a not-found call an attempt.

  • maxObservationBytes and maxInputTokens are upstream’s agent keys (config/agent.ts), in e2e.config.json, on AgentOptions, E2ESessionOptions, and the fixture. ResolvedAgent.From and the config check them as upstream’s boundedInt does (agents.default.maxInputTokens must be an integer from 1 through 1000000; maxObservationBytes takes 1024 through 16777216), and the defaults are upstream’s 262144 and 64000 (E2EDefaults). ObservationBudget.ObservationByteBudget is upstream’s observationByteBudget (agent/observation-budget.ts), over ModelAdapter.TokenUpperBound and ImageTokenUpperBound (upstream’s adapter.ts), both in UTF-8 bytes. SnapshotText.Render cuts the screen at that budget as prepareObservation does: the marker is reserved up front, the first node is always listed, and the first line that would pass the budget ends the screen with [observation truncated at the resolved observation byte limit]. A step that cut a screen reports observationTruncated. An act cuts each look at ObservationFeed.Text (upstream’s byteBudget in observation-feed.ts) around what every turn resends: the context, the prior-step ledger, and the instruction. Upstream redacts each capture once as it is taken; the port renders a look’s text when it is read, and keeps the newest rendering only while the attempt’s redactor is the one it was rendered under, so a secret registered since is never read from the kept text (AgentObservation/ObservationFeedTextTests, .NET-only). A judgment cuts at Agent.ObservationByteBudget (upstream’s invocation.ts), around the system text, the instruction, and a screenshot when Vision is on; under VisionMode.Only the tree does not reach the request, so only maxObservationBytes bounds it. A judgment whose request is still over maxInputTokens fails with STEP_BUDGET_EXHAUSTED before it is sent (upstream’s pre-flight in sdk.ts). Differences: the port’s tree text is its own format (Screen (/): and - role "name" [ref=e1] lines), so the header counts against the budget, and upstream’s second marker for an engine-cut tree is the port’s (More of the page is off screen. Scroll to reach it.), which a byte cut replaces. The act loop is not pre-flighted, as upstream’s is not, and the port’s tool loop resends its whole history, so a long act can still end in CONTEXT_OVERFLOW, which shrinks it. The run’s limits (ResolvedAgent.RunLimits, upstream’s runLimits) are the largest any agent allows, and the trace’s screens, screen.tree(), the failure evidence, and the report’s limits read them. Upstream’s removed-key hints for the agent keys (timeout, maxTurns, maxModelTokensPerCall, limits) and the top-level specVersion and limits are ported. Tests: AgentObservationBudget/ObservationByteBudgetTests and ObservationBudgetWiringTests (.NET-only), AgentObservation/ObservationByteBudgetTests, and AgentConfig/AgentConfigDefaultsTests and RunLimitsTests.

  • AgentObservation.PrepareObservation is upstream’s prepareObservation (agent/observation.ts, #1303) and returns a PreparedObservation (upstream’s AgentObservation, renamed because AgentObservation is the static class of the observation functions): Kind (semantic or pixels), Text, Bytes, Location (the redacted location), Path (observationPath of it: the address after the origin, fragment included, or the location as it is when it is not a URL), the redacted node index Nodes, Parents, Tree (the redacted roots; upstream has one root), Truncated, and the pixels or why they were withheld. RedactNode is redactNode and RedactNodesAgain is redactNodesAgain. A role is redacted like every other string field, in the screen text, the executor tree, and the recorded anchors, and an executor node’s attribute names are redacted with their values, as upstream’s NODE_FIELDS does (a secret used as a role or inside a name such as data-<secret> no longer reaches the model or the cache). AgentObservation.SettleAsync returns at once on a capture whose shape function answers null, as settleObservation does with undefined. Differences: the port renders the text from the raw nodes under the redactor at the point it is shown (the engine reads the raw name, role, and test id to tell twins apart), so PrepareObservation builds the redacted node index beside the text, and ObservationFeed does not read from it yet. Observation.SecureNodeCount is upstream’s redaction.secureNodeCount: an engine reports how many secure nodes it saw, and PixelsForModel compares it with EngineScreenshot.MaskedRegionCount (upstream’s redaction.maskedRegionCount, pixelsProvenMasked), so a pixel-only observation, which has no tree to count, is proven against the engine’s count (#1322). It is nullable (.NET-only): the proof uses the larger of the reported count and the tree’s secure nodes (upstream trusts the engine’s count), and a pixel-only observation with no reported count is counted as zero secure nodes, as upstream’s engine contract leaves it. No shipped engine produces a pixel-only observation yet, so none sets the count; a new one must. Partial_keeps_unavailable_semantics_separate_from_an_empty_tree_and_requires_permitted_masked_evidence now proves masking against SecureNodeCount with empty roots, and stays partial for the pixel observation’s empty Nodes and Tree, where upstream’s has neither property; Partial_redacts_every_string_field_a_node_carries_in_the_text_the_executor_tree_and_the_node_index_alike has no selector, framePath, or unknown-field cases (the port’s nodes have none, #1324); Keeps_the_whole_address_after_the_origin_as_the_path_fragment_included_for_the_route_check_to_read is a full port (#1323): Observation.Location is upstream’s location, set by the web engine from the page URL. Observation.Route stays (.NET-only; the mobile and desktop engines report a route, not a location), and an observation with no location reads its redacted route as Path (.NET-only; upstream’s path is then absent). ObservationFeed is wired through PrepareObservation in #1325. Tests: AgentObservation/PrepareObservationTests and CollapsedSecretCutTests. .NET-only: PreparedKind, PreparedObservation, and PrepareObservationOptions (the options upstream passes inline).

Explore.ExploreAsync ports upstream’s explore (packages/e2e/src/explore), the library under e2e explore, and e2e explore ports the command (see below). An exploration is the planner (ExtractAsync), the explorer (the built-in agent with the exploration rules and report_finding), and the loop of charters under the exploration’s budgets, with upstream’s outcome policy: a failed step is not a finding, a step at its limit is neither, three unproductive steps in a row end the run, reported issues fail it, and a run that explored nothing, or whose charters were all blocked, stays blocked. The planner’s prompt, the repairs of its answers (padded digit runs, a lone title or charter), and the explorer’s rules are upstream’s text, with done where upstream says complete_step and fill_secret where it says type_secret.

  • The port has no runner, so ExploreAsync starts one E2ESession and returns an ExploreOutcome: Status (RunStatus: Passed, Failed, Blocked), ExitCode (0, 1, 2, or 3, from the error that ended the run by upstream’s table of agent codes), Error (the E2EException that ended the run), and Explore (upstream’s run.explore block as ReportExplore). A config, agent, target, goal, or budget error throws before anything starts, as upstream does. A cancelled token throws OperationCanceledException, where upstream’s interrupt is exit code 130.
  • A failure while closing the exploration (the engine’s finish hook, or the session’s own release) does not throw and does not replace the outcome: as upstream’s runner records it as a run error of phase cleanup and folds its category into the exit code (precedence 130, 4, 3, 2, 1, 0), ExploreOutcome.ExitCode is the verdict’s combined with the cleanup failure’s (an engine failure is 3), Error is the verdict’s error or else the first cleanup failure, and a failure that is not an e2e error is an ENGINE_FAILURE, as upstream’s translateProvisioningError makes it. The findings stay in Explore.
  • Times are TimeSpans: ExploreOptions.Timeout, ExploreBudgets.Timeout, and ReportExploreStep.Duration where upstream has timeoutMs and durationMs. The step bounds are Explore.StepBounds (1 to 100, 8) and the time bounds Explore.TimeoutBounds (3 minutes to 2 hours, 10 minutes), upstream’s STEP_BOUNDS and TIMEOUT_BOUNDS of tester-army/e2e#1523 (f4be1c4).
  • Upstream’s ExploreOptions.rawConfig is RawConfig, an E2EConfig. Because e2e.config.json holds a provider and a model id only, Agents gives AgentOptions by name over the config’s, for a model of your own or a project tool, and Engine gives the engine, where upstream’s config file holds both. OnProgress receives the ExploreProgress moments that upstream sends as explore run events through onEvent; FindingReported is upstream’s finding phase. ExploreAsync also writes each moment to the process’s run events as an ExploreEvent (see Run events), so a reporter on the bus sees an exploration as upstream’s does.
  • A target is named by Target, or is the only one the config declares (TARGET_REQUIRED for several, UNKNOWN_TARGET for a name it does not declare). The config’s credentials are the accounts, as upstream’s credentialAccounts(resolved.credentials) carries them. Credentials adds accounts in code (.NET-only), by name, as UserCredentials, and one replaces a configured account of its name. Each travels into every step as the username and the secret <name>.password (purpose password), and a secret anywhere in the params of an act, at any depth, is declared and remembered, as upstream’s walk of the params finds it. The size bound of the account inventory, a quarter of the params limit, is upstream’s.
  • A target’s engine is chosen from its platform, a .NET-only bridge: upstream’s config holds a live engine handle, and e2e.config.json still rejects an engine key. web is a WebEngine. ios and android are a MobileEngine (MobileTargetEngine.Create, E2E.Mobile) built from app.bundleId or app.appPath and E2E_MOBILE_DEVICE, as for MobileAppTest. windows is a WinAppEngine (WinAppTargetEngine.Create, E2E.WinApp; the CLI passes WindowsTargets.Create as the windows factory of TargetEngines.Create, which is INVALID_CONFIG off Windows) built from app.appPath or app.bundleId, as for WinAppTest. ExploreOptions.Engine still wins. The device engine needs Node 22.12 or newer and a booted simulator or emulator. E2E_MOBILE_PROVIDER=limrun or devflow makes the engine lease a hosted device, as the config of upstream’s CLI does with mobile({ provider: limrun() }) (the port names the provider by variable, like the adapters). Any other value fails with INVALID_CONFIG; E2E.Expo, E2E.BrowserStack, and E2E.TestMu.Mobile are not referenced by E2E.Cli, because upstream’s CLI loads providers from the config and the port’s tool ships only Limrun and DevFlow. Upstream’s openStandaloneAttempt (run/standalone.ts) prepares the engine for one slot of a run of its own and finishes that run when the attempt closes, on every path (engines.prepare and engines.finish, run/provision.ts). The port has the same: Standalone.OpenAttemptAsync is openStandaloneAttempt, over Standalone.OpenWorkerAsync (openWorker) and its StandaloneHost (openAttempt, close), and PreparedEngines is provision.ts’s class of that name. Only upstream’s one-shot kind exists: the hosted kind publishes each session for another test runner, and the port’s tests run in their own. An engine takes part by implementing IPreparableEngine (.NET-only: upstream’s engine handle carries optional prepare and finish members). MobileEngine does; WebEngine does not, because it leases for the attempt it starts (below). e2e explore and e2e mcp open their session through the host, so the lease happens when the session opens, never when the engine is built or when ENGINE_IN_USE refuses a second session, and MobileEngine.StartAsync leases nothing itself. What prepare leaves (the device binding) reaches the worker in EngineStartOptions.Env, under the run’s own variables. The finish runs once, within the cleanup timeout, and a hook that outlives it is abandoned and reported as CLEANUP_TIMEOUT whether or not it honors its token, as upstream does. A finish that fails is an error (close_session shows it as a Cleanup: line, and e2e explore ends with it), because a hosted device bills until it is released. A start that fails or is cancelled after the lease was granted finishes the engine, with a failed finish added to the start’s message; a caller cancel surfaces as CANCELLED and not as a provider failure; a lease the provider grants after the caller stopped waiting is released where it lands; and the end of the process finishes an engine still held (AppDomain.ProcessExit, .NET-only; a killed process is covered by the provider’s own time limit, 15 minutes for Limrun). Progress lines of the provider (session URLs, lease ids) have nowhere to go in a session and are dropped, as in WebEngine’s standalone run; LIMRUN_API_KEY is registered as a secret, so an error that quotes it is redacted. DevFlow’s agent runs inside the app, so IDeviceProvider.AttachesToRunningApp (.NET-only; a default interface member, false) makes the first app.open() attach with no relaunch. Live runs are not possible without Limrun credits or a DevFlow agent: the tests use a fake provider that counts leases and releases. Ported, in part, through the host: OpenHostLifecycleTests.Partial_Host_close_cancels_an_opening_session_and_waits_for_disposal_and_finish_exactly_once (upstream’s open-host-lifecycle it, without the count of worker disposals, because the port has no worker dispose hook) and EngineTargetsTests.Partial_Ends_the_run_before_any_worker_starts_when_prepare_fails and Partial_Abandons_a_finish_hook_that_outlives_the_cleanup_budget_as_a_cleanup_error_instead_of_hanging_the_run (upstream’s engine-target it, without the run’s status, results, and error events, because the port has no run). .NET-only: StandaloneHostTests, PreparableEngineTests, HostedDeviceSessionTests, ExploreHostedDeviceTests, and DeviceTargetsTests. The .NET-only symbols of this change are: IPreparableEngine, StandaloneAttempt (upstream’s type of that name, over the port’s E2ESession), the process-exit finish of StandaloneHost, PrepareScope and FinishScope (upstream’s, in C# casing), E2ESession.LaunchAsync (the start with the worker’s environment), DeviceTargets and HostedDeviceProviders (they stand in for the provider upstream’s config holds as code), IDeviceProvider.AttachesToRunningApp, the MobileTargetEngine.Create overloads that take a provider, SessionHostOptions.Credentials, and FakeCloud (test helper). The E2E_MOBILE_PROVIDER mapping to Limrun and DevFlow is .NET-only, because upstream names a provider in e2e.config.ts and the port’s config file cannot hold code. DevFlow is .NET-only too: upstream has no DevFlow package, so the attach behavior has no upstream counterpart. EngineCapabilities.PinnedApp is the .NET-only stand-in for upstream’s test of the engine handle (a session with restart and no open): MobileEngine declares it. TargetEngines.LaunchesPinnedApp(target, engine) is upstream’s launchesPinnedApp (config/targets.ts, upstream #1252): the target has no app.url and the engine pins an app. The port’s config holds a platform and no engine handle, so it takes the engine too. Explore opens the app first when the target has a URL or LaunchesPinnedApp holds (openApp), so a device target’s pinned app launches before the planner’s first look. To make that call work, App.OpenAsync on a target with no URL on a pinned-app engine launches the app through RestartAsync, as upstream’s launchPinnedApp does in run/fixtures.ts, and refuses a path with APP_URL_REQUIRED; upstream’s UNSUPPORTED_CAPABILITY for an engine without restart has no port, because PinnedApp implies it. Tests: TargetEngineChoiceTests and MobileTargetEngineTests (.NET-only); E2eExploreTests.Launches_a_device_targets_pinned_app_before_the_planners_first_look and SessionHostTests.Launches_a_device_targets_pinned_app_before_the_first_observation port upstream’s two it of #1252. AppSteeringHooksTests ports three it of upstream’s app steering hooks for a device (app.open() launches through restart, app.open(path) is APP_URL_REQUIRED, and the engine’s own reason is kept); the fourth, an engine with no relaunch hook, has no port, because PinnedApp stands for that hook. .NET-only: SessionHostTests.Surfaces_a_cancel_during_the_launch_of_a_pinned_app_as_a_cancel_and_disposes_the_engine. The explore test reads the attempt’s steps from report.json, as upstream reads the report.
  • The goal is redacted for the secrets of the config and the credentials’ passwords, which the session also redacts wherever they appear.
  • The tool is named report_finding. A project tool of that name is INVALID_CONFIG for every agent, as upstream’s HARNESS_TOOL_NAMES has it (done is reserved with the grammar’s names). The finding is recorded with ArtifactId, the id of the screenshot artifact that holds its evidence, as upstream’s is (attachScreenshot writes the file, registers it with the attempt’s artifacts, attaches it to the step, and answers its id; the file is screenshots/<n>-finding-<k>.png under the attempt’s results directory, where upstream names it finding-<k>.png). The list reporter finds the screenshot among the run’s artifacts by that id, as upstream’s result(artifacts) does; the port hands them over as the .NET-only internal ExploreOutcome.Artifacts and ArtifactsRoot, and shows the path relative to the working directory. The exploration is a test of the virtual file explore (Explore.ExploreFile, upstream’s EXPLORE_FILE): the file joins the goal in the result id and leads <result> (explore-<goal words>-<id>), and every prompt opens with Test: <goal>, as upstream’s does, where an e2e mcp session, which runs no test (no TestFile), gets no such line. The explore executor keeps the model’s screenshot, also after a secret fill (upstream #1437), so none is kept when the engine captures none, when it cannot prove its masking covered every secure node (MaskingUnproven, as upstream’s pixelsProvenMasked), or when the observation or the attachment fails (the finding is still recorded). A finding records ObservationRevision, the revision of the screen the finding tool observed (Observation.Revision, #648), as upstream’s observationRevision; it is null when the observation failed, and the report writes it as observationRevision on the finding.
  • e2e explore [goal] (E2E.Cli, ExploreCommand) takes --config, --target, --agent, --max-steps, --timeout (milliseconds), --headed, --output, --debug, --ai-trace, --trace, and --video, with upstream’s bounds, and exits with the outcome’s code: 0, 1, 2, 3, and 130 for an interrupt. A bad flag exits 2 with commander’s message (option '--max-steps <n>' argument '101' is invalid. must be an integer from 1 through 100). Each E2E_USER_<NAME>_USERNAME and _PASSWORD pair in the environment that no configured credential owns is passed as Credentials (named <name> in lower case; .NET-only, upstream carries the config’s credentials alone). A username with no password, or a short one, exits 2.
  • The output is upstream’s list reporter, fed by the run’s events (see List reporter and Run events): explore-text.ts is ExploreText (the severity words, why-it-ended text, step counts, and the order of findings), and list-explore.ts is ExploreView in E2E.Cli. ExploreCommand subscribes a ListReporter to the process’s events, Explore.ExploreAsync writes the run’s start (HostRun.Started, with the explored target and agent) and plan, and the command ends the run with HostRun.FinishAsync. The output is the RUN header, the header of the exploration, each finding and each step as they happen, then the Findings section, the Assessment, and the summary rows (Findings, Steps, AI, Start at, Duration). Differences: no live window (the command always prints the output a pipe gets, where upstream paints a live window on a terminal), the model and the target text the command redacted before are now redacted where the run writes its events (the explore state and the session’s results), and a failure that is not the findings’ verdict prints as CODE: message below the record. An interrupt (exit 130) prints no summary. An error thrown after the run started (the engine failed to start) is one error CODE: message line on standard error, below the header.
  • --debug, --ai-trace, --trace [mode], and --video [mode] are upstream’s, with its parser: a bare --trace or --video is on, the optional value is greedy (--trace "Explore checkout" reads the goal as the mode and is refused with write --trace=<mode>, or put test files before --trace), and the old spellings all and retries are refused with the mode they meant. ExploreOptions.Trace, Video, Debug, and AiTrace carry them; a Trace or Video is a Run source over the target’s and the config’s, else the target’s mode. E2E_TRACE, E2E_VIDEO, E2E_DEBUG, and E2E_AI_TRACE set them without the flag. An exploration is one attempt, so a retry mode keeps nothing, and ExploreOptions.Notice says to pass --trace on or --video on (upstream’s recordingNotices for explore, as Explore.RecordingNotices, internal), as it says that a --video the engine cannot record is skipped. An exploration’s verdict (ASSERTION_FAILED with an issue finding) gets no trace page (isExploreVerdict, as TracePages.IsExploreVerdict), and ReportRun.Explore carries the record for that. e2e mcp takes none of the four, as upstream.
  • Not ported: --session and --reporter (the command refuses them with exit 2, since running without a session or a report would change what the run means). --session needs a runner that finds and runs the setup test that saves the session and restores it into the exploration’s attempt; the CLI has no such runner (a setup test is a compiled [E2ESetup] test in the user’s test assembly), and a saved session lives in the store of one process (SessionRun) and is deleted when the run ends, so another process cannot restore it. ExploreOptions.Session (upstream’s session) is ported for the part that does not need the runner: it names a session the host has already restored (for example through an Engine of its own), and then the planner and the explorer are told the app starts signed in (ExplorePlan.SignedInContext, upstream’s signedInContext, added to the explorer’s agent context as upstream’s agentContext), and the planner plans no sign-in and offers no other-account lens. It does not run a setup or restore state itself, and an unknown name is not COLLECTION_ERROR. Also not ported: --reporter json (the port has no reporters; .e2e/report.json has the record under run.explore, see Report document), --reporter json (the port has no reporters; .e2e/report.json has the record under run.explore, see Report document), a start from a restored session by the command, and the --artifacts refusal (the port never had the flag).
  • The planner prompt (tester-army/e2e#1523 f4be1c4, #1522 73734c6): ExplorePlan.PlanInstruction lists summaries for the latest 8 steps only (SummarizedSteps, upstream’s SUMMARIZED_STEPS), and carries upstream’s lenses and finish rule. The “another account or role” lens needs several accounts and no PlanRequest.Session (the session of ExploreOptions.Session), as upstream. PlanInstruction adds the signedInContext line and the “work as the signed-in user” text for a session. Tests: ExplorePlan/PlanInstructionTests (upstream’s explore-plan.test.ts, whole). ExploreRules in Executor.cs has upstream’s edge-case rule and its “same defect on another screen is a new finding” sentence, word for word.
  • Tests: E2eExploreTests ports the it of explore.test.ts that says to pass --video on when a retry mode would record nothing (partial: the notice comes through ExploreOptions.Notice, and a scripted engine that declares the video capability stands in for the web engine). The --trace and --video parser tests of cli.test.ts are about e2e run, which the port lacks; ExploreFlagsTests (.NET-only) covers the same parser on e2e explore, and ExploreRecordingTests (.NET-only) covers the files.

e2e doctor (tester-army/e2e#1493, 91bd614) is E2E.Cli DoctorCommand over Doctor (upstream’s cli/doctor.ts), with IDoctorEngine for upstream’s optional doctor hook of Engine. See Checking your setup. The device engine’s checks, --check-model, and the blank device name check were ported next (hardkoded/e2e-dotnet#971, second part).

  • DoctorCheck, DoctorReport, DoctorStatus, DoctorOptions, and Doctor.FormatDoctorReport are upstream’s names, internal to E2E.Cli. EngineDoctorInfo and EngineDoctorCheck are upstream’s, in E2E.Engine beside EnginePrepareInfo; EngineAppInfo is upstream’s with the members the port’s config declares (Site, BundleId, AppPath, LaunchArguments, Permissions), built by TargetApps.EngineAppInfoOf (upstream’s engineAppInfo). The schema doctor-v1.schema.json and both fixtures are copied.
  • .NET-only: IDoctorEngine (the hook is its own interface, as IPreparableEngine is, so an engine without it compiles unchanged), EngineDoctorStatus (upstream’s status is a union of four strings), the CancellationToken of DoctorAsync (upstream’s info.signal), the runtime check (upstream’s node, which names the Node.js version; node stays a reserved id, so an engine cannot take either), DoctorOptions.CreateEngine (the config names a platform, not an engine handle), DoctorOptions.CreateModel (a test seam for the model of an agent; upstream’s tests script an AI SDK instance in the config), and LoginModel.LoginOf (upstream’s loginOf, by the config’s provider: upstream records the login on the model instance).
  • The verdict line says e2e explore and e2e mcp can start here where upstream says e2e run can start here: the port has no e2e run. The message of the browser check names e2e install where upstream names npx @e2e-dev/web install.
  • Engines: WebEngine implements IDoctorEngine (WebEngine.Doctor.cs): init-scripts and browser, as upstream’s web engine does. The installed-browser lookup reads the revision from the driver’s browsers.json and checks the cache for INSTALLATION_COMPLETE, instead of asking a driver for the executable path, which would start a process; a revision override for an old operating system is not read. MobileEngine implements it too (MobileDoctor.cs, upstream’s mobile/doctor.ts): agent-device’s doctor command once per configured device (once with no device, for the booted one a run picks), with the machine checks (agent-device, toolchain, ios-runner-cache) reported once, info findings, metro, and target-app-device dropped, a device’s message prefixed with its name, targetApp set to the BundleId when there is no AppPath, and app-path for a build that does not exist; with a provider only device, as skip. The client calls it as command.doctor (DeviceCommands maps it to the doctor command), and, as upstream does, the daemon may start an iOS runner build in the background. DocumentEngine, WinAppEngine, and the MAUI DevFlow and TestMu engines have no hook, so their targets get the one engine check with status skip.
  • A target’s engine is built before its checks run, as e2e explore builds it; one that cannot be built (a windows target on another host, a bad E2E_MOBILE_PROVIDER) is that target’s failed engine check, and the other targets are still checked. A problem resolving a target’s app is the config check’s.
  • A model: the JSON config names a provider and a model id, so model and judge report those, where upstream reports the names the AI SDK instance gives itself. A provider that reads an e2e login (chatgpt, copilot, grok, opencode-console) is checked on the stored login or the API key variable; every other model is unknown (the model reads its own credential; --check-model calls it) and never pass without --check-model. With --check-model, a call goes through the agent’s own model (AgentConfig.CreateModel and CreateJudge), once per model, provider, base URL, key variable, provider options, and MaxInputTokens, with ModelRequest.MaxRetries (upstream’s ModelCall.maxRetries) set to 1 and a 1 minute limit, which fails as MODEL_PROVIDER_FAILED (the model did not answer within 1m); a MODEL_REFUSED or MODEL_OUTPUT_INVALID counts as an answer. The call sets no maxOutputTokens (the port’s models set their own). The config has no custom executor, so the executor field of the check is never set.
  • Messages are redacted for the config’s secrets and the hosted-device credentials before they enter a check, and an engine’s progress lines are redacted too. The human output passes each line through Format.Bounded.
  • Not ported: the manifest’s doctor key and the protocol (lifecycle/doctor, the doctor role of TransportContext, the grace for a protocol engine’s connection), since the port has no engine protocol, client, server, or transport; bin.ts‘s Node.js version report; the migrate guides’ change from agent-device doctor to e2e doctor (the mobile get-started guide now points at e2e doctor); a third Ctrl-C that exits at once (the tool cancels once, as e2e explore does); and SIGTERM, which only e2e mcp handles.
  • Tests: CliDoctor/E2eDoctorTests ports all 10 it of cli-doctor.test.ts (integration): six whole, four partial (Partial_: the model naming, which leaves out the agent that holds a custom executor; ‘retries a refused connection once’, which answers 503 from a local server where upstream’s scripted instance throws ECONNREFUSED; and the two Ctrl-C ones, which cancel a token and send no signal). The models are scripted by id through DoctorOptions.CreateModel. CliDoctor/DoctorTests ports both it of the unit file, partial: the engine’s own teardown stands in for a protocol connection’s close. WebDoctor/WebDoctorTests ports web/tests/unit/doctor.test.ts, Install/BrowserCheckTests the browserCheck addition to install.test.ts, and SchemaFixtures/DoctorV1SchemaTests the doctor-v1 case of schema-fixtures.test.ts. Doctor/DoctorTests in E2E.Mobile.Tests ports mobile/tests/unit/doctor.test.ts (five it), and Engine/LifecycleTests the blank device name it of engine.test.ts. NoOutputError/NoOutputErrorTests ports the ‘plain call: an error finish’ it of no-output-error.test.ts as far as the port has one (partial: an agent turn, since the port has no plain call that parses a reply, and no built-in provider reports an error finish); ‘plain call: a finished reply that is not JSON is MODEL_OUTPUT_INVALID with its text’ is not ported, for the same reason. ModelCallRetries/ModelCallRetriesTests is .NET-only (upstream has no test of maxRetries). Not ported: the engine-protocol.test.ts case and the manifest case of schema-fixtures.test.ts.
  • Reporter, FinishedRun, and ReporterSummaryRow (E2E.Reports, Report/Reporter.cs) are upstream’s Reporter, FinishedRun, and the elements of ReporterSummary (types.ts, as of bd7f45f). OnEvent(RunEvent) is onEvent(event): a virtual no-op that sees every run event as it happens (see Run events) and must not block or throw. OnRunFinishedAsync(FinishedRun, CancellationToken) is onRunFinished(run, signal): it runs once, when the report is final, within one minute (Runner.ReporterTimeout, upstream’s REPORTER_TIMEOUT_MS); its token is cancelled when that runs out or the run is forced to stop; a throw, a timeout, a forced stop, or a row with no label and text is one e2e: reporter "name" ... line on stderr, with upstream’s wording, and never changes the outcome. Runner.RunReportersAsync (Run/Runner.cs) is upstream’s runReporters (run/runner.ts). FinishedRun.Traces and FinishedRun.AiTracePath are upstream’s traces and aiTracePath, as init members so a positional new FinishedRun(...) still compiles: Traces is a IReadOnlyDictionary<string, string> (upstream’s ReadonlyMap), empty when no test kept a trace; AiTracePath is null when the process wrote no AI trace. A reporter that gives up on is work left behind: AbandonedWork.LeftWorkBehind is upstream’s leftWorkBehind (internal/abandoned.ts), set by Runner.RunReportersAsync when it stops waiting for a reporter past its budget or after a forced stop (a reporter given up on before it was called is not work left behind), as upstream’s runReporters calls leaveWorkBehind. Nothing in the port reads it yet: upstream’s CLI exits without waiting for such work, and a test host exits on its own.
  • reporters in e2e.config.json is upstream’s reporters (resolveReporters, config/resolve.ts), with a different shape. Upstream’s entries are built-in ids and reporter objects built in code (github(options)); the JSON config holds no code, so an entry here is a type name or { "type", "options" } and the reporter is built by reflection when the run begins, so its OnEvent sees the run from the start. reporters that is not an array, an entry that is neither a string nor an object with a string type, an unknown entry key, and options that is not an object are INVALID_CONFIG at config load. The type is resolved late, when the run begins (Reporters.Create), since a type of the test assembly is not loaded for every command that reads the config (e2e explore, e2e login): a name that is not found, a type that is abstract, is not a Reporter, or has no public parameterless constructor, and options for a type that is not an IConfigurableReporter, are one stderr line that names the type string (e2e: reporter "X" could not be created: ...). The other reporters still run and the outcome is unchanged. A message never holds an option value. Order is config order, a type listed twice runs twice, and no config file means no reporters. Config is the only way to choose reporters: the earlier [assembly: E2EReporter] attribute (E2EReporterAttribute, from #883) was removed, a breaking change to a .NET-only API. A reporter that fails to build or run is still one line on stderr. Trimming and AOT: the type is found by name at run time, so a trimmed or Native AOT app must keep it (a root descriptor or DynamicDependency); there is no source-generated registry.
  • .NET-only: IConfigurableReporter (Configure(JsonElement options)), since upstream passes options as arguments in code and a JSON entry has none; it is called once, only when the entry has options, and rejecting unknown option content is the reporter’s job. ReporterEntry and Reporters.Create, which build the reporters of the config; HostRun (Run/HostRun.cs), which E2ERunFixture (E2E.NUnit, E2E.XUnit.V3) drives, the only run-level hook a test framework gives (a run without the fixture calls no reporter and emits no run-level event): it builds the reporters when the fixture is set up and subscribes each OnEvent to the process’s events, emits run-started, the collect setup step, and plan, and when the fixture is torn down emits run-finished for each run the process wrote a report for and then runs the same reporter instances’ OnRunFinishedAsync; ReportFile.FinishedRunsAsync, which reads report.json back as the FinishedRun of each output directory. Runner.RunReportersAsync starts each reporter on the thread pool (Task.Run), so one that blocks before it returns a task still meets its budget; upstream’s promise cannot block its own timer. The rows print to standard output after the tests, where upstream’s list reporter prints them under the summary. Reporter is an abstract class, OnRunFinishedAsync returns null for upstream’s void, and the C# types make upstream’s malformed-row and scalar cases impossible except an empty label or text.
  • FinishedRun.LastRun is upstream’s lastRun: the report of the run a --last-failed rerun selected from (see Test filters), null for any other run. Not ported: the built-in json, junit, and markdown reporters (a reporter renders the markdown page itself: MarkdownReport.RenderMarkdownReport(run.Report, options) is public). exitCode is the report’s, not the test process’s.
  • Tests: Reporters/ReporterObjectsTests has the 4 it of describe('reporter objects') in tests/integration/reporters.test.ts (as of bd7f45f), whole: a run starts, a passing session over a fake engine is the test, and the run ends. Not ported: the scalar reporter of the third it, whose onRunFinished answers with something other than rows (untyped JavaScript): a C# reporter returns rows or nothing, so the case cannot be written. The loud and quiet reporters and the host’s onEvent are OnEvent and a sink on the process’s events. Reporters/RunReportersTests, Reporters/FinishedRunTests (the trace map and AiTracePath) and Reporters/ConfigReportersTests are .NET-only.

The run’s event spine of upstream’s run/events.ts (bd7f45f) is public, in E2E.Reports (Run/Events.cs): RunEvent (the envelope: Seq, At, and Fact, since a C# record keeps the fact as a member where upstream spreads it) and RunEventFact, a closed hierarchy with one record per upstream type: RunStartedEvent, PlanEvent, NoticeEvent, SetupEvent (with SetupStep, SetupState, SetupOutcome), TestStartedEvent, StepProgressEvent (step; .NET-only name, since StepEvent is the report’s model-turn record), OutputEvent (output, with OutputPair and OutputStream; defined, not emitted), TestFinishedEvent, ExploreEvent (explore, with the ExploreProgress moment it carries), RunErrorEvent, RunInterruptedEvent, RunStoppedEvent, and RunFinishedEvent. A reporter receives them in Reporter.OnEvent. The list reporter reads the same facts.

  • The emitter is upstream’s createRunEventEmitter: RunEventEmitter and RunEvents.CreateRunEventEmitter (Run/RunEvents.cs) stamp seq (from 1, counted only while someone listens) and at, and quarantine each sink on its own with one stderr line, e2e: reporter "name" threw on <type>: <message>; ignoring it for the rest of the run. Not ported: async sinks, since the port’s sinks are synchronous. .NET-only: RunEvents (Emit, Subscribe) is the process’s one bus, since a .NET test run has no runner that owns an emitter. It is thread-safe, takes sinks while it runs (Subscribe returns an IDisposable), and delivers under one lock, so every sink sees the events in seq order and a sink must not block. EventWire builds the public events from the port’s own records, as StepProgressWire does for a step.
  • Emitted: E2ESession (Run/SessionEvents.cs) emits test-started when the attempt has launched, step from the recorder’s progress, and test-finished after the attempt’s report is built and report.json is written; the run fixtures emit run-started, the collect setup step, plan, and run-finished (before the reporters’ OnRunFinishedAsync), and run-error for a failure of their own setup; HostTestFilters emits each filter’s filter setup step (with its outcome) and its notices (target filter); RunApps emits the app command’s app setup steps and its notices (target app). RunApps.StartAsync and AcquireAsync no longer take an onEvent: a caller subscribes to the bus.
  • A session is one attempt of a test, so a test that retries emits test-started and test-finished once per attempt, the later result holding every attempt so far; Repeat and DeclarationIndex are 0 (no repeat-each, no declaration order), SerialId is null, and the test’s file is the full name of its test class, as a session names it. RunEventResult carries the report’s public tree (ReportAttempt, SkipInfo, ResultStatus of E2E.Reports); its internal Recorded member (.NET-only) is the port’s own record, which ListReporter renders from. An exploration is a test of the virtual file explore and emits its test-started, step, and test-finished like any session, and Explore.ExploreAsync writes each ExploreProgress moment to the bus as an ExploreEvent (upstream’s explore event, which its run writes to the same stream), in addition to ExploreOptions.OnProgress. The tests of a process that explores while another listens to the bus see those events too.
  • plan is an estimate (HostRun.Planned): the test methods the framework adapter finds by reflection (RunSelection.Discover), grouped by test class, without the tests the framework ignores or the filters left out. A parameterized test counts once, and a test that skips itself while it runs is counted. Upstream’s plan counts the pairs the selection chose. run-started has the project id of the project folder’s name (the port’s config has no projectId), the config’s targets, and the default agent’s model as provider/model.
  • Not emitted: output (the test framework captures standard output), serial-group (the port has no serial groups), run-interrupted and run-stopped (no runner to interrupt or stop; the records exist for the list reporter), and prepare and service setup steps (no services; engines prepare on their own). e2e explore feeds a ListReporter from these events, without a live window; the live window needs a command that feeds a terminal (#882).
  • Tests: RunEvents/CreateRunEventEmitterTests is the first it of unit/run-events.test.ts, whole (with seq); the two async-sink it are not ported. RunEvents/RunEventBusTests (ordering and seq under parallel sessions, quarantine per sink, subscription), RunEvents/SessionEventsTests, and RunEvents/HostRunTests are .NET-only, as is Explore/ExploreRunEventsTests (an exploration writes its moments and its test’s events to the bus), and HostFilterSeam/HostTestFiltersTests has the filter events.

@e2e-dev/github (packages/github, as of tester-army/e2e#1438, d181e26) is E2E.GitHub, a NuGet package that references E2E (#745). List it in reporters of e2e.config.json (see Reporters): { "type": "E2E.GitHub.GitHubReporter, E2E.GitHub", "options": { "key": "chromium" } }. Ported: the whole of actions.ts, post.ts, reporter.ts, and merge.ts (as of tester-army/e2e 50fa7af). The docs guide is Pull request comments.

  • GitHubReporter is upstream’s github() and GitHubOptions { Key } is GitHubOptions. Upstream’s github(options) is called in the config module; the port’s config builds a reporter by type name with a public constructor with no parameters, so GitHubReporter implements IConfigurableReporter (.NET-only): Configure reads options.key (a string), and an unknown option or a key that is not a string throws an ArgumentException that names the option and never its value (INVALID_CONFIG at config load). Without key, the reporter reads the E2E_GITHUB_KEY environment variable (.NET-only), at the time the run finishes. GitHubOptions { Key } stays: it is the options Configure builds and a derived class’s protected constructor takes. A class that derives from GitHubReporter can pass GitHubOptions to its protected constructor (.NET-only). The reporter is named github, builds its HttpClient when the run finishes, and has no side effects before.
  • Actions (detectActions, ActionsContext, ActionsDeps), Post.UpsertCommentAsync (upsertComment, PostParams), GitHubReporter.ReportRunAsync (reportRun), ReportDeps, CommentMarker (commentMarker), and MarkerField (markerField) are upstream’s, in the equivalent files, and are internal as upstream does not export them. The page is MarkdownReport.RenderMarkdownReport(run.Report, ...) (see Report document), with the run page’s #artifacts link, the source links under the project’s path in the checkout, and the key as the title. The marker is <!-- e2e-github project=... workflow=... job=... [kind=explore] [key=...] -->, byte for byte as upstream’s, so encodeURIComponent’s spelling is kept (! ' ( ) * stay as they are) and a comment posted by upstream’s reporter is found by the port’s.
  • Differences, all .NET-only: fetch is an HttpClient, the abort signal is the CancellationToken (a cancelled call surfaces as a cancellation, with no reason text), and json.ts (isRecord) has no counterpart since System.Text.Json tells the kinds apart. The User-Agent is E2E.GitHub, where upstream sends @e2e-dev/github, so the port’s traffic is not counted as upstream’s. The token goes through the redactor before any text GitHub sent back reaches an error, so an error never holds it; upstream’s messages cannot hold it. The reporter never logs the token.
  • Merge.FoldLastRun is upstream’s foldLastRun (merge.ts, internal as upstream does not export it): when FinishedRun.LastRun is set, the reporter renders the rerun folded into the run it selected from. Differences: the port has no serial groups, so the fold joins none (serialGroups of run and of carried are empty). The guide has no built-in markdown reporter line.
  • Known gap: an exploration finding names its screenshot only when a result carries an artifact with its ArtifactId, which the port’s exploration keeps as a file path (#958); the comment of an e2e explore run is posted all the same, under its own marker.
  • Tests: E2E.GitHub.Tests has Actions/DetectActionsTests (all 5 it of actions.test.ts), Post/UpsertCommentTests (all 10 it of post.test.ts; the abort one is Partial_ since a .NET cancellation has no reason text; Keeps_the_token_out_of_the_error... is .NET-only), and Merge/FoldLastRunTests (10 of the 13 it of merge.test.ts; not ported, since the port has no serial groups: joins a rerun serial group's attempts..., shows a carried serial member's group..., and counts a serial member executed...), and Reporter/ReportRunTests (all 12 it of reporter.test.ts, the it.each of two cases as a Theory). Reporter/GitHubReporterTests is .NET-only (the key from Configure, from E2E_GITHUB_KEY, and from the derived class; an unknown option, a wrong kind, and a non-object are rejected without their value). The fake GitHub (FakeGitHub) is fake-github.ts and Fixtures is fixtures.ts, over the public Report records. No test uses a real token.
  • ListReporter (E2E.Cli, Report/ListReporter.cs, internal) is upstream’s report/list.ts, with FileGroup and TestLine in ListModel.cs (report/list-model.ts) and the formatting helpers in Format.cs (report/format.ts): Tally, StateString, FileOutcome, StatusBucket, StepsUsage, UsageText, ModelsText, DurationText, StepsCacheTally, CacheText, and the rest the summary reads. Handle takes the run facts of Run/Events.cs (run/events.ts, public: see Run events): RunStartedEvent, PlanEvent, NoticeEvent, TestStartedEvent, StepProgressEvent, TestFinishedEvent, ExploreEvent, RunErrorEvent, RunInterruptedEvent, RunStoppedEvent, and RunFinishedEvent. The test sessions, the run fixtures, and Explore.ExploreAsync emit them, so a reporter can be given them through Reporter.OnEvent. e2e explore feeds them to ListReporter and prints the run summary; no other command does. ListReporter renders a result from RunEventResult.Recorded, the port’s own record, and reads a step fact’s public StepProgress and a run-error fact’s public ReportError.
  • The summary rows are upstream’s, in its order: Test Files, Tests, Left out, AI, Cache, Errors, Cleanup, Start at, Duration. The Cache row counts the steps by Cache.Mode, as upstream does: self-finalized is replayed, agent-concluded is handed off, and missed is missed, with a zero count left out (Cache 4 replayed · 1 handed off · 1 missed · 1 not saved). not saved is Format.NotSavedCount (upstream’s notSavedCount of report/format.ts): the steps of a passed or flaky result whose CacheWrite is Unconfirmed, NoChange, or NotWritten, taken from the result’s latest passing attempt only (PassingRunSteps, upstream’s passingRunSteps of report/list.ts). The port’s list reporter has no serial groups yet, so upstream’s serialMemberDetails part of this change is not ported; four serial-member its of upstream’s report-list.test.ts are not ported with it (see #974). The Left out row (upstream list.ts at a9c3de9, tester-army/e2e#1206 da13624) counts the tests each test filter left out, from the unselected results whose Skip.Filter is set, through LeftOut.LeftOutTests (upstream’s leftOutTests of report/left-out.ts), so a test left out on several targets or repeats counts once: Left out 2 by areas, 1 by jev, or Left out 1 test by areas for one filter. The Cleanup row (tester-army/e2e#1233 34287cf) appears in the final summary only: Cleanup 1 cleanup failure: ENGINE_FAILURE: attempt end failed: close exploded (+2 more), the first cleanup failure of the run’s tests. A passed or flaky test shows each such failure under its row as → cleanup failed: <code>: <first line>, and its file lists its tests too (TestLine.CleanupErrors, ListReporter.CleanupLines, from ReportRecords.CleanupErrorsOf, upstream’s cleanupErrorsOf). The AI row names the models the steps reported, most calls first, and falls back to the configured model.
  • App errors (tester-army/e2e#1480, 723c1af). Under the app 2 errors, 1 warning logged row, a failure in the Failed Tests section quotes the app’s first 3 errors, oldest first, as × console error: ... (uncaught error, network error), loopback origins dropped, then 1 more app error logged. ListReporter reads them with FailureText.AppErrorsOf, the same call the Markdown page’s AppErrorLines uses; its private AppLogSummary record is upstream’s AppLogSummary (AppLogSummaryOf is upstream’s appLogSummary). The upstream commit also renamed stepLabel to quotedLabel in list-steps.ts; the port has no list-steps.ts or RunningTree yet (#843), and FailureText.StepLabel is the Markdown page’s own helper, so nothing renames. No command prints the list reporter yet.
  • The Screenshots row (tester-army/e2e#1481, f078364). After Traces, the summary names the first 10 app.screenshot files of the run, one per line, then and N more (the report lists every artifact). RequestedScreenshots is upstream’s requestedScreenshots, and ListReporter.PrintScreenshots its printScreenshots; ResultDetails.Screenshots is upstream’s screenshots. A screenshot an assertion or a failure kept is left out. Serial groups are not ported, so a serial member contributes none. No command prints the list reporter yet, so the row cannot be seen in a run. Tests: ReportList/ScreenshotsRowTests, Counts_the_files_past_the_first_ten and Partial_Names_each_app_screenshot_file_and_leaves_out_assertion_and_failure_screenshots (the serial half of upstream’s names each app.screenshot file, ordinary and serial, ... is missing).
  • Setup lines name the app URL (tester-army/e2e#1483, 0b84d35) in upstream’s setupWording, on the app setup event’s url. The port has SetupStep (CollectSetupStep, FilterSetupStep, PrepareSetupStep, ServiceSetupStep, AppSetupStep with Url), SetupOutcome, and the SetupEvent fact (upstream’s setup, with State Started or Finished) in Run/Events.cs, and ListReporter handles it: setupWording, the in-flight step the interrupt line names, the Narrated rule, and the startup split of Duration. The port has no runner, so the emitter is RunApps, where ManagedProcessHooks.Starting and Ready emit the AppSetupStep that AppStep builds with Urls.PrintableUrl (upstream’s appStep in runner.ts). RunApps writes to the process’s events (see Run events), so a sink that throws is quarantined with one stderr line and cannot fail the start of the app. .NET-only: EventType, which derives upstream’s type (setup) from the fact’s record name because the facts carry no type field. A process that attaches to one a SharedAppProcesses already holds emits nothing for the second caller. The run fixtures emit the collect step and HostTestFilters the filter steps; nothing emits prepare or service (no services); ListReporter renders them from the tests. The three it of setup steps in report-list.test.ts are in ReportList/SetupStepsTests. AppPortAllocation/AppPortAllocationTests has serves the app on a port the run picked ... as partial: it starts the command through RunApps, listens on the process’s events, and asserts the two app steps carry <origin>/, but runs no test against the base URL, reads no report baseOrigin, and starts no second run. The other two it of that file (two targets on distinct ports, the worker process) are not ported, since the port has no runner or workers. ListReporter.Setup is upstream’s setupStep, renamed because the SetupStep type takes that name in C#.
  • Skipped after a failure and repeats. A test that called Skip after a failed attempt is listed in a Skipped After Failure section after Failed Tests, with the failed attempt’s error and evidence, and the summary names the count on a Warnings row (Records.FailureBeforeSkip, upstream’s failureBeforeSkip in run/records.ts, without its groupOf argument, which only a serial member reads). A --repeat-each run gets a Repeats row, then one line per test that missed a run (Repeats.RepeatGroups, RepeatSummary, and RepeatLine, upstream’s report/repeats.ts, which the Markdown page already used). ReportList/RepeatsRowTests is .NET-only: no it of report-list.test.ts reads the row.
  • Code frame and video rows. A failure in Failed Tests names the failing line under its message ( ❯ tests/login.e2e.ts:4:22) with a code frame (CodeFrame.Render, upstream’s codeFrame), then the evidence rows, then one ❯ video <path> row per recording the attempts kept (a hosted service’s URL is printed as is). ListReporter.PrintFailureLocation is upstream’s printFailureLocation, VideoPaths its videoPaths, PrintVideos its printVideos. Upstream finds the line with userFrame in the error’s stack; a .NET error carries a StackTrace, not text, and the report keeps no stack, so the frame is found once, when the error is serialized, by Source.Locate (the port’s userFrame, and sourceLocation, which upstream’s internal/source.ts keeps beside it: the first frame in the project root and outside the runner’s assembly, where upstream skips node_modules), and the reporter reads the result from ReportError.Source. Upstream’s file URLs and module-cache query strings (file:///project/tests/login.e2e.ts?worker-collect-1) have no .NET counterpart. The three it of describe('failure locations') are in ReportList/FailureLocationsTests, on stack traces that real calls produce: extracts the first project frame, skipping runner and node_modules frames is Partial_ (no node_modules frames), returns undefined without a stack, root, or matching frame is ported, and resolves file URLs and strips module-cache query strings is not ported.
  • Closing Failed rows (tester-army/e2e#1482, d94593b). ListReporter.Rows prints the rows reporters resolved with, then the run’s Failed rows last, so a run piped through tail still names what broke: each failed test as Failed × |chromium| tests/login.e2e.ts:4 > login > welcomes, its error’s first line, and its trace page. FailedRows is upstream’s failedRows and _closingRows its closingRows; the run-finished event builds them and Rows prints and clears them, as upstream’s rows() does. The line is the error’s Source line when the test file itself threw, else the line the test is declared on (Failure.DeclaredLine, upstream’s declaredLine). The port’s declared line is ReportResult.Source, which a session sets to the line its first step was called from, since a .NET test method has no declaration line a stack names; a test with no step has none.
  • Differences. RunEventResult is the report’s ReportAttempt list and ReportSkip with the test and target identity; it carries ResultId, which the caller supplies because the port has no resultId digest (internal/ids.ts). ListReporter takes a TimeProvider (.NET-only, for the clock tests) and IListReporterOutput is upstream’s ListReporterOutput without raw. DefaultOutput is upstream’s DEFAULT_OUTPUT; its private StdoutOutput class is .NET-only, since a C# interface needs a class to implement it. Other .NET-only helpers of ListReporter: Colors (picocolors, which C# lacks), TestLineRows (upstream’s testLine; the name is the TestLine type’s), IndexOfTarget (the targets.indexOf of upstream’s badge, which several callers need), and StatusName (a ResultStatus as its wire name, which upstream prints as the string it already is). FDown and FRight are upstream’s F_DOWN and F_RIGHT. ModelTally is a plain Dictionary<string, int>, as upstream’s Map<string, number>. The RUN banner prints the assembly version.
  • Live window and console output (upstream report/live-window.ts at 7e967d9, report/running-tree.ts and report/list-steps.ts at 723c1af, report/list.ts at b8485ba). LiveWindow and RunningTree (E2E.Cli, Report/LiveWindow.cs and Report/RunningTree.cs, internal) are the block below the permanent log: it is painted through IListReporterOutput.Raw (upstream’s optional raw; an output without it paints no window) when ListReporterOptions.Live is true or, by default, the console is a terminal, and it repaints every LiveWindow.RepaintIntervalMs (80 ms) so the clocks tick. ListReporter handles the start, event, activity, replay, and end phases of a step: with a window the finished agent steps wait under their test and print nested in the file block (a file that has any lists its tests too), without one they print at once, as before. ListSteps.EventLine is eventLine. The model classes CurrentStep, SetupInFlight, ListModel.IsShownEvent, and the Steps of a TestLine and a RunningTest are list-model.ts‘s. OutputEvent is the output fact (OutputPair, OutputStream) and ListReporter.TestOutput, ProcessOutput, EndProcessOutput, SourcedOutput, PrintOutput, and FlushOutput are testOutput, processOutput, endProcessOutput, sourcedOutput, printOutput, and flushOutput: a test’s console output prints above the window under one stdout | <badge> <file> > <title> heading per source, a line written in pieces prints once whole, and what the runner process printed has a runner heading. Nothing emits OutputEvent (the test framework captures standard output). Format.VisibleWidth and Format.FitColumns now count terminal columns per grapheme cluster (Format.Graphemes, upstream’s graphemes, with WIDE_RANGES and the emoji rules), where they counted text elements before, and Format.TerminalRows is terminalRows. Differences, all .NET-only: LiveWindow takes a TimeProvider for its timer and a lock (ListReporter holds it while it handles an event, because the timer’s thread is not the one that handles events); Format.WithTerminalSize sets the terminal size in an async flow (upstream’s tests set process.stdout.rows and columns); Colors.White is picocolors’ white. Not ported: serial groups (the user left serial runs to the test runner), so RunningTest has no serialId and executing, and the serial-group fact; the live rows of an exploration and the explore events (the e2e explore view is ExploreView; #1019).
  • Step lines and replay notices (upstream report/list.ts at b4dd4bd, report/list-steps.ts at 723c1af), without a live window. ListReporter handles TestStartedEvent (testStarted, keeping the pair’s title) and StepProgressEvent (step): each finished agent step prints at once as ✓ checkout > agent.act "pay" 4.20s · 3 model calls, and deterministic steps never print. ListSteps (E2E.Cli, Report/ListSteps.cs) is list-steps.ts: QuotedLabel, StepLine, ReplayNotices, ReplayLine. A test row now prints as the test finishes, prefixed with its badge and file, and the file’s block is the file line alone, as upstream does without a live window (the port printed the rows inside the block before; SummaryTests follows the new line). A replay notice (replayed · recorded with <model>) prints under the test whose steps replayed a recording made by another model than the header’s. Differences: the port’s step records the recording model as one label (CacheInfo.RecordedBy, IAgentModel.Name), so ReplayNotice.Source is that string and modelLabel has no counterpart; StepEvent is taken by the report’s model-turn record, so the step fact is StepProgressEvent (RunEvents.EventType still names it step); TestStartedEvent.SerialId is carried and not read. Nothing emits the two facts: they need the runner (#882), where E2ESession’s OnProgress (StepProgress) is the source of step, and the test lifecycle is the source of test-started. Tests: ReportList/FileBlocksTests (all 9 it of describe('file blocks')), ReportList/StepStreamingTests (all 5), and ReportList/RecordingModelMismatchTests (4 of 5, each with and without a live window; the serial one is not ported). ReportList/LiveWindowTests has all 15 it of describe('live window'), ReportList/ListReporterTests the two sanitizing it (never lets control characters through error codes, phases, categories, or paths is Partial_: the port’s category and phase are enums, which cannot hold control characters), and LiveWindow/ is live-window.test.ts: LiveWindowTests (7), VisibleWidthTests (3), FitColumnsTests (1), QuotedLabelTests (2), and EventLineTests (2); its two ExploreView it wait for #1020. CodeFrameWidth/CodeFrameTerminalColumnsTests now has all 7 cases of code-frame-width.test.ts, with the CJK and emoji rows.
  • Exploration (upstream report/list.ts and report/list-explore.ts at a9c3de9). ListReporter handles ExploreEvent (exploreProgress is ExploreProgress; exploreBadge is ExploreBadge, the target its test started on; printExplore is PrintExplore). The first moment creates an ExploreView (Report/ListExplore.cs), which stands in for the one synthetic test: without a live window the header, each finding, and each finished step print as they happen; with one, ExploreView.LiveRows is the window (the header with its clock, the finished steps, the step in progress with its latest calls and findings in time order, or the planner deciding, and the Findings and Steps summary rows) and the record prints the header and every step at the end (Record(badge, withSteps)). The view counts the step’s engine events as actions (Action; the finding tool’s own call is not one), keeps the test’s artifacts for the findings’ screenshots (Result), and decides which error is the verdict (IsVerdict, on the error’s code): any other failure of the exploration test keeps its Failed Tests entry. ExploreView reads the terminal size as the other list helpers do (Format.TerminalColumns and TerminalRows), where it took the width as an argument; ExploreVerb (Exploring, Explored) is .NET-only, standing in for upstream’s string union, and the time argument of the constructor (a TimeProvider) is upstream’s now. A step line counts actions only when the view is fed engine events, which e2e explore’s own printer does not do, so its step lines show none. Tests: ReportList/ExploreRunsTests has the two live-window it of describe('explore runs') (Badges_the_record_with_the_explored_target_after_its_test_has_finished and With_a_live_window_shows_the_exploration_...) and LiveWindow/ExploreViewTests both it of describe('ExploreView') of live-window.test.ts.
  • Tests: ReportList/ReporterRowsTests has both it of describe('reporter rows'). ReportList/SummaryTests has all 12 non-serial it of describe('summary'), among them the two newer ones: closes with each failed test after the reporter rows: ... and counts the tests each filter left out on a Left out row, ... (the 4 serial ones are not ported), with ListReporterKit for the helpers the file declares at its top; vi.useFakeTimers is ListReporterKit.FakeTime, a TimeProvider whose timers fire as the clock is advanced, like vitest’s. ReportList/GoldensTests has all 5 it of describe('ListReporter goldens') against upstream’s fixtures (tests/fixtures/list-reporter/, copied as Fixtures/ListReporter/, byte for byte: pass, fail, error, interrupted, and live frames), at 80x30 in UTC on a frozen clock; E2E_GOLDEN_UPDATE=1 rewrites them in the source tree. ListReporter/ListReporterOutputTests is tests/integration/list-reporter.test.ts, the one it that reads the cleanup lines: Partial_Shows_a_cleanup_failure_under_a_passed_test_and_in_the_summary_... hands the reporter the result such a run records, without the runner or the exit code 3; the other it, the --repeat-each tally, needs the runner: ReportList/RepeatsRowTests is its Partial_ port, from events. ReportList/FailedTestsSectionTests has all 3 it of describe('failed tests section'), among them the one upstream (tester-army/e2e#1480) added, quotes the first app errors under the tally, loopback origins dropped, and counts the rest. ReportList/ListReporterTests has the it directly under describe('ListReporter'), titles the later runs of a repeated test and keeps each run its own line. Not ported: the serial groups block of report-list.test.ts (serial runs are the test runner’s feature), the resolves file URLs and strips module-cache query strings it of failure locations, the explore golden, and the live-window it of explore runs (#1020); the screenshots row tests are in ReportList/ScreenshotsRowTests.

docs-site/src/content/docs/reference/environment.mdx ports upstream’s docs/reference/environment.mdx (tester-army/e2e#1582, f185ca8), listing the variables the port reads (user-facing ones; each checked against src/): the model keys, E2E_OAUTH_CREDENTIALS, E2E_USER_<NAME>_*, E2E_SECRET_<NAME>, CI, E2E_CACHE_DIR, NO_COLOR, the GitHub reporter’s variables, PLAYWRIGHT_BROWSERS_PATH, PLAYWRIGHT_SKIP_BROWSER_GC, KERNEL_API_KEY, EXPO_TOKEN, LIMRUN_*, BROWSERSTACK_*, LT_*, and the internal E2E_WEB_BROWSERS_<TARGET>_<digest> and E2E_AGENT_DEVICE_POOL_<TARGET>_<digest>. Differences from upstream’s page:

  • .NET-only variables, marked on the page: E2E_HEADLESS, E2E_SKIP_BROWSER_INSTALL, E2E_MOBILE_*, E2E_AGENT_DEVICE_BIN, E2E_DEVFLOW_PORT, E2E_DEVFLOW_APP, E2E_DEVFLOW_TRACE, E2E_WINAPP_APP_PATH, E2E_GITHUB_KEY, E2E_AGENT, E2E_CHANGED_SINCE, E2E_LAST_FAILED, E2E_TRACE, E2E_VIDEO, E2E_UPDATE_SNAPSHOTS, E2E_NO_CACHE, E2E_CACHE_DIR_OVERRIDE, E2E_DEBUG, E2E_AI_TRACE (the test host has no flags for them), KERNEL_BASE_URL, TESTMU_USERNAME and TESTMU_ACCESS_KEY, CODEX_PATH, AZURE_*, and the Bedrock AWS_* variables.
  • Not read, because the feature is not ported: FORCE_COLOR, TERM, the telemetry and update-check variables, the CI-vendor and coding-agent markers, LIGHTPANDA_PATH, and TESTMU_API_ENDPOINT (the port’s TestMu package has no session recording lookup). CI sets the retries and cache.mode defaults only: the port has no workers, ONLY_IN_CI, or reuseExisting.
  • NO_COLOR is read by ListReporter, e2e explore, and e2e doctor as a non-empty value; upstream’s page says set.
  • Upstream’s skill (skills/e2e/references/*.md) does not link to its environment page, so skills/e2e-dotnet has no pointer to add.

E2ETest loads the nearest e2e.config.json above the test assembly directory, then above the working directory, once per run. Supported keys: targets (one entry with name, platform, and app with url, command, and readyUrl), timeout, launchTimeout, actionTimeout, assertionTimeout, cleanupTimeout, retries, agents, cache (mode, dir, strict), secrets, and testAssembly (.NET-only, for e2e mcp’s open_session {test}). Defaults, the CI cache demotion to read-only, E2E_SECRET_<NAME> overrides, the 6 code point secret minimum, and INVALID_CONFIG for unknown keys follow upstream.

app.url is normalized as upstream does, with System.Uri instead of WHATWG: a missing scheme becomes https://, or http:// for a loopback host. Userinfo, a query, a fragment, a scheme other than http(s), and plain HTTP on a non-loopback host are INVALID_APP_URL, with upstream’s messages. A base URL set in code (E2EFixture.BaseUrl, E2ESessionOptions.BaseUrl) follows the same rule. Port 0 on 127.0.0.1 or [::1] asks for a free port and needs an app.command to start the app on it (INVALID_CONFIG without one, or with reuseExisting); any other host with port 0 is INVALID_APP_URL. A base URL set in code with port 0 is INVALID_CONFIG, since only app.command starts an app on a free port. Keys of the old .NET shape (app, engine, agent, timeouts) fail with a hint to the upstream key.

app.command and app.readyUrl port upstream’s config/command.ts and config/app.ts (CommandConfig, Command.Normalize, TargetApps.ResolveTargetApp), and ManagedProcess ports run/managed-process.ts (readiness polling, the preflight probe and reuseExisting, the startup-failure tail of command.log, inheritEnv). executable is started with an argument list, never a shell. {port} expands in args, in env values, and in readyUrl, and a url on port 0 takes a free loopback port (AppPorts.AllocateTargetPorts, upstream’s allocateTargetPorts). The first test, e2e explore, or e2e mcp session that needs the command starts it, through Provision.StartDeclaredProcessesAsync and one process-wide SharedAppProcesses pool (upstream’s startDeclaredProcesses and SharedAppProcesses): they share one instance, and it stops when the last holder releases it. A test holds it for the run (E2EFixture.StartSessionAsync calls RunApps.StartAsync); Explore and the MCP session hold it for their own life (RunApps.AcquireAsync) and release it when they close. The tests’ hold ends with the run fixture (E2E.NUnit.E2ERunFixture, a [SetUpFixture] base, or E2E.XUnit.V3.E2ERunFixture, an assembly fixture, both .NET-only: a .NET test project has to register them, since neither framework runs a hook from a referenced library), and without one it lasts until the process ends, where ManagedProcess.KillManagedProcessGroups takes it down on the way out; on Windows the process runs in its own job object (ProcessJob, .NET-only), which ends it and what it started when it is stopped, and when this process is killed outright, as a test host is once its run ends. On Unix a descendant is read with pgrep -P when the app is stopped, so one that outlives a leader that exited earlier is not found. The app command differs from upstream’s in these ways:

  • There is no runner, so a command starts once per test process (a .NET-only holder, RunApps), not once per run. Two processes that declare one command, such as dotnet test and e2e mcp, each start their own, so give a shared app a fixed port and reuseExisting. Upstream’s SharedAppProcesses pool (ProcessPool.cs), declaredCommands (DeclaredProcesses.DeclaredCommands, over a target’s name and resolved app, since the port has no ResolvedTarget), and startDeclaredProcesses (Provision.StartDeclaredProcessesAsync, with ProcessPools.Unshared for upstream’s UNSHARED) are ported, and share the instance inside one process. The engine prepare hooks that startDeclaredProcesses shares a provision with are not ported. A caller whose token is cancelled leaves a shared start with OperationCanceledException, where upstream throws CANCELLED. A target whose command ended while it was held is started again by RunApps (.NET-only: the holder outlives its callers), on a new port when it asked for a free one.
  • A started process is stopped with SIGTERM and then Process.Kill(entireProcessTree: true) after shutdownTimeout. On Windows, which has no signal to ask a process to stop, the first step is the kill. There are no process groups: on Unix the descendants are read with pgrep -P before the leader is signalled, then each is sent SIGTERM and, after shutdownTimeout, SIGKILL, so a descendant that outlives its leader’s exit on SIGTERM is still ended. The two managed-process integration tests about that (stops a surviving child after the command leader exits on SIGTERM, lets a child finish its shutdown after the leader exits) are ported and return at once on Windows, as upstream skips them there. stdout and stderr are read together into log (or dropped when there is none), line by line as the process writes them.
  • A cancelled token ends ManagedProcess.StartAsync by throwing OperationCanceledException after taking the process down, where upstream’s start returns and the caller reads the signal. startupTimeout and shutdownTimeout are TimeSpans (CommandConfig.StartupTimeout, ShutdownTimeout), and a value over 2147483647 milliseconds, which a .NET timer cannot wait, is INVALID_CONFIG. A readiness probe still waiting when the process exits ends there.
  • JSON has no secrets.get() handle, so the message that names one for a string value of args, env, or url is not reachable, and an env entry of null stands for upstream’s undefined. command.log containment resolves symlinks as relativeToProjectRoot does (Paths.RelativeToProjectRoot). An app key outside the port’s set is named in the port’s own words (unknown targets[0].app key "readyURL"), where upstream says target "web" app has unknown key; the command’s own keys use upstream’s message.
  • The resolved app (ResolvedApp) has Base, PortRequest, Site, Environment, Identity, BundleId, AppPath, LaunchArguments, Permissions, Command, and ReadyUrl, as upstream’s. Site is Urls.SiteOf, Environment defaults by Urls.IsImplicitTestHost, and Identity keeps the declared :0. AppConfig (Identity, Environment, LaunchArguments, Permissions, with the AppPermissionState enum) is the checked declaration (upstream’s TargetAppDeclaration, read from JSON in E2EConfig; the shape errors read targets[0].app.<field> where upstream’s name the target). TargetApps.DigestTargetApp and Command.DigestCommand are upstream’s digestTargetApp and digestCommand, and ResolvedConfig.ComputeConfigDigest puts them in the config digest (see the config digest entry); the configDigest checks of app-ports.test.ts still compare the app digest alone (partial), since the port has no assignPorts. Upstream’s engineAppInfo and EngineAppInfo are not ported: the port’s engines are built from the target (MobileTargetEngine, WinAppTargetEngine), not handed its app at prepare and init. The report’s run.targets[].environment is still always test, not the app’s resolved environment.
  • Tests: ManagedProcess/ ports the it of tests/unit/managed-process.test.ts and ManagedProcessIntegration/ those of tests/integration/managed-process.test.ts, with the program they start (E2E.Tests.App) where upstream runs node -e; the notice tests wait out a real budget where upstream moves a fake clock. AppPorts/ ports app-ports.test.ts (partial: one target, and no config digest). Config/ ports the command and readyUrl tests of config.test.ts and its identity, environment, site, app shape, and app digest tests. TargetIdentity/ ports target-identity.test.ts (the project id describe is not ported: the port has no projectId). DeclaredProcesses/ ports declared-processes.test.ts and SharedAppProcesses/ ports shared-app-processes.test.ts (each target is a name and a resolved app, since the port loads one target per config). RunApps/ is .NET-only. AppPortAllocation/ ports app-port-allocation.test.ts (partial: the first it only, without a run). Not ported, because the port has no runner or target-selection execution path (targetIds, runExisting): the four it of target-processes.test.ts, starts the shared app command of the selected targets once, and nothing for the others, copies inheritEnv variables from the environment the run is given, rejects an unknown target with its suggestion before starting any process, and preserves an initial interrupt before validating target IDs or starting processes.

Differences:

  • JSON has no engine handles or model instances. The fixture’s CreateEngine chooses the engine, platform must be web, and targets holds one entry. agents.<name>.model and judge are model ids for the .NET-only provider (see Models), with the .NET-only baseUrl and apiKeyEnv beside them. A subscription provider refuses baseUrl and apiKeyEnv. E2ETest passes agents.default as the session’s own agent settings and every other entry through CreateAgents
  • Secrets.Get of a name the config does not declare throws SECRET_UNAVAILABLE with upstream’s message, naming the E2E_SECRET_<NAME> variable and, through ConfigSecrets.CredentialNamed, the credential whose password the name is (#1314; the Secrets the config builds carries the credentials map, .NET-only: upstream reads a module-global registry). The engine-in-config resolver half of #1314 moved to #1339. A secret set to null reads only E2E_SECRET_<NAME>. A test reads secrets with Secrets.Get(name). A JSON config holds no function, so a secret or a credential’s password that upstream writes as a SecretProvider is set in code (.NET-only, as WithCacheStore is): E2EConfig.WithSecretProvider(name, provider) for a secrets entry and E2EConfig.WithCredential(name, username, provider) for an account, over a SecretProvider delegate (ct => Task<string>, upstream’s SecretProvider of config/secrets.ts; the token is .NET’s). A provider entry replaces a file entry of the same name, and E2E_SECRET_<NAME>, E2E_USER_<NAME>_USERNAME and E2E_USER_<NAME>_PASSWORD still win, so a provider yields to a rotated value. The provider runs on every fill, inside the step and before the node is looked for (upstream’s locator.fill), after the policy of an agent typeSecret passes (authorizeSecretFill), and for an engine option (ResolveSecretValueAsync, upstream’s resolveSecretValue, run/secrecy.ts). Its value must be a string of at least 6 code points, or the fill fails with AUTH_CREDENTIAL_UNAVAILABLE (a password) or SECRET_UNAVAILABLE; the value joins redaction before it is used. A replay of a recorded typeSecret runs the same authorization before it asks the provider (ActReplayHost.TypeSecretAsync calls ActionDispatcher.AuthorizeSecretFill; upstream replays through the dispatcher’s typeSecret), and types the value as sensitive (#1315). Test: Agent/ASecretFillReplayedIntoAFieldThePolicyRefusesTests (.NET-only: no upstream it covers it). A provider that throws propagates its own error, as upstream’s does. A secrets entry now has the purpose generic-secret (upstream’s SecretPurpose), as a credential’s password has password; before, it had none (the params projection the model sees and the cache’s display string name it; the cache key does not). ConfigSecrets has upstream’s secretLength, isSecretValue, secretValueProblem and credentialNamed; a password or secret that is empty or not a string says must be a non-empty string or a provider function. IEngine.Secrets (default empty) is upstream’s engine secrets: WebEngine declares its BasicAuth password. ResolvedConfig.CheckEngineSecrets is upstream’s checkEngineSecrets; the port has no resolver that holds an engine in a config, so nothing calls it yet (the it is Partial_)
  • retries is validated and resolved (1 in CI, 0 elsewhere) but NUnit retries still come from [Retry]
  • cache.strict treats any replay that finds a recording but does not finish it as stale. Retries replay too, and a strict run never writes or deletes a recording, whatever cache.mode says
  • A launch or cleanup timeout fails with ENVIRONMENT_UNAVAILABLE
  • trace and video are accepted at the config root and on the target, as upstream. The modes are off, on, retain-on-failure, on-first-retry, and on-all-retries (RecordingMode, RecordingSource, ResolvedRecording). The mode is resolved as upstream’s resolveConfig does it: the flag, else the target’s key, else the config root’s, else the default (retain-on-failure for trace, off for video), and a mistake in a target’s key is reported even when the flag wins. The old trace: 'all' and trace: 'retries' spellings, bare or as { record }, are refused with the mode they meant. The port records video on the web engine (see Video) and writes the trace page (see Trace page): the settings are read and carried on TargetConfig.Trace and Video, the fixture’s Trace and Video properties, and E2ESessionOptions. The port has no --trace and --video flags, so the .NET-only variables E2E_TRACE and E2E_VIDEO stand in for them, with source Run. RecordingSource.Test is the source of a setting made for one test; the port has no per-test option yet. The per-attempt rules (attemptKeep, attemptVideo, keeps, recordsOnSomeAttempt) are in RecordingModes, internal. Upstream’s “keeps the mode, at the top and on a target, out of the digest” is ported as Partial_Keeps_the_mode_at_the_top_and_on_a_target_out_of_the_digest (the flag is the variable; #1309); the replay cache key does not read these settings. config.test.ts tests are in Config/: TraceTests and VideoTests (all four it, the digest one included; the flag is the variable, so “lets a target override the config, and the flag override both” and “refuses a mode it does not know” are partial), ArtifactsConfigTests (only the old trace spellings; the port has no artifacts key), and “uses CI defaults for retries and workers…” in ResolveConfigTests (partial, no workers). recording-modes.test.ts is RecordingModes/
  • failOnSkippedFailure (a boolean, E2EConfig.FailOnSkippedFailure, false by default) and maxDuration (a positive integer of milliseconds up to 2147483647, E2EConfig.MaxDuration, a TimeSpan?, unset by default) are accepted and validated as upstream’s resolveConfig does (failOnSkippedFailure must be a boolean; maxDuration must be a positive safe integer of milliseconds, got <value>; maxDuration must be at most 2147483647 milliseconds, got <value>), and neither enters the config digest. They are carried only: the port has no runner to choose an exit code from skipped tests (failOnSkippedFailure) or to stop a run at a limit (maxDuration; e2e run --max-duration stays missing), so nothing reads them. Tests: Config/ResolveConfigTests (both it, whole)
  • Not supported, and rejected with INVALID_CONFIG: projectId, tests, workers, the non-URL app keys, and the agent keys tools (set AgentOptions.Tools in code), and executor (set AgentOptions.Executor in code)
  • cache.store is CacheConfig.Store, an IStepCache (the port’s counterpart of upstream’s CacheStore: Writable (writable), Read, Write, Delete; Write returns the entry’s byte count or null when not written, as upstream’s write returns { bytes } | undefined; the breaking change for a custom store written against the older void Write with no Writable is accepted; the file store, FileStepCache, takes upstream’s maxBytes and writable as new FileStepCache(directory, maxBytes, writable): it refuses to write an entry over its byte cap, never writes or deletes when not writable, and its Write returns null when it refuses). A store is code, so the config file cannot name one (cache config key "store" is not supported by the .NET port): E2EConfig.WithCacheStore(store) returns the config with it (.NET-only name; upstream writes the object literal). As upstream’s resolveCacheConfig does, a store ends the E2E_CACHE_DIR override and exempts an unset mode from the CI clamp. A fixture reads it as CacheStore, a host as Cache.Store.
  • The config digest (ResolvedConfig.ConfigDigest, ResolvedConfig.ComputeConfigDigest, DigestAgents, DigestCache, DigestTargets, and ModelIdentity, upstream’s configDigest, computeConfigDigest, digestAgents, digestCache, digestTargets, and modelIdentity in config/resolve.ts and config/targets.ts) is the SHA-256 of the RFC 8785 canonical JSON of the config as written, with a credential’s password and a secret’s value replaced by { secretName }, a command’s env values by { envName }, the agents’ tools by name, an executor by its name, version, cache, and models, a model by its identity, and cache.store by { writable }. failOnSkippedFailure, maxDuration, filters, artifacts, output, trace, video (at the top, on a target, or by E2E_TRACE/E2E_VIDEO), and a reporter that is no type name never enter it. It is internal: HostTestFilters.Resolve sets ResolvedConfig.ConfigDigest, and the agents argument of ComputeConfigDigest carries the agents built in code (an executor, tools, and models are code). Differences: E2EConfig.RawConfig (.NET-only) keeps the JSON as written, since the digest reads the declared values; a model is its IAgentModel.Name alone (upstream’s provider, model id, and specification version); an AgentOptions entry digests its unset options at their defaults, since a property cannot tell a default from a written value; a custom store digests as its own Writable, and the file store the port builds is writable only in read-write mode (upstream’s createAgentCacheContext); an executor’s cache always enters (upstream adds it only when set); the port has no projectId or engine on a target, so neither enters (upstream digests the platform an engine declares); and the report’s project.configDigest reads it through BuildReportOptions.Config (upstream’s config of buildReport; the zero digest without one or when the resolver computed none, as upstream’s config?.configDigest ?? '0'.repeat(64)). ReportFile.WriteLeftOutAsync takes the config the host resolved (HostTestFilters.WriteReportAsync), so a run whose filters left tests out carries the digest; a session’s own write holds no resolved config (E2ESession builds the report from its options), so a run with no left-out tests still reports the zero digest (#1306 stays open for that), and project.id stays unknown (the port has no projectId). The host computes that digest without code-built agents (HostTestFilters.Resolve passes none to ComputeConfigDigest). ReportConfigDigest/ReportConfigDigestTests is .NET-only: upstream has no it that pins project.configDigest in buildReport. Partial ports (Partial_): “keeps reporter objects and artifact stores out of the config digest” (a reporter is data in JSON, so its cyclic client is not written; #1309), “keeps an engine option’s secret out of the config digest” (no engine option; #1308, #1246), “digests the platform an engine declares” (the target’s own platform; #1308), and the trace/video “keeps the mode out of the digest” (the flag is the environment variable; #1309). Tests: Config/ResolveConfigTests, FiltersTests, CommandLogTests, OutputConfigTests, ArtifactsConfigTests, TraceTests, and VideoTests, and in AgentConfig/: ACustomExecutorTests, TheBuiltInAgentOptionsTests, and NamedAgentsTests.
  • output is ported as upstream’s resolveOutput reads it (E2EConfig.Output, OutputLayout for upstream’s outputLayout in run/output.ts): the directory is relative to the config’s directory, .e2e by default, and results/, sessions/, and videos/<session>/ sit under it. It is refused (INVALID_CONFIG, upstream’s messages) when it is the project root, outside it, a file or under one, the cache directory or inside it, or wraps the cache in results, sessions, or videos; paths are compared through symlinks (Paths.RealPathOfExisting, upstream’s realpathOfExisting), a dangling link followed. The fixtures, hosts, e2e mcp recordings, and the run’s session store use it. e2e explore --output <dir> is the output directory now (it was the results directory; results/ is under it, as upstream), over the config’s output. Not ported: the check that the output does not hold a directory the tests globs scan (the port has no tests), --cache-dir in the overlap messages, report.json and ai-trace.json in the layout (no report writer; the AI trace keeps its ai-trace-<process id>.json name in the output directory). output stays out of the config digest (OutputConfigTests.Stays_out_of_the_digest).
  • credentials is ported as upstream’s resolveSecrets reads it (E2EConfig.Credentials, ResolvedCredential, ConfigSecrets.CredentialSecretName and EnvName): an entry is { username, password }; E2E_USER_<NAME>_USERNAME and _PASSWORD win over the config (the name is uppercased and every character outside A-Z and 0-9 becomes _), and username may come from the variable alone; the password is the secret <name>.password (purpose password, at least 6 code points). Two credentials that map to one variable, an unknown key, a non-object entry, a non-string username, a missing username, and a secret named like a password handle are INVALID_CONFIG with upstream’s messages, none holding a value. A secret may share a credential’s name. E2EConfig.AllSecrets (upstream’s allSecrets: the passwords, then the secrets) is what redaction reads in a hosted run, e2e mcp, and e2e explore. A JSON config has no provider function, so a password is a string, and the messages leave out upstream’s “or a provider function” and “only password may be a provider function”, and the shape errors name the kind of the value (a string, a number, null) where upstream quotes it, because a credential written as a bare string may be the password. The engine-secret check (ResolvedConfig.CheckEngineSecrets, upstream’s checkEngineSecrets) runs from the internal ResolvedConfig.Resolve(E2EConfig) (.NET-only, beside HostTestFilters.Resolve) over the internal TargetConfig.Engine, set through the internal E2EConfig.WithTarget; no public API puts an engine in a config yet (#1339, #1246), so ResolveConfigTests.Partial_Checks_every_secret_an_engine_option_holds_against_the_configured_secrets_never_a_credential stays partial and a JSON config never reaches the check. The config digest replaces passwords (see the config digest entry). Credentials.User(name) returns the account of the config the session runs with (upstream’s credentials.user); outside a session, or for a name the config does not declare, it reads the E2E_USER_* variables alone, naming them with the same EnvName mapping as the config (.NET-only: upstream throws AUTH_CREDENTIAL_UNAVAILABLE). An e2e mcp session holds the registry too; its type_secret tool offers each credential’s password.

WebEngine launches Chromium (or Firefox or WebKit, per BrowserName) through Playwright and builds a semantic tree in the page: explicit roles, the upstream implicit role table (landmarks, lists, tables with rows and cells, dialogs, options, img alt="" as presentation unless it has a title, a tabindex, or a global ARIA attribute, and role="presentation" or role="none" ignored on a focusable element or one with a global ARIA attribute, select multiple as listbox, and the rest), accessible name, text, test id, heading level, and the disabled, checked, expanded, selected, pressed, focused, and hidden states. As upstream, the name reads aria-labelledby before aria-label and associated labels. Disabled covers :disabled (including a disabled fieldset), aria-disabled="true" on the element, and aria-disabled inherited from an ancestor for the roles it applies to. Checked is the native state for checkbox and radio inputs and aria-checked="true" elsewhere; mixed reads as not checked. Hidden is what renders, as upstream: display: none, a visibility other than visible, content under content-visibility: hidden, and content a closed details folds away. A display: contents element is shown when a child element is, or when it is visibility: visible and its own text has a box. One exception, described below: a box with no size does not hide a node. aria-hidden is a separate state, not part of hidden. A child that sets visibility: visible under a hidden parent is visible; nothing under display: none is. An explicit role is the first recognized token of the role attribute; with none recognized, the node keeps its native role. role="img" is reported as image, and an open details is expanded. A closed select lists up to 60 options under it: the ones it offers, so an option that is hidden, display: none, aria-hidden, or inert, or sits under such an optgroup, is left out before the limit counts, as upstream’s isOfferedOption does (#900). A visibility: hidden option stays listed, since a closed select paints none of its options anyway, and a disabled one keeps its state. Each observed element keeps a stable ref for the life of the document, and the engine runs an action on the element that ref names, with no fallback to a text or role lookup in the page. The agent adds the fallback upstream’s agent has: a tap, double_tap, fill, fill_secret, press, select, check, uncheck, or clear whose node the engine reports NODE_STALE finds the node again by its role, name, and test id in a fresh look and retries, up to twice, scroll and swipe do not retry, and a ref the newest look no longer lists (not one it lists as hidden) is found the same way from the last node it named. A description that matches no node or several fails the verb with LOCATOR_NOT_FOUND. Upstream also matches a node’s placeholder and input purpose, and forgives a test id that changed; the port matches the three fields it records, and never finds again a node with no name and no test id. Upstream’s stale-node relocation describes the node with describeTarget, which carries no container key, so neither side looks at the container there. A trace replay does: see the recorded container key below. Upstream wraps the retry in commitTargeted and the step’s accounting; the port has no such wrapper, so each verb runs the loop (TargetedAsync) directly, and ObservationFeed.Relocate takes the redactor as an argument. Firefox and WebKit launch through WebEngineOptions.BrowserName. .NET-only: the first launch in a process runs Playwright’s install for the selected browser, and E2E_SKIP_BROWSER_INSTALL=1 turns it off. As upstream, an install that exits non-zero fails with BROWSER_INSTALL_FAILED (an infrastructure error, exit 3), not ENVIRONMENT_UNAVAILABLE; the message names the exit code. Upstream’s message quotes the e2e-web install command to run by hand, where the port’s says to install the browser yourself and set E2E_SKIP_BROWSER_INSTALL=1; the install runs in process, so there is no spawn-error variant. .NET-only: dotnet test has no flag like upstream’s --headed, so when WebEngineOptions.Headless is unset, E2E_HEADLESS=0 or false shows the window. As upstream, a run is headless by default. As upstream, a headless Chromium run installs with --only-shell, a headed Chromium run installs the full build, and Firefox and WebKit install their one build, and the install runs with PLAYWRIGHT_SKIP_BROWSER_GC=1 unless the user set it. Upstream checks the cache before it spawns the install; the port leaves that to Playwright’s install, which does nothing when the build is there. Playwright’s .NET Program.Main starts the driver with the process environment, so the port sets PLAYWRIGHT_SKIP_BROWSER_GC on the process, not on the install alone.

The walk goes through open shadow roots and closed ones that page script attached (an init script records them, as upstream does). Each iframe is a boundary node whatever its role, so an <iframe role="none"> stays listed with the role none, as upstream’s walk emits it before any role check, and the engine reads that frame’s document through Playwright and puts it under the node, so same-origin and cross-origin frames are both listed and acted on. One observation lists at most 3000 nodes across all frames. When a document has more, nodes that intersect the viewport come first and the rest of the budget goes to the others in document order; the observation reports Truncated, and the snapshot tells the model to scroll. A locator resolves against that tree, so matches come in tree order: a match inside a closed root sits where its host is, where upstream lists the light-DOM matches first and the closed root’s after them. OpenAsync waits for the load event.

WebEngineOptions carries the upstream web() options: Viewport (default 1280 by 720, null for no emulation), TestIdAttribute, Headers, BasicAuth, UserAgent, Locale, TimezoneId, ColorScheme, ReducedMotion, InitScripts, Connect (a CDP endpoint resolver, with an optional ReconnectEndpoint), and Browser (an IBrowserProvider, upstream’s browser: BrowserProvider). Differences:

  • Headers ride requests to the base URL’s host. Upstream scopes them to the app’s site, which can include sibling subdomains
  • Browser ports upstream’s BrowserProvider seam (provider.ts): IBrowserProvider (Name, Scope, AcquireAsync, ReleaseAsync, SweepAsync), BrowserProviderScope (Worker, Attempt), BrowserRequest, BrowserLease, and BrowserReleaseContext, and the engine side, LeasedBrowsers. BrowserLease.Protocol (BrowserProtocol.Cdp, the default, or Playwright) is .NET-only: a Playwright lease is dialed with Chromium.ConnectAsync, the engine opens its own context with the options it gives a launched one, and it needs Worker scope and no ReconnectEndpoint because that connection cannot be reattached (a dropped one is replaced by a new lease). A provider is an interface, so upstream’s asBrowserProvider checks that a method exists have no port; the engine still refuses a blank name, a scope outside the enum, and Connect beside Browser (INVALID_CONFIG). Scope and SweepAsync are default interface members: a provider that leaves them out leases per worker and sweeps nothing. Neither a request nor a context carries upstream’s signal: AcquireAsync, ReleaseAsync, and SweepAsync take a CancellationToken. Downloads (BrowserProviderDownloads, with BrowserDownloadContext) and RecordAsync (ProviderRecordContext, ProviderRecording, ProviderRecordingStopContext, ProviderRecordingResult) are default interface members too: a provider with no downloads returns null, and one that cannot record a browser returns null from RecordAsync, where upstream leaves the method out. LeasedBrowsers.Downloads() and Recorder() are upstream’s downloads() and recorder(), and ProviderRecordings.StopProviderRecordingAsync is stopProviderRecording (recording.ts, with VideoSegment as VideoFile or VideoLink). ProviderRecording.StartedAt is a DateTimeOffset, so upstream’s isProviderRecording has no port. The engine calls RecordAsync through Recorder when an attempt records video (see Video). Browser.WaitForDownloadAsync calls Downloads (upstream’s waitForDownload, with saveDownloadsTo, saveFromBrowser, and saveLocally of downloads.ts as Downloads.SaveDownloadsToAsync, SaveFromBrowserAsync, and SaveLocallyAsync). A provider’s directory is checked at config load too
  • A runner calls WebEngine.PrepareAsync, Init, FinishAsync, and DisposeAsync as upstream’s prepare, init, finish, and dispose, with EnginePrepareInfo, EnginePrepareResult, EngineInitInfo, and EngineFinishInfo; an attempt is StartAsync and the dispose of its session (startAttempt and endAttempt). The hand-off to a worker travels in the same E2E_WEB_BROWSERS_<TARGET>_<DIGEST> environment variable, capped at 16384 bytes. The port has no runner, so an engine whose Init never ran leases for the one attempt it starts, as upstream’s standalone run does: it prepares one slot of a run of its own, reading EngineStartOptions.Env (the process environment by default), and gives the lease back, and sweeps, when the session is disposed, with the default cleanup timeout for each step (the engine does not see the session’s). EngineStartOptions.AttemptId names the attempt to a per-attempt lease
  • Differences from upstream’s lease flow, all from the port’s engine. It keeps no browser connection between attempts, so a worker dials the endpoint of the lease it holds at every attempt, and leases a replacement only after an attempt attached to a browser that was no longer connected when the attempt ended (upstream: when the next attempt finds the connection dropped). A start that fails gives its lease back itself, since there is no endAttempt to call after it. A lease that arrives too late, after the attempt was cancelled or the worker disposed, is given back under a cleanup budget of its own (upstream passes the signal that already aborted). Upstream’s state capability, which an attempt-scoped provider drops, does not exist in the port, so only app.clearState() is refused (UNSUPPORTED_CAPABILITY, naming the scope)
  • The lease tests are BrowserProvider/ in E2E.Tests, from browser-provider.test.ts. Not ported: “rejects a sweep that is not a function” and “rejects a record that is not a function” (both are methods of the interface), “releases the replacement on dispose even when ending the attempt failed” (the port’s DisposeAsync does not end an attempt), and “refuses, at the start and named, a recording without a start time and a stop” (a recording is typed). The other tests of the recording group are ported in full, on a real Chromium the provider leases (upstream drives a scripted page), through StartVideoAsync and StopVideoAsync of the engine session. Also not ported: “knows a recording by a parseable start time and a stop” of provider-recording.test.ts. The rest of that file is ProviderRecording/, and provider-downloads.test.ts is ProviderDownloads/, on a real Chrome over CDP, with the Browser fixture over the engine session
  • Browser.OnDialogAsync and Browser.WaitForDownloadAsync are upstream’s onDialog and waitForDownload. DialogHandler is upstream’s DialogHandler (DialogHandler.Accept and Dismiss are its 'accept' and 'dismiss', and a Func<Dialog, Task> converts to it), Dialog.Type is a DialogType (Alert, Confirm, Prompt, BeforeUnload) where upstream’s is a string union, and OnDialogAsync returns Func<Task> for upstream’s unsubscribe. The engine side is DialogRouter (dialogs.ts) and ErrorLatch and WebSupport.SanitizeFilename (support.ts), and WebSession.ArtifactPath is the surface’s artifactPath. Differences: the engine session has OnDialogAsync and WaitForDownloadAsync (default members of IBrowserSession), and the Browser fixture attaches the file to the step (attachArtifact), since the port’s fixture holds no context; BrowserDownload is the result upstream types inline. A dialog handler’s failure is latched and fails the next step, as a route handler’s does, and one that no step follows fails the attempt at its end: ErrorLatch.Track and SettleAsync (support.ts) are behind IEngineSession.SettleAttemptAsync (upstream’s optional settleAttempt, whose EngineCleanupContext is the timeout and the token) and E2ESession.SettleAttemptAsync (the runner’s settleAttempt), which the NUnit and xUnit fixtures call when the body settles and again after the teardown, within the cleanup timeout. A handler still running at the budget fails the attempt with CLEANUP_TIMEOUT, as upstream does, and what it throws later is dropped. The MCP server, Explore, and standalone sessions have no attempt end to settle at, so they do not call it, and the attempt record has no phase, so the failure is not marked body. A test framework’s assertion is not an E2EException, so one thrown in a handler fails the next step as ENGINE_FAILURE, dialog handler failed: ..., where upstream’s expect failure keeps its ASSERTION_FAILED. A download is a download artifact of the browser.waitForDownload step, with the media type of its extension. AttemptScope.AttachArtifact registers the file through the attempt’s sink (ArtifactPaths.CreateAttemptArtifacts, see Artifact store), as upstream’s attachArtifact does, and the sink rewrites a download as sink.register does: when the session has a secret value and the media type is text-like (text/* or application/json), it rewrites the file through the redactor (ArtifactPaths.RedactDownload, upstream’s redactDownload) and the record says complete; any other download, one it cannot decode as UTF-8, one containing NUL bytes, or a session without a secret value stays as served and the record says incomplete. Unlike upstream, the port rejects NUL-containing text conservatively so BOM-less UTF-16 cannot hide secrets between NULs and still be marked complete. DownloadRedactionSessionTests extends the binary-download case with a BOM-less UTF-16LE CSV regression. AttemptScope.ArtifactsDir is upstream’s ArtifactSink.dir. The redaction its of engine-secrets.test.ts (the page’s echo of the password, and of the base64 credential in the Authorization header) are Partial_: they assert the failure message and the report, and scan every file the sessions wrote under their results directories (the screen, the trace page, and the download among them), where upstream scans the reporters’ files as well and the download comes from the same run. The handler-assertion tests of web-platform.test.ts are ported with a stand-in for expect(value).toBe, which the port lacks: the handler throws the ASSERTION_FAILED it would. “fails a %s handler assertion at the attempt end when no step follows it” and “takes the failure evidence of a late handler assertion before a teardown navigates away” are Partial_: they do not read the phase (body), attempt.cleanup, the run’s errors, the steps list, or failure.url from report.json. The ErrorLatch tests of dialogs.test.ts are Dialogs/ErrorLatchTests. The frame tests of dialogs-frames.e2e.ts are DialogsFrames/FramesTests, and the download tests trigger the link with browser.locator('a[download]') as upstream does
  • Browser.WaitForDownloadsAsync(trigger, count, timeout?) is upstream’s waitForDownloads(trigger, { count, timeout }) (#1048). It calls the trigger once and returns the first count downloads in start order, each its own download artifact; WebSession.CollectDownloadsAsync is upstream’s collectDownloads, which WaitForDownloadAsync shares with a count of one. One timeout bounds the start, completion, and save of every file (also for WaitForDownloadAsync): a timeout before the trigger returns fails with ACTION_FAILED browser.waitForDownload(s) exceeded its timeout of <n>ms, and one after names <k> of <count> downloads started within <n>ms; the trigger resolved after <m>ms (no download started for a count of one) or did not finish within <n>ms. On any failure the listener is removed, the downloads that started are canceled, and the provider’s ReadAsync token is canceled. A count below one fails with INVALID_ARGUMENT before the trigger runs. Differences: the engine session has WaitForDownloadsAsync (a default member of IBrowserSession, beside WaitForDownloadAsync), and the Browser fixture attaches the files once all are saved, where upstream attaches each as it is saved, so a failure after the first file attaches none. count is an int, so upstream’s “safe integer” check is the count < 1 check. The wait budget in the messages is the time left less Playwright’s lead, as before. ProviderDownloads/ ports the two its of provider-downloads.test.ts in full, with the %i and %s cases as theory data, and Routes/BrowserRouteDecisionsTests the five new its of routes.test.ts; the page’s download listener count is read from the Playwright page’s event field by reflection. Not ported: tests/types/downloads.ts, because the C# signature refuses a missing count and a synchronous trigger at compile time.
  • Aborted navigations and screenshots across navigations (fix(web): classify aborted navigations and capture screenshots across navigations, 4e7e8b8, tester-army/e2e#1550, #1095). A GotoAsync, App.OpenAsync, back, forward, or reload whose document request a route aborted fails with ACTION_FAILED (navigation failed: a route aborted the request for <url>: ...) instead of ENGINE_FAILURE; WebSession.NavigatingAsync is upstream’s navigating and NoteRouteAbort is noteRouteAbort, called by PlaywrightRoute before every abort it makes (upstream’s abort in browser.ts). A route handler that throws, such as a FulfillAsync with an invalid header, aborts the request, and the step fails with the handler’s error: WebSession.GuardAsync (upstream’s PlaywrightSurface.guard, RunAsync before) rethrows a latched error before it runs the step, prefers one latched while it ran, and refuses a cancelled token or stops waiting on the call once it cancels, both as CANCELLED. On a persistent context (cdpEndpoint) a caller’s own cancel stays an OperationCanceledException, as before, because the operation waits on a shared reconnect and Propagates_the_recovery_owner_cancellation_to_another_waiting_operation documents that type; so the exception type depends on how the engine started. A cancelled call whose work honours the token gets CancelGrace (one second, .NET-only) to undo itself, such as a drag releasing the button, before the step reports. App.ScreenshotAsync taken while the page navigates is taken again, within the step’s deadline, of the document that replaced the one its masks were resolved in (DocumentWatch is watchDocuments); a timeout is OPERATION_TIMEOUT screenshot timed out: the page replaced its document during every capture for <n>ms. A capture that fails with no document replaced is ENGINE_FAILURE, as upstream (the port’s artifact screenshot answered NODE_STALE for a navigation race before). Differences: the framenavigated event can arrive after the failure it explains, so the port makes one to five round trips to the page (SettleDocumentEventsAsync) before it reads the watch, where upstream’s caret cleanup is that round trip. The port’s artifact screenshot does not hide the caret (see the caret paragraph). .NET-only seams: WebEngine.CapturePage (what upstream’s tests do by spying on page.screenshot), and WebEngine.Guard and WebEngine.Latch (upstream’s tests call surface.guard and surface.latch.latch). Tests: ScreenshotNavigation/ (the five its of screenshot-navigation.test.ts), Routes/BrowserRouteDecisionsTests (the two new its of routes.test.ts), SurfaceGuard/ (the four its of surface-guard.test.ts). The should work while navigating it of screenshot.e2e.ts (whose skip the commit removes) is in the screenshot port of #1060.
  • With ReconnectEndpoint, as upstream, each attempt rides the default context of a fresh browser from CdpEndpoint, refuses a browser an earlier attempt of the same WebEngine rode, and reconnects once to the same browser and page after a transport drop. Headers, BasicAuth, UserAgent, Locale, and TimezoneId are INVALID_CONFIG, and app.clearState() is UNSUPPORTED_CAPABILITY. After a reconnect, PerformAsync, the agent’s key press, and the viewport swipe fail with NODE_STALE until the next observation; the browser fixture’s keyboard and mouse are direct input and keep working. As upstream, the reconnect is spent from the budget of the operation that found the transport dropped, both for the CDP dial and for the operation itself
  • BasicAuth takes a Secret password. As upstream, the attempt redacts the password and the Authorization credential the browser sends with it, padded and not, as text only: a page that shows the value outside a secure field is not masked in screenshots, and the agent cannot fill it by name. ASecretInAnEngineOptionTests.Protects_the_secret_as_text_only_screenshots_are_kept_the_text_download_rewritten ports upstream’s it of that name with App.ScreenshotAsync and WaitForDownloadAsync: one session per test of upstream’s suite, against one site that echoes the Authorization header. The port has no engine secrets to declare, so the engine resolves the password through the attempt when it starts. A plain string password is not redacted
  • Not ported from protected-app-options.test.ts (the audit of tester-army/e2e#1582), because WebEngineOptions is typed. Type-level, so the case cannot be written: “rejects headers that are not a plain object, null included” (Headers is a dictionary of strings), “rejects credentials that are not a plain object, null included” (BasicAuth is a WebBasicAuth), “refuses the old video key, naming screencast” (WebEngineOptions has no Video property and no untyped options object to carry one), “rejects an option it does not know, naming the nearest driving option” and “rejects an unknown key inside connect and basicAuth” (the compiler rejects an unknown property), and “keeps the removed options their own messages” (allowedOrigins was never ported). Missing feature: “declares a secrets.get() password as the engine secret it resolves per attempt” (the port has no engine secrets; the engine resolves a Secret password through the attempt, see above).
  • An InitScripts entry is a WebInitScript: source (a string converts to one), WebInitScript.FromPath, or WebInitScript.FromFunction. A C# lambda cannot run in the page, so a function is its JavaScript source. A relative path resolves against the project root (EngineStartOptions.ProjectRoot, which E2ESession passes from E2ESessionOptions.ProjectRoot). Each attempt reads the files when its session starts; upstream reads them once per process
  • ColorScheme and ReducedMotion are the enums WebColorScheme and WebReducedMotion, and Browser.EmulateMediaAsync takes a WebMedia; upstream’s are string unions. A value outside an enum (a cast number) is INVALID_CONFIG in the options and INVALID_ARGUMENT in EmulateMediaAsync; a null media throws ArgumentNullException. A feature or value outside the type cannot be written, so upstream’s unknown-key and wrong-type refusals have no port. Playwright sets the media per page, so a tab the app opens itself gets a test’s change as it appears, on a persistent context too, so a script it runs at load may still read the configured values, as upstream. After a reconnect the new transport sets the media again on the app’s own tabs

The tree is a subset of upstream’s: names follow upstream’s accname rules, and nodes are listed by role, test id, or direct text (not by name alone, or as an empty painted box). So getByText answers with the innermost element that reads the text, such as a <strong> inside a paragraph, as Playwright does. Text inside a <label> of a control, or in an element an aria-labelledby names, is not listed: the labelled element carries it as its name, so getByText answers with that element (Playwright answers with the label and retargets a fill to the control). A node listed for its text alone does not count against the 3000-node budget: such nodes have an allowance of their own, so a page full of text cannot push controls out. In the agent snapshot, a node that lists its children shows its own text, read as a person reads its line: the text of an inline link, emphasis, code, or span in the sentence stays in place, so <p>Read our <a>privacy policy</a> for details.</p> reads whole while the link is also listed as a control. An inline aria-hidden or inert element adds no words to the line, as upstream’s hidesSubtree leaves it out of the line. Inline text-only elements are not listed again, unless the line is longer than the 512-character text bound, or the element has a test id, a role, or can be acted on (tabindex, onclick, or an <a> with no href). getByText still answers with such an inline element: the page script sends it as a bare text node under the line, which the agent does not read. This differs from upstream, whose text engine finds the element in the page. A leaf such as a button or a heading shows its whole text. Locator reads (TextContentAsync, text matchers) still read the whole rendered text, as upstream’s node read does. A contenteditable editing host (the root of a rich-text editor, never a canvas, a frame, or a native control) is a textbox named by aria-label, aria-placeholder, or the data-placeholder its editor paints, with its rendered text as the value, as upstream. Its children stay in the tree as content, so getByText finds them. A <p> inside an editor has no role. A document in designMode is not an editing host, though its <html> is editable; upstream has no such check. Playwright’s role selector knows a bare host only by an explicit role="textbox", while the port’s GetByRole reads the tree and finds it. Upstream’s getByText runs Playwright’s text engine; the port matches the tree, so text split across child elements with no text of its own between them (<div><b>a</b><i>b</i></div>) is not one match.

A web screenshot (toHaveScreenshot, failure evidence) hides the text caret with a stylesheet adopted into every frame and shadow root, closed ones included, and takes it back afterwards, as upstream’s screenshot-caret.ts; Playwright’s caret: 'hide' would write an inline caret-color a hydrating framework reads as a mismatch. It works under a style-src policy. The port has one web screenshot path, so there is no separate observation-pixels capture. Not ported: upstream’s leaves the caret to the adopted stylesheet instead of editing element styles (observe.test.ts) and the frame stubs added to observation-capture.test.ts and semantic-fallback.test.ts, which fake page.screenshot and page.frames(); the port has no fake page. The three screenshot-caret.test.ts tests are Partial_: Playwright’s page cannot be spied on, so they sample the page inside the helper, not inside the engine’s own capture.

The snapshot leaves out a checkbox’s or radio’s value, which inputValue still reads (on by default). uncheck on a checked native radio is NOT_ACTIONABLE; on a role="radio" it clicks, as upstream and Playwright, and the failure when the click leaves it checked names the radio group.

The page script reads the text selected inside the focused input, textarea, or contenteditable host into SemanticNode.Selection, as upstream does. A caret, an unfocused field, and a secure field have none. The agent snapshot lists it as selection="..." after the field’s value, verbatim and escaped (a lone space counts, an empty selection does not), as upstream does. The runner drops it from a field whose value or text holds a registered secret, and from a field cut at its length limit when the selection is not in the part shown. Differences: the port’s press has no times, so one call presses the key once; and the snapshot shows a value as it is, a newline included, where upstream escapes it.

Upstream leaves an aria-hidden subtree out of its tree walk, and its text and visibility reads go through Playwright. Here every locator read comes from the tree, so the port lists the subtree and marks each node AriaHidden (.NET-only), and role queries and the agent skip those nodes. They are not hidden: a painted aria-hidden node is visible to isVisible, toBeVisible, and toBeHidden, as upstream, and a visible query keeps it. An action on one is not refused as hidden. A box with no size is not hidden here, since role queries skip hidden nodes and an empty landmark has no size; isVisible, toBeVisible, toBeHidden, WaitFor, and the visible option read NodeStates.EmptyBox too (LocatorEngine.IsNodeVisible, .NET-only, web only), so an element with an empty box is not visible, as upstream. A node with no layout box (display: contents) and an option keep their hidden state. NodeStates.Mixed and NodeStates.ExpandedAbsent (.NET-only, web only) stand for upstream’s nullable states: a role query for Checked or Pressed skips a mixed node (an indeterminate checkbox, aria-pressed="mixed"), and Expanded = false skips a node with no aria-expanded. Level of a role="heading" element is its aria-level, else 2. A hidden node reads its DOM text (textContent) instead of innerText, so a text query still finds a visibility: hidden copy.

Password fields and autocomplete=current-password fields are marked secure. Their values, and their value attribute, are omitted from the snapshot. A text, value, or attribute expectation on a secure field fails with POLICY_DENIED, as upstream. So do the textContent, inputValue, allTextContents, and getAttribute reads (for any attribute).

Selected is aria-selected="true" or a selected <option>, expanded is aria-expanded="true" or an open details, and focused is the active element, followed into shadow roots. Attributes (for getAttribute and toHaveAttribute) and the client rect (for boundingBox, null for a node with no layout box: display: none on it or an ancestor, or any display: contents element) are read for every kept node; they are not sent to the model. The tree reduces a link’s href attribute as upstream’s tree does: origin and whole path, without userinfo, with ?… or #… for a dropped query or fragment, mailto: and tel: kept, blob: reduced to its inner origin and path, and data:… or javascript:… for an inline payload. Upstream’s node read keeps the whole value; the port reads every locator attribute from the tree, so it keeps the whole href on the side and getAttribute and toHaveAttribute read that. The agent snapshot lists a node’s test id, its href, and its placeholder when it has no name, as upstream’s line does: a link target on the app’s origin shows as its path, any other as the whole URL, and a target over 256 characters is redacted, then cut there and ends with …. The executor tree carries treeHref’s result: a link target on the app’s origin keeps the origin and loses no more of its path than the line does. The snapshot is not part of the cache key or of a recording, so showing them does not change the replay policy version. The snapshot joins its lines with \n on every OS, as upstream does (the port used Environment.NewLine, so on Windows the lines ended \r\n); the cache key and recordings do not embed the snapshot text, so no recording is invalidated. A rect in an iframe is in the top-level viewport, shifted past the frame’s border and padding and clipped to its content box.

A display value query never matches a checkbox or radio, which carries a value it never shows. Text, label, placeholder, test id, and display value queries keep hidden matches, so toBeVisible fails on a hidden match and toBeHidden passes on no match or one hidden match. Role queries skip hidden nodes, and toBeAttached and waitFor attached or detached also match hidden nodes for role queries. A single-node matcher that still sees more than one match at its deadline fails with LOCATOR_AMBIGUOUS.

Playwright failures never escape as PlaywrightException. WebEngine throws EngineException with an upstream engine code from EngineErrorCodes: NOT_ACTIONABLE when an action timed out before its input was dispatched or the target does not take that input, ACTION_MAY_HAVE_COMMITTED when it timed out after dispatch, NODE_STALE when the element or its document is gone, OPERATION_TIMEOUT for a navigation or key press timeout, and ENGINE_FAILURE otherwise. EngineException.Retryable is true only for NODE_STALE and FRAME_NOT_FOUND; any other retryable claim becomes ENGINE_FAILURE, as upstream. As upstream (commit c23944c), a Playwright timeout stays a timeout: StaleOr and NavigationStaleOr never turn a TimeoutException into NODE_STALE, even when its call log says an element detached or the page navigated, so a read or a navigation that times out is OPERATION_TIMEOUT and is not retried. The action path is unchanged by that commit. Tests: Errors/StaleOrTests and Errors/NavigationStaleOrTests. A sensitive fill’s value is redacted from the message. As upstream, check and uncheck click once and read the state back on the same element until just before the action timeout, so a control that commits its state late passes. A control gone by the first read (replaced, or navigated away) took the click, so the action passes. Each of these is NOT_ACTIONABLE: a control that goes later in its old state, a click that leaves the state unchanged at the end of the wait, and an uncheck on a checked radio. The port ends the poll min(250 ms, timeout/4) before the action deadline, which upstream does not: upstream polls to the full timeout, but here the deadline that abandons the call would win the race and report ACTION_MAY_HAVE_COMMITTED. The document engine still uses NOT_FOUND for a ref missing from its last observation.

A page stuck in a script fails an operation at the action timeout, not the test timeout. As upstream, each page operation (a navigation, back, forward, reload, observe, an action, a scroll, browser.evaluate, browser.title, browser.setViewport, browser.emulateMedia, a key press, typing, and browser.mouse) has one deadline, the action timeout, that every page call in it shares. Playwright’s own timeout is set 250 ms short of what is left, or half of it when less than 500 ms is left, so Playwright’s reason (what blocked an action, or that its input was dispatched) arrives first. A call Playwright never answers, such as an evaluate or input on a page stuck in a script, is abandoned at the deadline. A read cut off that way fails with OPERATION_TIMEOUT. An action or input cut off that way is ACTION_MAY_HAVE_COMMITTED, because it may have reached the page.

Locator.SetInputFilesAsync(path | paths) is upstream’s setInputFiles, and LocatorAction.SetInputFiles its { kind: 'setInputFiles', paths } action (upstream #958). Paths resolve from the project root (Screen.ProjectRoot, upstream’s context.projectRoot), and a blank entry is an ArgumentException where upstream’s is INVALID_ARGUMENT. An empty list clears the input and fires input and change (tester-army/e2e#1546 a8ed7f7); the web engine hands it to Playwright’s SetInputFilesAsync([]) unchanged, for a file input and for the chooser a button opens. UploadActions/ThroughTheLocatorTargetTests and ThroughTheElementTargetTests each add the clear it as one theory over the two targets (a file input, a button over a hidden input); LocatorActionOptions/LocatorActionOptionsTests adds the empty-list it and the blank-path it (its number-among-the-paths case is left out, as the C# types refuse it). The agent’s upload tool keeps refusing an empty list, as upstream’s authorizeUploadPaths does. The web engine’s UploadFilesAsync is upstream’s uploadFiles (web/src/actions.ts) with its isFileInput (PageScript.IsFileInput): a file input, or a node inside a <label> for one, takes the files directly, and anything else is clicked with the filechooser wait already attached, so a control that opens no chooser is NOT_ACTIONABLE (upload clicked the control but it opened no file chooser). The locator reports that as ACTION_FAILED, as for every other action (TranslateLocatorError, #846). The other engines refuse the action with UNSUPPORTED_CAPABILITY. The observation lists no node for a <label>, and folds its text into the hidden input’s name, so a test reaches a label’s control through an element inside the label. The agent’s upload tool (files, project-relative paths) and IExecutorActions.UploadAsync are upstream’s upload and its path policy authorizeUploadPaths (agent/upload-paths.ts), UploadPaths.AuthorizeUploadPaths: a path outside the project root (a symlink out too), a hidden file or one under a hidden directory is POLICY_DENIED, and a missing file, a directory, an empty or blank list, or more than 16 files (Trace.MaxTraceUploadPaths, upstream’s MAX_TRACE_UPLOAD_PATHS) is INVALID_ARGUMENT; the allow and each POLICY_DENIED refusal is an upload.path policy event (Phases.RecordPolicyEvent, with StepEvent.Decision; an INVALID_ARGUMENT records none, as upstream), the paths are authorized before the node is resolved and before a slot is taken, and an upload is recorded as upload with its Paths (templated with the call’s params) and authorized again on replay. The tool is offered when the engine declares EngineCapabilities.Upload (.NET-only: upstream lists upload in an engine’s verbs), and the web engine does. Differences: the typed policy takes a list, so upstream’s bare-string input is a null list; a replayed upload records no engine event (a replay records none for any verb); an unreadable path (an invalid character) is INVALID_ARGUMENT (.NET-only: .NET path APIs throw where Node’s do not); and the MCP catalog has no upload line. The upload tool name is reserved for project tools whatever the engine declares, as upstream’s GRAMMAR_TOOL_NAMES does. A refused upload (policy or bad files) spends no action slot, as upstream’s. A recorded path that replay now refuses spends none either. .NET-only deviation: upstream refuses a path that is no regular file by isFile(); the port refuses a directory or a missing path, but accepts a FIFO or socket on Unix. .NET has no public API for the entry type (File.Exists is true and FileInfo.Attributes reads Normal), and opening the entry to find out would hang on a FIFO. Tracked in #877. The upload tool words its result as upstream’s does, Uploaded "<path>" to #<ref>. and upload "<path>" to #<ref> failed: <code>: <message>, each followed by the screen, with the node’s ref where upstream has the id (.NET-only: the port’s node ids are refs). Every other grammar tool words its result as upstream’s acting does (see the act tools’ wording below). Tests: UploadPaths/AuthorizeUploadPathsTests is upload-paths.test.ts (its list-input it is Partial_, for the bare string; the symlink entry of the refusal it is left out where the platform cannot link); the two upload it of agent-act-verbs.test.ts are in AgentActVerbs/AgentActGrammarVerbsTests, and the upload line of its replay it is in AgentActGrammarVerbsRecordThenZeroTurnReplayTests (which lacks the hover and drag lines); UploadActions/ThroughTheLocatorTargetTests and ThroughTheElementTargetTests are the four it of upload-actions.test.ts for each target kind (locator and element; the port’s element is the observation’s node); the upstream test calls dispatchLocatorAction and classifyActionError, which the port has inside WebEngine.PerformAsync, so it acts through the session. The five new it of actions.test.ts are in Actions/DispatchLocatorActionTests: they drive a live page where upstream stubs the page, so the first two (Partial_Uploads_through_a_file_chooser_it_awaits_before_clicking_a_button and Partial_Sets_a_file_input_directly) do not check the order and the arguments of the page calls, and the unhandled-rejection it checks TaskScheduler.UnobservedTaskException. Controls/ControlsTests ports every it of controls.e2e.ts (the secondary tap, the long press and double tap, and the link attribute reads included; the link it reads the class through expect(browser).toHaveClass) including the three upload it (several files reach a multiple file input and the two for /controls’ avatar button). The locator refuses a hidden node, so a hidden file input cannot be targeted by itself (as upstream’s); the label or button over it is the target. The /controls page has upstream’s avatar button, hidden input, and output.

A web scroll is a wheel gesture, as upstream’s performViewportSwipe and performElementSwipe (web/src/support.ts): WebEngine.PerformViewportSwipeAsync wheels by SwipeDistance of the viewport’s extent (VideoRecorder.CurrentViewportAsync, upstream’s currentViewport), and PerformElementSwipeAsync reads PageScript.WheelAim (wheelAim): a node the pointer hovers takes the wheel where it is, one hit at its centre takes it there, and any other (or a node inside an iframe) is hovered first, which waits for it to be actionable and reports what intercepts the pointer. The extent is the node’s own box, not clientHeight. Both wait for a rendered frame after the wheel (PageScript.NextRenderedFrame, upstream’s nextRenderedFrame). A node that no scrollable ancestor takes the wheel from scrolls nothing, where scrollBy scrolled the node itself. The port keeps three quarters for a swipe that names no momentum; upstream’s is half (momentum ?? 'none'). back is the browser history.

artifacts.store is IArtifactStore (upstream’s ArtifactStore, types.ts), with StoredArtifact and StoredArtifactLink. A store is code, so the config file cannot name one: call E2EConfig.WithArtifactStore (E2EConfig.ArtifactStore; a fixture and E2EHost.OpenAsync read it), set E2ESessionOptions.ArtifactStore, or override ArtifactStore on the fixture. The artifacts JSON key holds no store (INVALID_CONFIG, naming WithArtifactStore); it still exists so the removed kinds list and trace and video blocks fail with upstream’s hints (resolveArtifactStore’s removedRecordingReplacement), which name E2E_VIDEO where upstream names --video, and artifacts must be an object where upstream says { store }. Each artifact an attempt registers (a download, a video file, a screenshot or log the test attaches) is handed to PutAsync as it is produced, with its bytes, digest, redaction label, and the identity the report files it under (RunId, TestId, AttemptId, StepId, StartedAt), and the store’s reference is recorded as the record’s Ref. A store that throws, or returns an empty reference, leaves the record with its local path and no Ref; the run never fails for it. A provider-hosted video link goes to PutLinkAsync, which a store may leave at its default (no reference), as upstream’s putLink is optional; a passed attempt’s link under retain-on-failure is never handed over. Known gap: the automatic failure evidence (the failure screen text and the failure screenshot, written by FailureEvidence.CaptureAsync) is not registered through the sink, so a store does not receive it and it carries no Ref; upstream registers it.

  • ArtifactPaths.CreateAttemptArtifacts and AttemptArtifacts (SettleAsync, Records, Sink, Dir) are upstream’s createAttemptArtifacts and AttemptArtifacts (run/artifacts.ts), IArtifactSink, ArtifactRegistration, and ArtifactLink are ArtifactSink and its argument types (run/fixtures.ts), and ArtifactIdentity is the identity option. REDACTION_BY_KIND is ArtifactPaths.RedactionByKind. AttemptScope.Artifacts is the one AttemptArtifacts of an attempt (the runner makes it in upstream), and AttemptScope.Attached its records.
  • Differences: PutAsync returns the reference string where upstream returns { ref }, and PutLinkAsync is a default interface member. ReportArtifact stays the port’s in-memory artifact, built from the sink’s ArtifactRecords. The sink’s ids are <attemptId>:artifact:<n>, as upstream’s; the port’s failure evidence (its screen text and screenshot) is not registered through the sink yet, so a store never receives it, and App.ScreenshotAsync registers its file with the running step (see App and browser fixtures). The session waits at most the cleanup timeout for them before it reads the records. A download’s text scan runs on the registering thread, up to the first await, so its label is on the record when Register returns.
  • .NET-only guards, which upstream lacks: (1) E2ESession.SettleArtifactsAsync stops waiting for the store at the cleanup timeout and logs it, then goes on to the report, because upstream’s settle awaits every pending put with no bound and a hung store would hang the test (the store call itself is not cancelled; a late Ref is not in that report). (2) ExecuteVideo.Register hands a video file to the sink only when it lies inside the attempt’s directory, because an engine’s video path is its own word and the sink reads the file’s bytes and hands them to a store; upstream registers every path. A file outside the directory is still kept in Kept and reported as a video, just not read or handed over.
  • .NET-only: AttemptScope.Artifacts makes the attempt’s AttemptArtifacts on first use, and AttemptScope.CreatedArtifacts (internal) reads it without making it. Upstream’s runner calls createAttemptArtifacts once per attempt, which creates the attempt directory at once and keeps the returned object, so it needs neither. The port’s scope is built before it is known that anything is kept, and the report and the settle must not create an empty attempt directory for a passing attempt that keeps nothing. StoredArtifactLink.Kind and Redaction are upstream’s kind: 'video' and redaction: 'incomplete', defaulted since a link is always both.
  • Output/ArtifactStorePutLinkTests is describe('ArtifactStore.putLink') of output.test.ts (both it), through a session over a fake engine with a hosted link, since the port has no run: Partial_, they read E2ESession.Report() and not report.json (no schema check, no run status, no cleanup field). Not ported: the describe('output') tests of the same file, which are about the run’s output directory.
  • Tests: ArtifactStore/ holds artifact-store.test.ts: CreateAttemptArtifactsWithAnArtifactStoreTests (6 it), ArtifactRedactionLabelsTests (2), and DownloadRedactionTests (8), through CreateAttemptArtifacts as written. FilledSecrets/FilledSecretsTests is filled-secrets.test.ts through the real web engine, one session per test of its suite. Keeps_a_screenshot_after_a_fill takes the screenshot with App.ScreenshotAsync. Partial: Downloads_without_a_fill_the_text_file_is_kept_as_served_PARTIAL (upstream declares the credential in the config, so the session scans a download it never filled; the port has no credentials key, so with no secret known the download stays incomplete). The executor’s fill is recorded as a fill action whose value is the secret’s marker (<secret:member.password>) where upstream’s entry has a typeSecret action with a secret field; both name the secret and carry no value. DownloadRedactionSessionTests is .NET-only (the rescan, see Web engine).

video records an attempt on the web engine. The modes, their precedence, and E2E_VIDEO are under Config. This is the rest of upstream’s video.ts, provider-video.ts, attempt-session.ts (startVideo, collectVideo), and the video half of execute.ts.

  • IEngineSession.LocateAsync is upstream’s locate (EngineSession.locate), with the flat LocatorExpression record and the budget left as a timeout argument. Core resolves a locator through it when the session says CanLocate (.NET-only, transitional). WebEngine and DocumentEngine implement it: each reads its semantic tree and resolves the expression over it with the core resolver, so a match is a node of that observation with the ref the page script minted. Upstream’s web locate (surface.ts) projects the expression onto Playwright selectors (locators.ts), which the port’s page script replaces; the port resolves over the tree it already reads, so only the selector and frame expression kinds ask Playwright (see the Browser.Locator bullet below). The web engine reads under the timeout it is given (what is left of the wait, at least 500 ms), or the action timeout when that is shorter; the document engine answers at once and does not use it. LocatorExpression.IncludeHidden is .NET-only: toBeAttached and waitFor set it so an engine that resolves over its tree matches hidden role nodes, which they matched before the engine located; upstream’s Playwright has no such switch. A locate hands the trace the observation it read (TraceFeed.ShowScreen, and EngineStartOptions.Screen on the document engine), as core’s Agent.ObserveAsync did for the resolve it replaces; upstream’s web locate shows none. A retryable EngineException of the read (NODE_STALE during a navigation) is now retried until the wait’s deadline, as resolveOnce does. Any session that says no CanLocate (the WinApp engine, a scripted engine) has its locator resolved over ObserveAsync in core, as before. Screen.GetByTestId on such an engine, and the LocatorResolver readers of screenshot masks and e2e mcp, still resolve over the observation.
  • A web node that LocateAsync returned as the only match of its locator stays strict, as upstream’s locate (surface.ts, #859) keeps the strict Playwright locator for a single match: PerformAsync resolves the same locator again and, when a second element now matches, throws a retryable NODE_STALE (Node <ref> now matches more than one element. Observe again.) before any input, so the action acts on neither. Upstream gets this from Playwright’s strict mode; the port’s refs are page-script ids, so WebEngine keeps the locator of each single-match node (_strict, .NET-only, keyed by the node instance a locate returned) and re-resolves it in RequireNoNewTwinAsync. A node the observation listed (it has the same ref), a node among several matches, and every match of a display-value or exact-label query (upstream pins those to the element handles it read) name their own element and are never stale for a twin. Differences: upstream counts the elements of the whole projected locator (reads.length) and the port the nodes its resolver returns; and the port has no web dragTo, so upstream’s drag case of #859 (ACTION_MAY_HAVE_COMMITTED when a drop target turns ambiguous after the press) has no port.
  • An observed web node’s element handle is made when an action reaches for it, as upstream’s ElementList and RefRegistry do (element-list.ts and refs.ts, tester-army/e2e#1571; hardkoded/e2e-dotnet#1172). WebEngine keeps each document’s elements in one in-page array behind one handle (ElementList, with FetchAsync and AtAsync for upstream’s fetch and at) and publishes a generation of ListedTargets per observation through RefRegistry (BeginCapture, Publish, LookupAsync, Clear, ReserveIds, MintId, StoreLocated). PerformAsync looks a node up there; the list owns the handle, so the action no longer disposes it. A node whose element is gone, a document replaced since the walk, and a list released by the next observation are a retryable NODE_STALE. Differences: the port’s refs are the strings the page script stamps (e12) with no revision, so LookupAsync takes a string where upstream’s lookup takes a NodeRef; ActionTarget has only the element kind (ElementTarget) because the port keeps no strict Playwright locator target, so StoreLocated has no caller outside the tests until LocateAsync stores its targets as upstream’s locate does (hardkoded/e2e-dotnet#1229); an iframe’s owner is still found from the page script’s ref, where upstream fetches the boundary element through the list; the walk still hands its elements to the page-side map that RefsOrForce reads. RefTarget (the base of the upstream union ActionTarget | ListedTarget), ElementTarget (upstream’s { kind: 'element' } literal), and WebSupport.DisposeQuietly and DisposeWhenSettled (upstream’s inline void handle.dispose().catch(...)) are .NET-only. So is the pin that keeps a list alive while an action uses it (RefRegistry.LookupPinnedAsync, ElementList.Pin, WebSupport.DisposePinWhenSettled): the port’s locator reads publish observations while a click runs, which upstream’s refs.storeLocated avoids (#1229 removes the need). The port’s page script no longer has Find: an action resolves its element from the list. Tests: ElementList/ holds unit/element-list.test.ts and integration/element-list.test.ts (ElementListTests 6 it, ObservedRefsTests 2, ElementListOnARealPageTests 3) and RefsDisposal/LocatedElementRefsTests holds both it of refs-disposal.test.ts, each as written.
  • Browser.Locator(selector) and Browser.FrameLocator(selector) are upstream’s browser.locator and browser.frameLocator (browser.ts). FrameScreen is upstream’s FrameScreen: a Screen (so Screen is no longer sealed, though only the port can derive from it) whose every query goes through a frame expression, with Locator(selector) and FrameLocator(selector) for a CSS or XPath selector and a nested frame. A locator of a frame screen can Or, Filter, and scope as any locator, since Screen.OwnLocator compares the attempt’s root screen (upstream compares the context). LocatorExpression has the selector kind (the device’s, now the web engine’s too) and the frame kind (Selector is the iframe’s selector, Source the scoped expression). WebEngine.LocateAsync resolves them in WebSession.ProjectAsync, over the tree: Playwright says which elements a selector, or an iframe, names (WebLocators is upstream’s locators.ts, with FrameSelectors), the elements’ refs go to the resolver as a refs expression (LocatorExpression.Refs, .NET-only, internal), and a frame scopes its queries to the iframe node’s descendants, where the walk hangs the frame’s document. Any element a selector names is a node, as upstream’s Playwright locator matches any element and its e2e-read engine reads it: when the observation does not list a match (html, body, head, a wrapper with no role, test id, or text of its own), LocateAsync marks it in the page and observes again, and the page script lists the marked elements as nodes (forced in PageScript.Collect, .NET-only, with Forcing in WebEngine). They get refs of that observation, stand in the tree where they sit in the document (so Locator("div").GetByRole(...) scopes to what is inside), and are not held to the node budget (a locator whose selector names many elements lists them all, as upstream reads them all); the walk also enters a leaf node (a button, a link) when a marked element is inside it. A poll of such a locator observes twice, and the next ordinary observation lists the tree as before. A marked element in a hidden iframe is still unreachable, and an element Chrome drops from the tree (inert) is not read. Differences: an iframe the page does not show has no node, so it is FRAME_NOT_FOUND (retryable) and its content is not reachable; a read that does not wait (Count, AllAsync, AllTextContentsAsync, IsVisible, IsHidden, toBeAttached, toBeVisible, toBeHidden, toHaveCount, a text list, and WaitFor for Detached or Hidden) answers no match for a missing frame (MissingFrame.Empty, upstream’s missingFrame: 'empty'), and any other resolve polls for it until its timeout and fails with LOCATOR_NOT_FOUND (FRAME_NOT_FOUND) or LOCATOR_AMBIGUOUS (FRAME_AMBIGUOUS), as upstream’s translateLocatorError maps them to LOCATOR_NOT_FOUND and LOCATOR_AMBIGUOUS. A Filter(has) resolves inside each match, so a frame its locator shares with the source is the source’s; a has from another frame fails with UNSUPPORTED_CAPABILITY. A frame selector must match an iframe or frame element, else the frame is missing. A selector that captures with * before its last part fails with INVALID_LOCATOR when the locator resolves; upstream finds out when its read selector returns nothing for the captured element, the port reads the spelling (WebLocators.RefuseCapture, which splits on >> outside quotes), and its message says Filter(Locator) where upstream says filter({ has }).
  • Upstream’s packages/web/tests/unit/locators.test.ts is ported in part (#1171). describe('frameSelectors') (both its) is Locators/FrameSelectorsTests, over WebLocators.FrameSelectors. Not ported, because the port has no Playwright projection of a LocatorExpression (projectExpression, applyPostSteps, ProjectedLocator, PostStep in locators.ts; extracting them is tracked in #1213): it resolves over the semantic tree (see the bullet above). The 13 its of describe('projectExpression') and describe('applyPostSteps') that #1171 lists, and the parameterized it.each of applyPostSteps, all assert the chain of Playwright calls such a projection records, or the post steps it defers: projects an exact label query onto the label engine, narrows a visible query inside the selector for every kind, narrows a visible or role query inside a hidden frame to nothing, projects a testId query onto the configured attribute, passes role states and the heading level through to getByRole, spells the contract image role as the img role, the five displayValue position/filter/scope/has rules, projects a union onto Playwright or, and runs a filter step only on the matches the steps before it selected. The behaviors they stand for (visible, testId, role states, union, displayValue positions) are exercised end to end by the tests of the tree resolver. The test directory is Locators, so IsNodeVisibleTests and TranslateLocatorErrorMappingTableTests alias E2E.LocatorEngine as LocatorEngineType instead of Locators.
  • BrowserExpect.ToHaveClassAsync(locator, expected) is upstream’s expect(browser).toHaveClass, on Expect.That(browser) and Expect.Soft(browser). A string is the whole class list, whitespace-normalized, and a Regex is tested against it. A locator with no match yet keeps it polling (observed: no node), a node with no class attribute fails it (observed: no class attribute; class="" is an empty list), and several matches fail it at once with LOCATOR_AMBIGUOUS. The step’s label is page, as the other expect(browser) matchers’ here, where upstream’s is the expected pattern.
  • IEngineSession.StartVideoAsync and StopVideoAsync are upstream’s artifacts.startVideo and artifacts.stopVideo, and EngineCapabilities.Video is its video artifact capability. EngineStartOptions.ArtifactsDir is EngineAttemptContext.artifactsDir: the attempt’s .e2e/results/<result>/attempt-<n>. WebEngine starts the video once the attempt’s page is open, and WebSession (upstream’s AttemptSession) tells it when pages open and close.
  • VideoRecorder and ProviderVideo implement IAttemptVideo (internal), upstream’s AttemptVideo. VideoRecorder writes video/video.webm and, for later pages, video/video-part<n>.webm, each with its StartedAt, from Playwright’s IPage.Screencast.StartAsync. ProviderVideo returns the one segment the provider made: a file it wrote under video/ (Kernel’s replay.mp4) or a VideoLink. The first-frame wait is the same FirstFrameWait (1 s). WebScreencastOptions (WebEngineOptions.Screencast) is upstream’s WebScreencastOptions; Size is a WebViewport and a size under 1 pixel or a Quality outside 0 to 100 is INVALID_CONFIG. The old web({ video }) key has no port, since the options are typed.
  • A browser provider that records is asked through LeasedBrowsers.Recorder. Upstream leaves record out of a provider that cannot record, and the engine then records the screencast. A .NET provider is an interface, so it returns null from RecordAsync and ProviderVideo.IsRecording is false: the session then arms a VideoRecorder instead. A page the app closes under a ProviderVideo needs nothing, as upstream.
  • ExecuteVideo (internal) is upstream’s execute.ts video code: Plan is validateEngine for the one attempt a session is (UNSUPPORTED_ARTIFACT when a mode a target or a test set cannot be recorded by the engine; a config-root or E2E_VIDEO mode is skipped), StartAsync is the video part of launchSession (a default mode fails quietly, a set one fails the start), and StopAsync is stopVideo, closeSession, and registerVideos (a video the mode does not keep for the verdict is deleted, a link that is not http(s) fails the cleanup after the other recordings are kept). E2ESession starts the video after the engine, finalizes it before the engine is released when the session is disposed, and reads the verdict from the error Complete is given: no error is a pass, a SkipException is a skip. A required video that cannot be finalized makes DisposeAsync throw. The kept segments are E2ESession.Videos (internal); the port has no report to register them in.
  • App.StartRecordingAsync / StopRecordingAsync are upstream’s app.startRecording / app.stopRecording (#1381), with RecordingOptions, RecordedVideo, RecordedVideoFile, and RecordedVideoLink (a class hierarchy where upstream has a union; StopRecordingAsync returns an IReadOnlyList that is never empty, where upstream types a non-empty tuple). Recordings.cs is run/recordings.ts: SessionRecordings shares the engine’s one recorder between the attempt’s video and the spans (Recordings.SessionRecordings is sessionRecordings; the extra recordsVideo argument is .NET-only, since the port’s session always has StartVideoAsync and the engine declares EngineCapabilities.Video). A span moves its files into recordings/001-<name>.<ext> (-part<n> for later pages) and registers them; a span left running is stopped within the cleanup budget by E2ESession (upstream’s stopRunningRecording). WebSession.StartVideoAsync arms the recorder again on a later start, as upstream’s startVideo does. FailureText places a step in a stopped recording only until its stop step ends (TimedVideo, upstream’s timedVideos), via ReportArtifact.Producer. .NET-only hardening: a video path an engine returns that leaves the attempt’s directory fails the stop with ENGINE_FAILURE. The App methods take a cancellation token, not upstream’s action-timeout bound, as ScreenshotAsync. Not ported: the run_code surface entries (mcp/code-surface.ts; the port has no run_code), and the serial-group stop of a member’s recording (the port has no serial groups). Tests: AppRecording/ (AppRecordingsTests, all seven it of tests/unit/app-recording.test.ts; AppRecordingsRunTests, the four of tests/integration/app-recording.test.ts, partial: one session each, no runner), Video/VideoRecorderTests and E2E.Mobile.Tests/Engine/VideoTests (the added re-record its), and ReportFailureText/RenderTracePageTests (the recording-span offsets).
  • Differences: a test run has no --video flag (E2E_VIDEO, see Config; e2e explore --video is the flag itself), no run-wide check, and no notice, so a run-wide mode that an engine cannot record is skipped without one, and a retry mode with no retries says nothing. e2e explore has both notices (see Explore). A session knows only its attempt number, not the test’s retries, so UNSUPPORTED_ARTIFACT is raised only when the attempt records, where upstream raises it before any test when some attempt would. xUnit v3 has no retry, so on-first-retry and on-all-retries record nothing there. The test option video and test.describe options have no port (RecordingSource.Test is set by code that builds the session). A mode set on a test is not checked against a serial group, which the port does not have. MobileEngine records the device screen with agent-device (see Mobile engine); a device provider’s own recording (DeviceProvider.record) is not ported.
  • Tests: Video/ (video.test.ts, VideoRecorderTests, the nine it), ProviderVideo/ (provider-video.test.ts, both), BrowserProvider/RecordingTests (the recording group of browser-provider.test.ts, see Web engine), ProtectedAppOptions/WebScreencastTests (the first it of describe('web({ screencast })'), partial: typed options have no fractional size or unknown key; “refuses the old video key, naming screencast” has no port), EngineContract/VideoArtifactsTests (describe('video artifacts'), all seven partial, session level, no report; describe('video capability and plan notices') is not ported, it needs the runner’s notices) and “surfaces UNSUPPORTED_ARTIFACT before any attempt…” in RunnerEngineContractTests (partial), and VideoModes/ (video-modes.test.ts, partial: no runner, report, or serial group, so the wizard group is not run, and the modes are already resolved). E2ESessionCleanupTests now fails the start with a required video, since a bad results directory is refused before the engine starts.

What the trace page shows about the app is collected as upstream’s trace-feed.ts collects it, and kept on the attempt’s step records. The page that reads it is described in Trace page.

  • EngineStartOptions.Screen and EngineStartOptions.Environment are upstream’s EngineAttemptContext.screen and environment. TraceFeed (Engine/TraceFeed.cs, internal) is upstream’s class: after an action, ScreenAfterActionAsync captures the screen like an observation without publishing it, so the refs a test or the model holds stay valid, within one second; TellEnvironment tells the browser (chromium 141.0) and the page’s user agent once an attempt, without anyone waiting for it. The web engine builds the feed when the attempt starts. It hands the screen after OpenAsync, BackAsync, PerformAsync, PressAsync, and SwipeAsync (upstream’s open, back, perform, pressKey, and the viewport swipe), and tells the environment after OpenAsync and BackAsync (upstream’s navigating). Upstream’s typeText and the point actions have no engine member here.
  • An attempt that keeps a trace (the same keep rule as the video: attemptKeep of the resolved trace mode) hands the engine a Screen sink. An attempt that keeps none hands none, and takes no screen from what the test observes. The default mode, retain-on-failure, keeps one for every attempt, since the verdict is not known before the end.
  • SessionScreens (Run/SessionScreens.cs) is upstream’s screens of TargetSession and EnvironmentFacts is its createEnvironmentFacts: a name told again overwrites, blank values are dropped, at most 8 facts, each redacted and then cut to 40 and 200 characters. The port has no createEngineSession, so they are classes of their own. AttemptScope.ObserveAsync shows each observation the test, the screen fixture, and the agent take to the same sink.
  • StepRecorder.RecordScreen and StepScreens.CompareScreens and TraceScreen (Run/StepScreens.cs) are upstream’s recordScreen and step-screens.ts. A step keeps how the last screen it saw differs from the step before’s (StepRecord.Screen): the node lines added, removed, or changed, without node ids, 12 at most. Differences: the engine hands the port a typed Observation, so SessionScreens has no check for a malformed snapshot or treeUnavailable, and no revision to mint. The screen’s location is the route (/todos), not the whole URL, and a node that is hidden or aria-hidden is left out, as the lines the model reads leave it out. The byte budget is the run’s maxObservationBytes, the largest any agent allows (262144 by default), as upstream’s config.limits.maxObservationBytes.
  • E2ESession.Steps, E2ESession.Environment, and E2ESession.AppLog (internal) hold what the page reads.
  • The app log is collected apart from the feed, as upstream does it. EngineStartOptions.AppLog and EngineStartOptions.Navigation are upstream’s EngineAttemptContext.appLog and navigation, and AppLogEntry is its AppLogEntry; AppLogSource and AppLogLevel, the records’ enums, are public for it. AppLog.Install and NavigationLog (Engine/AppLog.cs, internal) are installAppLog and NavigationLog of web/src/app-log.ts. On every context the web engine configures, a persistent one too, it reports console output (error and assert as errors, warning, log and info as info; debug and the rest are left out, and so is Chrome’s Failed to load resource: echo, which the network lines tell), uncaught errors, failed requests (one the browser cancelled is left out), and responses with a status of 400 or more (5xx an error, 4xx a warning, a missing /favicon.ico left out). It tells where the page went: navigated to /checkout, the new tab navigated to /help, frame "pay" loaded /embed, and the app opened a new tab at /help; the test stays on its page. A navigation the engine makes itself is not told, since its step says it: NavigatingAsync (upstream’s navigating) wraps OpenAsync and BackAsync, and also ForwardAsync, ReloadAsync, and GotoAsync, as upstream wraps browser.goto, reload, back, and forward. It also tells the environment, as upstream’s navigating does. Differences: the console location is Playwright’s URL:line:column string, read to (at URL:line), and an uncaught error is the text Playwright gives (the message, then the first at frame), where upstream reads the error’s name, message, and stack.
  • As upstream, a tab’s first document is told by its opening, a page that is not the test’s current page counts as a tab (so the test page’s navigation while RestartAsync replaces it reads as a tab’s), and a request a test aborts itself (net::ERR_FAILED, ERR_BLOCKED_BY_CLIENT) is logged: only the browser’s own cancellations are left out.
  • .NET-only names: StepHooks, E2ESession.Phase and E2ESession.AppLog (internal), StepEvents (the step’s events, safe to read while the engine appends), and AppLog, NavigationLog, and AppLogRoute as the homes of upstream’s installAppLog, NavigationLog, and AppLogRoute. .NET-only tests: StepHooks/StepHooksTests in E2E.Tests and E2E.NUnit.Tests. EngineStartOptions.AppLog and Navigation are for engine authors, as Screen and Environment are; no user guide describes the engine contract, so the guides tell only what the trace page shows.
  • AppLogRoute (Run/AppLogRoute.cs) is upstream’s AppLogRoute of TargetSession, built by createAppLogRoute (engine/session.ts), and AppEvent and AppLogLimits are its AppEvent and APP_LOG_LIMITS. The engine reports from the moment it starts, before any step records, so what arrives before the recorder takes it waits: errors and warnings up to 200, info up to 100, navigations up to 50, so chatter never crowds out an error. An entry with a source or a level outside the enums, or a blank text, is dropped. The route is a class of its own, since the port has no createEngineSession. StepRecorder.RecordAppEvent and AppLog() are upstream’s recordAppEvent and appLog(): a line goes to the attempt’s app log with the step running in this async context, else the step that started last, redacted and then cut to 300 characters; where the app went is a navigation event of that step, and one before the first step is told under it.
  • Step events, #443. A locator action records an engine event, upstream’s recordAction of the locator engine: the action, the node it landed on as the resolve read it (role and label, secrets redacted), and appeared after Nms when the node took more than one round to appear, and went stale Nx when the node went stale under the action N times. An action that failed records its code. PressSequentiallyAsync records no engine event, where upstream’s performUntil records its focus (the port’s PerformUntilAsync records none, as for a swipe or a scroll into view); the action selectOption is named select, as the engine contract names it. RecordedTarget.TargetLabel is upstream’s targetLabel (cache/trace.ts). An assertion on a locator and WaitForAsync record a poll event with the count of reads and, when the reading changed or the poll failed, the readings in order: SampleHistory (Expect/SampleHistory.cs) is upstream’s class (expect/samples.ts), RecordAsync its record. An agent step records the events upstream’s instrumentPhase records (Phases.InstrumentPhaseAsync, agent/phases.ts; PhaseHost, PhaseSpec, and PhaseDetail for its host, spec, and detail; PhaseDetail is .NET-only, since upstream’s is a Partial<StepEvent>; the port’s PhaseSpec has no api, which upstream never reads). Every look the step takes is an observation event with the nodes it read and its size in bytes, as a model reads it, and a look taken inside an action is named: relocate for the fresh look that re-finds a stale node, page for the look between the pages of a scroll. Every grammar action is an engine event named for the verb (tap, doubleTap, type, typeSecret, press, selectOption, check, uncheck, scrollIntoView, scrollUntil, scroll, navigate, back; and clear, which upstream has no verb for), with the action it recorded as its detail, and a project tool is one named tool:<name> (ActionNames.ProjectToolEventPrefix, agent/action-names.ts). A judgment records one observation event for its look. Differences: the port’s action body commits and notifies inside the phase (the action is recorded and the test’s OnAction hook has run when the event ends), where upstream’s phase ends before it, so an engine event also holds the settle look and the hook; the model events are recorded where each model call is counted (AddModelCall), so the model phase announces no activity; and there is no agent.cache phase or policy event.
  • Agent step events, #648. Observation.Revision (public, set by the harness; upstream’s Observation.revision) is b<n> for the attempt’s n-th capture through AttemptScope.ObserveAsync, so an observation an engine hands a locator directly has none. A step records the revision of the last screen it read as StepRecord.ObservationRevision (StepAgentDetails.ObservationRevision), and the report writes it as observationRevision on any agent step that read one. StepAgentDetails.ObservationBytes keeps the largest observation in StepMetrics.ObservationBytes. Phases.RetryingObserveAsync and Phases.CheckStepClock are upstream’s retryingObserve and checkStepClock: the observation feed and the judgments (assert, extract) capture through the first and check the step clock with the second; waitFor retries a race the same way and guards the capture with the step clock too (#775, upstream’s invocation.observe passing guard: checkDeadline): a capture that outlives the deadline reports STEP_TIMEOUT (agent.waitFor exceeded its N ms timeout). Between judgments the wait maps that timeout onto waitFor timed out; last judgment: ... with the step’s timeout as the cause, as upstream’s waitForNextJudgment does; the first capture, before any judgment, keeps the bare message. Tests: AgentPhases/InstrumentPhaseTests, RetryingObserveTests and CheckStepClockTests port the three describe blocks of agent-phases.test.ts; foreignEngineError (an engine from another module registry) has no .NET counterpart, so those tests throw the engine’s own EngineException. The events and the revision are read in the ported tests of agent.test.ts (the waitFor and repair cases), agent-act.test.ts (the executor step and the stale node), agent-vision.test.ts (observationBytes) and the secret-fill describe of agent.test.ts (typeSecret). Not ported: the policy events (recordPolicyEvent) and the observation event of a denied pixel fallback (agent-fallback-handoff.test.ts’s POLICY_DENIED observation event), because the port has no pixel fallback.
  • The hook a step ran in, #443. StepRecorder.Phase is upstream’s phase, and E2ESession.Phase (internal) its enter. Upstream’s runner enters beforeEach and afterEach itself. The port has no runner: NUnit or xUnit calls the hooks. So when Phase is null, StepHooks (Run/StepHooks.cs, .NET-only) reads the step’s call stack. The first method outside the library that carries a mark decides: an NUnit [SetUp] is beforeEach, a [TearDown] is afterEach, a [Test], [TestCase], or [Fact] is the body, and a test class’s InitializeAsync or DisposeAsync is the xUnit pair. A step called after an await inside a helper the hook called belongs to the body, since the stack no longer shows the hook. [Theory] and [TestCaseSource] are test methods too, and InitializeAsync and DisposeAsync count on a class that implements IAsyncLifetime. OneTimeSetUp and OneTimeTearDown are not hooks of a test (upstream’s beforeAll and afterAll), and their steps carry none.
  • Tests: StepScreens/ (step-screens.test.ts, all 11 it; “hands every engine screen to the routed sink …” is partial, with no malformed or treeUnavailable snapshot to drop, and is named for what it checks), Traces/TracesTests (see Trace page), AppLog/ (unit/app-log.test.ts, all 7 it: StepRecorderRecordAppEventTests and TheSessionAppLogRouteTests; “holds lines and navigations until a sink is routed …” is partial and named for what it checks, since a typed entry cannot have a source that is no source), WebAppLog/ (web/tests/integration/app-log.test.ts, both it, in Chromium; AppLog/ is taken by the unit test of the same name; the server of upstream’s first it destroys the socket of /api/reset, which an HttpListener cannot do, so a route aborts that request and the line ends net::ERR_FAILED), SampleHistory/ (unit/sample-history.test.ts, all 6 it), and the .NET-only TraceFeed/WebTraceFeedTests, which drive the web engine in Chromium, where no upstream it does, and E2E.NUnit.Tests’ StepHooks/StepHooksTests, which runs a fixture with a [SetUp] and a [TearDown] through NUnit and reads the trace page.

Upstream’s --trace writes <output>/results/<result>/trace.md, a markdown page that tells the whole attempt: what failed and where to look, every step with what it did, the cache’s decisions, what the app logged, the agent’s last turns, the screen at failure, and what the attempt ran on. You open the file; there is no viewer. A test run has no --trace flag, so trace and the .NET-only variable E2E_TRACE choose which attempts keep a page (see Config); the default is retain-on-failure. e2e explore --trace [mode] is the flag itself.

  • A session writes the page when it is released, after the video is stopped, the engine is closed, and the debug table and the AI trace are written, and before a required video’s failure is rethrown. It writes when an attempt of the test kept a trace, by attemptKeep and keeps (the rule the video follows), and the page then tells every attempt, see below. A page that cannot be written prints a line on stderr and never hides the test’s result. The page goes in the test’s directory under the results directory, .e2e/results/<result>/trace.md, beside the attempt-<n> directories, as upstream’s does. A session is one attempt, and each adds itself to RunReport (.NET-only, Report/RunReport.cs), which collects the attempts of a test: a first attempt starts the test over, a later one extends it. The page tells every attempt the test has had so far, as upstream’s does from the run report, and is written when any of them kept a trace (upstream’s tracedResultIds). So a flaky test reads Passed after 1 failed attempt with the last failure, and a test that failed every attempt reads Failed the same way on both attempts, even when the passing or last attempt kept none itself. The run keeps the attempts of a test only while it has not passed and the mode is not off: an attempt that passed or was skipped ends the test and drops them. The port cannot know the last attempt of a test that keeps failing, since the adapters do not tell the session the retry count, so those entries stay until the process exits. Upstream’s runner holds every result of the run in memory too (const results: ResultRecord[] = [] in run/runner.ts), for its report.
  • The MCP server’s sessions set trace to off, so they write no page and take no screens: an MCP session is for looking, and e2e mcp has no --trace, as upstream. An exploration takes the target’s mode, or --trace; its own verdict gets no page.
  • TracePages.WriteTracePagesAsync and TracePages.TracePage are upstream’s writeTracePages and TRACE_PAGE (report/traces.ts). FailureText.RenderTracePage (which reads the public Report: TracePages builds it from the document the run holds), ToldAttempt, FailedStepOf, AttemptsLine, FailureSource, EvidenceOf, DetailLines, and StepLabel are the matching functions of report/failure-text.ts, and MarkdownText and ReportFormat are report/markdown-text.ts and the parts of report/format.ts the page uses. ArtifactPaths.ResultSegment is resultSegment (run/artifacts.ts; it also strips a .cs extension). All are internal. The trace map of FinishedRun.Traces (see Reporters) is what each session’s call to WriteTracePagesAsync returned, kept by ReportFile.SetTrace in the process’s state for the run and unioned over the tests; a first attempt that keeps nothing removes the page and its entry. Upstream’s writeTraces writes the pages once when the run ends and the runner holds the map.
  • Report1Document, ReportRun, ReportResult, ReportAttempt, ReportError, ReportArtifact, FailureEvidence, and Outcome (Report/ReportRecords.cs) are the part of upstream’s report the page reads, and AttemptReport.Build (Run/AttemptReport.cs, .NET-only) fills them from the step recorder, the environment facts, and the video segments of one attempt. ReportAttempt is upstream’s ReportAttempt and AttemptView in one, since the port has no serial groups. The file is the first step’s file (unknown without a step), the run id is one per process, and the title is the test’s title as one part. RunReport.Add joins an attempt to its test’s result and derives the result’s status from the attempts (Flaky when the final attempt passed after one that did not), where upstream’s runner keeps the result record and buildReport reads it.
  • What the page tells: the title, the file, the status and duration, what the attempt ran on, the error (a fence in it cannot close the block), Look at:, whether the attempts failed alike, every step (its label, duration, model calls, the video offset, the hook, the explanation of a failed one, the cache’s decision, the steps’ screenshots, and how the screen changed), the app log, the agent’s last turns, the screen at failure, other errors, and the evidence. Every piece of text goes through MarkdownText (a mention or a URL becomes code, markup is escaped, a loopback origin is dropped), and the whole page goes through the attempt’s redactor again before it is written.
  • Not filled by the port yet, each with its issue. The renderer shows them when a record carries them, and the tests build such records by hand. A serial group’s members: the port has no serial groups. Filled since: the agent’s turns of a step (#481), the step events, the hook, and the app log (see Trace feed), and what became of a step’s recording with the model that recorded it (see Trace page).
  • Recording outcome. E2ESession.Flush is upstream’s settleStagedTraces: it returns a CacheWrite per step index, and the session sets StepRecord.CacheWrite on each step that carries cache detail. A step decides two itself when it concludes: Evicted (a passed step an end-mismatch hand-off had to repair) and NoChange (the step changed nothing a replay could check and read no entry; one that read an entry is evicted at the settlement instead). The settlement reports the rest: Saved, Kept (the replayed entry, or one holding the same flow, which ignores the recording model), Unconfirmed, and Evicted (an entry the step read that the settlement deleted: a whole replay no check confirmed, a replay that ended in a failure, or an entry the step read and replaced with nothing). A flow the step recorded anew is Unconfirmed when no check confirmed it, whether or not an older entry was deleted, as upstream’s settleStagedTraces reports it (only an entry replayed whole is evicted). Both report Evicted only after IStepCache.Delete returned, as upstream’s evict and settleStagedTraces do since 689620d (#1072). IStepCache.Delete returns when the entry is absent and throws when deletion fails, as upstream’s CacheStore.delete does, and FileStepCache.Delete ignores only a missing file or directory, as upstream’s FileCacheStore ignores only ENOENT. A Delete that throws leaves the entry in place: E2ESession.Flush reports Unconfirmed for a whole replay or a new recording and nothing for an act that recorded nothing (upstream’s evict stages nothing then), and StepTraceSession.ConcludeAsync (upstream’s evict for a repaired end-mismatch) stages no decision. Upstream also evicts a failed step’s consumed replay in conclude; the port does both at the settlement, so a delete ConcludeAsync could not make is tried once more there. Tests: StepCache/StepTraceSessionTests “does not stage an eviction outcome when deleting a consumed entry rejects” and the three it of trace-cache-config.test.ts in TraceCacheConfig/FlushStagedTracesTests, the default-store one a no-op as root and on Windows, as upstream. NotWritten is a store whose Write throws or returns null (as upstream’s write returning undefined: a FileStepCache over its byte cap, or not writable); StepCache/FlushPipelineTests “says a confirmed recording the store did not write was not written, rather than saved” ports upstream’s it over a 16-byte cap. Unlike upstream, a cancelled attempt reports none, since it never settles. The page tells the model after the cache decision: recorded with `fake-loop/model-A` . CacheEntry.RecordedBy and CacheInfo.RecordedBy are upstream’s recordedBy, but one string, IAgentModel.Name, which spells provider and model id together (upstream’s is a provider and a model). The recorder redacts it and drops one that is blank or past 300 characters, and a read does the same, so a malformed one never makes an entry a miss. It is the agent’s configured model, which an executor’s Model becomes when the agent sets none; an agent with none records none. It never keys the entry. The port has no list reporter, so the recorded with note on a list line has no port; cache.recordedBy and cache.write are in report.json (see Report document). Tests: CacheModelProvenance/ holds both it of cache-model-provenance.test.ts, each partial: they read the step record, the entry file, and report.json (checked against the schema), not the list line or trace: 'on', and the malformed cases are one string (the nine cases of the first are seven). The second is also partial where an executor reports no model: upstream’s report names the executor, the port’s says unknown. StepCache/CacheWriteTests (.NET-only) covers each outcome. TraceRecorderTests has the two oversized cases as one theory, the blank cases as one theory, and the redaction in “records a secret fill by name only”. The two it of trace-cache.test.ts that read a bounded or blank recordedBy are covered by the oversized-model, blank-model, and invalid-model cases of the first test.
  • Semantic evidence in the replay (step-cache.test.ts, describe('StepTraceSession'), describe('recordedVerdictOf')). IReplayHost.TraceEligible is upstream’s ReplayHost.traceEligible (it was on IStepCacheHost), and Replay.ReplayTrace checks it before each recorded action and stops with action-failed once it is false, as upstream’s replayTrace does; VerifyEndState and PollSettled return false once it is false, as upstream’s do; IStepCacheHost inherits it. Tests: the three it of an observation that loses semantic evidence are in StepCache/StepTraceSessionTests; the port reads no pixel-only screens, so the test host flips StepHost.TraceEligible where upstream’s look returns pixels. StepCache/RecordedVerdictOfTests is partial (Partial_): the port’s entries record no verdict and its replay answers Replayed recorded actions., so the test passes StepTraceSession.RecordedVerdictOf the summary upstream builds (replayed N recorded action(s) zero-turn from the trace cache; recorded verdict: ...) instead of reading it off a session (#1281).
  • Error details. ErrorDetails (E2EException.Details, public) is upstream’s ErrorDetails of internal/errors.ts, with the same fields in C# casing: Locator, Expected, Observed, Matches, Role, Name, TestId, and WaitedMs. A locator that matched nothing (LOCATOR_NOT_FOUND) carries the locator as written, what it asked for, and how long it waited. One that matched too much (LOCATOR_AMBIGUOUS) carries the same without the wait and with Matches. A waitFor that timed out carries the wait. A locator matcher that failed carries Locator, Expected (with not when negated), Observed, and Matches, and ToHaveScreenshot carries the stored screenshot’s path as Expected and what it observed. LocatorResolver.LocatorDetails and LocatorExpression.ExpressionHints are upstream’s locatorDetails and expressionHints. ErrorSerializer.Serialize keeps the details as upstream’s serializeError does: text redacted, stripped of control characters, cut at 2 KiB, empty text dropped. The port has no report boundary, so ErrorRedaction.Failure also redacts the details text when it builds the error. Screen.ScrollUntilVisibleAsync sets them too, on its LOCATOR_NOT_FOUND. Upstream sets details in one more place the port has no feature for: a tap at a point. Not ported: the details of an error classified from another module copy (there is one copy of an assembly).
  • Failure evidence. FailureEvidence.CaptureAsync is upstream’s captureFailureEvidence (run/failure-evidence.ts), with its options, its 5 s budget for the observation and the screenshot together, its limits, and its scoring of the nodes closest to what a locator asked for. A failed attempt that keeps a trace page looks at the app once more and keeps the screen as attempt-<n>/screen-at-failure.txt, one #id role "name" text="…" [states] line for each node (indented by depth, hidden nodes left out as the lines the model reads leave them out, a node with no role read as text), a masked screenshot as attempt-<n>/screenshots/failure.png, the location, and for a locator that matched nothing or too much, up to five candidates. The page shows them under ## Screen at failure. The look is taken once per attempt, the moment the test body fails, ahead of the test’s own teardown (upstream’s captureEvidence, called after the body, the late soft failures, and the settled callbacks, and again after the teardown for a failure that first landed there). E2ESession.CaptureFailureEvidenceAsync is that look, and an adapter calls it: the NUnit adapter wraps the test method (IWrapTestMethod, since ITestAction runs after [TearDown]) and looks when the body throws or an Expect.Soft failed; the xUnit adapter looks from a BeforeAfterTestAttribute after the test method, when the result is Failed. A failure that first lands in the teardown is looked at when the session is released, as upstream does. Differences: an xUnit Expect.Soft failure is kept on the session until the test is disposed, so it is looked at then, after the test’s own DisposeAsync (closing the soft failures early would move them out of the test’s result). An attempt whose trace page is not kept looks at nothing. The screenshot is dropped when the attempt knows a secret (as every pixel the port keeps; upstream keeps its masked failure screenshot), when the look at the screen failed, and when the engine does not report that it covered a region for each secure node. The viewport is the screenshot’s size in viewport pixels, since the port’s observation has none, so it is absent without a screenshot. When the look fails (a crashed page, a closed app) there is no evidence, not the last screen a step saw. The candidates are listed for the codes LOCATOR_NOT_FOUND and LOCATOR_AMBIGUOUS.
  • The footer points at report.json (“the whole run is in report.json”), as upstream’s does, unless TracePageOptions.Standalone is set (upstream’s standalone, for HostTrace.WriteHostTraceAsync’s page). Differences: the page has no sourceUrl or artifactsUrl link. An attempt that did not skip but carries a skip (a test that called Skip and then failed on a soft failure) names it on its page after Look at:, as Also skipped: <reason>. lastTurnLines and screenLines belong to the run page and are not ported. HostTrace.WriteHostTraceAsync (internal, Run/HostTrace.cs) is upstream’s writeHostTrace (run/host-trace.ts): it writes one attempt’s standalone page at TracePath (redacted) and returns the typed Report. Its options (HostTraceOptions) take the attempt’s report (AttemptReport.Build’s document), the project root, the results directory, the attempt’s path segments, the trace path and the redactor, where upstream takes the config, target, run id, test id, title, agent and an AttemptRecord, which the port’s attempt report already holds. A hosted session (E2EHost, Hosted sessions) calls it when it closes, and returns its report from Report(). A session of a test framework writes its page through TracePages (every attempt of a test on one page) and builds Report() from ReportFile.SingleAsync.
  • .NET-only names: E2ESession.Evidence (what the session captured; upstream reads it from the report), E2ESession.CaptureFailureEvidenceAsync and E2EFixture.CaptureFailureEvidenceAsync (upstream’s local captureEvidence closure; the fixture’s is for the adapters), LooksBeforeTeardownAttribute (NUnit and xUnit; internal), NUnit E2ETest.CaptureEvidenceOf (internal; reaches the protected fixture method), xUnit E2ETest.LookAtFailure and its Running map (the attribute is handed the test, not the instance), FailureEvidence.ScreenFile, ScreenshotFile, ScreenArtifactId, and ScreenshotArtifactId (upstream registers the files with its artifact sink), FailureEvidenceOptions.Observe and Capture (upstream hands the open session), AttemptReport (and its ResultId and ResultSegmentOf, which give the result id and directory name; a .NET test has no one source file, so the test class stands for upstream’s file: the fixture passes its full name as E2ESessionOptions.TestFile, it joins the title in the id hash as upstream’s testId does, and its simple name leads the segment; a session started with no TestFile, such as explore or a direct E2ESession.StartAsync, hashes the title alone), AttemptReport.TestId and EncodeTitle (internal; upstream’s testId and encodeTitle in internal/ids.ts, with a title path of one title; the title is percent-encoded so a :: in it cannot pass for the separator; the hash input carries a NUL mark so a title-only session cannot share an id with a test id), E2ESessionOptions.TestFile (public, optional; the one new member of the public API, set by E2EFixture, so the NUnit and xUnit adapters change nothing), TraceOutput, WriteTracePagesOptions, ReportResult.Directory (an attempt writes under ArtifactPaths.ResultSegment of the result’s id and title, so two titles that slug alike keep apart; the segment leads with the test class’s name when the fixture started the session, and the page goes in that directory), StepRecorder.AddModelCall (upstream’s usage.record in StepAccounting), FileStepCache.CacheDirectory (internal), and CacheInfo.Entry (upstream’s entry of StepCacheInfo), OptionalTextConverter (upstream’s readRecordedModel tolerates a malformed recordedBy; the port’s is a string, which a converter reads leniently), PendingAct.Decided (upstream’s decided staged entry), and CacheInfo.WithRecordedBy (upstream spreads recordedBy into the info).
  • Tests: OpenHostTrace/OpenHostTraceTests is open-host-trace.test.ts’s describe('openHost: trace'), both it partial (Partial_ names), through E2EHost: the video one (it.each(['failed', 'passed'])) runs on the real web engine, and the safe-pages one has no gadget.dropFile call, no config secret an engine resolves (the secret is the session’s own), and one results directory for its two same-titled sessions. .NET-only: Writes_a_standalone_page_and_returns_the_report_of_the_attempt (HostTrace.WriteHostTraceAsync alone) and Hosted_session_writes_a_standalone_page_even_when_the_trace_mode_is_off.
  • Tests: Traces/ holds unit/traces.test.ts (all 11 it: WriteTracePagesTests, TracePageNamesTests, TheStepsOnATracePageTests, TheAppLogOnATracePageTests, over hand-built records) and integration/traces.test.ts (TracesTests, all 6 it, in a session over a fake engine, with no runner). In TracesTests, “keeps each step’s events, files what the app logged …” is named for the part it checks, Keeps_each_steps_events_and_files_what_the_app_logged_under_the_step_it_happened_in_on_the_page (partial: it reads no run event, which the port has no run to emit); the two “names the step … on the page and in the summary” tests are partial (no summary reporter); “keeps the traces the mode asks for” runs sessions with the attempt number in place of a runner’s retries. ReportFailureText/ holds report-failure-text.test.ts: detailLines, attemptsLine, failedStepOf, failureSource, evidenceOf, and renderTracePage (15 it; the footer of “tells the whole story” has no report.json pointer). Not ported from that file: “lastTurnLines and screenLines” (the run page), and “a serial member on its page” (no serial groups). .NET-only: TracePageRedactionTests. FailureEvidence/ holds failure-evidence.test.ts (FailureEvidenceTests, 6 of its 7 it in E2E.Tests, in sessions over a fake engine; the it.each is one theory). “looks at the screen before teardown runs …” is E2E.NUnit.Tests/FailureEvidence/FailureEvidenceTests (through NUnit, with a [TearDown] in place of afterEach), so all 7 it of the file are ported, with a .NET-only soft-failure variant beside it; the xUnit adapter’s look has no test project. “keeps the evidence of two tests whose ids sanitize to the same directory name apart, each report digest matching its file” is Keeps_the_evidence_of_two_tests_whose_titles_slug_alike_apart (partial: the port’s report artifacts carry no sha256 to compare). Keeps_the_evidence_of_two_tests_with_one_title_in_two_classes_apart and Gives_a_title_with_a_separator_in_it_another_id_than_the_same_text_split_into_file_and_title are .NET-only (upstream’s runner rejects a duplicate test id; the port keys on the class instead of the file). Errors/ErrorDetailsTests holds the error details tests of unit/errors.test.ts: two of three, the redaction one partial (the port keeps no stack text), and not “keeps the details of an error classified from another module copy”. The details of the failure are asserted in ScriptedMatchers/, ScreenshotAssertions/, and AgentExecutorContext/ where upstream asserts them, and the failure capture beside an assertion’s own screenshot in AssertEvidenceUnderACustomExecutorTests.
  • The markdown page. MarkdownReport.RenderMarkdownReport(Report, MarkdownReportOptions) is upstream’s renderMarkdownReport and MarkdownReportOptions (report/markdown.ts, as of 1d671f6). Both are public (E2E.Reports), as upstream exports them (tester-army/e2e#284, 8811ba7), and the function takes the public Report a reporter receives as FinishedRun.Report, as upstream’s takes its Report; the GitHub reporter (#745) calls it: the headline with the counts, the spend line, the run-level errors, a block per failed test, the flaky tests folded, the --repeat-each tally, the test filters’ lines and left-out table, every test folded as a table with a row per file, the footer, and the exploration record in place of the table. The renderer reads only the public Report tree. It does not take the in-memory Report1Document, so FailureText, Outcome, and the other helpers moved onto the public records (ReportStep, ReportResult, ReportAttempt, ArtifactRecord, StepCacheRecord) with them; the trace page is rendered from the same tree (TracePages reads the document the run writes back into a Report, as HostTrace does), so one reading of a report serves both. Its helpers are upstream’s: Repeats (report/repeats.ts: RepeatGroups, RepeatSummary, RepeatLine), FailureText.SourceText, LastTurnLines, ScreenLines, AppErrorsOf, and AppErrorLines (report/failure-text.ts; AppErrorsOf also has a .NET-only overload over the run’s own AppLogRecord, for the live list reporter), and ReportFormat.FormatTokens, FormatCost, ShortCommit, StatusBucket, and Tally (report/format.ts; Format.FormatTokens and FormatCost in E2E.Cli now call them). ReportResult.Skip and ReportResult.TestId are upstream’s skip and testId: a test the selection left out has no attempt to carry its skip. FailureText, ExploreText, and the other helpers are internal. Differences: upstream’s markdownReporter (the summary.md writer) and its three it are not ported, since the port has no reporter extension point; the port has no serial groups, so the page reads each result from its own attempts; a run with no finish time reads as instant. An exploration finding’s evidence is found among the run’s artifacts by its ArtifactId, which the exploration sets to the id of the screenshot artifact it registered (#958), so the finding links its screenshot when a result carries an artifact with that id; report.json writes and reads artifactId on a finding (the schema has it, and the page needs it from the public Report). Tests: ReportMarkdown/ holds unit/report-markdown.test.ts (RenderMarkdownReportTests, RenderMarkdownReportForAnExplorationTests, RenderMarkdownReportEvidencePathsTests, AnInterruptedRunTests, ARunTestFiltersNarrowedTests; Partial_Leaves_a_result_the_selection_did_not_choose... and Partial_Tolerates_a_document_written_before_results_carried_repeat... check the half a typed record can hold; the tests build their input as the in-memory document and render the public Report read back from its wire form, ReportBuilders.Public), and ReportRepeats/ holds unit/report-repeats.test.ts (RepeatTallyTests, both it). Not ported: the two serial-group it (“reads a serial member from its group…” and the it.each “tells a serial member from its verdict when a %s retry was cut”) and the three markdownReporter it.

Upstream #1206 (da13624, feat(runner): run only the tests a pull request can affect) adds filters to the config, --changed-since <ref> on e2e run and e2e list, and the “left out” part of the report. #1345 (47127f7) adds context.configFile. The port has no runner, no collect or select, no e2e run or e2e list, and no reporters other than the JSON report, so it takes the filter seam, the change detection, and the report fields, and wires them into the run fixtures. A test framework selects tests itself (dotnet test --filter), and the port keeps no list of every test before the first one runs, which a filter needs, so the run fixture of each adapter finds the tests by reflection and hands them to the filters (see Wiring).

Ported:

  • ITestFilter (upstream’s TestFilter: Name, and FilterAsync for filter), TestFilterCandidate, TestFilterChanges, TestFilterContext (with ConfigFile, #1345), and TestFilterResult (Exclude, Note) are public (Run/TestFilter.cs, upstream’s types.ts). A host calls the internal TestFilters.ApplyTestFilters (Run/TestFilters.cs, upstream’s run/test-filters.ts) with its candidates: filters run in order on the tests the ones before kept, a filter that throws, returns an invalid result, or runs past 5 minutes (FilterTimeout) leaves nothing out with a warning, and reasons, notes, and log lines are redacted and cut to one line of 1024 code points. context.Redact also masks every run of 8 or more characters of a secret. TestFilters.RepoConfigFile is upstream’s repoConfigFile, TestFilters.FilterRecords and FilterSummary are filterRecords and filterSummary, and LeftOut.LeftOutTests is leftOutTests (Report/LeftOut.cs, report/left-out.ts).
  • Filter validation (ResolvedConfig.ResolveTestFilters, Config/ResolvedConfig.cs, upstream’s resolveTestFilters and MAX_FILTER_NAME in config/resolve.ts; HostTestFilters.Resolve calls it): the list in declaration order, empty when unset; a null item is filters[i] must be a TestFilter: { name, filter(tests, context) }; a name outside the target name rules (E2EConfig.ValidName, upstream’s TARGET_NAME_PATTERN), over 256 characters (clipped to 31 characters and … in the message), or used twice is INVALID_CONFIG with upstream’s wording. Differences: upstream’s refusals of a value that is not a list, of a function in the list (call it, such as filters: [decisionFilter({ model })]), and of an item without a filter function have no port, since the list and ITestFilter are typed; upstream’s “leaves the config digest alone” it is ported through HostTestFilters.Resolve, whose ConfigDigest a filter never changes. Tests: Config/FiltersTests is describe('filters') of config.test.ts (the item check is Partial_).
  • --last-failed (tester-army/e2e 50fa7af, run/last-run.ts, run/runner.ts): the run fixture’s protected virtual bool LastFailed (false; else the E2E_LAST_FAILED variable set to 1 or true) is lastFailed of the run options. HostTestFilters.ExcludeAsync reads the previous run’s report.json where this run writes its own (LastRun.ReadLastRunAsync, upstream’s readLastRun; none is NO_LAST_RUN, with upstream’s wording), selects with LastRun.LastFailedIds (lastFailedIds: failed, timed out, interrupted, skipped by a setup, a predecessor, a hook, the worker or a limit, and the tests carried from an earlier run), and a test the previous run did not fail skips itself with did not fail in the last run. As upstream, the filters run only when a base ref is also set, and then without asking (changes.skipped is --last-failed). The report this run writes carries what the previous run owed and this run did not run (run.carried, LastRun.CarryForward, upstream’s carryForward) until a session runs it, and FinishedRun.LastRun hands the previous report to the reporters. Differences, all .NET-only: a run with nothing owed skips every test instead of ending NO_TESTS, as the filters’ empty result does; a result’s testId is the test’s class and method (AttemptReport.TestId(className, method), the same for every row of a parameterized test), so the host finds a test it discovered by reflection again; PreviousRun holds the typed report with the JSON it was read from, so carried is written from the previous document’s own JSON; RerunCollection.UncollectedFiles is always empty (reflection collects every test); the port has no serial groups. Not ported: previousFileDurations and fileDurationKey (they order the files of a parallel run, and the test framework owns that order), and --repeat-each. A rerun starts from the tree the report it reruns names, and files its attempts apart (#1003): HostTestFilters.ExcludeAsync prunes the results directory down to LastRun.ReportArtifactPaths of the previous report (ArtifactPaths.PruneArtifactsAsync, upstream’s pruneArtifacts, with reportArtifactPaths; the carried results’ files stay too) and takes ArtifactPaths.NextRerunDirAsync (nextRerunDir): rerun-<n>, past every number any test’s directory holds. HostSelection.RerunDir carries it, the run fixtures hand it to HostRun.RerunDir (.NET-only: upstream’s runner passes rerunDir to its workers), E2EFixture puts it on E2ESessionOptions.RerunDir, and the session files its attempt at <test>/rerun-<n>/attempt-<n> (ArtifactPaths.AttemptSegments, upstream’s attemptSegments), so a passing rerun no longer deletes the video of the failed attempt it reruns. The trace page stays in the test’s directory. Differences: a full run does not clear the results tree (the port has no runner to own the output, and the test framework may run several processes on one output), so only a rerun prunes; a failed prune fails the run’s start with the exception, where upstream records a launch run error. Tests: LastRun/ReadLastRunAndLastFailedIdsTests (the 6 it of that describe in tests/unit/last-run.test.ts) and LastRun/CarryForwardTests (9 of its 10 it, the it that reads carried back included; names every artifact file a report points at... is Partial_, without the serial group’s files; not ported: carries a serial member's group..., no serial groups), and RerunArtifacts/PruneArtifactsTests and NextRerunDirTests (rerun-artifacts.test.ts), whole; not ported: describe('previousFileDurations'). LastRun/LastFailedRunTests has two Partial_ ports that ask the host’s selection where upstream runs the runner twice: runs only what the previous run did not pass under --last-failed, and needs a report to read (runner-lifecycle.test.ts) and reruns what --last-failed owes without asking the filters... (test-filters.test.ts); the rest of that file is .NET-only. Not ported from runner-lifecycle.test.ts (they need the runner): runs every selected test n times under --repeat-each..., stops at maxDuration..., an interrupt reports every test it never started..., a run-level model failure reports every queued test..., --last-failed runs a failed hook's scope again... (the port has no suite hooks), and --last-failed keeps owing what the failure limit or another filter left out...; from output.test.ts: none of the artifact-tree cases is whole; Output/OutputTests has them as Partial_ (clears the artifact tree when a run starts... and keeps the evidence a --last-failed rerun folds in...: the host’s selection stands for the runner, and no full run clears the tree).
  • Wiring (#913; NUnit and xUnit v3; .NET-only, since upstream’s host applies filterSelection to the collected files and dotnet test has no collection step): E2ERunFixture (E2E.NUnit, and E2E.XUnit.V3, which is no longer sealed and is an IAsyncLifetime) gains protected virtual IReadOnlyList<ITestFilter> Filters (empty), ChangedSince (null; else the E2E_CHANGED_SINCE variable, as upstream’s --changed-since), and Config. Its [OneTimeSetUp] (xUnit v3: InitializeAsync, so a derived fixture is registered with [assembly: AssemblyFixture]) finds the assembly’s tests by reflection (RunSelection.Discover), and HostTestFilters.ExcludeAsync (internal, in E2E, framework-neutral) collects them into a Collection, runs Selector.Select and TestFilters.FilterSelection once, and returns a HostSelection: the left-out tests with their reasons, a skipped result for each, run.filters, and run.changes. E2ETest’s [SetUp] ends a left-out test with Assert.Ignore(reason); the xUnit v3 E2ETest.InitializeAsync throws xUnit’s dynamic-skip exception (a message that starts with $XunitDynamicSkip$) before its session starts. xUnit v3 tests are [Fact] and [Theory] methods (not Explicit; a Skip with SkipUnless or SkipWhen is conditional and still judged), and Tags are the TestCategory trait values of the method, its class, its enclosing classes, and the assembly. HostTestFilters.WriteReportAsync puts the outcome in report.json through ReportFile.WriteLeftOutAsync (.NET-only: upstream’s runner builds the report once, and a left-out test starts no session that would add its result): each left-out test is a skipped, selected: false result with skip: { cause: "filtered", reason, filter } and no attempts, its id the hash of its test id, its file the layout guess, and its target the config’s until a session runs, whose target (a fixture can run on a target of another name) replaces it, so the report keeps one target. The report is written when a base ref is set and the filters had a say, also when every test is left out. The mobile and Windows adapters (MobileAppTest and WinAppTest, NUnit and xUnit v3) derive from E2ETest, so discovery and the left-out skip apply to them unchanged (#965). The xUnit v3 MobileAppTest.InitializeAsync checks RunSelection.SkipIfLeftOut before it leases a hosted device, because the base class skips the test only after that lease (E2E.XUnit.V3 makes its internals visible to E2E.Mobile.XUnit.V3). The NUnit MobileAppTest still leases the device in its [OneTimeSetUp], once per run, even when every test of the fixture is left out; its [SetUp] that installs the app runs after the base [SetUp], so a left-out test never installs. With no base ref, no filter runs. A one-target ResolvedConfig is built from E2EConfig (HostTestFilters.Resolve; the port has no resolver). A test’s File is a layout guess, <TypeName>.cs in folders that follow the namespace, found under the project root, since reflection names no source file; it is wrong when a class lives in a file of another name. A test’s id is AttemptReport.TestId(file, "<Type> > <method>"), a parameterized method is one test, and Tags are [Category] values of the method, class, enclosing classes, and assembly.
  • The select layer (upstream’s collect/select.ts and collect/collect.ts), internal, called by the run fixtures through HostTestFilters: Selector.Select is select (the class is .NET-only, since a C# member cannot share its type’s name) with SelectionFilters (tags, tagMode, excludeTags, grep, grepInvert, lastFailed, shard, excluded, targetIds), Selection, TargetSelection, TestTargetPair, SkipInfo, Shard, TagMode, and SelectTargets. It applies .only, tags, grep, lastFailed (with withSetupConsumers), the serial closure, --shard, the filters’ exclusions, and session selection as upstream does, and TestFilters.FilterSelection and FilterCandidates are filterSelection and filterCandidates (BuildReport.CompareTests is compareTests, Ids.ResultId is resultId, Suggestions.SuggestionNote is suggestionNote). CollectedTest, CollectedFile, Collection, UncollectedFile, GroupNode, TestMode, ResolvedTarget, ResolvedConfig, and ResolvedTestOptions hold only what these read. Differences: nothing collects yet (a .NET test framework does the collecting, so a host would discover tests by reflection), so a CollectedTest carries its resolved options (Options, .NET-only) where upstream’s resolveOptions derives them from the group chain and the config; ResolvedEngine (.NET-only) is the slice of upstream’s Engine that grading reads; a CollectionError is a ConfigurationException with the code COLLECTION_ERROR; describeNoTests keeps the “collected but none is runnable” summary, and has no glob, near-miss, or positional branch (the collection holds none); repeatEach and resolveOptions are not ported.
  • Changes.FindChangesAsync (Run/Changes.cs, upstream’s findChanges): every file that differs from the merge base of the ref and HEAD, staged, unstaged, deleted, and untracked files included, a rename as both paths, sorted by code point, with a 30 second budget. A ref git cannot measure from is INVALID_CHANGED_SINCE (a ConfigurationException). Git.RunGitAsync, GitResult, and GitFailure are upstream’s runGit, GitResult, and GitFailure; Paths.OnDiskPath is onDiskPath; Time.BudgetText is budgetText; ReportFormat.FilterDecision is filterDecision.
  • The report: run.changes (ReportChanges) and run.filters (ReportFilter, FilterOutcome) on E2E.Reports.ReportRun, SkipInfo.Filter (a filtered skip names the filter), ErrorPhase.Filter, and the filter phase in the wire form. schema/report-v1.schema.json and both fixtures are upstream’s at #1345.

Differences:

  • An interrupt surfaces as an OperationCanceledException, where upstream rejects with INTERRUPTED. The context’s Signal follows the interrupt only while the call runs. The work a timed-out or interrupted call leaves behind is not recorded (upstream’s leaveWorkBehind keeps the CLI from waiting for it; the port has no CLI process to keep).
  • A result is typed, so the refusals of a result that is not { exclude, note? } (an array, a string, an unknown key, a map, a numeric note, a value that cannot be shown as text, and a reason that is not a string) cannot happen. A null result, a null Exclude, an empty reason, and an id no collected test has are refused, with the port’s wording for the first two.

Not ported:

  • filters in e2e.config.json (a filter is code, and the JSON config holds none), --changed-since, --no-filter, INVALID_CHANGED_SINCE as a CLI exit 2, the list and run output of a left-out pair, the left-out lines of the list and JUnit reporters (there are none in the port; the markdown reporter prints its left-out lines from the report), telemetry, the filter setup step of a run, pull_request_target guidance, and the CI recipe. They need the runner, the collector, and the reporters. The dotnet test host (the run fixture) takes the filters and the base ref in code (see Wiring above).
  • @e2e-dev/decision’s decisionFilter and its tests, including #1345’s leaves nothing out, making no call, when the config the run loaded changed, whatever its name, and goes by name for any other: the package is not ported (see Upstream packages).
  • Tests: Changes/FindChangesWithChangedSinceTests has all 10 it of changes.test.ts (the INTERRUPTED one is Partial_rejects_once_the_run_is_interrupted; the --no-relative one runs apart from Windows, as upstream’s does). Time/BudgetTextTests is budgetText. SchemaFixtures/ReportV1SchemaTests has the filter it of schema-fixtures.test.ts. TestFilters/ApplyTestFiltersTests, AFilterPastTheDeadlineTests, and FilterRecordsAndFilterSummaryTests port test-filters.test.ts over candidates built by hand, since the port has no collect or select; the ones that differ are Partial_. TestFilters/FilterSelectionTests and FilterCandidatesTests port the two filterSelection and the three filterCandidates it, all Partial_: they build the collection and the config by hand where upstream calls collectModule, test.describe, and resolveConfig. Select/SelectWithWhatTheTestFiltersLeftOutTests ports the five it of select with what the test filters left out (select.test.ts) the same way, Partial_. Not ported from test-filters.test.ts: the refuses a result cases above, and leaves nothing out when a filter throws a value that cannot be shown as text. TestFilters/WhatAFilterIsToldTests is #1345’s names the config file the run loaded over RepoConfigFile, partial. Not ported: the rest of integration/test-filters.test.ts, select.test.ts’s cases for excluded, config.test.ts’s filters cases, cli*.test.ts, report-list, report-markdown, report-junit, telemetry-events, and packages/decision’s tests.

Upstream writes report.json, a report-1 document of the whole run (report/build.ts), checked by schema/report-v1.schema.json. The port writes it too (#496), with the differences below.

  • When and where. Upstream builds the document once, when its runner ends the run, and writes it to <output>/report.json. A test framework runs the port’s attempts as sessions with no run around them, so each session adds its attempt to the process’s run (ReportFile.WriteAsync, .NET-only) and the whole document is written again, atomically, to report.json beside the results directory (.e2e/report.json by default, as ai-trace.json is). The file is complete after every attempt. run.finishedAt and run.status are those of the attempts so far, not final, and run.exitCode is the worst exit code of the results, as upstream’s verdictExitCodes derives it: a failed or timed-out result exits 1, or 2, 3, or 4 when the category of an attempt error is configuration, infrastructure, or internal (an agent code’s category comes from AgentError.CategoryByCode, upstream’s CATEGORY_BY_CODE, so a blocked AUTH_CREDENTIAL_UNAVAILABLE exits 2), and an interruption exits 130, which outweighs the rest. An attempt whose cleanup is failed adds the categories of its cleanup-phase secondary errors (ReportRecords.CleanupErrorsOf, upstream’s cleanupErrorsOf, tester-army/e2e#1233), so a passed or skipped test whose cleanup failed exits 3 (a session marks its attempt’s cleanup failed, with a cleanup-phase secondary error, when the engine session does not close or a required video is not finalized, as upstream’s closeSession does, and the test’s own verdict stays; DisposeAsync still throws the failure, unless the session’s own commit failure is thrown instead (the report holds both); a best-effort video that fails is not a cleanup failure; the port has no list reporter, so the cleanup failed line and the Cleanup summary row have no port). run.status follows the code (passed, failed, interrupted, else error), and blocked is derived from the results afterwards. A result keeps its wire form until it gains an attempt, so a large suite does not serialize every result again after each attempt. A result id is the test’s file and title, so a test that runs twice in one process (another target, a repeat) is one result that its last run replaces, as RunReport already treats it. Test processes that share an output directory overwrite one another’s file, and a file from an earlier run is replaced by the first attempt. It is written whatever the trace mode, for passing tests too. A write that fails (disk, permission) prints one line to stderr and does not fail the test.
  • A retry the run interrupted (retryVerdict, run/retry.ts). Retry.RetryVerdict (Run/Retry.cs) is upstream’s retryVerdict, and RetryAttempt is its type of that name. RunReport.StatusOf (.NET-only, it collects the attempts of a test) derives a result’s status from it: a pass after an attempt is flaky, a skip decides, and an interrupt during a retry keeps the failed or timed-out verdict before it, so Outcome.Verdict (upstream’s outcome().verdict) picks the attempt that failed and not the interrupted retry. An interrupt of the first attempt is interrupted, and no attempts read as failed, as upstream does. The run-level interrupt flag is RunState.Interrupted in ReportFile (.NET-only, it is the process’s run), where upstream’s runner keeps interruptController (run/runner.ts): it is set when a session adds an attempt that a user cancel ended (AttemptStatus.Interrupted; a test timeout is timed-out, not an interrupt). E2ESession.Complete takes the user’s cancel from the caller’s cancellationToken (the runner’s token that the xUnit and NUnit adapters pass): an OperationCanceledException with it not cancelled (an HTTP timeout in the test) is a failure, or a timeout when the session’s own TestTimeout fired (its error is recorded as TEST_FAILED or TEST_TIMEOUT wrapping the cancellation, since a CANCELLED error would read as the interrupt category and exit 130), and a failure is never upgraded to an interrupt, so a timeout a framework reports as a failure stays one. The flag is read from the results the run holds (a rerun that replaces an interrupted result clears it; the retries of a test stay in its result), and ReportFile.StatusOf(results, interrupted) adds 130 to the verdict exit codes when it is set, as upstream’s currentExitCode does. So a run whose retry was interrupted after a failure reads interrupted with exit code 130 in report.json, while that test keeps its failed verdict. The xUnit adapter’s ErrorForCache (.NET-only) hands a test that xUnit recorded as failed with an OperationCanceledException or TaskCanceledException to the session as an OperationCanceledException (xUnit keeps only the type name and message), so the session tells the user’s cancel by the runner’s token as it does for any test; the NUnit adapter already passes the recorded exception. Known gaps (#837): the flag is derived from attempts, where upstream’s comes from the interrupt signal itself, so a cancelled signal that ends no attempt (a session that never starts) sets nothing; Report() (ReportFile.SingleAsync, .NET-only: it is the report of one session, a run of one result, as upstream’s writeHostTrace builds it) applies the flag to its own result only, since it sees no other result of the process. Upstream drops the 130 when the run stopped itself (runAborted, stoppedEarly); the port has no scheduler or run-level errors, so it has neither. Upstream’s tests for this are CLI signal tests (interrupt-signals.test.ts, the flow retries case) that spawn the CLI and send Ctrl-C; the port has no runner, so they are not ported, and ReportFileTests (.NET-only) covers the flag. Ported: the seven cases of the retryVerdict it.each, as Retry/RetryVerdictTests. Not ported: isRetryEligible, runWithRetries, and isCutSerialRetry, with their tests (a test framework runs each retry in the port, and it has no serial groups).
  • A closed session’s report (feat(runner): expose the closed hosted session report, b750125). E2ESession.Report() is upstream’s session.report(): once the session is disposed and its trace page, when the mode keeps one, is written, it returns the attempt’s report-1 document as a single-result run (ReportFile.SingleAsync, .NET-only; a hosted session returns the Report that HostTrace.WriteHostTraceAsync builds, as upstream’s writeHostTrace does). It returns null before that and when the page cannot be written. The return type is the public E2E.Reports.Report, upstream’s Report (an alias of Report1Document) with its nested types in C# casing and the names of report/build.ts and run/steps.ts (ReportRun, ReportTarget, ReportResult, ReportAttempt, ReportStep, ReportError, ArtifactRecord, StepEvent, StepMetrics, StepModelInfo, StepCacheRecord, FailureEvidence, SkipInfo, VcsInfo, and the rest). They live in the E2E.Reports namespace because the port’s own internal records for the same parts keep upstream’s names in E2E (ReportRunStatus and ReportExplore are shared and stay in E2E). The typed report is read from the document that report.json holds, so the two tell one attempt alike; ReportSerializer is .NET-only and the only place that reads it; the library never writes the typed form. Differences: the typed report has no serialGroups and no carried (the port has none), no extensions and no stack; enum members stand for upstream’s string unions (ResultStatus.TimedOut for timed-out); durations stay DurationMs as upstream, but ReportExplore keeps its TimeSpan members; a session that keeps no trace (the mode keeps none for the attempt’s verdict) still returns its report, where upstream’s hosted session always writes a trace; a trace page that cannot be written is reported on stderr and the session releases without a failure, so upstream’s close() failure for it has no port. E2ESession.AttemptId (internal) is upstream’s attemptId. Tests: OpenHostReport/OpenHostReportTests has both it of open-host-report.test.ts; the first is partial and renamed Returns_independent_closed_reports_that_remain_stable_across_a_second_session (no gadget.dropFile() fixture, and the soft failure is CloseSoftFailures’ result rather than an entry of close()’s failures), the second is partial and renamed Returns_null_when_the_trace_write_fails_and_the_session_still_releases (no close() failure check). .NET-only: Tells_the_same_result_as_report_json_for_the_same_session checks that Report() and report.json tell one attempt alike, which upstream’s hosted session (no report.json) has no counterpart for. TypedReport/TypedReportTests (.NET-only) reads the valid report-1 fixture into a Report and writes it back, and checks that the document is the same bar the serial groups, carried, extensions, and stack. The document’s run.id is the session’s own, so it is not compared. ReportFile.DetectVcs (.NET-only) asks version control once per process and project root for both report.json and Report(); a failed lookup is asked again, and Asks_for_the_commit_once_per_project_root_however_many_sessions_ask_and_asks_again_after_a_failure covers both.
  • schema/report-v1.schema.json is upstream’s schema, apart from the serialAttempt.cutRetry property (upstream dc8f56d, #1056), added by hand because the vendored copy is older than upstream’s (it lacks the visionDegraded description). The valid fixture is upstream’s at #1056. schema/fixtures/report-v1.valid.json and report-v1.invalid.json are upstream’s fixtures. The E2E package packs schema/*.schema.json under schema/ (not the fixtures), as upstream’s files does. schema/session-v1.schema.json and its two fixtures are upstream’s, unchanged. schema/agent-judgment-v1.schema.json, agent-judgment-v2.schema.json and their four fixtures are upstream’s, unchanged. AgentProtocol.JudgmentSchema and AgentProtocol.ValidateJudgmentResponse (Agent/AgentProtocol.cs, internal) are upstream’s JUDGMENT_SCHEMA and validateJudgmentResponse; see Agents for the judge that uses them.
  • Session store (run/sessions.ts, SessionStore). SessionStore (internal) is upstream’s: one AES-256-GCM envelope file per session, authenticated over the whole envelope (identity, expiry, and the secret names in the clear), the learned secret values only inside the ciphertext, a memoized decrypt that still checks expiry on every load, and file names that are percent-escaped, cut, and hashed. SessionIdentity, SavedSession, and EngineState are the records of upstream’s interfaces. SavedSession.Secrets is upstream’s SavedSecrets (a list of name and value pairs, with no alias of its own), and the envelope’s secrecy carries only the names: the tainted flag went with the pixel taint (#1437), and schema/session-v1.schema.json no longer has it. Methods are SaveAsync and LoadAsync (save, load); Create and ForWorker take an optional TimeProvider (.NET-only, a test’s clock). ForWorker takes the key as byte[]. A key of the wrong length is E2EException with SESSION_KEY_INVALID, since the port has no infrastructure error class. A file is written 0600 and the directory 0700 on Unix (AtomicWrite.WriteFileAtomicAsync takes the mode; Windows has none). A payload or envelope field of the wrong type is SESSION_INVALID, where upstream’s TypeError escapes. Sessions.TargetIdentity is upstream’s targetIdentity (it takes the target’s name, platform, engine, and resolved app, where upstream’s takes a ResolvedTarget). SessionStaging is upstream’s: Stage, Missing, and Entries (stage, missing, entries); a name saved twice or not declared is SESSION_CONTRACT. IEngineSession.CaptureStateAsync and RestoreStateAsync are upstream’s optional captureState and restoreState; a session that does not override them fails with UNSUPPORTED_CAPABILITY, as upstream’s session.save() does for an engine without state. EngineState is public for them. The web engine implements both as upstream’s does (playwright-storage-state, version 1, with IndexedDB); restoring replaces the browser context and is unavailable on a persistent context. The runner that uses them is ported for NUnit and xUnit v3 (#927), without upstream’s collector. test.setup(title, { sessions }, fn) is [E2ESetup(title, Saves = [...])] on a test method (E2E.NUnit.E2ESetupAttribute, which derives from [Test], and E2E.XUnit.V3.E2ESetupAttribute, which derives from [Fact] and shows Title as the display name; ISessionSetup is the framework-neutral seam), session: name on test or describe is [E2ESession(name)] on a method or class, and session.save(name) is E2EFixture.SaveSessionAsync (these names are .NET-only: the port has no test() options object or fixtures object). Each attempt of a setup test stages its saves through SessionStaging.Stage with the secrets its session learned (upstream’s carriedSecrets leaves out static config values, because every upstream session registers those itself; the port’s session registers a config secret when the test reads it, so it keeps them), and the passed attempt writes them with SessionStore.SaveAsync (a name left unsaved is SESSION_CONTRACT, as upstream’s). A test that restores one loads it before the video starts, adds its secrets to the session’s ledger (upstream’s adoptSecrets, without the process ledger), and restores the state; a restore failure ends the attempt like any launch failure. The store is one per process (SessionRun, .NET-only: upstream’s runner makes it for the run), under .e2e/sessions/<run id>, with its key in memory only; E2ERunFixture (both adapters) deletes it when the run ends (upstream’s cleanup). EngineCapabilities.State (.NET-only; upstream’s optional engine.state) is what the report’s stateCapability records, and capabilities leaves it out; WebEngine declares it. Differences, all from the test framework owning the test order and the selection: setup tests do not get a later test’s dependency (NUnit gives a setup test an early [Order], which orders it inside its own fixture only; xUnit v3’s E2ETest carries [TestMethodOrderer(typeof(SetupTestMethodOrderer))] (.NET-only), which puts the setup tests of a class first and is replaced by a class’s own orderer, and xUnit runs classes of different collections in parallel: put the tests that restore its session in that fixture or class, or order the fixtures yourself; a session no setup saved yet is SESSION_UNAVAILABLE; a class-level [E2ESession] does not apply to the setup tests of the class); a setup test runs although no selected test needs its session; a setup inside a describe, two setups declaring one name, and a setup failure skipping its dependents with setup-failed are not checked (NUnit and xUnit have no describe; a dependent of a failed setup fails with SESSION_UNAVAILABLE); and the state capability is checked when a session is saved or consumed, with UNSUPPORTED_CAPABILITY, not as a COLLECTION_ERROR before any test. openSession is ported: see Hosted sessions. Upstream’s one engine-level test of the hooks, round-trips persisted state through capture and restore, and reset drops it (web/tests/integration/lifecycle.test.ts), is ported as Lifecycle/WebEngineLifecycleTests.Round_trips_persisted_state_through_capture_and_restore_and_reset_drops_it (the blank page reads Route blank, where upstream reads about:blank). Upstream’s tests of the runner are EngineContract/RunnerEngineContractTests and SessionSecrets/SessionSecrecyAcrossSaveAndRestoreTests (the NUnit test project, through nested NUnit runs): Partial_A_session_consumed_on_a_target_without_a_state_capability_fails_before_its_setup_test_saves (the run does not fail before the setup runs: the setup fails at SaveSessionAsync and the consumer when it restores), Partial_Round_trips_captured_state_into_the_dependent_attempt_via_state_restore (the real web engine behind a wrapper that records the state, and a cookie the dependent reads, where upstream checks a fake state’s data), and Ends_the_attempt_when_session_restore_fails_after_it_started (whole except its check of concurrent attempts: it reads the failure’s code and counts the engine sessions started and disposed) are engine-contract.test.ts’s; the two session-secrets.test.ts cases are partial (the provider case uses a Secret.Create secret, as the port has no provider-resolved secrets; both read the failure message only, with no report, failure screen, or probing executor). SessionStaging has no upstream test of its own. The port’s tests (SessionStaging/, WebEngineState/) are .NET-only. The xUnit v3 test project (tests/E2E.XUnit.V3.Tests, new with #927) has the same EngineContract/ and SessionSecrets/ classes, same names; each test runs its explicit fixture class in a test process of its own (xUnit has no in-process runner to nest), reads the XML result by method name, and the failing-restore test reads the started and ended engine session counts the child prints. The failure code is read as the exception type and message (xUnit keeps no Code in the message). A_setup_test_breaks_the_session_contract_when_it_saves_wrongly is .NET-only, as in NUnit. The xUnit adapter’s setup attribute needs xunit.v3.extensibility.core 4.0.1 (the package floor rose from 1.0.1: FactAttribute takes its source location from 3.0, and ITestMethodOrderer is new in 4.0).
  • Web engine lifecycle (web/tests/integration/lifecycle.test.ts, tester-army/e2e#1169’s audit): Lifecycle/WebEngineLifecycleTests and Lifecycle/OnOneSharedBrowserAFreshAttemptPerTestTests (describe('on one shared browser, a fresh attempt per test')) port the file’s it, as far as the port has the surface. Whole: the video it (records a video per page at the viewport size..., records a video started mid-attempt..., opens the attempt page when the video starts; the port cannot spy on page.screencast.start and the recorder exposes no frame signal, so the paint wait is on the page: loaded, two animation frames, and a screenshot to force the repaint, after which the recorder waits for the first frame within VideoRecorder.FirstFrameWait), masks secure fields in artifact screenshots and restarts the counter per attempt, applies visible before an index, filter, or scope... (the has filters use Browser.Locator), refuses to swipe a node with no box..., and reports a drag whose drop target turns ambiguous after the press as possibly committed (the port has no strict locator target, so WebEngine.DragAsync checks a located drop target for a new twin after the press, as upstream’s locator.dragTo resolves its target then: the twin is ACTION_MAY_HAVE_COMMITTED, retryable: false, a twin already there too; #1226). Partial_: declares the full deterministic tier plus the browser fixture (the port’s capabilities are flags with no pointer, artifacts, or browser member), keeps tree attributes bounded while node reads expose every attribute (the port’s observed tree carries every attribute, so only the node-read half is ported), mints one root id... (the port has no root node), treats endAttempt before startAttempt and dispose on a cold engine as no-ops (no endAttempt: a session is the attempt, a deliberate .NET design, so there is no issue), and rejects a video that cannot start... (the start fails because a screencast already runs on the page, where upstream rejects a mocked one). Not ported: refuses a second startAttempt while one is running and keeps the first intact (an engine hands out independent sessions, concurrent ones allowed), and stops waiting on cleanup once its budget is aborted, and recovers on the next attempt (a session’s DisposeAsync takes no cleanup context, because IAsyncDisposable cannot; the session bounds its teardown with E2EDefaults.CleanupTimeout itself, a deliberate .NET design).
  • Tests: SessionEnvelope/ is unit/session-envelope.test.ts (all 10 it: SessionEnvelopeTests, SessionLoadTests, SessionFileNamesTests), and SchemaFixtures/SessionV1SchemaTests, AgentJudgmentV1SchemaTests and AgentJudgmentV2SchemaTests are the two it of describe.each(schemas) for each of those schemas. AgentJudgmentSchema/AgentJudgment2Tests is agent-judgment-schema.test.ts (all 21 cases of its one it.each).
  • WriteReport (Report/WriteReport.cs, internal) is upstream’s report/write.ts: WriteTextReportAsync, WriteJsonReportAsync (two-space indent, a trailing newline), and ToPosixPath. AtomicWrite.WriteFileAtomicAsync is upstream’s writeFileAtomic (internal/atomic-write.ts): a sibling temporary file with random bytes in its name, moved over the target; AtomicWrite.WriteFileAtomic is the synchronous twin (writeFileAtomicSync), which FileStepCache.Write uses because IStepCache.Write is synchronous. On Windows both retry a move the file system refused while another move was replacing the target or a reader held it open (see Replay cache). The trace page and the failure screen file are written through WriteTextReportAsync, as upstream’s traces.ts does (it replaces the port’s own TracePages.WriteTextAsync). The writer serializes with the port’s JSON defaults (camel case, null omitted), so a caller redacts the text and shapes the document. Difference: a string with a lone UTF-16 surrogate makes WriteJsonReportAsync throw, where JSON.stringify writes an escape; the builder that cuts text to the schema’s limits must not split a surrogate pair. Not ported: the file mode option, and fileReporter, since the port has no reporters.
  • The schema is checked in tests only. The tests use JsonSchema.Net 8.0.5 (MIT; version 9 and later use another license), in the test helper project tests/E2E.Tests.Schema. The shipped package validates nothing and has no new dependency. ReportSchema.AssertValidReport is upstream’s assertValidReport, with format asserted as Ajv does.
  • Run-level blocks (Report/BuildReport.cs, upstream’s report/build.ts): DescribeTarget, ProjectSource, ComputeSummary, DeriveRunStatus, ComputeUsage, SerializeTarget, and Build, which assembles Report1Document with ReportRun’s new members (Status, ExitCode, StartedAt, FinishedAt, Project, Environment, Vcs, Errors, Summary, Limits, Usage). ReportRun.Targets are ReportTargets now, not names. ReportResult gained DeclarationIndex, Tags, and Selected; ReportArtifact gained Size; StepMetrics gained ObservationBytes (the largest observation the step read, in bytes of the text a model reads; a judgment that sends pixels alone counts none, as upstream’s does not; so usage.maxObservationBytes is the largest of them). AttemptReport.Build fills each kept file’s Size, so usage.artifactBytes adds them up. The engine version of a per-attempt target is IEngine.Version, which the session carries in AttemptScope.EngineVersion; a blank version reads unversioned. Git.RunAsync removes the variables that point git at a repository (GIT_DIR, GIT_WORK_TREE, and the like) before it starts git, so a hook or wrapper cannot move the repository it reads; upstream passes the parent’s environment through. A target’s baseOrigin is the scheme, host, and non-default port of the app URL, without credentials, and only for http and https, as new URL(...).origin is for a web URL. Differences: the port has no serial groups and no runner to act on failOnSkippedFailure, so DeriveRunStatus reads results only. A --last-failed rerun’s run.carried is written by ReportFile, not by Build (see Test filters). DescribeTarget takes the engine’s IEngine.Name, which defaults to its platform; its flag capabilities are spelled in camel case (tapModifiers); stateCapability is whether the engine declares EngineCapabilities.State (see Session store). A target’s environment is always test (the report does not read the app’s resolved environment yet), the project is unknown with a zero digest (no project id or config digest, as upstream reports without a config), limits are the largest maxObservationBytes and maxInputTokens of the attempt’s agents, merged across the tests of a run (the defaults without agents), and environment.runtime reads .NET <version> where upstream’s reads node <version>.
  • .NET-only names in this part: ReportEngine, ReportProject, ReportEnvironment (upstream writes these as inline object shapes), ReportRunStatus (upstream’s status string union), BuildReportOptions.TargetProvenance is upstream’s own, Git.RunAsync’s budget parameter (for tests), and DescribeTarget(platform, version, capabilities) (the session knows its engine by those three, not as an IEngine).
  • Vcs.DetectAsync and Git.RunAsync (Internal/Vcs.cs, Internal/Git.cs) are upstream’s detectVcs and git (internal/vcs.ts, internal/git.ts): git is asked with a one-second budget, and a checkout without git falls back to GITHUB_SHA and GITHUB_HEAD_REF or GITHUB_REF_NAME. Difference: a cancelled token surfaces as a cancellation, where upstream has no token.
  • Wire form (Report/ReportWire.cs, internal; upstream’s serialize* functions and the report-1 shapes of report/build.ts). Upstream types the shapes and lets JSON.stringify drop what is absent; the port builds JsonObjects, which omit what is absent the same way. Text is cut to the schema’s bounds without splitting a UTF-16 surrogate pair, and a lone surrogate reads as U+FFFD (JSON.stringify escapes it; the port’s writer refuses it). A result’s text goes through the redactors of that test’s attempts, as its trace page does. ReportError gained Category and Retryable; the stack never enters (SerializedError has none). ReportAttempt gained Id (a UUID version 7, AttemptScope.AttemptId, now minted with the dashes), StartedAt, Cleanup (always complete: the port does not tell a failed or forced cleanup from the attempt), and Skip; ReportResult gained Platform; ReportSkip and AttemptCleanup are .NET-only. The run id is a UUID version 7, one per process. A result id is the full 64-hex SHA-256 that its directory name is the head of (the port’s digest, not upstream’s). testId is file::title as AttemptReport.TestId spells it.
  • Fields the port cannot fill, and what the wire says: a judgment step that failed before it read a screen has observationRevision unrecorded (upstream requires one; the revision, b1, b2, and so on, is minted for each capture of the attempt by AttemptScope.ObserveAsync and kept as Observation.Revision) and its explanation reads empty when the judge gave none; model.endpoint is provider-default, adapterVersion the package version, policyVersion unversioned, tokenAccounting provider, peakTokensPerCall 0, and provider and model are split at the first slash of IAgentModel.Name, unknown when the name has none; cache.recordedBy is dropped when the name has no slash; cache.entry is dropped unless it is a SHA-256; a skip is always explicit (a Skip call); visionInput, visionDegraded, visionOnly, and the tool-proposal event kind have no port; an artifact is complete only for a log whose file was read, and every video and screenshot is incomplete (pixels cannot be proven free of a secret); the size and sha256 come from the file under the results directory when the report is written; serialGroups is [] and carried is absent; a target’s index is the order its first attempt reached the report. Results sort by file, declaration index, target index, then, since the port declares no index, by source line, title, and id, so the order does not depend on which attempt finished first.
  • Tests: ReportStatus/ holds report-status.test.ts: ResultTagsTests, ResultSourceTests, RunStatusDerivationTests (the three non-serial cases), and RunLimitsTests (the default-limits case), each asserting the document is valid report-1 as upstream’s build does, and ErrorStacksTests (partial: no serial member; the port’s error keeps no stack, so the test throws a real exception and checks that neither its stack nor its path reaches the document). Not ported: the three serial-group cases (“is blocked when the failing member of the last attempt carries a blockable code”, “stays failed when the failing member of the last attempt failed on the product”, “reads the last attempt, not an earlier blocked one”; the port has no serial groups), and “fills the block from the largest per-agent values” (the config rejects those keys). Vcs/DetectVcsTests has all three it of vcs.test.ts. .NET-only: ReportParts/ReportPartsTests (upstream reaches these blocks only through whole runs), ReportJson/ReportFileTests (the file as sessions write it, the artifact digest, redaction, the surrogate cut), and the helper GitRepo (upstream’s tests/helpers/git-repo.ts).
  • Tests: SchemaFixtures/ReportV1SchemaTests has every it of upstream’s describe.each(schemas) for report-v1; SchemaFixtures/SchemaFixturesTests has the first top-level it (a schema for every fixture pair); the second (it publishes every schema) is partial: it reads the project file’s packed items and the glob, not package.json, and dotnet pack was checked by hand to hold the schema and no fixture. ReportWrite/WriteJsonReportTests has both it of report-write.test.ts. .NET-only: the two-space/newline test and the ToPosixPath test.
  • Serial verdict (upstream dc8f56d, #1056: a serial attempt that was interrupted, or a retry that never reached its members, is a cutRetry and no longer supplies a result’s verdict, duration, or failure text). Ported: the schema property and fixture, SchemaFixtures/ReportV1SchemaTests.Accepts_optional_runner_cut_retry_decisions_and_rejects_other_types, Outcome.Verdict (upstream outcome().verdict, with reachedVerdict), Outcome.DurationMs read from it, and FailureText.ToldAttempt returning it. The Outcome of a result answers from its own attempts, so a failed test whose retry the run interrupted now reports the failed attempt’s duration. Not ported, since the port has no serial groups, no JUnit or Markdown reporter, and no run/retry.ts: isCutSerialRetry, SerialAttemptRecord.cutRetry, serializeSerialAttempt, the serial branch of attemptViews, and the tests report-outcome (both it), serial-record, retry (isCutSerialRetry), report-status (serializes the runner cut-retry decision), report-junit (both new it), report-markdown (the serial it.each), interrupt-signals (a serial member keeps its failed attempt time), and the sdk-types check.
  • observationTruncated (upstream 82039ad, #1301) is ReportStep.ObservationTruncated, written by ReportWire.Step when true and absent otherwise. ObservationFeed marks it for any look of the step that a capture or byte limit cut, including one a settled look took before its last, and ObservationFeed.ReportDetails() is upstream’s reportDetails. A judgment records it in Agent.LookAsync, where upstream does it in Invocation.observe. Tests: AgentObservationReport/AgentObservationReportFieldsTests ports agent-observation-report.test.ts, both partial (Partial_ prefix): the port has no fixture-engine runProject, so each test runs its own session over an engine wrapper that marks every observation truncated and validates its own report.json, where upstream runs one project of both tests and validates its report. SchemaFixtures/ReportV1SchemaTests has the boolean/string/absent it. Not ported: the sdk-types.ts check (the C# type makes it).
  • Tests that read the report: a test whose upstream it reads outcome.report gives its session a results directory (ReportDirectory, .NET-only, in ReportJson/) and reads report.json after the session is disposed, checked against the schema. They are AgentAct/ (the hand-rolled executor, the default tool loop, and the blocked verdict), EngineTargets/, CacheModelProvenance/, ScriptedActions/, TruncatedSecrets/, TransformedSecrets/, and AgentPolicy/ASecretTheObservedScreenShowsTests. What the report still lacks keeps a test partial: app.restart and app.clearState record the reopen as a step of its own; a step whose executor reports no model reads unknown where upstream names the executor. Traces/TracesTests stays partial: the lead it reads is in upstream’s summary.md, and the port has no summary reporter.

Text downloads are rescanned through the final secrecy ledger before their report records are read, including values filled after attachment. Fragment scans also recognize ASCII secrets written with JSON Unicode escapes, once or twice quoted. These safeguards extend upstream’s attachment-time scan and ASCII spelling shortcut; stream redaction keeps its existing buffering. The .NET-only regressions are DownloadRedactionSessionTests.Rescans_downloads_with_values_registered_after_attachment, Reports_a_previously_complete_download_incomplete_when_the_final_scan_fails, and Redacts_JSON_Unicode_escaped_ASCII_secrets_before_reporting_complete. The rescan changes the file after the store was handed the bytes of the first scan, so a store holds what the ledger knew at registration, as upstream’s does.

App.RestartAsync closes the tab and opens a new one in the same browser context, so cookies and storage survive. App.ClearStateAsync replaces the context with a clean one. Both then reopen the app at its base URL, as upstream, and keep a viewport set with Browser.SetViewportAsync. Without a base URL they leave a blank page.

App.ScreenshotAsync(label) is upstream’s app.screenshot (upstream #1326 and the commit that added it): a redacted evidence screenshot, saved as an attempt artifact under screenshots/ and returned as an absolute path; the report records the path relative to the artifact root. Upstream’s engine surface artifacts.screenshot(label, operation) is IEngineSession.ScreenshotArtifactAsync(label, cancellationToken) (a different name from the existing ScreenshotAsync, which returns the PNG ToHaveScreenshotAsync compares). The port redacts the label before the engine names the file (upstream passes it as given, so a secret of filename-safe characters would show in the file name: reported on #797). It returns the artifact-relative path, and the default fails with UNSUPPORTED_CAPABILITY as upstream’s guard does. WebEngine (secure fields masked in every frame, the file moved into place from a unique temporary name) and MobileEngine (secure nodes painted over, status bar left as the device shows it; an image that cannot be redacted is not written) and WinAppEngine (the window with secure fields painted over, as toHaveScreenshot takes it; .NET-only engine) implement it. DocumentEngine does not, so ScreenshotAsync there is UNSUPPORTED_CAPABILITY. Tests: FixtureRuntime/ExplicitScreenshotSecrecyTests is fixture-runtime.test.ts’s describe('explicit screenshot secrecy') (all it, with the provider set by E2EConfig.WithCredential; the captures before and after a %s secret fill one is partial, since the artifact is read from the step’s record where upstream reads the arguments of register). OpenSession/HostOpenSessionTests is open-session.test.ts’s describe('host.openSession'): its first it is partial (the app.screenshot lines, through an E2ESession); the other four need the hosted openHost and a config file. .NET-only: FixtureRuntime/WebAppScreenshotTests (the real web engine), and WindowScreenshotsTests in E2E.WinApp.Tests (the Windows engine). The mobile it “numbers screenshots per attempt, masks secure fields in them, and refuses an unmaskable one” (engine.test.ts) now runs through ScreenshotArtifactAsync, as upstream’s does. The mobile-benchmark controls.e2e.ts it “screenshot, restart, and clearState reopen the app on its home list” is WinAppBenchmark.E2ETests/Controls/ControlInventoryTests.Screenshot_restart_and_clearState_reopen_the_app_on_its_home_list (it needs an unlocked Windows desktop, so it was built but not run here).

App.OpenAsync names a navigation the network refused APP_UNREACHABLE (infrastructure), as upstream’s unreachableApp and openAt do (run/fixtures.ts): when the engine’s error message names ERR_CONNECTION_REFUSED, ECONNREFUSED, ERR_NAME_NOT_RESOLVED, ENOTFOUND, ERR_ADDRESS_UNREACHABLE, EHOSTUNREACH, ERR_CONNECTION_TIMED_OUT, or ETIMEDOUT (upstream’s NOTHING_LISTENING), the error reads nothing answered at <url> (<match>); start the app there, point the target's app.url at where it runs, or give the target an app.command so the runner starts it, with the engine’s error as InnerException. The reopen after App.RestartAsync and App.ClearStateAsync goes through the same path. Any other failed navigation stays ENGINE_FAILURE. EngineException.Mapped (internal, .NET-only) marks an error the runner already named, which ErrorSerializer.TranslateEngineError keeps as it is: upstream’s runner throws these as InfrastructureError, which its translateEngineError does not touch, where the port’s EngineException is both that class and the engine’s EngineError. A plain exception an engine throws (no E2EException) is a non-retryable ENGINE_FAILURE (navigation failed: <message>), as upstream’s engine-to-session adapter (engine/session.ts) makes it: the port’s EngineSession (Engine/EngineSession.cs, upstream’s createEngineSession) wraps each attempt’s engine session in E2ESession.StartAsync and normalizes every member’s throw with upstream’s guard labels (normalize). A cancellation passes through as a cancellation, and so does any other throw once the caller’s token is cancelled (.NET-only). The Browser fixture’s browser.* calls reach the engine’s own IBrowserSession through EngineSession.Unwrap, so they are not normalized by the adapter (the adapter cannot expose IBrowserSession without implementing it for every engine); WebSession has its own guard. The adapter also checks a press key against the key grammar before the engine sees it (Keys.RequireKey, upstream’s requireKey), as the dispatcher and the replay host already did. Upstream’s capability gate in the same seam is not moved: the port keeps it in IEngineSession.ActionKinds and PointerActionKinds (read by Screen and the dispatcher) and in the UNSUPPORTED_CAPABILITY default members. The adapter’s own class, the Unwrap helper (the Browser fixture and the web engine’s test hooks read the engine’s own type through it), and the adapter’s IEngineFixtureHost forwarding are .NET-only. DisposeAsync is not normalized (upstream’s dispose() belongs to the worker). Tests: EngineContract/RunnerEngineContractTests, the plain Error case of ‘classifies EngineErrors from fixture surfaces (app.open) with the canonical mapping, and a plain Error as ENGINE_FAILURE’ (still partial: a session stands for the run), and the .NET-only ‘A_cancellation_an_engine_throws_stays_a_cancellation_and_is_not_normalized_to_ENGINE_FAILURE’.

Differences from upstream:

  • app.open, back, forward, and reload wait for load within the action timeout. Upstream waits within the test timeout.
  • Browser.GotoAsync(url, GotoOptions?) resolves the URL against the base URL like App.OpenAsync, with the same scheme rule. GotoOptions.WaitUntil is Load (the default), DomContentLoaded, or NetworkIdle, and Timeout defaults to the action timeout. Upstream’s default is the test timeout.
  • Browser.WaitForURLAsync is ToHaveURLAsync as a wait, as upstream, so it verifies the previous act and fails with expect.toHaveURL failed. It takes a string, resolved against the base URL, or a Regex, and polls until the assertion timeout or the given timeout. ToHaveURLAsync takes a string or a Regex instead of upstream’s string | RegExp. A string is compared after both sides go through System.Uri (not WHATWG), which agrees with Chromium on the default port, the trailing slash, dot segments, and percent-encoding. A Regex is tested against the URL as Chromium serializes it.
  • Browser.WaitForResponseAsync takes upstream’s glob string or a .NET Regex (upstream an ECMAScript RegExp), and the timeout as a TimeSpan?. As upstream, the timeout bounds the match only; WebResponse.BodyAsync (upstream’s body(), a copy of the bytes on every call), TextAsync, and JsonAsync<T> wait for the body up to the action timeout, which is fixed for the session (upstream reads the budget when the body is read). A failed match is OPERATION_TIMEOUT with the port’s message form (waitForResponse: <Playwright message>).
  • Browser.EvaluateAsync<T> takes the script as a string (an expression, or a function source that is called with the optional argument) and deserializes the JSON result to T. A throwing script fails with EVALUATE_FAILED and the message it threw, a result that is not plain JSON (such as Infinity, a Date, or a class instance like a DOMRect or an element; return rect.toJSON() instead) with INVALID_ARGUMENT, and nothing returned as null. As upstream (tester-army/e2e#1553, 9267248), the page-side boundary encodes the result itself and Playwright takes it back as a string from a handle, so a page that deleted Array or JSON, or replaced Map or Object after the call began, still returns its result. A page that replaced a built-in the engine’s in-page code needs, such as Map, fails a later evaluate and a locator read with EVALUATE_FAILED, not ENGINE_FAILURE, when Playwright’s utility world still reads the document (WebErrors.PageScriptFailureAsync, upstream’s pageScriptFailure; the port probes the top frame and runs it for evaluate and LocateAsync). Not ported: upstream’s __name keep-names helper, which the TypeScript loader needs and the port does not, and a browser that closes under it with ENGINE_FAILURE.
  • Browser.RouteAsync takes the same glob string or Regex as WaitForResponseAsync, and a handler that returns a Task. WebRoute has Request, FetchAsync (WebResponse: Url, Status, Headers, BodyAsync, TextAsync, JsonAsync; takes no options, adds the configured site headers, runs under the action timeout, never follows a redirect, and does not decide the route; a body the browser could not read fails BodyAsync, TextAsync, and JsonAsync with ACTION_FAILED naming route.fetch), FulfillAsync (RouteFulfillResponse: Status, Headers, ContentType, Json, Body, BodyBytes, Path), ContinueAsync (RouteContinueOverrides: Url, Method, Headers, DropHeaders, PostData), FallbackAsync, and AbortAsync, with upstream’s checks, codes, and messages. UnrouteAsync removes the routes added with an equal glob, or a Regex with the same source and options. UnrouteAllAsync removes every route added through the browser and keeps the configured site headers. Path resolves against the project root (E2ESessionOptions.ProjectRoot, which E2ETest sets to the config’s directory, else the working directory). Binary bodies, header deletes, and several set-cookie (tester-army/e2e#1548 40826e4): a fulfill body of bytes is RouteFulfillResponse.BodyBytes and is sent unchanged, a request header dropped by ContinueAsync is named in RouteContinueOverrides.DropHeaders (also on a redirect), and a set-cookie header of RouteFulfillResponse.Headers may join several cookies with \n, each line checked as its own value, so route.fetch() headers pass straight back; any other line break is INVALID_ARGUMENT. BodyBytes and DropHeaders are .NET-only names: upstream’s body is a string or a Buffer/Uint8Array and its headers take undefined, which C# has no union for, and a string? header value would warn every caller that passes a Dictionary<string, string>. Giving Body and BodyBytes together is INVALID_ARGUMENT (.NET-only). BrowserResponse.BodyBytes is the engine-facing twin. Tests: Routes/BrowserRouteDecisionsTests adds the it of routes.test.ts for the bytes, the header drop, the set-cookie join, and the new refusals (the undefined fulfill header and the number body are left out, as the C# types refuse them), and RouteOptions/RouteDecisionHeadersTests is route-options.test.ts. Differences: options are typed, so an unknown key, a non-string header value, and an abort error code do not compile instead of failing with INVALID_ARGUMENT; Json is serialized with System.Text.Json web defaults, and null means no JSON body; a handler error raised after the test’s last browser call is collected by E2ESession.SettleAttemptAsync (as upstream’s settleAttempt) and fails the attempt at its end, as for a dialog handler (see the OnDialogAsync entry): the settle waits within the cleanup timeout for a handler still running, and one that outlives it fails the attempt with CLEANUP_TIMEOUT naming it, after which what it throws is dropped.
  • Browser.AddInitScriptAsync takes source or a WebInitScript, and a JSON argument only with WebInitScript.FromFunction, the function’s JavaScript source.
  • Each async Browser call is a harness step of kind resource, as upstream’s FixtureRecorder records it, with the api name browser.goto, reload, back, forward, url, title, waitForURL, evaluate, addInitScript, route, unroute, unrouteAll, waitForResponse, cookies, setCookies, clearCookies, setViewport, emulateMedia, onDialog, waitForDownload, waitForDownloads, and keyboard.* and mouse.*, and upstream’s labels (a URL or pattern, the key, <n> chars for typed text, the init script’s path or kind, the media features). browser.waitForURL verifies, and expect(browser) matchers are assertion steps nested in it. A pattern label (upstream’s patternLabel) writes a glob string quoted, as JSON.stringify does, and a regex as /source/flags, since .NET has no String(RegExp). Browser.Locator and FrameLocator are not async and record nothing, as upstream. Argument checks the type system makes upstream’s (a predicate pattern, an unknown option key) do not exist, so upstream’s fails with INVALID_ARGUMENT at %s and an option waitForURL does not take is refused tests have no port. The port does not wrap each call in the action timeout, as FixtureRecorder.run does: a call keeps the bound it had. Browser.ClearCookiesAsync(CookieFilter?) is upstream’s clearCookies(options): a filter field is a TextMatch (a string matches exactly, a Regex matches the text, run by Playwright as JavaScript), and Context.ClearCookiesAsync does the removal. Upstream’s refuses an unknown filter and a value that is not a string or RegExp, clearing nothing test and tests/types/clear-cookies.ts have no port: CookieFilter has no url member and the compiler refuses a field that is neither, so there is no INVALID_ARGUMENT path.
  • Navigation URLs resolve with System.Uri, not WHATWG. As upstream, only http:, https:, and the exact about:blank are admitted. But a tab or newline inside a URL is escaped, not stripped, so view-\tsource:file: opens as an http path under the base URL (or fails with APP_URL_REQUIRED without one) instead of POLICY_DENIED. A percent-encoded unreserved character in the path is decoded (%66ile: becomes file:). Neither opens a scheme other than http(s).

DocumentEngine supports app.back (it rebuilds the previous route), app.restart, and app.clearState (both drop the history and reopen the base URL). It has no viewport: DocumentPage.OnScroll and DocumentElement.OnScroll let a page load more rows when it is scrolled. It has no browser, so every Browser member fails with UNSUPPORTED_CAPABILITY. A custom engine opts in by implementing IBrowserSession, and by overriding the default BackAsync, RestartAsync, and ClearStateAsync on IEngineSession, which otherwise fail with UNSUPPORTED_CAPABILITY.

Upstream takes any AI SDK model instance. JSON cannot hold one, so agents.<name>.provider names the client, and code builds one with ModelProviders, Subscriptions, or a client’s options. Each client speaks its vendor’s wire protocol directly:

Upstream provider .NET
@ai-sdk/openai chat, @ai-sdk/openai-compatible, Ollama openai, openai-compatible OpenAiCompatibleModel
@ai-sdk/openai Responses, @ai-sdk/azure openai-responses, azure OpenAiResponsesModel (ModelProviders.AzureOpenAi)
@ai-sdk/anthropic anthropic AnthropicModel
@ai-sdk/google google GoogleModel
@ai-sdk/amazon-bedrock bedrock BedrockModel, signed with SigV4 or a Bedrock API key
@ai-sdk/xai xai OpenAiCompatibleModel at api.x.ai
@openrouter/ai-sdk-provider openrouter OpenAiCompatibleModel at openrouter.ai
gateway() from ai gateway OpenAiCompatibleModel at ai-gateway.vercel.sh
chatgpt() chatgpt Subscriptions.ChatGpt
copilot() copilot Subscriptions.Copilot (CopilotModel)
grok() grok Subscriptions.Grok
opencodeConsole() opencode-console Subscriptions.OpenCodeConsole (OpenCodeConsoleModel)

Keys come from the environment variable the AI SDK reads (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, AZURE_API_KEY, XAI_API_KEY, OPENROUTER_API_KEY, AI_GATEWAY_API_KEY, AWS_*), or the one apiKeyEnv names.

Subscriptions follow upstream: the same four logins (openai PKCE on port 1455 or --device, github-copilot from gh or an OAuth App’s device flow with enterprise hosts, opencode-console and spacexai device flows), the same credentials file ($XDG_CONFIG_HOME/e2e/oauth.json, mode 0600, locked and replaced atomically, unknown entries kept), E2E_OAUTH_CREDENTIALS, refresh two minutes ahead of expiry with one refresh shared per file (a cancelled call stops waiting for it, and the refresh finishes for the others), a retry after a 401, Copilot’s chat-or-Responses choice from the plan’s listing, OpenCode Console’s per-model protocol from the workspace config, and OPENCODE_API_KEY, which replaces the login for the model and for e2e models opencode-console; bare e2e models also lists OpenCode Console when only the key is set, and a missing login’s message names the key. The OpenCode Console model always asks the Anthropic route for 8192 output tokens, as upstream does when a call sets no cap. A missing or rejected login fails the step with MODEL_PROVIDER_FAILED, blocked, naming the OAuthException code (NOT_LOGGED_IN, LOGIN_REQUIRED). Tests: oauth/errors.test.ts is OauthErrors/ (DescribeResponseTests: both it of describeResponse; ReadJsonBodyTests: the it of readJsonBody, which is TokenEndpoint.ReadJsonBodyAsync) and oauth/token-endpoint.test.ts is OauthTokenEndpoint/RequestTokensTests (all 3 it).

Differences:

  • Requests are not streamed. The Codex backend only streams, so its event stream is folded back into the final response, as upstream folds it
  • The Vercel AI Gateway and OpenRouter are reached over their OpenAI-compatible chat API, so a gateway model gets no Anthropic cache breakpoints or OpenAI cache key. The gateway reads VERCEL_OIDC_TOKEN from the environment but does not run vercel env pull itself
  • Gemini tool schemas go as parametersJsonSchema, unconverted, and the judgment schema as responseJsonSchema, as the AI SDK does: @ai-sdk/google 4.0.105 (the version upstream locks) sends parametersJsonSchema: tool.inputSchema and no longer runs convertJSONSchemaToOpenAPISchema (vercel/ai #20757, “preserve JSON Schema instead of converting to OpenAPI schema”). For responseJsonSchema it only rewrites const to a one-value enum (sanitizeResponseJsonSchema); the port’s tool, explore, and judgment schemas use no const, so there is nothing to rewrite. Gemini’s docs list only some JSON Schema keywords; the port’s schemas also use unlisted ones such as maxLength, which were not verified against a live Gemini call. A Gemini 3 thought signature rides the call it signed, as ModelToolCall.ProviderMetadata["google"].thoughtSignature (the AI SDK’s providerMetadata.google.thoughtSignature), and GoogleModel sends it back with that call on the next turn; a call with none gets the documented placeholder
  • A Responses model (OpenAI, Azure, and the subscription backends) replays its reasoning on the next turn as upstream does: nothing is stored, so the request asks for reasoning.encrypted_content and sends each encrypted reasoning item back inline, ahead of the turn’s text and tool calls (all reasoning items first, not interleaved as returned). The request asks for it from every model except those named gpt-3*, gpt-4*, chatgpt-4o*, and gpt-5-chat*, as the AI SDK does. Anthropic replays its thinking blocks, signature and redacted data included, ahead of the turn’s text and tool calls, and chat completions replay reasoning_content (read from reasoning_content or reasoning) on the assistant message, as the AI SDK does. Google replays its thought parts (thought: true, with their thoughtSignature) and Bedrock its reasoningContent blocks (reasoningText with its signature, or the redacted content) the same way, ahead of the turn’s text and tool calls. A Gemini text part with a thoughtSignature and no thought: true keeps its signature and sends it back on that same text part on the next turn. A Bedrock request is signed again for every attempt (ModelHttp.SendAsync takes a sign callback), as the AI SDK signs inside each fetch, so a retry after a long wait carries a fresh x-amz-date
  • On Anthropic, the tool loop stops replaying the thinking from a message it rewrote since the last request (an executor’s PrepareMessages changed it, or the history was shrunk after a context overflow) on, as upstream does, since Anthropic binds each thinking block to the prefix before it. The loop compares each message by value with what the last request sent (MessageShape), drops the reasoning with ProviderHints.AfterEdit (upstream’s afterEdit, taking the model, since the port has no providerHints(model) factory; its SpeaksAnthropic check reads the model object where upstream’s reads a provider and model id), and notes it on the turn. The drop is permanent for the step, and reasoning produced after the rewrite stays. Only AnthropicModel and such a BedrockModel do this: a Bedrock model whose id names Anthropic behind an optional region prefix (eu.anthropic.claude-…) does it too, as upstream’s speaksAnthropic recognizes it (the id is read off the BedrockModel; a Bedrock application inference profile ARN is not recognized, as upstream). The port has no Vertex or OpenRouter client that replays Anthropic thinking, so a rewrite is one of three: the per-turn elision of stale screens and screenshots (TranscriptCompaction, #677), a history shrunk after a context overflow, or an executor’s PrepareMessages. Elision starts once the stale screens pass KeepStaleScreenBytes (32 KB). The port prints a full screen on every look, so the next look then elides the previous one too, where upstream’s later screens are diffs and leave the thinking after them replayed. The part of the change that keeps the system prompt fixed across a switch to auto (the instructions hold the tool-calls-only rule from the first turn) is in place; the switch itself arrives with the tool-choice retry of #1157
  • azure uses the Responses API at /openai/v1 with api-version=v1, as the AI SDK’s azure() does. Bedrock signs with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (and AWS_SESSION_TOKEN) when both are set and otherwise resolves the AWS credential chain (shared profile via AWS_PROFILE or the default profile, SSO, container and instance roles) with the AWS SDK for .NET (AWSSDK.Core), as the AI SDK’s amazon-bedrock provider does with the AWS SDK for JavaScript. Upstream has no symbol for it, since the AI SDK owns the chain, so AwsCredentialChain and BedrockModelOptions.CredentialChain (internal, a test seam) are .NET-only. A chain that finds nothing ends the step with MODEL_PROVIDER_FAILED; the chain’s own message is redacted
  • A model request the provider refuses as too large ends with CONTEXT_OVERFLOW, blocked, and names the same status and body. The port uses upstream’s patterns for the refusal (every provider’s wording, any HTTP 413, a throttling text vetoed) on the message and the body. As upstream does, agent.act then shrinks the step’s history once and sends the request again: every superseded screen is elided, and any text past 16,384 characters is cut to its head with a notice. The refused request spends no model call, and the retry runs through the turn’s preparation again, so an executor’s PrepareMessages sees the shrunk history, as upstream’s prepareMessages does. A second refusal, or a first one with nothing to shrink, ends the step and says which. The built-in agent also elides stale screens and screenshots before each turn (TranscriptCompaction), so an overflow shrink finds fewer to elide.
  • A model that refuses a request (finish reason content-filter) ends the step with MODEL_REFUSED instead of MODEL_PROVIDER_FAILED, as upstream does, and the step cache reads it as a failed flow like MODEL_OUTPUT_INVALID. The port has no AI SDK to map each provider’s stop word, so its providers do: refusal (Anthropic), content_filter (chat completions, and Responses incomplete_details), SAFETY, RECITATION, BLOCKLIST, PROHIBITED_CONTENT, SPII, and IMAGE_SAFETY (Gemini, and a prompt it blocks with no candidate, by promptFeedback.blockReason), guardrail_intervened and content_filtered (Bedrock). A refused turn that still called a tool is kept, as upstream keeps a usable answer. The message names the model without a provider, because an IAgentModel has only a name, and quotes the provider’s word redacted and cut at 128 characters
  • A model GitHub Copilot does not serve to the account (model_not_supported, a 4xx answer) ends the step with MODEL_UNAVAILABLE, blocked, naming the model and the causes (the plan, the Copilot settings, an unknown id), as upstream’s copilot() does. Upstream also marks the failure so its runner reports it once and stops the run; the port has no run-level error list and no workers, so every step that calls the model fails the same way. A model on the wrong endpoint (unsupported_api_for_model) stays a MODEL_PROVIDER_FAILED
  • A model request answered with an error status ends with MODEL_PROVIDER_FAILED and names the HTTP status and the response body, secrets redacted, cut at 1 KB. The port never parses a provider’s error body, so it quotes every one. Before it fails, the request is sent again up to 5 times (upstream’s TRANSPORT_RETRIES, ModelHttp.TransportRetries) after a network failure or a status the AI SDK treats as retryable (408, 409, 429, and every 5xx), waiting the provider’s retry-after-ms or retry-after when it is under a minute (or under the backoff) and otherwise 2 seconds doubled each time; the failure is the last attempt’s. A request that got no response in 120 seconds is not sent again, and the step’s deadline or a cancel ends the wait. The act loop sends a forced tool_choice and, when a 400 refuses it, sends the request again with auto (see the tool loop bullet)
  • Every model request sends upstream’s identity headers, replacing the same headers set on the client, but names this port so its traffic is not counted as upstream’s: User-Agent: e2e-dotnet/<version> (<platform>; <arch>) (the NuGet version; the platform and arch by Node’s names), HTTP-Referer: https://github.com/hardkoded/e2e-dotnet, and X-Title: e2e-dotnet. Model requests append runtime/dotnet/<version> after it, where upstream has the AI SDK’s user agent. Login requests send the same user agent, as upstream’s do, and still name the e2e originator and referrer that upstream registered
  • e2e login with no provider shows a numbered list instead of upstream’s picker. e2e models prints the same columns. e2e login prints the sign-in URL on a line of its own, as upstream does, with plain lines where upstream uses clack log steps
  • A ModelMessage of the user role can carry Images (ModelImage: the bytes, a media type, and the size), and every provider sends them after the turn’s text: an image_url part with a data URL for chat completions, input_image for Responses, a base64 image block for Anthropic, inlineData for Google, and an image block with its format for Bedrock. The AI SDK builds these parts upstream, so the port writes each provider’s shape itself. A model that cannot read images answers with the provider’s error, which ends the step with MODEL_PROVIDER_FAILED. A judgment sends one when it asks for vision (see Agents); vision on act is not ported. Pixels.SizeForModel (internal) caps a screenshot’s long side at 768 pixels with upstream’s box filter and keeps the scale (image pixels per CSS pixel) in step
  • EngineScreenshot.MaskedRegionCount counts the regions the engine covered, which upstream carries as maskedRegionCount on observed pixels: the web engine counts the secure fields of every frame, and the mobile engine the secure nodes it painted. It is null for an engine that cannot say. A secret fill no longer withholds pixels from a model (upstream #1437 dropped the exposure levels with the pixel taint); the screenshot masks secure fields only.
  • e2e init writes the model config as a provider and model (see Coding agents), not a constructed model

Upstream’s ModelUsage (agent/usage.ts) is ModelUsage in Agent/Usage.cs (internal), the per-step accumulator behind StepRecorder.AddModelCall (upstream’s StepAccounting.usage). Record returns the call’s tokens, which the model event carries as Count; Report fills StepModelInfo, whose TokenAccounting and PeakTokensPerCall are now real: a call with no usage, or without both token counts, makes the step adapter-upper-bound, a negative or oversize count is dropped, a sum past 2^53-1 (ModelUsage.MaxSafeInteger) is capped and also marks the step adapter-upper-bound, and a cost that is negative, not finite, or whose total overflows is omitted (an overflowed total stays omitted). BuildReport.ComputeUsage caps modelTokens and modelCachedTokens the same way. ModelUsage.Usage is upstream’s non-exported Usage interface; TokenFields is upstream’s tokenFields. Differences: model-usage.test.ts is ModelUsage/ModelUsageAccountingTests and ModelUsage/ReportedModelUsageTests. The third accounting it is partial (a C# token count is a long?, so Infinity cannot be sent). Both integration it are partial: the port has no runExisting harness or report schema check, the cost is ModelCallUsage.EstimatedCostUsd where upstream reads the AI Gateway metadata, the first test sets the step tokens to the maximum directly (a ModelCallUsage count is an int), and the second sends -1 only (not 0.5 or NaN). The agent’s session totals (E2ESession.InputTokens) stay int.