Skip to content

core: fail $well_formed when subject_type is empty or only whitespace - #121

Merged
jbpros merged 2 commits into
mainfrom
fix/empty-subject-type
Oct 4, 2026
Merged

jbpros merged 2 commits into
mainfrom
fix/empty-subject-type

Conversation

@jbpros

@jbpros jbpros commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Rows and the descriptions of the checks ergo adds name the subject by its subject_type, so an empty one gives sentences that name nothing. On main, "subject_type": " " gives The in-scope count is at least 1 and The is in scope.

A subject_type that's empty or only whitespace now fails $well_formed, reported like a subject_type of the wrong type:

{ "name": "subject_type", "value": "" }

"a b" and any other string with something besides whitespace in it is still fine.

If #113 moves subjects into their own section, as Tooky suggested, an empty subject name there should fail the same way. That's noted on #113.

Changes the report: a requirement with an empty or whitespace-only subject_type fails $well_formed.

Checks

  • The AGENTS.md checks pass: 719/719 under OPA, under Wasm in Docker and with .github/wasm-js.cjs, plus regal, full coverage and the comment check.
  • kosli-dev/sdlc-policies and kosli-dev/server: no change from main, and no policy there has an empty subject_type.

🤖 Generated with Claude Code

Rows and the descriptions of the checks ergo adds name the subject by
its subject_type, so "" or "  " gave sentences that name nothing, like
"at least 1 matching  subject(s) required". It's now reported like a
subject_type of the wrong type.

Changes the report: a requirement with an empty or whitespace-only
subject_type fails $well_formed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jbpros jbpros added enhancement New feature or request core Relates to the ergo library or format themselves. impacts-ergo-policies Impacts ergo policy schema. Careful design attention needed. impacts-ergo-reports Impacts ergo report schema. Careful design attention needed. labels Oct 4, 2026
@jbpros
jbpros marked this pull request as ready for review October 4, 2026 19:55
@jbpros
jbpros merged commit c909ffa into main Oct 4, 2026
6 checks passed
@jbpros
jbpros deleted the fix/empty-subject-type branch October 4, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Relates to the ergo library or format themselves. enhancement New feature or request impacts-ergo-policies Impacts ergo policy schema. Careful design attention needed. impacts-ergo-reports Impacts ergo report schema. Careful design attention needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant