fix(bg-notifier-test): platform-independent path assertions#4450
Merged
Conversation
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>
There was a problem hiding this comment.
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
defaultHistoryFiletest to compute expected paths withnode:path.join. - Added a brief comment explaining why the assertion must not hard-code
/separators.
This was referenced May 20, 2026
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
🤖 Generated with Claude Code