Skip to content

Give every case a permanent number and an editable tag - #290

Merged
mt0rm0 merged 1 commit into
284-number-and-label-casesfrom
285-permanent-number-and-tag
Oct 16, 2026
Merged

mt0rm0 merged 1 commit into
284-number-and-label-casesfrom
285-permanent-number-and-tag

Conversation

@mt0rm0

@mt0rm0 mt0rm0 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Closes #285

The Test-ID (TF-GO-014) did two jobs: it was the identity that rounds, reports and links pointed at, and a label carrying the category. A label has to be correctable and an identity must not change, so they are split.

  • nummer: a global running number from a counter that never hands one back, also not after withdrawal. Every API path, the YAML format, the review queue and the report sheets now refer to it.
  • tag: a readable label, generated as <Kategorie>-<nnn> (e.g. GO-001, no more TF-) or set by hand with PUT /api/eval/cases/{nummer}/tag. Unique, with a 409 naming the conflict. A hand-set tag is marked tag_manuell and kept; an empty one hands it back to the generator, which skips tags taken by hand. Label cases by Bereich, Testart, Frageform and Herkunft with open value lists #286 extends the generated form with the Testart.
  • Migration 0013_nummer_and_tag: numbers existing cases in creation order, keeps each Test-ID as its tag, and turns test_id_sequences into generic counters, so tags generated for a category continue where its Test-IDs stopped. Downgrade restores the old shape.
  • YAML: nummer replaces test_id. A tag that differs from the case's is applied and marked as set by hand. --allow-new-ids seeds with a given number and advances both counters past it.
  • Frontend: types, API calls and screens use nummer and tag. The Testfälle table has an "Nr." column sorted numerically, with the tag beside the number. The full editing UI is Show and edit number, tag and labels in Administration #288.

🤖 Generated with Claude Code

The Test-ID was both the identity rounds pointed at and a label carrying the
category. They are split: nummer is a global running number, never changed
and never reused; tag is a readable label, generated as <category>-<nnn> or
set by hand, unique, and kept once set by hand.

Migration 0013 numbers existing cases in creation order, keeps each Test-ID as
its tag, and turns the per-category counters into generic ones. The API, the
YAML format, the review queue, the report and the frontend address and show
cases by number and tag. PUT /cases/{nummer}/tag sets a tag; an empty one
hands it back to the generator.
@mt0rm0

mt0rm0 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Other infos

  • Evaluation: 413 passed (new tests for tags in the API and in YAML), mypy src clean. Frontend: 173 passed, tsc -b and eslint . clean.
  • The migration was run on a copy of the local eval database (40 cases, demo rounds): cases numbered 1 to 40 in creation order, Test-IDs kept as tags, counters carried over, case counter at 41. The downgrade on that copy restored test_id and test_id_sequences. The migration tests, including the schema comparison and the downgrade, pass on an empty Postgres.
  • API change: /api/eval/cases/{test_id} is now /api/eval/cases/{nummer}, and test_id is gone from every response. Frontend and harness change together in this PR; nothing else calls the harness.
  • The German wording in the collection templates still mentions the Test-ID. It is updated with the template regeneration in Set labels on import and through the templates #287.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 66244575-385e-4915-91d9-d34e5fcc5087

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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

Comment @coderabbitai help to get the list of available commands.

@mt0rm0
mt0rm0 merged commit f3a3d95 into 284-number-and-label-cases Oct 16, 2026
5 checks passed
@mt0rm0
mt0rm0 deleted the 285-permanent-number-and-tag branch October 16, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant