Skip to content

Fix the findings from reviewing the changes of 16 October - #302

Merged
mt0rm0 merged 1 commit into
devfrom
300-review-findings
Oct 16, 2026
Merged

mt0rm0 merged 1 commit into
devfrom
300-review-findings

Conversation

@mt0rm0

@mt0rm0 mt0rm0 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Closes #300

Fixes from a code review of everything changed on 16 October (babf2c6..dev).

  1. Old YAML exports. CaseEntry now refuses keys it does not know (extra="forbid"). A file with test_id gets a message saying to re-export, instead of every entry silently becoming a new case. A typo in a field name is refused too, where it used to drop the field.
  2. Labels and tag from files apply only when a case is created. Labels are corrected on screen, and an older export put the old values back on every import, then pinned the old tag as set by hand. On an existing case, a file now changes content and approval only. This replaces the rule from Set labels on import and through the templates #287, where a missing key left a label alone but a present one overwrote it.
  3. Migrated tags. Migration 0013 now marks the kept Test-ID as set by hand, so the first label edit does not replace TF-GO-014. Clearing the tag hands a case to the generator. This matters for the cluster, which has not run 0013 yet; locally the data was started fresh after 0013 ran.
  4. Herkunft. Cases drafted from feedback get "Feedback", like the ones migration 0014 labels. "Erfassungsvorlage", which the sheet import writes, is a built-in value.
  5. SENTRA lookups outside transactions. Every case endpoint fetches the indexed documents before opening its session; it used to fetch inside, after counter rows were locked FOR UPDATE. Timeout 15 s. An outage is cached for 15 s, so a down SENTRA no longer costs every refresh a full timeout.
  6. Older stored payloads. The marker check numbers a payload without source_file the way SENTRA did before Documents without an Aktenzeichen are merged into one source #280: every document without an Aktenzeichen as one source. It used to skip them and shift later numbers.
  7. Title headings. The heading fallback cleans Word's field error before checking for a document type, which had skipped "Fehler! … Kurzinformation " whole.
  8. Frontend keys. documentKey() (Aktenzeichen, else file) keys source cards, document lists and the autocomplete, and drives the selected source on the review screen. Documents without an Aktenzeichen no longer share a React key, and selecting one no longer highlights all of them.

A tenth finding, that documents without an Aktenzeichen cannot be a test case's source, needs a design decision and is #301.

🤖 Generated with Claude Code

- A YAML file with test_id, or any key the importer does not know, is refused
  instead of every entry becoming a new case.
- A file sets tag and labels only when it creates a case, so an older export
  no longer reverts what was corrected on screen.
- Migrated cases keep their old Test-ID as a tag set by hand.
- Cases drafted from feedback get Herkunft Feedback; Erfassungsvorlage is a
  built-in Herkunft.
- The case endpoints fetch the indexed documents before opening a session,
  with a 15 s timeout, and an outage is cached for 15 s.
- The marker check numbers payloads stored before #280 as SENTRA did then.
- Headings are cleaned of Word's field error before the document-type check.
- The frontend keys documents by Aktenzeichen or file, so documents without
  one get their own React key and their own selection.
@mt0rm0

mt0rm0 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Other infos

  • Evaluation: 464 passed. Backend: 639 passed, now also locally with a login in .env (Backend tests fail when backend/.env configures a login #272). Frontend: 191 passed. mypy, ruff, tsc -b and eslint clean.
  • Item 2 changes behaviour from Set labels on import and through the templates #287 on purpose: three YAML tests that pinned "a file updates labels and tag" now pin the opposite, and new tests cover refusing test_id and unknown keys.
  • Item 3 edits migration 0013, which has run locally but not on the cluster. A database that already ran it keeps its migrated tags as generated; locally that is moot, since the data was emptied and re-imported afterwards.

@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: db631e35-95a9-4674-8ecc-a925c5d0b702

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 86d36ce into dev Oct 16, 2026
5 checks passed
@mt0rm0
mt0rm0 deleted the 300-review-findings branch October 16, 2026 15:25
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