8000 Parse a Submission's species_type at the read (null drafts, legacy values) · Issue #435 · jra3/mulm · GitHub
[go: up one dir, main page]

Skip to content

Parse a Submission's species_type at the read (null drafts, legacy values) #435

Open

Description

@jra3

Split from #425.

  • Species.species_type is string (src/species/types.ts:12), though SpeciesType exists.
  • Species.is_cares_species is number (src/species/types.ts:17); should be boolean.
  • NewSpecies.pointClass?: number | null and the update input (src/species/curation.ts:45, :92) should use PointClass.

Each DB read that builds a Species has to parse at the boundary (isSpeciesType / admitPointClass), not cast. Same for the species_type: string copies in db/submissions.ts, db/activity.ts, db/members.ts, db/cares.ts.

Activity

  1. jra3 commented on Oct 28, 2026

    @jra3
    OwnerAuthor

    Note

    🤖 Claude Opus 5.5 responding on behalf of John Allen

    #592 did most of this, so I'm narrowing the issue to what remains:

    • Species.species_type is SpeciesType, is_cares_species is boolean, and base_points is PointClass | null. Every read that builds a Species parses with speciesOfRow.
    • NewSpecies.pointClass and SpeciesUpdate.pointClass take PointClass.
    • The copies in db/members.ts and db/cares.ts are gone.

    Still open: species_type: string on Submission (src/db/submissions.ts:39) and SubmissionApprovedData (src/db/activity.ts:34). These can't be parsed the same way yet. submissions.species_type is nullable with no CHECK, and drafts are saved from a partial form. We need to decide first:

    1. What a draft with no species_type parses to: SpeciesType | null, or a separate draft type.
    2. What happens to stored values outside SpeciesType: a migration that normalizes them plus a CHECK constraint, or refusing at the read. This needs a count of the distinct values in prod first.

    Relabelled ready-for-human until those are settled.

  2. added and removed
    ready-for-agentFully specified, ready for an AFK agent
    on Oct 28, 2026
  3. changed the title [-]Tighten Species public types: SpeciesType, boolean CARES flag, PointClass[/-] [+]Parse a Submission's species_type at the read (null drafts, legacy values)[/+] on Oct 28, 2026
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

    priority:lowLow priority - nice to haveready-for-humanRequires human implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0