Skip to content

fix(auth): alert updates stay readable when a newer release recorded an author this one doesn't know - #706

Draft
PiquelChips wants to merge 2 commits into
fix/676-unknown-actorsfrom
fix/701-unknown-alert-authors
Draft

PiquelChips wants to merge 2 commits into
fix/676-unknown-actorsfrom
fix/701-unknown-alert-authors

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

After a rollback, an alert update whose author a newer release recorded broke the dashboard's Alerts page: alert_updates.author decoded as a strict Json<Actor>, so a new actor type, or a new job in Actor::System, failed the whole alerts read with "stored column author is invalid".

The author now decodes as #689's RecordedActor, through a TryFrom<Value> that the events read shares. An author this release doesn't know reads as AlertUpdate.author: None: the Alerts page shows that update without a byline, and auth-service alerts list --json prints "author": null for it. Writes stay typed, and an administrator or operator that doesn't decode, or a known actor of another type, is still InvalidStoredData.

The column's CHECK allows only admin and cli authors, so a release that writes another type widens it in a migration first. Migrations aren't reverted, so after a rollback the older release reads that author as unknown. The database docs' forward-compatibility section now says this, instead of naming the column as strict. The test fixture drops the CHECK the same way, and refuses to run outside a schema from Database::isolated.

Stacked on #689 (fix/676-unknown-actors), which this PR targets as its base.

Closes #701

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)

…an author this one doesn't know

An alert update's author of a type this release does not know, or a known type
naming a value it does not know such as a new job, reads as no author instead
of failing the alerts read, and the dashboard's Alerts page shows the update
without a byline. A known author that does not decode is still an error, and
writes stay typed.

Closes #701
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-project-automation github-project-automation Bot moved this to Needs Triage in sourceorigin.dev Nov 22, 2026
The database docs say alerts list --json prints a null author for one this
release does not know, and that the column's CHECK is widened by the release
that writes another author type, a migration a rollback keeps. The dashboard
test no longer asserts the overview's banner, which never reads authors.
add_update_written_elsewhere refuses outside a schema from Database::isolated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant