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

Audit log does not cover non-HTTP events, starting with email sends

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

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

backend question

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.
  • success on that row is the HTTP status, not the operation result. AuditLog.ts:45 is 200 <= res.statusCode <= 299. resendPendingInvites returns 204 and createInvites returns 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:862 throws 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 success mean the HTTP status or the operation outcome? If the latter, how is a partially-failed batch represented?
  • Do non-HTTP events write to AuditLog with a synthetic resource, 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

環境構築

はじめの一歩

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

Garvan-Data-Science-Platform/ctrl のほかの issue

Garvan-Data-Science-Platform/ctrl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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