Skip to content

fix(rules): classify semantic stem parse refusals as schema-valid - #212

Merged
pablontiv merged 1 commit into
masterfrom
pablontiv/fix-issue-199
Aug 27, 2026
Merged

fix(rules): classify semantic stem parse refusals as schema-valid#212
pablontiv merged 1 commit into
masterfrom
pablontiv/fix-issue-199

Conversation

@pablontiv

Copy link
Copy Markdown
Owner

What

Classify semantic .stem parse refusals as schema-valid while preserving yaml-valid for YAML syntax failures. Populate field metadata and remove absolute filesystem paths from public stem_health messages.

Related issue

Closes #199

Why

ParseStem previously returned undifferentiated text errors, so stem health mislabeled semantic schema refusals as YAML failures, omitted the affected field, and exposed absolute local or CI paths.

How

  • Add an internal typed parse error carrying check, field, path, reason, and optional cause.
  • Project typed metadata with errors.As in stem health without parsing strings.
  • Preserve contextual paths for direct error consumers while keeping public diagnostic reasons path-free.
  • Document the new schema-valid category and record the contract in ADR 0004.
  • Add end-to-end regressions for null fields, malformed YAML, and unsupported versions.

Checklist

  • Tests pass (go test ./... -race)
  • Code is clean (go vet ./... via just check/golangci-lint and build gates)
  • Changes are documented if user-facing
  • Linked to its issue with a closing keyword

Use typed ParseStem errors to carry stem-health metadata (check, field, reason) without string parsing in EvaluateStemState.

YAML syntax errors remain yaml-valid, while unsupported stem versions and null schema field refusals now surface as schema-valid with field metadata and path-free stem_health messages.

Docs and validate references now list schema-valid as a public stem-health category.

Closes #199
@pablontiv
pablontiv merged commit 9969a61 into master Aug 27, 2026
11 checks passed
@pablontiv
pablontiv deleted the pablontiv/fix-issue-199 branch August 27, 2026 22:55
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.

stem health reports a semantic .stem refusal as "yaml-valid", with an empty field and an absolute path

1 participant