Skip to content

Explain chapter display names and handles in rule diagnostics - #448

Merged
vjovanov merged 3 commits into
agent-grounds:mainfrom
vjovanov:fix/issue-447
Oct 5, 2026
Merged

vjovanov merged 3 commits into
agent-grounds:mainfrom
vjovanov:fix/issue-447

Conversation

@vjovanov

@vjovanov vjovanov commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #447

With ## goal: Goal and hypothesis, a goal chapter subject reaches the chapter, but Each BENCH must have exactly one goal chapter. counts zero because it compares the display title. Previously, the finding gave no explanation for that difference:

BENCH-001-example-benchmark has 0 goal chapters; RULE-012-bench-goal requires exactly one

Now the same finding explains the comparison and shows the chapter it observed:

BENCH-001-example-benchmark has 0 goal chapters; RULE-012-bench-goal requires exactly one; expected display name "goal" (case-insensitive, not section handle); observed direct chapters: "goal: Goal and hypothesis"

Chapter-cardinality findings append the expected display name and every accepted direct chapter's coordinate/title pair in source order, or none. Text output and JSON message carry the same explanation. The new specification point also requires the guide to explain this distinction beside its examples (§FS-rules.7.2.1). The rule guide and both shipped grund-init skill copies now include that explanation.

The specification clarifies the existing behavior: chapter subjects select handles (§FS-rules.2); presence rules compare direct chapter display names case-insensitively and accept only a single non-empty NAME token (§FS-rules.3.1). Thus goal: Goal counts one, while goal: Goal and hypothesis still counts zero for presence NAME goal.

Trying Goal and hypothesis as a presence NAME remains refused. The parser appends NAME forbids whitespace anywhere. after the complete existing reason and accepted-form example; internal spaces, tabs and Unicode whitespace remain unsupported (§FS-rules.3.5.1). Authored display titles may still contain spaces.

Both diagnostics preserve their complete released prefixes (§FS-errors.3). Counting, handle selection, grammar, finding fields, authority, severity, locations and exit verdicts are unchanged.

Verification

  • Specification and regression tests were committed before implementation in c247d9800a. The text, JSON and whitespace assertions failed on missing explanations; the handle-selection control already passed. Review then passed all four focused CLI tests and the parser unit test, including empty NAME and whitespace at internal and surrounding positions. Removing the chapter citation produces the expected missing-citation finding, proving selection actually reaches the chapter.
  • Review's sole major finding, R1-01, was resolved in ffaf8b6063: nine older expected-message lines across eight contract, e2e and example files were refreshed with the required suffixes, preserving prefixes and assertion strength. No findings were rejected or deferred, and no adjacent findings were reported.
  • At ffaf8b60638505d501ba42a1aa90e113985e5edc, the ticket-local reproducer exited 0 with zero failed assertions. It used checkout-built grund 0.16.1-dev, with its explicit build target under ~/ag/tmp, and confirmed text/JSON explanations, refusal exit 2, presence exit 1, and positive/negative chapter-selector controls.
  • The complete pre-commit run --all-files gate exited 0 at that commit: all ten hooks passed, including Cargo formatting, warnings-as-errors build, Cargo tests, Python tests, grund check/fmt/init, lychee, fissile and the attribution check. Hosted CI and merge remain for shipping.
AI workflow: `rhei`, 11 agent invocations across 1 model; 7 tasks completed, 9 in progress.
  1. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 1) — cdx, openai/gpt-6.1-sol — 2m19s — 389.8k in / 2.9k out
  2. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 2) — cdx, openai/gpt-6.1-sol — 4m40s — 1.1M in / 6.5k out
  3. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket.specify specify — cdx, openai/gpt-6.1-sol — 14m14s — 2.5M in / 20.7k out
  4. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 3) — cdx, openai/gpt-6.1-sol — 2m35s — 380.7k in / 3.8k out
  5. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket.implement implement — cdx, openai/gpt-6.1-sol — 9m33s — 2.0M in / 13.6k out
  6. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 4) — cdx, openai/gpt-6.1-sol — 2m32s — 386.0k in / 3.7k out
  7. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket.review-1 review — cdx, openai/gpt-6.1-sol — 6m22s — 1.2M in / 9.0k out
  8. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 5) — cdx, openai/gpt-6.1-sol — 2m37s — 498.6k in / 3.9k out
  9. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket.fix-1 fix — cdx, openai/gpt-6.1-sol — 3m04s — 541.9k in / 4.2k out
  10. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 6) — cdx, openai/gpt-6.1-sol — 2m50s — 560.3k in / 3.9k out
  11. github-issues-agent-grounds-grund-447-implement-635ac3e6.ticket supervising (visit 7) — cdx, openai/gpt-6.1-sol — 2m38s — 477.4k in / 3.9k out
Accounting Value
cost $3.45
total tokens 10.1M
input tokens (incl. cache) 10.1M
input cache read 9.2M
input cache write -
output tokens (incl. cache) 76.0k
output cache read -
output cache write -
coverage Complete

Append the accepted comparison context (§FS-rules.7.2.1) and NAME whitespace guidance (§FS-rules.3.5.1) to older exact expectations, preserving released prefixes (§FS-errors.3).
@vjovanov vjovanov changed the title Specify chapter diagnostic context for display names and handles Explain chapter display names and handles in rule diagnostics Oct 5, 2026
@vjovanov
vjovanov marked this pull request as ready for review October 5, 2026 14:43
@vjovanov
vjovanov merged commit fcf77be into agent-grounds:main Oct 5, 2026
5 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.

Chapter-cardinality diagnostics do not distinguish display titles from section handles

1 participant