Audit log does not cover non-HTTP events, starting with email sends
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
Read AuditLog.ts and the cited ParticipantsController.ts and SurveysController.ts entry points to understand the existing HTTP and manual audit writes; compare them with Invite.status and Invite.sentAt. The issue leaves core design decisions open, including event storage and partial-batch outcomes, so there is no defined implementation or test to start with. Done requires those decisions to be settled before a scope and acceptance criteria can be set.
索引モデルが issue の本文から書いたものです。
説明
The audit log is HTTP request logging. auditLog writes one row per PATCH/DELETE/POST/PUT carrying the resource path, the method, and whether the response was 2xx. It has no concept of anything that is not an HTTP request, so nothing it records says anything about email.
Raised by @ignatiusm while reviewing #936:
There are possibly other non-http request things we'll want to have auditlogs for. Designing all of that and thinking through the implications might blow up the scope of current PR.
So this is that design question pulled out of #936, with email as the first case rather than the whole scope.
What is wrong today
- Inviting 500 participants writes one audit row saying an admin POSTed to the invites endpoint. No recipients, no per-message outcome.
successon that row is the HTTP status, not the operation result.AuditLog.ts:45is200 <= res.statusCode <= 299.resendPendingInvitesreturns 204 andcreateInvitesreturns 200 regardless of how many sends failed, so a batch where every email failed is audited as a success.- The single-invite resend is the only honest path,
ParticipantsController.ts:862throws a 502. - The only manual audit write in the codebase is
SurveysController.ts:495, for answer recalculation, so there is no established pattern for non-HTTP events to copy.
What is recorded elsewhere
Invites are covered by Invite.status and Invite.sentAt, which give recipient and outcome per row. OTP, password reset and contact-us have nothing. OTPToken and PasswordResetToken record that a token was issued for a userId, not that an email went out.
Open decisions
- Should
successmean the HTTP status or the operation outcome? If the latter, how is a partially-failed batch represented? - Do non-HTTP events write to
AuditLogwith a syntheticresource, or get their own model? - What else belongs here beyond email? Background jobs and scheduled work have the same gap.
- Does the retention story change? If Sent Items on the M365 mailbox gets a cleanup policy, the app becomes the only record of what was sent.
Related: #936
- 主要言語
- TypeScript
- スター
- 4
- フォーク
- 0
- 平均マージ
- 14時間 50分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Garvan-Data-Science-Platform/ctrl のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
-
admin-client backend bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
backend bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Garvan-Data-Science-Platform/ctrl#970 · コメント 1 件 ·
-
backend bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
backend bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Garvan-Data-Science-Platform/ctrl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melgarafael/DeskcommCRM#3000 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
callstackincubator/simlock#639 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
aws/agentcore-cli#2606 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 7 日以内に返信
-
ai-driven-qa bug Cosmetic
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信