test(server): input-authority-during-skip-check proves absences with a fixed 80 ms tick, which a late leak would pass
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
Research direction
Start with packages/server/tests/input-authority-during-skip-check.test.js and find each absence assertion that follows the fixed tick() (80 ms), such as the empty-slice and unchanged callCount checks. Then look at where _handleMessage finishes handling a frame in the server source, to decide whether a handled-message counter or hook can be awaited instead. Done means every absence check waits on that completion signal rather than wall time, and a mutant that delays the leak past 80 ms makes the relevant case fail.
Written by the indexing model from the issue text.
Description
Context
Found while fixing #9339.
Description
packages/server/tests/input-authority-during-skip-check.test.js proves several things did NOT happen by waiting a fixed tick() (80 ms) and then asserting an empty slice or an unchanged callCount:
- a stripped bound client receives nothing while gated;
- non-auth frames from a stripped client are refused;
- input to a session outside the client's scope is not dispatched.
A fixed wait is the false-green direction for an absence assertion. If a regression leaked a frame or dispatched input after the tick, which is more likely under load since _handleMessage is async, the test would still pass. The risk in practice is low: the broadcast-drop paths are synchronous. But this is a security-relevant file (input authority while stripped or gated), and these assertions are its point.
There is no shared quiescence helper in packages/server/tests. A sentinel round-trip does not fit the stripped-client cases, because a stripped client is deliberately sent nothing, so there is no reply to wait on.
Acceptance Criteria
- Each absence assertion in the file is bounded by something that proves the server finished handling the frame in question, not by wall time. For example, a server-side handled-message hook or counter the test can await, or a sentinel round-trip where a reply exists, such as an
input_ackfor the re-authed client. - A mutant that delays the leak or dispatch past the old 80 ms tick turns the relevant case red.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 1
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 333
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from blamechris/chroxy
-
from-review tech-debt testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
blamechris/chroxy#9520 ·
Maintainers usually reply within 1 day
-
priority: low server
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
blamechris/chroxy#9340 ·
Maintainers usually reply within 1 day
-
documentation from-review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
blamechris/chroxy#9237 ·
Maintainers usually reply within 1 day
-
agent-control client: notify() docstring should say the outbound gate applies only in principal modeOpenenhancement from-review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
blamechris/chroxy#9227 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blamechris/chroxy#9108 ·
Maintainers usually reply within 1 day
All issues in blamechris/chroxy
Similar issues
-
Documentation pleaseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
Java Edition Tests
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JSPrismarine/JSPrismarine#4178 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Trac-Systems/main_settlement_bus#1278 ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apidly-ltd/apidly-mcp#5 ·