feat: post-materialization result file validation#74
Conversation
When a recipe exits 0 but writes suspicious output (all-NaN table, invalid/all-null metric JSON, empty figure), the runner now emits Dagster context warnings rather than silently reporting success. Adds lightcone.engine.validation with type-specific validators: - metric: checks JSON is parseable and not entirely null/NaN - table: warns if every numeric column is all-NaN - figure: warns if no image file exists or it is 0 bytes Validation is wired into _build_single_asset and never raises — failures surface as context.log.warning so materialization status is unaffected while the user is clearly informed. Closes #45 Co-authored-by: Alexandre Boucaud <aboucaud@users.noreply.github.com>
|
@claude please review this PR |
|
Claude finished @aboucaud's task in 2m 15s —— View job PR Review:
|
| Severity | Issue |
|---|---|
| Bug | Silent pass when output path is a file, not a directory |
| Nit | Dead math.isnan branch in _is_null_scalar |
| Gap | No asset-level test exercising validate_output via context.log.warning |
| Minor | Double iterdir() in figure path |
The core logic and "never raise" contract are solid. Fix the silent-skip bug and the PR is good to merge.
✅ Eval Results
Graders✅ spec_valid (1.00) Full output |
|
I have read the Developer Certificate of Origin and I hereby sign the DCO for this PR |
1 similar comment
|
I have read the Developer Certificate of Origin and I hereby sign the DCO for this PR |
Adds post-materialization validation for ASTRA output files. When a recipe exits 0 but writes suspicious output (all-NaN table, invalid/all-null metric JSON, empty figure), Dagster now emits context warnings rather than silently reporting success.
Closes #45
Generated with Claude Code
Signed-off-by: Alexandre Boucaud 3065310+aboucaud@users.noreply.github.com
Signed-off-by: Francois Lanusse EiffL@users.noreply.github.com