test(core): assert the remaining download wait budget

Merged
RU
13d ago
+7-1
  • The native download diagnostic integration assertion assumes the configured 500ms timeout is the exact wait budget. The engine correctly reports the remaining deadline after setup, so normal timing jitter makes the strict expression return no match and the trigger duration becomes NaN.
  • Keep the complete diagnostic format and ACTION_FAILED classification, capture both integer durations, require a positive wait capped by the configured 500ms, and retain the trigger's 190ms lower bound.
  • Test-only reliability correction; no runtime or public behavior changes. AI-assisted work on behalf of rudycelekli with a signed DCO commit.

Verified

Ran it locally: yes

Two actual hosted native spec failures show the old assertion rejecting the download timing: Node26 run and Node22 run. Both reach the same assertion and produce NaN while the expected failure remains ACTION_FAILED.

Rebuilt the core CLI and web engine at this signed head. The native Chromium web-platform.test.ts suite consumes the built CLI and passes all 40 cases, including the 200ms no-download trigger and schema validation of its failed report. Lint and diff checks pass. This patch does not weaken the message grammar or accept a wait beyond the requested budget. Hosted workflows remain required.