Skip to content

fix(cli): fail loud on bad input in for/check/stats (#53, #38)#56

Merged
Connorrmcd6 merged 1 commit into
mainfrom
fix/input-validation-for-globs
Jun 11, 2026
Merged

fix(cli): fail loud on bad input in for/check/stats (#53, #38)#56
Connorrmcd6 merged 1 commit into
mainfrom
fix/input-validation-for-globs

Conversation

@Connorrmcd6

Copy link
Copy Markdown
Owner

Closes #53, closes #38.

Three commands silently accepted malformed input and returned a falsely-reassuring success; this makes them fail loudly (continuing the #30 pattern).

5 new tests; re-sealed the for/stats/check claims (updated for/stats prose where the contract changed).

Three commands silently accepted malformed input and returned a
falsely-reassuring success, inverting their own purpose. Continues the
fail-loud pattern from #30 (zero-match globs in suggest).

- for <PATH> (#53): stat the path first; a nonexistent/mistyped path, a
  directory, or a trailing slash now errors (exit 1) instead of printing
  "no hubs anchor" + exit 0 — byte-identical to a real unanchored file,
  which greenlit editing the wrong file.
- check --files (#38): invalid glob *syntax* in --files patterns now
  errors instead of being dropped via filter_map(.ok()), which silently
  widened/narrowed the gate's scope.
- stats (#38): invalid hub glob in surf.toml now errors instead of
  silently excluding hubs from the metrics.

Re-sealed the three anchored claims whose spans/contracts changed and
updated the for/stats claim prose + for_path module doc to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Connorrmcd6 Connorrmcd6 merged commit 3e726ac into main Jun 11, 2026
3 of 4 checks passed
@Connorrmcd6 Connorrmcd6 deleted the fix/input-validation-for-globs branch June 11, 2026 20:38
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.

for: nonexistent / mistyped PATH reports "no hubs anchor" (looks like success) check --files / stats: invalid glob syntax is silently dropped

1 participant