The inline grammar discards MethodForVerb's known-verb signal, so an unrecognised verb silently mints a POST #297
Labels
No labels
burndown-2026-06
sunday-sprint
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/umbra#297
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Filed by Angie (ENG,
claudeseat), splitting the live half out of #281. That issue asked whetherreopenwas missing from the verb table; it is not, and it closed. This is the footgun it identified along the way, which is real.The signal exists and nothing reads it
MethodForVerbalready distinguishes a known verb from a guess, and says so in its own doc comment:It has exactly one production caller, and that caller throws the second return away:
So
can transfer repo,can restore repo, orcan merge prparses cleanly, mints a tool, and emits POST against an API that almost certainly wants something else. Nothing at parse time reports that a method was inferred rather than known.Why it is worth closing
This is the one place the grammar guesses. Everywhere else it refuses to infer authority: an unwritten grant is an unminted tool, a
canbody rejects an unknown node fail-closed, and a fetch overlay must state itsoutput. A verb it has never seen getting a mutating method by default is the odd one out, and Darren put it well on #281:The failure is silent in the dangerous direction. A wrong GET fails loudly at the API. A wrong POST against a real endpoint may not.
The constraint that makes this a decision rather than a repair
pinrelies on the fallthrough and is documented as doing so.coilyco-bridge/deploy/services/forgejo-mcp/forgejo.mcp.kdlnames it explicitly: "unknown verbs such as pin -> POST". Failing closed today breaks that grant, and any other guardfile leaning on the same default.So this needs an audit before a switch, which is why it is filed rather than fixed.
Options
pin -> POSTbecomes explicit rather than accidental. Smaller, and it does not close the hole for a genuinely novel verb.okand report an inferred method at parse time. Keeps every existing guardfile working and makes the next instance visible instead of silent.Option 3 is the cheapest thing that removes the silence, and it composes with 1 later.
Acceptance
pinkeeps working, or is declared explicitly in every guardfile that uses it, in the same change.Related
reopenpremise was false; this half was not.coilyco-bridge/deploycarries a header comment describing the verb table that omitsreopen,archive,unarchive,delete, andremove. Worth correcting there so the next reader is not misled the same way.Landed on
mainas3893db5.make testandpre-commit run --all-filesgreen.The audit first, since it was the stated blocker
Scanned every
*.mcp.kdlunderdeploy/servicesforcan <verb> <resource>grants whose verb misses the convention table (accounting for thelist-andcreate-on-prefixes andsearch). Two verbs, three grants:comment-services/sirens-echo/forgejo-mcp.mcp.kdl:73,services/forgejo-mcp/forgejo.mcp.kdl:262pin-services/forgejo-mcp/forgejo.mcp.kdl:290That is the whole dependent set. It is small enough that options 2 and 3 stop being alternatives and compose, which is what shipped.
What shipped
Descriptor.MethodInferredrecords the guess instead of discarding it. This is the actual defect in the title fixed:MethodForVerbalways returnedok, andinline.go:130threw it away.ParseInlineWithWarningsreturns one note per inferred grant, naming the verb and the method it was handed.ParseInlinekeeps its signature, so every out-of-tree caller compiles unchanged.method "PUT"node in acanbody states the method outright and suppresses the inference. A statedDELETEalso marks the leafDestructivewhatever the verb is called, because the confirmation gate should key off the effect rather than the spelling. Fails closed on a non-method and on a duplicate.commentandpinare now in the convention table, so zero guardfiles rely on the fallthrough.pin -> POSTis a decision rather than an accident, which is what the deploy comment was documenting.What I did not do, and why
Did not fail closed (option 1), even though the audit shows the in-fleet dependent set is now empty. The audit covers
deploy, which is where MCP guardfiles live, but out-of-tree guardfiles are not all visible from this checkout. Refusing would break any that lean on the fallthrough, with nothing gained over reporting. Option 3 removes the silence today and composes with the switch later, exactly as the issue framed it.Acceptance
TestParseInlineUnknownVerbIsMarkedAndWarned.pinkeeps working and is declared explicitly, in the same change.Follow-up outside this repo
coilyco-bridge/deploycarries a header comment describing the verb table. Withcommentandpinnow stated upstream, the note inservices/forgejo-mcp/forgejo.mcp.kdlreading "unknown verbs such as pin -> POST" is stale and describes the old behaviour. Not touching that repo from here. Worth a one-line correction next time someone is in it, alongside the omissions the issue already flagged (reopen,archive,unarchive,delete,remove).Angie, engineer seat