Repository navigation
Open
Labels
Description
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
- credentials-and-lifecycle.md: Scheduled runs, including the Evidence of Schedule setup and the scheduled-run session open
- audit.md: AuditEvent profile
- implementation.md: Session ownership and isolation: scheduled invocations preserve owner attribution
- The scheduled-run records as updated by "docs(drafts): scheduled-run audit records, retention, and the logger sink" (docs(drafts): scheduled-run audit records, retention, and the logger sink #3021): each scheduled-run record references the schedule's current grant record (its latest setup or renewal), and each end of a schedule's authority is recorded with its reason.
- credentials-and-lifecycle.md "Scheduled-run session open", Evidence, as updated by docs(drafts): scheduled-run audit records, retention, and the logger sink #3021: the consent facts the open records.
Scope
- The broker writes the schedule events and marks every record of a scheduled run.
- The broker's record of a schedule ended by sign-out everywhere or the upstream re-check is "Sign-out and revocation" (Sign-out and revocation #2568)'s. AS-1's revocation record and AS-1's conversion record at setup are [Phase 3] Authorization server and gateway audit records, and reconciliation #2848's.
Decide before starting
- Which field carries the schedule, and what are the event type names for setup, renewal, revocation, deletion, and a scheduled run's session open? docs(drafts): scheduled-run audit records, retention, and the logger sink #3021 settles what these records reference and carry (the current grant record, the consent facts, the end reasons), but not the field or the type names. Add them to the design first.
- Is a manual trigger, such as retrying a failed run, recorded as distinct from a timer? The design does not say. Phase 2, Slice 3: Scheduled runs — A scheduled run calls gateway tools on its own grant, with no one present #2569 sends both through the same authority path.
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
AuditIDof 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
ChrisJBurns commentedon Nov 18, 2026
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.mddefines 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.
rdimitrov commentedon Nov 25, 2026
#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.
docs(agent-identity): close the gaps the write-order edits opened
docs(agent-identity): close the round-4 review questions on write order
rdimitrov commentedon Nov 25, 2026
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.