Skip to content

fix(reposetup): stop flagging writer-quoted frontmatter scalars as manual review (change 0447) - #340

Merged
danielhanold merged 5 commits into
mainfrom
fix/repository-check-flags-docket-s-own-single-quoted-frontmatte
Sep 27, 2026
Merged

danielhanold merged 5 commits into
mainfrom
fix/repository-check-flags-docket-s-own-single-quoted-frontmatte

Conversation

@danielhanold

@danielhanold danielhanold commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

↩ Change 0447 — repository check flags docket's own single-quoted frontmatter as needing manual review

docket repository check reported every correctly quoted string field (slug: 'x', title: '…', type: 'fix') as a frontmatter-manual-review error, because the checker compared the raw quoted bytes against the decoded value. That was 921 findings on the live corpus, with no way to clear them.

What changed

  • New wellFormedQuotedString helper in internal/reposetup/repair.go decides on the parsed YAML node: exactly one string scalar, single- or double-quoted, no tag or anchor, and nothing after it (a second decode must hit EOF). planQuote returns no finding for such tokens.
  • Bare ambiguous scalars (yes, true, unquoted : ) and malformed quoting are still reported, unchanged.
  • Tests: helper table, no-finding table, still-flagged cases, a writer/checker parity table over 39 adversarial strings, and an end-to-end change.create → zero repair findings test. Each guard was mutation-checked.

Verification

  • Live corpus: frontmatter-manual-review 921 → 0; other finding families unchanged (artifact-links-stale 275, drop-terminal-claimed-at 241).
  • Review (docket-review-standard): no findings.

Deviation from spec: the helper also requires end-of-input, since a single YAML decode silently accepts trailing content like 'a' b. Stricter than specified.

command: go run ./cmd/docket development test
result: green
head_sha: 9b2adbb
ran_at: 2026-09-27T17:50:03Z

@danielhanold
danielhanold force-pushed the fix/repository-check-flags-docket-s-own-single-quoted-frontmatte branch from f322a58 to 9b2adbb Compare September 27, 2026 17:50
@danielhanold
danielhanold merged commit 2788736 into main Sep 27, 2026
1 check passed
@danielhanold
danielhanold deleted the fix/repository-check-flags-docket-s-own-single-quoted-frontmatte branch September 27, 2026 17:50
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