Make the review anonymity test assert against a populated speaker list - #198
Conversation
`seedReviewFixture` inserted a `participant` row for the submission author but
never linked it to the submission through `participantRole`. `getSubmissionDetail`
builds `detail.speakers` from that join, so the fixture produced an empty speaker
list and the anonymity assertion
expect(JSON.stringify(detail.speakers)).not.toContain('Vitruvius')
passed against `[]` — it could not have failed regardless of what the query
returned. The test named the strongest part of the anonymity guarantee and
verified nothing about it.
Link the author's participant row to the submission as the primary speaker, then
assert the list is actually populated before asserting the redaction, and cover
the company field alongside the display name.
Recovered from the abandoned `pr107-fix-20260813` branch, whose fix to the
follow-up of #107 never opened a pull request.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
CI red here is inherited from This PR touches two files, Rebasing onto the dependency fix once it lands should clear this. |
The defect
seedReviewFixtureinserted aparticipantrow for the submission author but never linked it tothe submission through
participantRole.getSubmissionDetailbuildsdetail.speakersfrom thatjoin, so the fixture produced an empty speaker list, and this assertion in
lib/services/review.integration.test.ts:was running against
[]. It could not have failed no matter what the query returned. The testnamed the strongest part of the anonymity guarantee — that a reviewer in an anonymized round never
sees the speaker roster — and verified nothing about it.
Demonstrating it
Reverting
db/testing.tstomainwhile keeping the new assertions fails exactly where expected:The fix
Link the author's participant row to the submission as the primary speaker, assert the list is
actually populated before asserting the redaction, and cover
companyalongside the display nameso a leak through either field is caught.
Provenance
Recovered during a branch sweep from the abandoned
pr107-fix-20260813branch — a follow-up to#107 that was pushed but never opened as a pull request. Every other unmerged branch in that sweep
was verified as already landed or deliberately superseded; this was the only one carrying content
that never reached
main.Verification
bun run test:integration— 17/17 pass.bun run test— 1498 pass; the 12 failures are pre-existing onmaininopenapi/mcpfilesfrom the recent zod 4 and TypeScript 7 dependabot bumps, and are untouched by this change.
bun run typecheckfails onmaintoday in those same five unrelated files; zero errors in thetwo files this PR touches.
🤖 Generated with Claude Code