Skip to content

Station signup: jobs/station-signup-attempt-prune for 30-day attempt-log retention #2363

Description

@jakebromberg

Problem

station_signup_attempt grows without bound. Rows are retained 30 days for audit (they answer "who revealed the code?" and "what did the attack look like?"), then need deleting.

Desired end state

A jobs/station-signup-attempt-prune workspace deleting attempt rows older than 30 days, consuming pruneSignupAttempts from the lifecycle module.

This is not one file. jobs/* is an npm workspace (package.json:67-71). The nearest shape, jobs/flowsheet-ghost-row-sweep/, carries job.ts, package.json, tsconfig.json, tsup.config.ts, and a README, plus a root Dockerfile.flowsheet-ghost-row-sweep and deploy/cron wiring. Follow it.

Cron registration

Register in docs/ops-cron-scheduling.md under "Excluded / DB-only (verified — don't try to 'space' these)" (line 46), beside metadata-no-match-digestnot in the slot table. That table exists to space LML-hitting crons, and a pure-Postgres prune is not a scheduling constraint.

Acceptance criteria

  • Workspace with the full jobs/* footprint
  • Root Dockerfile + deploy wiring
  • Registered in the DB-only section of docs/ops-cron-scheduling.md
  • Deletes only rows older than 30 days; a test pins the boundary

Context

Plan: ~/Downloads/wxyc-station-passcode-signup-plan.md.

Related

Blocked by the lifecycle module. Split from the review job because the failure consequences differ: a failed prune means a larger table, a failed review means a silent queue and a security gap, and those want separate alerting.

Blocked by

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions