Skip to content

dashboard-api still serves POST /api/alert-preferences in production: the removal needs a redeploy to take effect #797

Closed

Description

@scttfrdmn

Split out of #794 so it is not lost when that closes.

#794 removed lambda/alert-evaluator and the dashboard's
GET/POST /api/alert-preferences handlers, and tore down the evaluator's live
function, rule and log group. The code is correct on main.

spawn-dashboard-api is hand-deployed and still running the old code, so in
production today:

  • POST /api/alert-preferences still accepts alert configuration;
  • it writes spawn-alert-preferences;
  • nothing reads that table any more — the evaluator that did is deleted.

That is the #790 defect exactly: a user-facing surface that accepts input and
reports success while nothing consumes it. #790 was fixed for spawn alerts create by refusing; here the fix is already written and simply not deployed.

Why it was not deployed in the same change

Retiring an idle scheduled Lambda and redeploying the dashboard's live REST
backend are different risk classes. dashboard-api is in use; the evaluator was
not. Doing the second unprompted, in the same breath as the first, is the kind of
scope creep that turns a clean teardown into an outage.

What needs to happen

  1. Redeploy spawn-dashboard-api from current main (lambda/dashboard-api/deploy.sh).
  2. Confirm the routes are gone — POST /api/alert-preferences should return the
    API's not-found response rather than 200.
  3. Snapshot the function config before and diff after, per the project's deploy
    discipline: it shares SpawnDashboardLambdaRole with three other live
    functions, so the role must be unchanged.

The wider point

This is the version-skew problem in miniature: the control plane does not upgrade
with the repo, so "merged" and "in effect" are different states and nothing
reports the gap. spawn footprint and make lambda-versions-deployed can show
it, but only if someone looks. Worth noting that the spawn:version stamping
from #768 is what makes this checkable at all.

Related: #653 (nothing reaps the control plane), #794, #790.

Activity

  1. added
    bug
    on Oct 11, 2026
  2. scttfrdmn commented on Oct 11, 2026

    @scttfrdmn
    ContributorAuthor

    Deployed and verified. Production no longer accepts alert-preference writes.

    Config diff: zero drift

    Snapshotted before and after; every field identical, only the code changed.

    field before → after
    Runtime / Architectures / Handler unchanged (provided.al2023, x86_64, bootstrap)
    Role unchanged — SpawnDashboardLambdaRole, still shared by 4 live functions
    Timeout / MemorySize 30 / 512, unchanged
    Description unchanged
    Environment IDENTICAL, 4 → 4 vars (incl. the Secrets Manager ARN)
    CodeSha256 0PuVFSFd8to… → EyXtn0+GgJX…

    Proving the route is gone took two attempts

    The obvious check was inconclusive:

    POST /api/alert-preferences  -> HTTP 401
    GET  /api/instances          -> HTTP 401     <- a route that DOES exist
    

    Auth runs before routing, so an unauthenticated request cannot distinguish
    "route removed" from "route requires auth". Reporting that as proof would have
    been wrong.

    What settled it was a differential test on the actual deployed artifacts — the
    pre-deploy zip (kept for rollback) against the one now live:

    binary /api/alert-preferences /api/strata/catalog (control)
    OLD (pre-deploy) 1 1
    NEW (deployed) 0 1

    The control is the point: it proves strings does find route literals in these
    binaries, so the 0 is a real absence rather than a probe that silently matches
    nothing.

    Rollback remains possible

    The pre-deploy package was downloaded before overwriting and verified
    byte-exact — its base64 SHA256 equals the CodeSha256 that was deployed
    (0PuVFSFd8toLlzRz57cJfnipM1Y4xX0R7t0YluRUsL0=).

    Also checked: what else rode along

    The deployed build was from 2026-08-02, so I checked what two months of commits
    would ship. Only three touched lambda/dashboard-api/: this removal, a gofmt
    commit, and #480 (anonymous strata catalog). #480 looked undeployed by date —
    but its commit timestamp is 89 minutes before that deploy, and the live
    anonymous call already returned HTTP 200 with 5 formations beforehand. So it
    was already live and nothing unexpected shipped. Confirmed still working after:
    GET /api/strata/catalog → 200, 5 formations.

    Filed from this: #799

    Running the script surfaced three defects in it and the reason none were caught:
    both deploy gates scan only scripts/, so lambda/*/deploy.sh is ungated. The
    function carries no spawn:version tag, the script races
    update-function-configuration against its own update-function-code (exit 254,
    code updated, config not), and set -e skips its own cleanup.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions