Deleting an instrument record leaves an orphaned session, and no endpoint can delete a session
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 53/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start with apps/api/src/instrument-records/instrument-records.service.ts and SessionsController to trace record deletion, session references, and the existing session routes. The issue lists three possible approaches but does not choose one; clarify the intended scope and check the relevant tests before making a change. Done means preventing or removing orphaned sessions as agreed, while preserving sessions that still have records.
索引モデルが issue の本文から書いたものです。
説明
Problem
Deleting an instrument record leaves its session in the database, and no endpoint can delete a session.
InstrumentRecordsService.deleteById(apps/api/src/instrument-records/instrument-records.service.ts) deletes the record and its files only.SessionsControllerhas onlyPOST /sessionsandGET /sessions.- The only path that deletes sessions is
DELETE /subjects/:id?force=true, which deletes the whole subject.
Every session created by the bulk upload or by a form holds exactly one record, so each record delete leaves an empty session. These sessions:
- count toward
GET /summarycounts.sessionsand its trend, - appear in the session list and the subject's session history,
- cannot be removed by an admin without direct database access.
Observed
On a production instance (v2.5.2), a cleanup of about 26,000 duplicate bulk-uploaded records through DELETE /instrument-records/:id would leave about 26,000 empty sessions. Before any cleanup, that instance already has 79 sessions with no record.
Options
- In
deleteById, also delete the record's session in the same transaction when no other record references it. - Add
DELETE /sessions/:id(@RouteAccess({ action: 'delete', subject: 'Session' })), rejected while the session still has records. - Both.
Option 1 stops new orphans. Option 2 (or a one-off migration) is still necessary to remove the sessions that are already orphaned.
- 主要言語
- TypeScript
- スター
- 119
- フォーク
- 19
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 61
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DouglasNeuroInformatics/OpenDataCapture のほかの issue
-
Area: API Bug Difficulty: Low Priority: Low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
DouglasNeuroInformatics/OpenDataCapture#1937 ·
メンテナーはふだん 1 日以内に返信
-
Area: Infrastructure Bug Difficulty: Low Priority: Medium Security
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DouglasNeuroInformatics/OpenDataCapture#1916 ·
メンテナーはふだん 1 日以内に返信
-
Area: Infrastructure Chore Difficulty: Low Priority: Medium
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
DouglasNeuroInformatics/OpenDataCapture#1835 ·
メンテナーはふだん 1 日以内に返信
-
Area: Instruments Bug Difficulty: Low Priority: Low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Completing a series instrument logs a TypeError "Cannot read properties of undefined (reading 'kind')"対応中かも @SAY-5 が 3 日前に担当しました。 オープンArea: Shared Bug Difficulty: Low Priority: Low
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
DouglasNeuroInformatics/OpenDataCapture#1813 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
DouglasNeuroInformatics/OpenDataCapture の issue をすべて見る
似ている issue
-
bug done
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
neavo/LinguaGacha#1124 ·
メンテナーはふだん 1 日以内に返信
-
[fullsend] E2E: backstage-microsoft-auth — catalogQuery missing error handler for network errors対応中かも @fullsend-ai-coder が今日担当しました。 オープンe2e-failure ready-to-code
難易度 2/5 1時間未満 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugin-export-overlays#4821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
brylie/mission-island#225 ·
メンテナーはふだん 1 日以内に返信
-
enhancement from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nightly-labs/openbot#14986 ·
メンテナーはふだん 1 日以内に返信
-
status/need-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google-gemini/gemini-cli#30412 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信