Future: error categorization in baseline validation (looks-like-typo, looks-like-encoding, ...) #28

Open
opened 2026-05-05 03:01:40 +02:00 by claude · 0 comments
Collaborator

Future enhancement (operator suggestion, 2026-05-05)

ADR 0002 made baseline validation raise ConfigError with field-specific message. Operator suggested further UX improvement: categorize the error.

"Możemy dawać jakąś kategorię na zasadzie, że 'looks like a typo' albo coś. Wydaje mi się, że na ten etap można dopisać Issue jako przyszły rozwój."

Scope

_validate_baseline_shape() in src/pyfallow/baseline.py could pattern-match on the malformed value and return a category along with the error:

  • looks-like-typo (fingerprint is a number that's close to a known fingerprint string when stringified)
  • looks-like-encoding-issue (UTF-8 BOM in JSON, mojibake in fingerprint string)
  • looks-like-merge-conflict (presence of <<<<<<< markers)
  • looks-like-truncated (file ends mid-object)
  • unknown-shape (default)

Priority

Low. UX polish. Dogfood window will surface if this is real friction or just nice-to-have.

Phase

Phase C (Show HN polish). Open dogfood label dogfood:friction if encountered during the window.

## Future enhancement (operator suggestion, 2026-05-05) ADR 0002 made baseline validation raise `ConfigError` with field-specific message. Operator suggested **further** UX improvement: categorize the error. > "Możemy dawać jakąś kategorię na zasadzie, że 'looks like a typo' albo coś. Wydaje mi się, że na ten etap można dopisać Issue jako przyszły rozwój." ## Scope `_validate_baseline_shape()` in `src/pyfallow/baseline.py` could pattern-match on the malformed value and return a category along with the error: - `looks-like-typo` (fingerprint is a number that's close to a known fingerprint string when stringified) - `looks-like-encoding-issue` (UTF-8 BOM in JSON, mojibake in fingerprint string) - `looks-like-merge-conflict` (presence of `<<<<<<<` markers) - `looks-like-truncated` (file ends mid-object) - `unknown-shape` (default) ## Priority Low. UX polish. Dogfood window will surface if this is real friction or just nice-to-have. ## Phase Phase C (Show HN polish). Open dogfood label `dogfood:friction` if encountered during the window.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/fallow-py#28
No description provided.