Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

test(task-bridge): unit tests for _shouldFallthrough guard - #94

Open
jgluck96 wants to merge 1 commit into
josh/phase-5.1-task-bridge-hardeningfrom
test/task-bridge-shouldfallthrough
Open

jgluck96 wants to merge 1 commit into
josh/phase-5.1-task-bridge-hardeningfrom
test/task-bridge-shouldfallthrough

Conversation

@jgluck96

@jgluck96 jgluck96 commented Jun 3, 2026

Copy link
Copy Markdown

Summary

Dependencies

Test plan

  • npm test — all 6 new cases pass

🤖 Generated with Claude Code

Fills the gap noted in the phase-5.1 review: _shouldFallthrough was
exported for unit testing but had no test file. Covers the allowlisted
prefixes (task-, voice-, proactive-) and the per-channel pull-namespace
filename shape that must be blocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@bassilkhilo-ag2 bassilkhilo-ag2 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tests look good for the current implementation, but the allowlist in PR #70 needs to be extended before these tests are complete.

PR #70's _shouldFallthrough is missing 4 prefixes that the voice path relies on: question-, briefing-, insight-, friction- (see my change-request review on #70). Once Josh adds those to the allowlist, this test file will need matching test cases:

it('allows question- prefix', () => {
    assert.equal(_shouldFallthrough('question-1748800000000.txt'), true);
});
it('allows briefing- prefix', () => {
    assert.equal(_shouldFallthrough('briefing-1748800000000.txt'), true);
});
it('allows insight- prefix', () => {
    assert.equal(_shouldFallthrough('insight-1748800000000.txt'), true);
});
it('allows friction- prefix', () => {
    assert.equal(_shouldFallthrough('friction-1748800000000.txt'), true);
});

Please update alongside the PR #70 fix so both land together.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants