Skip to content

πŸ›πŸ§‘β€πŸ’» - bugfix intermittent hosted Windows permission journal test exceeds Jest timeoutΒ #577

Closed

Description

@efraespada

Is there an existing issue for this?

  • I have searched the existing issues.

Which actions are affected?

Pull Request

Which platforms are affected?

Windows

Description

During v3.6.0 reconciliation (#576), the hosted Windows full-coverage job failed because one existing fixture exceeded Jest's default 5-second test timeout:

src/infrastructure/__tests__/setup_permission_operator_actions.test.ts β€” never substitutes setup authority when bot dispatch is denied.

The case took 5,206 ms in the failed attempt. The immediately preceding case took 4,226 ms. This fixture mocks GitHub requests but uses real temporary files and a durable permission-probe journal.

One rerun of only the Windows job, without code or configuration changes, passed the same case in 39 ms and completed the full suite: 10,685 passed, 34 skipped; coverage and acceptance validators passed. The promotion's Windows job had also passed before publication.

Expected: this authority-isolation regression runs predictably within a deliberate bounded test budget on hosted Windows. The timing variation needs investigation so CI does not require a manual retry. Its exact cause has not been established.

Reproducing the issue

  1. Use the hosted windows-latest runner at commit 33b128f9b86dc40e2b4e9d4d2c50f4e298c85204 (v3.6.0).
  2. Run the normal Setup Platform Smoke PR workflow with Node 24 and pnpm 10.12.4, including pnpm run test:coverage with the checked-in Jest settings.
  3. Observe the intermittent 5-second timeout in the case above. A single isolated rerun passed; reproduction is not deterministic.

Failed job: https://github.com/vypdev/copilot/actions/runs/39176556313/job/117820320996
Successful retry: https://github.com/vypdev/copilot/actions/runs/39176556313/job/117822891656

copilot Version

v3.6.0 β€” 33b128f9b86dc40e2b4e9d4d2c50f4e298c85204

Relevant Log Output

never substitutes setup authority when bot dispatch is denied (5206 ms)
Exceeded timeout of 5000 ms for a test.
Test Suites: 1 failed, 1 skipped, 671 passed, 672 of 673 total
Tests: 1 failed, 34 skipped, 10684 passed, 10719 total

Successful retry on the same commit:
never substitutes setup authority when bot dispatch is denied (39 ms)
Test Suites: 1 skipped, 672 passed, 672 of 673 total
Tests: 34 skipped, 10685 passed, 10719 total

Additional context and comments

Found during setup dogfooding and the normal v3.6.0 release (#574). The retry retained the same code, assertions, timeout budgets and required checks. Reconciliation was merged only after the complete retry, CI, Codecov and RepoWise passed. This follow-up records the intermittent test failure separately from the full setup Apply and dependency vulnerability work.

Activity

  1. added
    bugSomething isn't working
    bugfixSomething isn't working
    priority: highCritical issue, needs immediate attention.
    on Oct 18, 2026
  2. added theissue type on Oct 18, 2026
  3. moved this to Todo in vypdevon Oct 18, 2026
  4. changed the title [-]bugfix: intermittent hosted Windows permission-journal test exceeds Jest timeout[/-] [+]πŸ› - bugfix intermittent hosted Windows permission journal test exceeds Jest timeout[/+] on Oct 18, 2026
  5. vypbot commented on Oct 18, 2026

    @vypbot
    Contributor

    Hi! I’m @vypbot, the Copilot assistant for this repository.

    I can answer questions, explain the codebase, propose implementation and test plans, review issues and pull requests for potential bugs or security problems, and help authorized maintainers apply changes.

    Try /copilot help to see the available commands, or mention @vypbot with your question.

  6. moved this from Todo to In Progress in vypdevon Oct 21, 2026
  7. added
    branchedIndicates that a branch has been created for this issue.
    on Oct 21, 2026
  8. changed the title [-]πŸ› - bugfix intermittent hosted Windows permission journal test exceeds Jest timeout[/-] [+]πŸ›πŸ§‘β€πŸ’» - bugfix intermittent hosted Windows permission journal test exceeds Jest timeout[/+] on Oct 21, 2026
  9. 1 remaining item

  10. vypbot commented on Oct 21, 2026

    @vypbot
    Contributor

    Implementation plan

    Current status: Ready to start. No action is required from maintainers before implementation.

    1. Trace the slow test path
      • Measure the fixture’s filesystem, journal, and request phases on hosted Windows under coverage to locate the timing variation.
      • Compare isolated and full-suite runs, including the preceding test, without assuming a cause.
    2. Reduce avoidable fixture cost
      • Use measurements to remove redundant durable journal or temporary-file work while preserving the authority-isolation assertions and recovery behavior.
      • Keep credentials out of persisted journal data.
    3. Set a deliberate test budget
      • Give the affected parameterized test an explicit timeout based on repeated Windows full-coverage measurements.
      • Keep the timeout bounded and consistent with the existing 30-second Windows journal test.
    4. Verify Windows stability
      • Run the affected cases repeatedly and run the complete `Setup Platform Smoke` Windows coverage job with Node 24 and pnpm 10.12.4.
      • Confirm coverage and setup acceptance validators still pass.

    Acceptance: The authority-isolation cases pass in repeated hosted Windows full-coverage runs within the explicit test timeout, and the complete Windows job’s coverage and setup acceptance validators pass.

    Need something else? Mention the bot with a question or use /copilot help.

  11. vypbot commented on Oct 21, 2026

    @vypbot
    Contributor

    Issue closed β€” historical progress

    Current status: closed as completed.

    The last estimate is retained below as history. Closure does not certify a new percentage, tests, or branch alignment.

    Action required: none for this closed issue. If work continues, reopen the issue; a fresh assessment can update this same card.

    Last assessment before closure (historical)

    Progress: 65% β€” in progress

    > Current status: The change gives the permission-journal test suite a bounded 30-second Jest budget and documents the timeout mismatch, reproduction, and remaining platform verification. The supplied comparison does not show measurements tracing the timing variation, repeated hosted Windows full-coverage runs, or passing coverage and acceptance validators.

    Next: Trace the slow path with hosted Windows measurements, reduce avoidable fixture cost if supported by those measurements, and verify repeated cases plus the full Windows coverage job and validators.

  12. added a commit that references this issue on Oct 21, 2026
  13. removed
    65%Progress: 65%
    in-progressStart work on an admitted issue.
    on Oct 21, 2026
  14. moved this from In Progress to Done in vypdevon Oct 21, 2026
  15. added
    100%Progress: 100%
    and removed
    state:workingWork can proceed on the verified branch or without a branch.
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

100%Progress: 100%branchedIndicates that a branch has been created for this issue.bugSomething isn't workingbugfixSomething isn't workingpriority: highCritical issue, needs immediate attention.size: XSExtra small task with minimal effort required.

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions