Skip to content

test: adaptive cancellation assertion races before partial transition #2104

Description

@chubes4

Problem

The full adaptive browser gate can deterministically fail the test cancellation during a partially failed action retains bounded non-replayable evidence because its fixed 250ms abort fires before any error transition is recorded.

Reproduction

npm run test:browser-accessibility-oracles

Observed repeatedly on current origin/main plus PR #2099:

✖ cancellation during a partially failed action retains bounded non-replayable evidence
AssertionError: assert(failed)
  at tests/browser-adaptive-exploration.test.ts:444

The result is already incomplete/cancelled, but result.transitions.find((transition) => transition.status === \"error\") is undefined because cancellation wins the timing race before the intercepted repeat action reaches its expected partial failure.

Expected

The test should synchronize cancellation to the intended in-flight action state instead of using a fixed wall delay, then assert bounded non-replayable evidence deterministically.

Scope

Test synchronization only unless investigation shows runtime cancellation dropped an already-observed transition. Do not weaken the production evidence contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions