Skip to content

feat: record the last workspace deadline change - #31490

Open
EhabY wants to merge 1 commit into
mainfrom
feat/workspace-deadline-recording
Open

EhabY wants to merge 1 commit into
mainfrom
feat/workspace-deadline-recording

Conversation

@EhabY

@EhabY EhabY commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Records one build-local snapshot when its autostop deadline changes: reason, time, known actor, and typed activity sources. Writes replace the snapshot atomically; no-op deadline writes preserve it, and a null-safe trigger invalidates stale metadata from legacy writers.

This is the recording/storage foundation for #31279. It does not expose deadline_change in build responses or change the tooltip. Deadline calculations, activity detection, and authorization are unchanged.

Migration: 000637 adds the snapshot columns, actor foreign key, constraints, and invalidation trigger. Existing rows remain unexplained.

Implementation decisions
  • Preserve source identities and order, validate each type's fields, and deduplicate by identity rather than label.
  • Capture actors before authorization overrides; retain soft-deleted attribution and clear hard-deleted actors.
  • Keep recording and persistence regressions in this layer, including HTTP actor attribution, source validation, no-ops, legacy invalidation, and concurrent writes. Consolidate fixtures and assertions without removing cases.
  • Generate database and audit outputs here. API presentation and generated API documentation belong to the dependent PR.

Implements the recording portion of the deadline-change RFC. Refs #17320.

Generated by Coder Agents on behalf of @EhabY.

@EhabY
EhabY requested a review from code-asher October 29, 2026 14:33
@EhabY
EhabY added this pull request to stack #31492 October 29, 2026 14:57
@EhabY
EhabY marked this pull request as ready for review October 29, 2026 16:40
@EhabY
EhabY force-pushed the feat/workspace-deadline-recording branch from f8fe82c to 912dc25 Compare November 12, 2026 10:54
@EhabY
EhabY temporarily deployed to main November 12, 2026 10:54 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
main — 912dc25e Deployed Nov 12, 2026 by EhabY via cla #254869
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant