feat(meet): add mom versioning and room music#195
Conversation
|
Addressed the Greptile findings in
Validation repeated:
Web lint is still blocked locally by the incomplete dependency install ( |
|
@greptile Please provide a complete summary of the full updated latest PR, along with a confidence score out of 5. Additionally, list any issues or bugs, noting their severity and whether they are fixed or pending, in a tabular format.y are fixed or pending, in a tabular format. |
PR #195 — Full Updated Summaryfeat(meet): add mom versioning and room music What this PR does1. MoM (Minutes of Meeting) Versioning 2. Room Music System
Confidence Score: 3.5 / 5The security posture is solid and all three previously flagged P1 race conditions are correctly addressed. Score is held back by a likely functional break in Piped music search and a multi-instance gap in the MoM rate limiter. Issues & Bugs
The most actionable pending item is issue #4: fixing Tip: You can customize Greptile's behavior for this repo with |
|
Follow-up fixes pushed in
Remaining known limitation: MoM rate limiting is still in-memory/process-local. I did not add a new distributed limiter here because the web app does not already have a shared limiter for this route, and adding a production binding would be a separate infra change. |
|
@greptile Please provide a complete summary of the full updated latest PR, along with a confidence score out of 5. Additionally, list any issues or bugs, noting their severity and whether they are fixed or pending, in a tabular format.y are fixed or pending, in a tabular format. |
PR #195 —
|
| File | Role |
|---|---|
apps/web/src/app/api/conclave/mom/finalize/route.ts |
New — MoM GitHub commit route |
packages/sfu/server/socket/handlers/adminHandlers.ts |
MoM token issuance, music permission controls |
packages/sfu/server/socket/handlers/chatHandlers.ts |
/play resolution, slow-mode guard, stale-request rejection |
packages/sfu/config/classes/Room.ts |
Music state, track, revision, request timing |
Confidence Score: 4 / 5
The music-side race conditions (slow mode bypass, stale-request restart) were caught and resolved. One security issue on the MoM finalize path remains open.
Issues & Bugs
| # | Issue | File | Severity | Status |
|---|---|---|---|---|
| 1 | Stale Host Token Keeps Write Access — A 12-hour SFU join token can be replayed after the host leaves or loses privileges. The finalize route never verifies current room membership or role. | finalize/route.ts:99–104 |
P1 — Security | ✅ Resolved (thread closed) |
| 2 | Concurrent /play Requests Bypass Slow Mode — Two requests from the same attendee can both pass the slow-mode check before either lookup finishes, causing the second to silently replace the first. |
chatHandlers.ts:1056–1064 |
P1 — Logic | ✅ Resolved (thread closed) |
| 3 | Pending /play Request Reverses Host Stop — A /play request in-flight during a host stop action passes post-lookup permission checks (stopping doesn't revoke permission level), so music restarts after the explicit stop. |
chatHandlers.ts:1056–1064 |
P1 — Logic | ✅ Resolved (thread closed) |
| 4 | Revoked Host Token Remains Valid (60s window) — The finalize token issued by the SFU has a 60-second TTL. If a host loses authority within that window, the route still accepts the token and performs the GitHub write because it never re-checks current room authority at request time. | finalize/route.ts:107–111 |
P1 — Security | ❌ Pending (thread open) |
Issue #4 is the blocking item before merge. The fix is to make an SFU room-state call (or consult an in-memory room registry accessible to the web server) to verify the submitting user still holds host/admin authority at the time the finalize request arrives, rather than relying solely on the short-lived JWT claim.
PR Summary —
|
| File | Role |
|---|---|
apps/web/src/app/api/conclave/mom/finalize/route.ts |
MoM GitHub write route |
packages/sfu/server/socket/handlers/adminHandlers.ts |
Host music controls + MoM token issuance |
packages/sfu/server/socket/handlers/chatHandlers.ts |
/play resolution with slow-mode and stale-request guards |
packages/sfu/config/classes/Room.ts |
Music state, permissions, revision tracking |
Confidence Score: 4 / 5
The music system race guards and stale-request logic are well-handled after the follow-up fixes. The one blocking security issue on the MoM finalize route remains open and must be addressed before merge.
Issues / Bugs
| # | Issue | Severity | Location | Status |
|---|---|---|---|---|
| 1 | Stale Host Token Keeps Write Access — The initial version of the finalize route trusted a 12-hour join token without checking live room membership. A removed host could replay the token and write MoM to GitHub. | P1 — High | finalize/route.ts:99-104 |
✅ Resolved (commit 8a2abca) |
| 2 | Concurrent /play Requests Bypass Slow Mode — Two requests from the same attendee could both pass the slow-mode check before either lookup finished, letting both succeed back-to-back. |
P1 — High | chatHandlers.ts:1056-1064 |
✅ Resolved (commit 8a2abca) |
| 3 | Pending /play Reverses Host Music Stop — An in-flight /play resolver result could reinstall a track after the host had already stopped music, because stopping didn't cancel pending requests. |
P1 — High | chatHandlers.ts:1056-1064 |
✅ Resolved (commit 8a2abca) |
| 4 | Revoked Host Token Remains Valid — The finalize route validates roomId, purpose, and session email from the JWT but never queries the SFU for current room authority. A host who loses privileges can still use a token issued before revocation (up to 60s TTL) to write meeting minutes to GitHub. |
P1 — High | finalize/route.ts:107-111 |
❌ Pending (open inline thread) |
Issue 4 is the only blocker. The fix requires the finalize route to make a live authority check against the SFU (e.g., an internal /room/:id/is-host?email= endpoint, or embedding a short-TTL one-use nonce in the token that the SFU marks as consumed on issue).
|
Addressed the remaining P1 in
Validation repeated:
Web lint remains blocked locally by the incomplete dependency install ( |
|
@greptile Please provide a complete summary of the full updated latest PR, along with a confidence score out of 5. Additionally, list any issues or bugs, noting their severity and whether they are fixed or pending, in a tabular format.y are fixed or pending, in a tabular format. |
PR #195 — Complete Updated Summaryfeat(meet): add mom versioning and room music What This PR Does1. MoM (Minutes of Meeting) Versioning
2. Room Music System
Confidence Score: 4.5 / 5All four P1 issues have been addressed in code. The one remaining inline thread ( Issues & Bugs
Only two items remain open: the formally-unresolved inline thread for issue #5 (the code fix is in place — the live SFU check rejects former hosts — the thread just needs to be marked resolved) and the known in-memory rate limiter gap (#7, acknowledged out of scope). Neither is a functional regression. The PR is effectively merge-ready pending thread resolution. |
|
@greptile Please provide a complete summary of the full updated latest PR, along with a confidence score out of 5. Additionally, list any issues or bugs, noting their severity and whether they are fixed or pending, in a tabular format.y are fixed or pending, in a tabular format. |
PR #195 Summary —
|
| File | Role |
|---|---|
apps/web/src/app/api/conclave/mom/finalize/route.ts |
New — GitHub versioning endpoint with auth, rate-limiting, nonce consumption |
packages/sfu/config/classes/Room.ts |
Music state + MoM authority checks (hasActiveHostEmail, hostUserKey gating) |
packages/sfu/server/socket/handlers/adminHandlers.ts |
Room music controls, MoM finalization token minting |
packages/sfu/server/socket/handlers/chatHandlers.ts |
/play resolution with slow-mode, permission, and revision checks |
Issues & Bugs
| # | Issue | Severity | File | Status |
|---|---|---|---|---|
| 1 | Stale Host Token Keeps Write Access — A 12-hour join token could be replayed by a departed or demoted host; current room membership was never re-checked. | P1 — Security | mom/finalize/route.ts:99-104 |
✅ Resolved |
| 2 | Concurrent Requests Bypass Slow Mode — Two simultaneous /play requests from the same user could both pass the 30-second slow-mode check before either async lookup completed. |
P1 — Logic / Abuse | chatHandlers.ts:1056-1064 |
✅ Resolved |
| 3 | Pending /play Reverses Music Stop — An in-flight /play awaiting resolver completion would re-install a track after the host had already stopped music, silently overriding the host action. |
P1 — Logic | chatHandlers.ts:1056-1064 |
✅ Resolved |
| 4 | Revoked Host Token Remains Valid — Within the ~60-second nonce window, a host who lost host status could still consume the nonce and write MoM to GitHub, because current room authority was not rechecked at consumption time. | P1 — Security | mom/finalize/route.ts:107-111 |
✅ Resolved |
| 5 | Transferred Host Retains Write Authority — After an explicit host transfer, the former host's client remained Admin, so hasActiveHostEmail() accepted their email and they could still mint and consume a finalization nonce. Verified by T-Rex harness. |
P1 — Security | Room.ts:1004 |
✅ Resolved (commit bab13864) |
| 6 | Promoted Host Fails Authority Check — When the original host disconnects and a participant is auto-promoted, hostUserKey is not updated to the new host's email. The promoted host is then rejected by hasActiveHostEmail() and cannot obtain a MoM finalization token. Verified by T-Rex harness. |
P1 — Functional Blocker | Room.ts:1000-1001 |
❌ Pending — Not Fixed |
Merge Readiness
The single remaining open issue (#6) is a functional blocker: in any meeting where the original host disconnects (a common scenario), the auto-promoted host will be unable to finalize meeting minutes at all. The disconnect-promotion path in Room.ts needs to call this.hostUserKey = <promoted client's email> (or equivalent) when it broadcasts the hostChanged event. All other P1 issues have been addressed.
|
Fixed the auto-promotion blocker in
Validation repeated:
|
|
@greptile Please provide a complete summary of the full updated latest PR, along with a confidence score out of 5. Additionally, list any issues or bugs, noting their severity and whether they are fixed or pending, in a tabular format.y are fixed or pending, in a tabular format. |
PR #195 — Complete Final Summary
What This PR Does1. MoM (Minutes of Meeting) Versioning
2. Room Music System
Confidence Score: 5 / 5All six P1 issues identified during review have been fixed in code, and all inline review threads are marked resolved. The two remaining open items (process-local rate limiter, unverified web lint) are P3 quality/infra concerns acknowledged by the author as out of scope for this PR. No blocking issues remain. Issues & Bugs
All P1s are resolved. The two open items are P3 and non-blocking for merge. |
Summary
off,hosts, andeveryonepermissions plus/playchat command supportMUSIC_PIPED_API_BASEand requiring host-only allowlisted HTTPS direct URLs viaMUSIC_DIRECT_URL_HOSTSSecurity / behavior notes
/playrequests re-check permissions before broadcasting, and/playin DMs stays private instead of starting room-wide musicConfiguration
MOM_GITHUB_TOKEN,MOM_GITHUB_REPOSITORYare required for MoM versioningMOM_GITHUB_BRANCH,MOM_GITHUB_BASE_PATHMUSIC_PIPED_API_BASE,MUSIC_DIRECT_URL_HOSTSValidation
git diff --checkeslinton changed meeting-core and SFU source filespnpm installis still blocked by registry timeout while fetchingdashjs,next, and@next/swc-win32-x64-msvcspent a lot of water and tokens to review your slop
Greptile Summary
This PR adds versioned meeting minutes and shared room music. The main changes are:
/playsearch, direct-URL restrictions, and slow mode.Confidence Score: 5/5
This looks safe to merge.
Current host authority is checked when MoM authorization is created and consumed. Host ownership is synchronized during transfer and automatic promotion. Music requests reserve slow mode before lookup and reject stale results after stop or permission changes. No blocking issues were found in the changed code.
What T-Rex did
Important Files Changed
/playresolution with permission, slow-mode, membership, and stale-request checks.Reviews (7): Last reviewed commit: "merge upstream main into mom music syste..." | Re-trigger Greptile