Skip to content

fix(bridge): native login guard scan uses the per-step budget - #121

Merged
1bobby-git merged 1 commit into
mainfrom
fix/native-policy-guard-budget
Nov 19, 2026
Merged

1bobby-git merged 1 commit into
mainfrom
fix/native-policy-guard-budget

Conversation

@1bobby-git

@1bobby-git 1bobby-git commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Requested by 바비 · project thread

Why

1.8.76 could not be released at first: main's Validate failed three times with ui_timeout in the 20,000-element "large dashboard OFF -> ON" scenario, so Release was skipped and Home Assistant's add-on build got 404 on the release archive. #120 then gave that scenario the 5 s step budget and 1.8.76 was released (installed and running on HA since 2026-11-19 12:58 KST).

The scenario's first probe is still the guard scan with a fixed 1.5 s bound, which ignores the step budget. Measured locally: ~1.3 s per scan of the 20,000-element page at normal speed, ~3.0 s at 2x CPU throttling. So the same timeout can return on slow runners or slow hosts (the HA host is an Intel N100).

Change

bridge/src/browser/native-login-policy.ts: the guard scan uses the per-step budget (3 s default, 5 s max) like every later probe. Only the bound changes; no check, decision, or mutation path changes.

Not released by itself: no version change. It ships with the next version.

Validation (local, Windows, Edge as Chromium)

  • DOM regression: 4/4 passes at normal speed, 2/2 at 2x CPU throttling (failed at 2x before the change).
  • npm run typecheck clean, build OK. vitest: 1952 passed, 3 failed, all Windows-only and unrelated (symlink and shell update-helper tests).

🤖 Generated with Claude Code

@1bobby-git 1bobby-git self-assigned this Nov 19, 2026
The read-only guard that scans the whole document before any change had a fixed 1.5 s
bound while every later probe already used the per-step budget (3 s default, 5 s max).
A scan of a 20,000-element page takes about 1.3 s at normal speed and about 3 s with
2x CPU throttling, so on slow hosts or runners the guard alone could end a run with
ui_timeout (main's Validate failed three times this way on 2026-11-19 before #120 gave
the scenario the 5 s budget, which the guard did not use). The guard now uses the same
budget. Ships with the next version (no version change here).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1bobby-git
1bobby-git force-pushed the fix/native-policy-guard-budget branch from 38cdea0 to 745e43d Compare November 19, 2026 03:58
@1bobby-git 1bobby-git changed the title fix(bridge): native login guard uses the step budget so 1.8.76 can release fix(bridge): native login guard scan uses the per-step budget Nov 19, 2026
1bobby-git pushed a commit that referenced this pull request Nov 19, 2026
Ships #121 (the guard scan uses the per-step budget). Bumps add-on, package,
protocol, manifest, runtime and tests to 1.8.77 with CHANGELOG and release notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017YMfNUhiWuLfvJL8w9QQfu
@1bobby-git
1bobby-git merged commit 745e43d into main Nov 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant