Skip to content

feat: a lone write is an invocation, whichever method spells it - #104

Merged
ShocOne merged 1 commit into
mainfrom
feat/lone-write-action
Aug 15, 2026
Merged

feat: a lone write is an invocation, whichever method spells it#104
ShocOne merged 1 commit into
mainfrom
feat/lone-write-action

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 15, 2026

Copy link
Copy Markdown
Member

Closes the first of the two gaps docs/mapping.md records (#103).

What was wrong

classify.go recognised an action 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, 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.action needed 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 Kind comments in the file: KindListResource described
the list-only meaning docs/glossary.md explicitly retired, and KindAction
named 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:

Document actions before after excluded before after
thousandeyes 52 53 7 6
github 80 97 100 83

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!") and crud("/odd", "put!") both expected exclusion — and now assert
the 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.md

README.md:55 reports 210 actions across three documents. That figure is now
understated, 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 full
generation run. Left alone rather than restated from classification counts,
which are a different measurement.

Verification

make check passes: fmt, build, vet, coverage gate at 91.3% total (specmodel
95.0%), hygiene.

🤖 Generated with Claude Code

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>
@ShocOne
ShocOne merged commit 11d1eb8 into main Aug 15, 2026
2 checks passed
@ShocOne
ShocOne deleted the feat/lone-write-action branch August 15, 2026 13:12
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