Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
/live accepts a report from a signed-in, unbanned user for a line that exists, acks only the reporter, and sends owners and moderators the reports list #341
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
/live now accepts {"type":"report","id":N} from a signed-in, unbanned user. It stores the report through src/reports.ts and sends owners and moderators the reports list. The suite passes except one test that also fails on main: "serves the model, its meshes and the vendored libraries…".
shipped merged
/live now accepts {"type":"report","id":N} from a signed-in, unbanned user. It stores the report through src/reports.ts and sends owners and moderators the reports list. The suite passes except one test that also fails on main: "serves the model, its meshes and the vendored libraries…". I didn't investigate it; I think this sandbox lacks the model files, but I haven't confirmed that. I didn't see the tsc --noEmit result: the run printed "bun is unable to write files to tempdir" and nothing else, so the type check is unconfirmed, and I only checked the pushed branch for the push, not for the forge's check.
- Report vs. timings: a
reportframe with anidkey is a chat report, and one without is the page's timings. Timings behave as before; a test confirms a bad timings frame is still refused. - Refusals: a guest gets "join to take part", a banned user gets the ban error, and a missing line gets "no such line to report". A system line also counts as missing, as does a non-integer or string id.
- Ack and repeats: only the reporter gets
{"type":"reported","id"}, including for a repeat. A repeat doesn't re-send the list. - Reports list: a
reportsmessage goes to the verified owner and moderators on join, whenever a new report is filed, and when moderators change. Nobody else gets it. It reuses the same check as the muted list. - Storage:
bench/fake-serve.tspassesreportsFile(reports.jsonunderFORGE_APP_DATA) to the lobby. I made theReportsfile argument optional so a lobby withoutreportsFilekeeps reports in memory, as the other lobby stores do. - Tests and docs: two new tests in
src/lobby.test.tscover each case above. The/liveprotocol header inlobby.tsdocumentsreport,reportedandreports. They check the stored reports throughlobby.lineReports, not the file on disk, whichsrc/reports.tsalready covers.
🤖 Generated with Claude Code
Does what the issue asks: a report with an id is validated (safe integer, line exists, not a system line), needs a signed-in unbanned seat, acks only the reporter (repeats too), and pushes the list only to the owner and verified moderators, reusing the muted-list gate. Timings frames without an id are untouched. Reports.ts caps are per reporter and overall, so spam is bounded. Tests would fail without the change. Next: (1) say in the pull that the tsc result and the model-files test were unconfirmed so the forge check is the verdict; (2) wire reportsFile into whatever production entry builds the Lobby once one exists, as only bench/fake-serve.ts passes it now, and give the page a Report button with a plain-worded error for the refusals.
/livenow accepts{"type":"report","id":N}from a signed-in, unbanned user. It stores the report throughsrc/reports.tsand sends owners and moderators the reports list. The suite passes except one test that also fails onmain: "serves the model, its meshes and the vendored libraries…". I didn't investigate it; I think this sandbox lacks the model files, but I haven't confirmed that. I didn't see thetsc --noEmitresult: the run printed "bun is unable to write files to tempdir" and nothing else, so the type check is unconfirmed, and I only checked the pushed branch for the push, not for the forge's check.reportframe with anidkey is a chat report, and one without is the page's timings. Timings behave as before; a test confirms a bad timings frame is still refused.{"type":"reported","id"}, including for a repeat. A repeat doesn't re-send the list.reportsmessage goes to the verified owner and moderators on join, whenever a new report is filed, and when moderators change. Nobody else gets it. It reuses the same check as the muted list.bench/fake-serve.tspassesreportsFile(reports.jsonunderFORGE_APP_DATA) to the lobby. I made theReportsfile argument optional so a lobby withoutreportsFilekeeps reports in memory, as the other lobby stores do.src/lobby.test.tscover each case above. The/liveprotocol header inlobby.tsdocumentsreport,reportedandreports. They check the stored reports throughlobby.lineReports, not the file on disk, whichsrc/reports.tsalready covers.🤖 Generated with Claude Code
Closes #318