Skip to content

test(windows): prove one residual cleanup window from supervisor evidence - #459

Merged
BunsDev merged 1 commit into
mainfrom
fix/residual-window-evidence
Oct 14, 2026
Merged

BunsDev merged 1 commit into
mainfrom
fix/residual-window-evidence

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 14, 2026

Copy link
Copy Markdown
Member

Closes #453

What changes

The native residual regression bounded the time after profile unregistration to 9.5–18 s to catch a window that was reopened or reset part-way through. Wall-clock time cannot do that: a restart at 8.8 s and one slow window both end near 18.8 s, and a slow windows-2025 runner failed #451 at 17.18 s and 18.80 s with nothing reset.

Supervisor (scripts/windows-job-supervisor.cs): the residual window's start is recorded when it opens, after the DeleteProfileW loop returns. A profile cleanup failure now carries OpenCoven.ProfileResidualWindow in its Data: the delete loop's duration, every window start (a reopened window would show two), the moment the window expired, and the window clock's own reading, all as Stopwatch ticks. Production deadlines are unchanged.

Native test (scripts/windows-profile-residual-native.test.ps1): the three full-window cases (persistent, unauthorized, disabled-unregistered) assert on that evidence instead of the ceiling:

  • exactly one window opened;
  • it ran to its 10 s deadline;
  • its clock agrees with its recorded start within 0.5 s, so it was never reset.

The only wall-clock bound left is the existing 30 s total budget. The timing line now prints the delete and window phases, so a slow run shows which phase was slow. A portable check round-trips the evidence through an exception graph and rejects invalid inputs.

The workflow embed is regenerated from the source with renderWindowsSupervisorSource, and docs/phase1-conformance.md carries the new pinned sizes and digests. A repin PR follows the merge, since windows-job-supervisor.cs is governed by harnessAuthority.

Verification

  • -CompileOnly and -PortableOnly pass locally (pwsh 7.6.6, macOS).
  • Deliberately broken supervisor copies fail the portable check at the right assertion: a describer that accepts no starts → "accepted invalid inputs"; a renamed key → "key changed its contract".
  • vitest run src/windows-owned-profile.test.ts src/client-v1-conformance-workflow.test.ts src/windows-supervisor-source.test.ts: 126 passed, 19 skipped.
  • Native Windows: this PR carries ci:full for the real residual job. A scratch probe branch (probe/residual-window) also runs the native test against two regressed supervisors on windows-2025: a clock reset at 5 s (lands inside the old 9.5–18 s ceiling) and a reopened second window. Run links follow in a comment.

Coven-Harness: Claude Code / claude-fable-5-1

@BunsDev BunsDev added the ci:full Run the macOS and Windows CI jobs on this pull request label Oct 14, 2026
…ence

The native residual regression bounded the time after profile
unregistration to 9.5-18 s, to catch a window that was reopened or reset
part-way through. Wall-clock time cannot do that: a restart at 8.8 s and
one slow window both end near 18.8 s, and a slow windows-2025 runner
failed #451 at 17.18 s and 18.80 s with nothing reset (#453).

The supervisor now records the residual window's start, every start if
it were ever reopened, the delete loop's duration, the moment the window
expired and the window clock's own reading, and attaches them to the
profile cleanup failure as `OpenCoven.ProfileResidualWindow`. The three
full-window cases assert on that evidence: exactly one window opened, it
ran to its 10 s deadline, and its clock agrees with its recorded start.
The only wall-clock bound left is the existing 30 s total budget. The
timing line now also prints the delete and window phases, so a slow run
shows which phase was slow.

A portable check round-trips the evidence through an exception graph and
rejects invalid inputs. Deliberately broken supervisor copies (a
describer that accepts no starts, a renamed key) fail that check.

The workflow embed is regenerated from the source and the docs carry the
new pinned sizes and digests.

Closes #453

Coven-Harness: Claude Code / claude-fable-5-1
@BunsDev
BunsDev force-pushed the fix/residual-window-evidence branch from e8838af to 01332b0 Compare October 14, 2026 19:43
@BunsDev

BunsDev commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

Native Windows evidence

Probe run 38625228667 on probe/residual-window (this branch plus a scratch workflow and scripts/probe-residual-window-mutate.py, neither for merge). One fresh windows-2025 runner per case, the native test invoked from a pwsh step as ci.yml does.

Case Supervisor Timing line (persistent) Result
real unchanged delete=1.23s;window=10.07s;windows=1;after-unregistration=10.75s (earlier run) all 18 cases pass
restart window clock reset once at 5 s total=16.75s;delete=1.63s;window=10.06s;windows=1;after-unregistration=16.10s caught: "window clock disagrees with its recorded start"
reopen a second window opened after the first expired total=24.15s;delete=3.97s;window=10.05s;windows=2;after-unregistration=21.73s caught: "opened its window more than once"

The restart case is the one the issue describes: 16.1 s after unregistration sits inside the old 9.5–18 s ceiling, so the previous test would have passed it. The reopen case ends at 24 s total, inside the 30 s budget, and is caught by the window count rather than by time.

Across the three probe runs the real supervisor measured delete 1.2–1.5 s and window 10.07–10.08 s for all three full-window cases (unauthorized and disabled-unregistered totals 11.6 s). One regressed run showed delete=7.73s on a slow runner, which is the delete-loop variance that pushed #451 to 17–19 s; the timing line now separates it from the window.

The PR's own ci:full run also passed Windows profile residual cleanup and Windows supervisor behavior.

Coven-Harness: Claude Code / claude-fable-5-1

@BunsDev
BunsDev merged commit b293d5f into main Oct 14, 2026
11 checks passed
BunsDev added a commit that referenced this pull request Oct 14, 2026
Repin the harness authority to #459's merge commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the macOS and Windows CI jobs on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows residual timing ceiling (18 s) is exceeded by slow runners and cannot detect a mid-window restart

1 participant