Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Share the RoomService transport and add DeleteRoom

オープン
#320 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@dges5202 がすでに取り組んでいます。

2026年10月16日 から。

  • #325 @dges5202 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
api, backend

調査の方向性

Start with the private post_room_service and livekit_room_service_request in src/livekit/rooms.rs (around lines 122 and 138), then the token helper livekit_room_admin_token in src/token.rs near line 111. The work moves the transport into a new src/livekit/room_service.rs, adds livekit_room_create_token and delete_room, and extends tests/unit/livekit/rooms.rs, tests/token.rs and a new tests/unit/livekit/room_service.rs. Done means the existing room tests pass unedited, the new axum-stub tests cover the DeleteRoom request, the 404 not_found case and the 500 error case, and ./scripts/test.sh passes.

索引モデルが issue の本文から書いたものです。

説明

Context

This issue separates P4 from #306 so it can be worked on independently. The peer sweeper (P11) has to delete a LiveKit room once a peer session ends, but the only RoomService client today lives in src/livekit/rooms.rs: post_room_service and livekit_room_service_request (src/livekit/rooms.rs:122, :138) are private to the agent's duplicate-participant handling, and livekit_room_service_request reads its credentials from AgentConfig, which codetrial web does not load.

Desired outcome

A RoomService client that any server-side caller can use with a LiveKit URL, API key and API secret, plus a delete_room call for cleanup. Agent behavior stays exactly as it is.

Proposed implementation

  • Add src/livekit/room_service.rs and move post_room_service and livekit_room_service_request into it. The request function takes (url, api_key, api_secret) instead of &AgentConfig.
  • Keep the duplicate-agent handling (isolate_local_agent, remove_room_participant, is_participant_gone) and validate_livekit_credentials in rooms.rs, calling the moved transport with the fields from AgentConfig.
  • Add livekit_room_create_token beside livekit_room_admin_token (src/token.rs:111). It grants roomCreate: true and nothing else, since LiveKit requires roomCreate for DeleteRoom.
  • Add delete_room(url, api_key, api_secret, room, now_seconds), which posts {"room": room} to /twirp/livekit.RoomService/DeleteRoom. A 404 whose body carries the Twirp not_found code returns Ok, because a room that is already gone is the outcome cleanup wants. Any other non-success status is an error that names the method, the status and the body.

Acceptance criteria

  • The existing cases in tests/unit/livekit/rooms.rs pass unedited.
  • A new tests/unit/livekit/room_service.rs runs a local axum stub and asserts that delete_room posts to /twirp/livekit.RoomService/DeleteRoom with a bearer token that holds roomCreate and not roomAdmin.
  • The same file asserts that a not_found reply returns Ok and that another failure, such as a 500, returns an error.
  • tests/token.rs asserts the claims of livekit_room_create_token, including that it carries no roomAdmin, roomJoin or roomList, and adds it to every_token_expires.
  • ./scripts/test.sh passes, with any skipped lanes reported in the pull request.

Scope

This adds the transport and DeleteRoom only. It does not call CreateRoom, does not add any peer caller (that is P11), and does not change the tokens or the RoomService calls the agent already makes.

Ownership

I will implement this issue and open the pull request.

Refs #306

主要言語
Rust
スター
160
フォーク
64
平均マージ
1日 10時間
マージ済み PR(30日)
116

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。