Skip to content

fix(bg-notifier-test): platform-independent path assertions#4450

Merged
AceHack merged 1 commit into
mainfrom
fix/b0501-test-windows-path-portability-2026-05-20
May 20, 2026
Merged

fix(bg-notifier-test): platform-independent path assertions#4450
AceHack merged 1 commit into
mainfrom
fix/b0501-test-windows-path-portability-2026-05-20

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 20, 2026

Summary

Follow-up to #4449 — addresses the lingering Copilot P1 review finding on `tools/bg/backlog-ready-notifier.test.ts` that landed after merge: the test hard-coded forward-slash paths in `defaultHistoryFile` assertions, which would fail on Windows where `path.join` returns backslashes.

No Windows workflow exists today, so this is a portability hardening rather than a CI fix.

Test plan

  • Computed expected values with `path.join` (matches the implementation)
  • 49/49 tests still pass on Linux
  • `tsc --noEmit -p tsconfig.json` clean
  • B-0501 claim already released before this PR

🤖 Generated with Claude Code

PR #4449 review finding (Copilot P1, post-merge): the test
"defaultHistoryFile honors ZETA_BUS_DIR" hard-coded
"/var/zeta-test/assignment-history.json" but defaultHistoryFile uses
path.join, which returns OS-native separators (backslashes on Windows).
The assertion would fail on a Windows CI leg even though no Windows
workflow exists today. Computed expected values with path.join() for
portability.

49/49 tests still pass; tsc clean.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 20, 2026 20:15
@AceHack AceHack enabled auto-merge (squash) May 20, 2026 20:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens backlog-ready-notifier’s assignment-history tests by making defaultHistoryFile path assertions platform-independent (matching the production implementation’s path.join behavior), avoiding Windows-specific separator failures.

Changes:

  • Updated the defaultHistoryFile test to compute expected paths with node:path.join.
  • Added a brief comment explaining why the assertion must not hard-code / separators.

@AceHack AceHack merged commit 0f7e340 into main May 20, 2026
34 checks passed
@AceHack AceHack deleted the fix/b0501-test-windows-path-portability-2026-05-20 branch May 20, 2026 20:17
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.

2 participants