Skip to content

Audit records mark scheduled runs #2843

Open

Description

@ChrisJBurns

Depends on: #2566 (audit records), #2569 (schedule grants)

Problem

A scheduled run acts without the user present, and the design requires audit to tell it apart from a fresh human request. The audit profile has no field naming the schedule. It has no event for setting up, renewing, or revoking a schedule, or for opening a scheduled run's session. An investigator cannot tell a nightly run from Alice acting.

Implements

Scope

Decide before starting

Done when

  • Every record of a scheduled run names its schedule, as the decision above defines.
  • Setup, renewal, revocation, and run opens are recorded with the owner and source jti.
  • No scheduled-run record presents the saved owner as a fresh user authentication.
  • Every scheduled-run record references the schedule's current grant record, never the original setup once a renewal exists.
  • Each scheduled-run session open records the consent facts: schedule ID, owner, the definition reference (source, name, revision), the grant's horizon, and the AuditID of the current grant record. An investigator can read who authorized the run, and until when, from that one record.
  • The ends of a schedule's authority this ticket owns (revocation, deletion, horizon reached) are recorded with the reason.
  • The schedule records follow the same delivery and profile checks as the other broker records, including TestEveryRecordTypeHasAProfile.

Activity

  1. ChrisJBurns commented on Nov 18, 2026

    @ChrisJBurns
    ContributorAuthor

    Design decision for this ticket: Which field names the schedule in audit records, and which event types record schedule setup, renewal, revocation, deletion, and a scheduled run's session open? Is a manual trigger recorded separately from a timer? audit.md defines none of these.

    Where it goes: audit.md: AuditEvent profile.

    Decide it when this ticket is picked up, and record the answer as a small design edit (reviewed by the design's author) before or with the ticket's first PR.

  2. rdimitrov commented on Nov 25, 2026

    @rdimitrov
    Member

    #2984 settles part of the design question above: schedule setup waits for its record, and fails as a session open that converted a token when the sink does not accept it; a scheduled run's open retries once, and if the record is still not accepted the run does not start and its fire fails as a retryable infrastructure error. Which field names the schedule, and the event types, are still open here.

  3. rdimitrov commented on Nov 25, 2026

    @rdimitrov
    Member

    Correction to my earlier note: #2984 no longer says a scheduled run's open that cannot be recorded "fails as a retryable infrastructure error". The broker retries the open once; if the record is still not accepted, the run does not start, and the schedule's next fire runs as usual. What else a fire that cannot start does, such as notifying the owner, and whether it is retried before the next fire, are left to this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions