Skip to content

fix(smoke): stabilise mcp-permissions-tool-grid screenshot capture#1474

Merged
Aaronontheweb merged 5 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-flaky-session-mcp-tests
Jun 24, 2026
Merged

fix(smoke): stabilise mcp-permissions-tool-grid screenshot capture#1474
Aaronontheweb merged 5 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-flaky-session-mcp-tests

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

  • Increases the pre-Enter settle guard in the mcp-permissions screenshot tape from 1s → 2s, reducing the window where an in-flight daemon tool-reindex can cause Enter to land mid-transition
  • Adds a 500ms post-Wait+Screen settle before the Screenshot call, absorbing the Spectre Console full-refresh repaint that can race with VHS's frame capture after the anchors fire
  • Raises SHOT_BLANK_RETRIES default from 3 → 5 as defense-in-depth so the existing AE-based retry logic has more headroom under CI load

Root cause (from #1471)

Wait+Screen /record-tasks/ and Wait+Screen /Server default:/ both fire correctly (VHS exits 0), but VHS's Screenshot races with a Spectre Console full-refresh triggered by a daemon event (tool re-index / reconnect notification) arriving immediately after navigation. The repaint clears the screen and redraws — VHS captures the intermediate state, which is the server-selection screen rather than the tool grid. The AE-based retry detects this correctly but 3 retries were exhausted before a clean capture landed.

Test plan

  • Verify ./scripts/smoke/run-smoke.sh light passes locally (mcp-permissions tape)
  • Confirm CI Screenshot Regression (Linux) job passes on this PR
  • Confirm mcp-permissions-tool-grid frame reports PASS at AE=0

Closes #1471

Two changes to address flaky mcp-permissions-tool-grid captures (see netclaw-dev#1471):

1. Tape: increase pre-Enter settle guard from 1s → 2s and add a 500ms
   post-Wait+Screen settle before Screenshot. The Wait+Screen anchors fire
   on first match but VHS can race with a Spectre Console full-refresh
   repaint triggered by a daemon event (tool re-index, reconnect) arriving
   immediately after navigation. The 500ms absorbs that repaint window.

2. Harness: raise SHOT_BLANK_RETRIES default from 3 → 5. The retry logic
   correctly detects the transient capture via AE comparison; 3 attempts
   weren't enough headroom under CI load for this frame.

Fixes netclaw-dev#1471
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 24, 2026 03:22
@Aaronontheweb Aaronontheweb added the tests All issues related to testing, quality assurance, and smoke testing. label Jun 24, 2026
@Aaronontheweb Aaronontheweb merged commit af09a1d into netclaw-dev:dev Jun 24, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests All issues related to testing, quality assurance, and smoke testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky screenshot regression: mcp-permissions-tool-grid captured before the server→tool-grid transition paints

1 participant