Make path/component validation errors contextual¶
uid: ISS-0025 status: BACKLOG priority: medium owner_role: REWORK estimate: TBD dependencies: [] risk: medium milestone: backlog
Category¶
REWORK
Evidence¶
src/filare/models/utils.py:119-125raises"{filename} does not exist."or"{filename} is not a file."without showing cwd or the referencing YAML field, making it hard to locate the bad path.src/filare/models/harness.py:323-338raise genericExceptionstrings for mismatched types inconnections/templates without quoting the designator or the type mismatch details.src/filare/models/harness_quantity.py:55-63raisesValueErrorwhenquantity_multipliers.txtJSON is invalid but does not echo the file path or the malformed content that failed.
Suggested Next Steps¶
- Include full resolved path and caller context in path errors, e.g.,
image 'docs/img/missing.png' not found (cwd=/app, referenced by connector X1.image). - Replace generic connection/type errors with value-aware
ValueErrormessages:connections[1] uses template 'W1' as connector but expected connector template; check metadata/templates. - When parsing
quantity_multipliers.txt, echo the file path and JSON error:invalid JSON in outputs/quantity_multipliers.txt: Expecting value at line 1 column 5; delete or fix the file to re-prompt. - Add regression tests that provoke each error and assert the improved messaging without altering behavior.