Skip to content

feat(Conformance): one policy for a refusal probe that says nothing (#352) - #368

Merged
thomasfosterau merged 1 commit into
trunkfrom
issue-352-refusal-unanswered
Oct 15, 2026
Merged

thomasfosterau merged 1 commit into
trunkfrom
issue-352-refusal-unanswered

Conversation

@thomasfosterau

Copy link
Copy Markdown
Owner

Summary

Closes #352.

Implements the owner decision in issuecomment-6186117133 for all nine refusal rules that share probeFirstUsable (src/internal/conformance/spec.ts): the two from #278 (spec/query/include-unsupported-endpoint, spec/query/sort-unsupported-endpoint) and the seven from #310.

  • 5xx is a finding. A server that answers 5xx to a parameter it does not support mishandled it, so the rule fails, reported as … which does not declare \X`, was not rejected` with the 5xx as observed.
  • 429, 408 or a lost response is not decided. The rule is Skipped with the reason not decided: \?X=…` on /path answered , and a rate limit, a request timeout or a lost response says nothing of whether the server refuses the parameter. A lost response is any transport error (status: 0), including a requestTimeout` cut-off (feat(Conformance): skip and requestTimeout options (#302) #366).

What changes:

How: the per-rule unanswered: "finding" | "undecided" switch on UsableProbe / Refusal is removed and replaced by one shared predicate, saysNothingOfRefusal (transport error, 408 or 429). settleRefusal loses its "got no response" branch, which nothing reaches any more. crawl.ts's unanswered, used by the link and pagination rules, is unchanged; that is out of scope.

A side effect worth checking: a #278 probe that a transport redirected off the origin now gets the rule's own not decided: … reason followed by the redirect sentence runRule adds. That is what the #310 rules already did. Before, the probe reached settleRefusal as a "got no response" finding, and runRule turned it into a skip. The pinned expectation in "skips a rule some of whose requests were redirected off the origin, rather than passing it on the rest" is updated to match.

Verification

All gates were run in a fresh clone, in AGENTS.md order:

  • pnpm install --frozen-lockfile: pass
  • vp run build: pass
  • vp check: pass (0 errors; the warning counts for spec.ts and Conformance.test.ts are the same as on trunk, 115 and 88)
  • vp run check (sources, type-level tests, examples, emitted declarations): pass ("every type gate green")
  • vp run -r test:unit: pass (root 3417/3417; examples 45, 43 and 55, all passing)
  • vp run docgen (every JSDoc @example compiled and executed): pass
  • fallow audit --format json --quiet --explain --gate-marker agent: verdict pass
  • fallow audit --base origin/trunk: pass ("No issues in 7 changed files"; 7 inherited findings excluded)

Tests (src/Conformance.test.ts):

Mutation checks (each run against src/Conformance.test.ts, then reverted):

Mutation to saysNothingOfRefusal Tests that fail
also treat status >= 500 as saying nothing 4: "fails both" 500 and 503 (#278), "fails each" 500 and 503 (#310)
drop 408 2: the 408 case for #278 and for #310
drop 429 2: the 429 case for #278 and for #310
drop the transport-error check 3: the lost-response case for #278 and for #310, and the off-origin redirect case
trunk's spec.ts with the new tests 9 fail

Changeset

  • A changeset under .changeset/ for every change to published behaviour

No new changeset file is added. Neither #278 nor #310 has shipped: their changesets (conformance-unsupported-include-sort-endpoint.md, conformance-unsupported-endpoint-probe-followup.md, conformance-unsupported-family-probes.md) are still pending in .changeset/, are not in the @thomasfosterau/effect-jsonapi@0.16.3 tag, and CHANGELOG.md does not mention these rules. So, following earlier follow-ups, the unreleased changesets are edited in place to describe the final behaviour:

  • conformance-unsupported-include-sort-endpoint.md (minor): a 5xx fails; 429, 408 or no response leaves the rule not decided.
  • conformance-unsupported-family-probes.md (minor): the same for the seven rules. "Their findings and their other outcomes are unchanged" for the two feat(Conformance): probe include / sort on an endpoint that does not declare them (#261) #278 rules becomes "They settle a probe's answer as the seven do".
  • conformance-unsupported-endpoint-probe-followup.md (patch): drops the clause "A probe that got no response is reported as such instead of as 'was not rejected'", which no longer holds.

Bump choice, for the owner to confirm: the issue proposed a patch, and earlier rule-outcome changes to conformance have shipped as minor. Neither applies here, because both affected changesets are already minor and unreleased. The release that carries these rules is a minor whichever way this is labelled, and no rule outcome changes for anything already published. If you would rather have a separate changeset, a patch one would not change the release bump.

Notes

🤖 Generated with Claude Code


Generated by Claude Code

…352)

The nine refusal rules that share `probeFirstUsable` now settle a probe's
answer the same way, as the owner decided on #352: a 5xx is a finding (the
server mishandled the parameter), while a rate limit (429), a request
timeout (408) or no response at all leaves the rule not decided, with a
reason. The per-rule `unanswered: "finding" | "undecided"` switch gives way
to one predicate, `saysNothingOfRefusal`; `crawl.ts`'s `unanswered`, which
the link and pagination rules use, is unchanged.

For the two #278 rules a 429, 408 or lost response moves from a finding to
not decided; for the seven #310 rules a 5xx moves from not decided to a
finding. Neither set has been released, so their unreleased changesets are
edited in place.

Claude-Session: https://claude.ai/code/session_0187g2QpzaHqEzX8GJxiJBVc
Co-Authored-By: Claude <noreply@anthropic.com>
@thomasfosterau
thomasfosterau merged commit d182132 into trunk Oct 15, 2026
1 check passed
@thomasfosterau
thomasfosterau deleted the issue-352-refusal-unanswered branch October 15, 2026 08:53
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.

feat(Conformance): leave the #278 include / sort refusal rules not decided on a probe that says nothing

2 participants