Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
AssigneesNone

Relationships

↔ sibling #3853

#3850 Docs: checks.md names four methods for pre-flight checks; they run before every method not read or list

Opened by reset · 10/23/2026· Shipped 10/23/2026

references/extension/references/model/checks.md opens with "Pre-flight checks run automatically before any mutating method (create, update, delete, action)" and the appliesTo section repeats those names. Read literally, a behavior whose methods are named resolve, mute, assign or deploy cannot attach a check to them, and the adversarial review's preflight dimension gets answered "not applicable" for those extensions.

On swamp 20261020.024627.0-sha.26dc044f (macOS 27) checks do run before such methods. In a workspace with a local behavior whose check is appliesTo: ["resolve"] and whose method is named resolve, swamp behavior run p1 resolve --json prints:

"error": "Pre-flight checks failed for \"p1\" → resolve:\n resolve-gate:\n - resolve-gate ran"

The rule in the source is inferMethodKind(): only get, read, describe, show (kind read) and list, search, find (kind list), or an explicit kind: "read" | "list", skip checks; any other name infers to undefined and isMutatingKind() treats undefined as mutating. appliesTo is validated as z.array(z.string()) and matched by method name.

Expected: checks.md says checks run before every method except those whose name or declared kind is read or list, lists the seven names, and shows appliesTo naming a custom method. Actual: the page names four method names and reads as an allow list.

Steps to reproduce:

  1. swamp repo init --tool none; add extensions/behaviors/probe.ts with a method resolve and a check { appliesTo: ["resolve"], execute: async () => ({ pass: false, errors: ["resolve-gate ran"] }) }.
  2. swamp behavior create @probe/thing p1 --json, then swamp behavior run p1 resolve --json fails on the check.

Suggestion: replace the four-name sentence with the inferMethodKind rule and note that kind on a method overrides the name.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDLINKED+ 3 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

10/23/2026, 6:32:45 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 linked sibling of #385310/23/2026, 5:34:58 PM
Editable. Press Enter to edit.

stack72 commented 10/23/2026, 6:32:53 PM

Thanks @reset for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.