Repository navigation
Add the in_effect decision status and two decision gate Plays - #4392
Merged
Merged
Conversation
decision_status gains in_effect (built, or a rule in force). Two core Plays refuse setting a decision to accepted without an open linked task, and to in_effect while a linked task is open; they read the decision's tasks edge. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…word Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mstomar125
force-pushed
the
issue-4388-decision-fields
branch
from
November 26, 2026 12:32
e999d3b to
12957a2
Compare
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.
Closes #4388
Design: #3729 (comment) (core owner), approved by the owner. A decision records that it is built or a rule in force through its status; no marker field, no typed
described_by.What changed
Type
decision: kind concrete, category flat. Sheet changed:packages/core/shape-record/node-types.md(decision_status values).decision_statusgainsin_effect("In effect"; closed, core-protected).DecisionStatusserializes as snake_case now (identical for the existing values). Generated TypeScript regenerated.core_plays.rs, enabled by default, user-editable/disableable:acceptedunless a task linked to the decision (itstasksreverse edge) is neither done nor cancelled.in_effectwhile a linked task is open. A decision with no linked task may go proposed -> in_effect (standing rule). in_effect -> accepted is allowed (with an open task linked).has(node.tasks)because a decision with no edges has notasksvalue (found by the test; without it a decision with nothing linked was accepted).decision-status-in-effect(core_schema) anddecision-gate-plays-seeded(seeded_content, additive).Known limits
acceptedorin_effectis not checked.update_decision_nodeis not gated by the Plays in the unit-test harness (no engine); the integration tests run the engine.Existing databases (class
refuse, notadditive)The core-type comparison reports a stored
decisionschema withoutin_effectas a changed field, so a database created by an earlier build is refused at open (schema mismatch) until it is reset, like the earlier ai-chat-message value additions. I recorded the change as classrefusebecause that is what it does; the two Plays are created on open in any database. The owner's NodeSpace workspace database holds real data, so this release is a reset for that database: export/re-import is the owner's call and no migration is added.Workspace cleanup (NOT done here; after the core release is installed on the owner's device)
On the device that declares the fields:
work_statustoin_effect, then clearwork_status.described_byedge with a mention of that page in the decision's content.work_statusanddescribed_byfrom thedecisionschema.(If the database was reset for this release, the custom declarations and the 82 values are gone with it and steps 1-3 mean re-importing them as in_effect.)
Tests (mutation-checked, each failed for the right reason)
a_decision_is_accepted_only_with_an_open_linked_task: nothing linked, spec-only link, cancelled-only task refused; open task accepted. Covers a decision linked from both a task and a spec (tasksvsspecsreverse names). Mutation: accepting condition ->false: fails. Also caught the missinghas()(reproduce-first).a_decision_goes_in_effect_only_when_its_linked_work_is_finished: standing-rule path, refusal while open, done -> in_effect, back to accepted. Mutation: in-effect condition ->false: fails.spec_plan_and_decision_declare_the_decided_fields(schema values): mutation removingInEffectfromALL: fails.a_superseded_decision_cannot_be_reinstated, play id/seed tables, and the core play counts.Commands:
bun run quality:fix,bun run test:changed(passed),bun run gen:types,node-types:gen,shape:gen,shape:check.🤖 Generated with Claude Code