Skip to content

Key first-run failures on Behavior to write - #84

Merged
raghubetina merged 1 commit into
mainfrom
behavior-to-write-rule
Oct 12, 2026
Merged

raghubetina merged 1 commit into
mainfrom
behavior-to-write-rule

Conversation

@raghubetina

Copy link
Copy Markdown
Contributor

From the next First Draft deploy, a polymorphic Reference keeps its storage when a target cannot carry the authored deletion outcome. That target refuses its own deletion in a private before_destroy while a record references it, and a cascade or nullification it leaves out fails its deletion spec with ActiveRecord::RecordNotDestroyed. The generated README's Behavior to write lists that outcome, and the generated AGENTS.md now says:

A spec that fails through behavior README.md's Behavior to write lists is work to do: write that behavior until its specs pass. A stub raises NotImplementedError, and a deletion outcome First Draft left out fails its spec with RecordNotDestroyed. Any other failure is a First Draft defect.

The workshop notes (from #80) called only a NotImplementedError work to do, so an agent would have reported a left-out deletion as a First Draft defect.

This changes only the first bullet of Setup and specs in .devcontainer/workshop/app-instructions.md: a spec that fails through behavior the README's Behavior to write lists is work to do, and the bullet names both failure shapes. Everything else in the file is unchanged. Before the deploy no README lists a deletion outcome, so the rule holds on both sides of it.

Verified. The wording follows the AGENTS.md template at service main a55d79bb. A Compile of the service's multi-target smoke Plan on that commit produced a README whose Behavior to write lists a Remark cascade, and its specs failed only there, with RecordNotDestroyed.

Not run: a Codespace, and an agent reading the notes.

Not for merging until the owner approves: merging changes what new workshop Codespaces get.

Docs: updated .devcontainer/workshop/app-instructions.md (Setup and specs).

Review: Codex (codex-review 0.8.0, max effort), session c5411aaa-17e4-461b-903e-fc38b36aa4a6, approve.

The next First Draft deploy keeps a polymorphic Reference's storage
when a target cannot carry the authored deletion outcome. Such a
target refuses its own deletion while a record references it, and a
cascade or nullification it leaves out fails its deletion spec with
RecordNotDestroyed. The README's Behavior to write lists that
outcome, and the generated AGENTS.md now calls any spec that fails
through behavior on that list work to do.

The workshop notes called only a NotImplementedError work to do, so
an agent would have reported a left-out deletion as a First Draft
defect. They now key the first run on the Behavior to write list and
name both failure shapes, as the app's AGENTS.md does. Before the
deploy no README lists a deletion outcome, so the rule holds on both
sides of it.
@raghubetina
raghubetina merged commit b4a34e4 into main Oct 12, 2026
1 check passed
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