Skip to content

feat: batch 2026-07-19 — escalation org default + assignment picker, migration consolidation - #148

Merged
fclairamb merged 13 commits into
mainfrom
batch/2026-07-19
Jul 19, 2026
Merged

fclairamb merged 13 commits into
mainfrom
batch/2026-07-19

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Summary

Batch integration on batch/2026-07-19 — one /implement-todos spec, plus a migration
consolidation chore, gated by an independent completeness audit and archived to
specs/done/2026/07/.

Features

  • Escalation org default + assignment picker — escalation policies could be created and
    edited in dash0 but nothing in the UI ever assigned one to a check, and there was no org-wide
    fallback for checks with none.
    • Org-level default escalation policy: a nullable default_escalation_policy_uid on
      organizations. Resolution precedence is now check → group → org default → none,
      fixed at incident-open time (never retargets in-flight cycles). Opt-in — unset reproduces
      today's behavior exactly. Org settings page shows the blast radius ("N checks currently
      inherit and will start using this policy") before you commit to a default.
    • Empty-policy-as-silent convention — no escalation_mode column, no seeded "None"
      policy. A picker shortcut creates (or reuses) a zero-step policy to represent
      "explicitly silent," badged "0 steps — silent" in the policy list, with an informational
      note on the check form. Policy delete confirmation now shows usage count across both
      checks and groups ("Used by N checks and M groups — they will fall back to inherited
      escalation").
    • Assignment picker on the check form — a new select: "Inherit — currently:
      <resolved name>" (live-resolves group → org default), the org's policies (silent ones
      badged), and the silent shortcut. Check-group REST now also exposes
      escalationPolicyUid on both read and write paths (Postgres + SQLite).

Chores

  • Migration consolidation — 007_v0_6_0 (deported agents) and 008_v0_7_0 (this PR's
    escalation-default column) are folded into 006_v0_5_0. None of the three had shipped in a
    release yet (latest tag v0.4.1), and the upcoming release is v0.5.0 — per
    wiki/conventions/database.md ("one migration per release"), scratch migrations from a
    release cycle get squashed into a single file before release. Verified the consolidated
    migration produces a byte-identical schema to the pre-consolidation state and applies
    cleanly against an already-migrated dev DB.

QA

  • Backend: make build-backend lint-back test green (134 packages).
  • dash0: make build-dash0 + bun run lint green, no new ESLint errors in touched files.
  • Migrations verified on both Postgres and SQLite; schema-dump diff confirms the consolidation
    changed no net DDL.
  • Playwright E2E authored (4 scenarios covering the picker, org default field, silent badge,
    delete usage count) but not run locally — the :4000 devloop isn't in SP_RUNMODE=test.
  • Every spec passed an independent completeness audit before archiving.

fclairamb and others added 12 commits July 19, 2026 11:19
…ase migration

None of these have shipped in a release yet (latest tag is v0.4.1) and the
upcoming release is v0.5.0, not v0.7.0 — per wiki/conventions/database.md
"one migration per release", scratch migrations from a release cycle get
squashed into one file before release. Folds the deported-agents (007) and
org-default-escalation-policy (008) migrations into 006_v0_5_0 for both
Postgres and SQLite; verified the consolidated migration produces a
byte-identical schema to the pre-consolidation state (fresh-DB dump diff) and
applies cleanly against an already-migrated dev DB.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fclairamb
fclairamb enabled auto-merge (squash) July 19, 2026 15:43
…t policy

The check-form picker's "No escalation (silent)" shortcut creates a
zero-step policy and calls onChange(created.uid), but the selection never
stuck: Radix Select mirrors its controlled value onto a hidden native
<select> for form/accessibility compatibility, and that mirror only
recognizes policies whose SelectItem has rendered as a native <option> at
least once. The freshly created policy's item never gets that chance — the
popover is already closed by the time the create request resolves — so the
native mirror reports back an empty change event that silently reset the
selection to "" on the very next render. The visible trigger label had the
same root cause: Radix's SelectValue caches whichever item's text last
mounted while the dropdown was open, so it stayed frozen on the previous
"Inherit" label even after the correct policy was selected, since the new
item's text never mounted either.

Fixes: seed the escalation-policies query cache synchronously in
useCreateEscalationPolicy's onSuccess so the new policy is resolvable from
the very next render; ignore the spurious empty-string change (no real
SelectItem in this list ever uses "" as its value, so it's always that
native-mirror echo); and render SelectValue's label from our own computed
state instead of relying on Radix's item-mount-based text caching.

Found via the E2E test authored for the escalation org-default spec, which
failed in CI (authored-but-not-run-locally was flagged as a residual risk
when that spec was audited); reproduced locally against a side-car server
matching CI's build+seed exactly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@fclairamb
fclairamb merged commit bb585a8 into main Jul 19, 2026
11 checks passed
@fclairamb
fclairamb deleted the batch/2026-07-19 branch July 19, 2026 16:42
@fclairamb fclairamb mentioned this pull request Jul 19, 2026
fclairamb added a commit that referenced this pull request Jul 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.5.0](v0.4.1...v0.5.0)
(2026-07-19)


### Features

* batch 2026-07-16 — deported agents, SSH tunnels everywhere, incident
comments, OAuth self-revocation, and a critical secrets-leak fix
([#145](#145))
([994bc85](994bc85))
* batch 2026-07-19 — escalation org default + assignment picker,
migration consolidation
([#148](#148))
([bb585a8](bb585a8))


### Bug Fixes

* **deps:** update dependency docusaurus-plugin-llms to ^0.5.0
([#147](#147))
([1d30a78](1d30a78))
* **deps:** update go dependencies (non-major)
([#139](#139))
([6906133](6906133))
* **deps:** update module github.com/go-ldap/ldap/v3 to v3.4.14
([#141](#141))
([b7166d6](b7166d6))
* **deps:** update module github.com/gosnmp/gosnmp to v1.44.0
([#144](#144))
([a1c5897](a1c5897))
* open v3 plaintext envelopes before the enabled-gate in sshtunnel and
freebox resolvers
([#149](#149))
([4223bdb](4223bdb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
This was referenced Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant