Repository navigation
Say that ungenerated State Machine events are stubs - #167
Merged
Merged
Conversation
The service's next Compiler keeps a required, unconditional State Machine alone on its Entity in AASM when an event has effects it cannot generate. Before, one such event made the whole machine storage only, with no events, AASM initialization, or assignment guard, even for the events it could generate. Now the aasm block lists the generated events, and each other event is emitted as its bang form, plain form, and may_ predicate, under the names AASM would give it, each raising NotImplementedError until it is written. The README's Behavior to write lists each one, its State Machine examples fail through the stub, and seeds and spec setup never fire one. The generated AGENTS.md now says a stubbed scope or event raises. The Skill's rule for failing specs named only a stubbed scope, so the test run and continuation now say a stubbed scope or event raises, as the app's AGENTS.md does. The Plan reference said cross-Entity, multi-effect, and broader effect shapes kept only storage; it now says which events are generated, describes the stub, the left-out seed record, and the GapSet record, and keeps storage only for optional, conditional, multiple-per-Entity, guarded, and colliding machines. Until the service deploys that Compiler, no README lists an event under Behavior to write, so the rule holds on both sides of the deploy. Plugin 0.8.13 is published and selected, so this moves to 0.8.14 with a CHANGELOG entry. Packing main (84bb47f) with CLI 92f27714 on Node 24.18.0 reproduced its digest before the repack. npm ci --ignore-scripts, npm audit, sh script/check with the stub CLI and with that CLI, and check-cli-contract pass.
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.
Why
The service's next Compiler (service
maine2318b81) keeps a required, unconditional State Machine alone on its Entity in AASM when an event has effects it cannot generate: two effects, or one that sets a Field on another Entity, a required, immutable, derived, or non-datetimeField, or a Value other than the current time ornil. Before, one such event made the whole machine storage only, with no events, AASM initialization, or direct-assignment guard, even for the events it could generate. Now theaasmblock lists the generated events, and each other event gets<m>!,<m>, andmay_<m>?under the names AASM would give it, each raisingNotImplementedErroruntil it is written. The README's Behavior to write lists each one, the event's State Machine examples fail through the stub, and seeds and spec setup never fire one. The generatedAGENTS.mdnow says:Plugin 0.8.13 named only a stubbed scope as raising, and its Plan reference said cross-Entity, multi-effect, and broader effect shapes kept only storage.
AGENTS.mddoes. The preview gate is unchanged: a stubbed event's examples fail, so the run passes only once it is written, and no generated page fires an event.effects_not_generatedrecord with a consequence naming the stubs. Optional, conditional, multiple-per-Entity, guarded, and colliding machines still keep only storage.AGENTS.mdbullet or describes a storage-only State Machine, so none changed.Verified on service
e2318b81.script/compiler_transition_stubs_runtime_smokepassed. Its Ticketstatusmachine keptaasm :statuswithno_direct_assignmentand onlyevent :assign, and stubs forresolve(setsdesk.last_resolved_at),postpone(a required Field),reopen(adateField), andarchive(two effects). The README's Behavior to write listed all four with the wording this PR quotes, the generatedAGENTS.mdcarried the new sentence, the seed left out theresolvedTicket, and Test coverage to complete listed the Policy and request examples whose setup needsresolve. The generated suite ran 96 examples with 16 failures, each an expected failure through one of the four stubs' State Machine examples.Order. Ship with the service release that deploys
e2318b81or later. Until then no README lists an event under Behavior to write, so the rule holds on both sides of the deploy.Release. Plugin 0.8.13 is published and selected, so this moves to 0.8.14 with a CHANGELOG entry. Packing
main(84bb47f) with CLI92f27714(v0.8.2) on Node 24.18.0 reproduced its declared digest1b57b73a…; this branch packs to9a00700f…, twice. This PR does not tag, publish, or change the catalog selection.Checks.
npm ci --ignore-scriptsandnpm audit(0 vulnerabilities) pass.sh script/checkpasses 85/85 with the stub CLI and with CLI92f27714, andnode script/check-cli-contract.mjspasses.Docs: updated
skills/create-full-stack-app/references/diagnostics-and-recovery.md(Run the generated tests, continuation),references/foundation-plan-023.md(the State Machine paragraph), and theCHANGELOG.md0.8.14 entry.Review: Codex (codex-review 0.8.0, max effort), session 6043bc21-89d0-459d-bfb6-4d27c0bc06b0, approve.