Skip to content

fix: name the offending field in devhelm.yml schema errors - #175

Merged
caballeto merged 2 commits into
mainfrom
fix/yaml-error-field-names
Oct 26, 2026
Merged

caballeto merged 2 commits into
mainfrom
fix/yaml-error-field-names

Conversation

@caballeto

Copy link
Copy Markdown
Member

Summary

devhelm validate (and plan/deploy/test via loadProject) printed schema errors as devhelm.yml: invalid enum value… with no field path. formatIssue dropped path whenever the issue carried a file. Regression from #168 (doc 42 §6 project loader). Caught by mono tests/surfaces/cli/test_negative_yaml.py (test_unknown_monitor_type_rejected, test_empty_escalation_steps).

Now: file:line when the finding has a line (code findings, unchanged); otherwise file: path: message (e.g. devhelm.yml: monitors[0].type: invalid enum value…). The path is not repeated when it equals the file (ignored Playwright keys). JSON output already carried path, so it is unchanged.

Tests

  • New test/lib/project-format-issue.test.ts (5 tests): real loadProject on the two mono failure YAMLs plus the three formatting branches.
  • npm run lint, npm run typecheck clean; npm test: 63 files, 1248 tests passed.

Not in this PR

  • Nothing for this fix. Diff is limited to formatIssue to stay clear of the concurrent zod-schemas.ts / differ.ts work.

🤖 Generated with Claude Code

formatIssue printed only the file when an issue carried one, so schema
errors read 'devhelm.yml: invalid enum value' without the field. Print
file plus field path unless the finding has a line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@caballeto
caballeto merged commit 009b553 into main Oct 26, 2026
3 checks passed
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