feat: a lone write is an invocation, whichever method spells it - #104
Merged
Conversation
An action was recognised only as a collection POST. An API that spells an invocation as a replacement offers a lone PUT or PATCH instead, and that entity classified as nothing: the write was filed as a collection write no consumer reads, or as an update with no lifecycle around it. A write with nothing to read it back, list it or remove it is an invocation whichever method carries it. It goes in the create slot beside every other action's, so a consumer finds it in one place. An entity offering a write in both positions still classifies as nothing — two candidate invocations and no way to choose between them. Corrects two comments on Kind while there: KindListResource described the list-only meaning the glossary retired, and KindAction named the POST it is no longer limited to. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Closes the first of the two gaps
docs/mapping.mdrecords (#103).What was wrong
classify.gorecognised an action only as a collectionPOST. An API thatspells an invocation as a replacement offers a lone
PUTorPATCHinstead —and that entity classified as nothing. The write was filed as a collection
write no consumer reads, or as an update with no lifecycle around it, and the
entity was dropped as
"no operations in classifiable positions"or"partial lifecycle (update) fits no kind".What changes
A write with nothing to read it back, list it or remove it is an invocation
whichever method carries it. It goes in the create slot beside every other
action's, so a consumer finds it in one place regardless of the method the
document used —
derive.actionneeded no change.An entity offering a write in both positions and nothing else still
classifies as nothing: two candidate invocations and no way to choose between
them, which is worth refusing rather than guessing.
The singleton is disjoint by construction, not by ordering — it needs a
collection
GET, and the new rule requires there be none.Also corrects two
Kindcomments in the file:KindListResourcedescribedthe list-only meaning
docs/glossary.mdexplicitly retired, andKindActionnamed the POST it is no longer limited to.
Effect on the pinned documents
Classification counts, measured before and after on the two documents in
corpus.lock.json:Resource, datasource and list-resource counts are unchanged on both. The
change is purely additive: every entity it moves came from the excluded pile.
Two existing test cases asserted the old behaviour —
crud("/knobs/{knobId}", "patch!")andcrud("/odd", "put!")both expected exclusion — and now assertthe action. Added a table-driven test proving the invocation lands in the
create slot with its own method, for all four positions, and that it is not
also recorded as surplus.
Note on
README.mdREADME.md:55reports 210 actions across three documents. That figure is nowunderstated, but it is a post-binding count over Jamf Pro as well, and Jamf Pro
is not in
corpus.lock.json— so it cannot be re-measured here without a fullgeneration run. Left alone rather than restated from classification counts,
which are a different measurement.
Verification
make checkpasses: fmt, build, vet, coverage gate at 91.3% total (specmodel95.0%), hygiene.
🤖 Generated with Claude Code