Skip to content

Refactor validation2 xvi - #330

Merged
mschwoer merged 21 commits into
refactor_validation2_XIIIfrom
refactor_validation2_XVI
Nov 19, 2026
Merged

mschwoer merged 21 commits into
refactor_validation2_XIIIfrom
refactor_validation2_XVI

Conversation

@mschwoer

Copy link
Copy Markdown
Contributor

Last round of review comments

mschwoer and others added 21 commits November 19, 2026 11:02
All other rules sit in the domain types and the shared.db facade. The
backend checked the values against the model instead; `RawFileUpdate` states
the same limits, and the limit test compares them with the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`*_errors` returns a list, `_check_*` raises: `users.check_active` becomes
`users.owner_errors`, `settings._check_active` becomes `_check_status_change`,
and the settings check of `assign` becomes `_settings_errors`. A record that a
write refers to but is not active gets one message for users, projects and
settings, via `inactive_errors`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nment

`update_to_latest` raised on a missing newer version before checking the
project, so a caller not allowed to change the fallback project was told
there is no newer version. Like `assign`, it now reports all rule errors
together, the project errors first; `assign` lists them first as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since raw file updates are checked, status details over 1024 characters were
rejected and the intended status was not written. Only the failure callback
and the processor truncated; the handler did not. `RawFileUpdate` now
truncates them for every writer, and the two truncations in the pipeline go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A creating call raised NotFoundError for a reference that does not exist, so
it dropped the other rule errors and meant something else than on reads; every
client had to translate it. It is now one more entry of the InvalidInputError,
and NotFoundError only means that the addressed record does not exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leaving them out meant all instruments, the misspelled-key risk the caller
note in shared/db warned about. Now a caller must state them, `['*']` for all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The file remover writes all its errors into the details exactly when there
are too many; over 1024 characters the save failed and the ERROR status was
never written. `shared.db.status.update` truncates them now, with the same
helper as the raw file updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `project_owner`: an owner reference to a user that no longer exists
- `settings.create(archive_previous=True)`: archiving fails after the insert
- `translate_errors`: mongoengine's coding-error signals become DatabaseError

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The record, with its possibly large file info, was loaded only to log its old status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The migration left such keys alone, and since the webapp no longer merges the
duplicate columns, those documents kept an extra column. Keys with another
value are still left alone and reported. Add the first tests of the migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`_to_raw_file_dict` and `_to_dict` differed only in the excluded keys; the
metrics and the backup path are added in one pass over the raw files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The error list is the same, as the project errors are collected before; the
else branch and the type ignore on the version go away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard against an empty id list was redundant, as `id__in=[]` matches
nothing, and the backend sort was repeated by the facade, whose project query
returns the newest first anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Status records truncated too long details in the facade function, raw files in
their input type. `KrakenStatusUpdate` truncates them the same way and checks
the other field limits; the limit tests compare it with the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NaN is not equal to itself, so a duplicate key with a NaN value was kept and
reported as a conflict. Also find the key holding the current name in one
expression.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both were 1024 and fed the same truncation; nothing meant them to diverge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 19, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mschwoer
mschwoer changed the base branch from refactor_validation2_III to refactor_validation2_XIII November 19, 2026 14:16
@mschwoer
mschwoer merged commit a75b112 into refactor_validation2_XIII Nov 19, 2026
4 checks passed
@mschwoer
mschwoer deleted the refactor_validation2_XVI branch November 19, 2026 14:37
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