Repository navigation
feat(Conformance): one policy for a refusal probe that says nothing (#352) - #368
Merged
Merged
Conversation
…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>
Merged
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.… which does not declare \X`, was not rejected` with the 5xx as observed.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 arequestTimeout` cut-off (feat(Conformance):skipandrequestTimeoutoptions (#302) #366).What changes:
include/sorton an endpoint that does not declare them (#261) #278 rules: 429, 408 and a lost response move from a finding to not decided. 5xx stays a finding.fields[TYPE]/page[…]/filter[…]on an endpoint that does not support them (#261) #310 rules: 5xx moves from not decided to a finding.How: the per-rule
unanswered: "finding" | "undecided"switch onUsableProbe/Refusalis removed and replaced by one shared predicate,saysNothingOfRefusal(transport error, 408 or 429).settleRefusalloses its "got no response" branch, which nothing reaches any more.crawl.ts'sunanswered, 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 sentencerunRuleadds. That is what the #310 rules already did. Before, the probe reachedsettleRefusalas a "got no response" finding, andrunRuleturned 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: passvp run build: passvp check: pass (0 errors; the warning counts forspec.tsandConformance.test.tsare 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@examplecompiled and executed): passfallow audit --format json --quiet --explain --gate-marker agent: verdictpassfallow audit --base origin/trunk: pass ("No issues in 7 changed files"; 7 inherited findings excluded)Tests (
src/Conformance.test.ts):include/sorton an endpoint that does not declare them (#261) #278 rules: the pinned test "says a probe that got no response got none, not that it was not rejected" now expects Skipped, with the full reason. The transport's own wording in the parentheses is not pinned. New: "does not decide either on a probe answered 429 / 408" and "fails both on a probe answered 500 / 503".fields[TYPE]/page[…]/filter[…]on an endpoint that does not support them (#261) #310 rules: the old 503/429/408 "does not decide" case is split into "does not decide on a probe answered 429 / 408" and "fails each on a probe answered 500 / 503". "does not decide on a probe that got no response" now pins the reason's ending.Mutation checks (each run against
src/Conformance.test.ts, then reverted):saysNothingOfRefusalstatus >= 500as saying nothing408429spec.tswith the new testsChangeset
.changeset/for every change to published behaviourNo 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.3tag, andCHANGELOG.mddoes 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): probeinclude/sorton 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
minorand 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, apatchone would not change the release bump.Notes
docs/conformance.mdsentence that named the feat(Conformance): probeinclude/sorton an endpoint that does not declare them (#261) #278/feat(Conformance): probefields[TYPE]/page[…]/filter[…]on an endpoint that does not support them (#261) #310 difference now states the shared policy and links feat(Conformance): leave the #278 include / sort refusal rules not decided on a probe that says nothing #352. It also notes that the link and pagination rules still decide nothing on a 5xx. The test-section paragraphs for the feat(Conformance): probeinclude/sorton an endpoint that does not declare them (#261) #278 and feat(Conformance): probefields[TYPE]/page[…]/filter[…]on an endpoint that does not support them (#261) #310 suites are updated to say what is now pinned.UsableProbeandRefusalare internal.🤖 Generated with Claude Code
Generated by Claude Code