You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(objectql): exempt curated seed writes from state_machine validation (#3433) (#3454)
* fix(objectql): exempt curated seed writes from state_machine validation (#3433)
`state_machine.initialStates` (#3165) enforced the FSM entry point on every
insert, so seed replay silently rejected every mid-lifecycle row and cascaded
its master-detail children — an empty-DB showcase boot loaded 1/5 projects and
1/10 tasks, and every marketplace template with a `closed_won`/`closed` seed row
plus the rehydrate-heal and per-org replay paths hit the same "installed but no
data" trap.
A seed is a curated snapshot of established facts, not a record walking its
lifecycle, so it is now exempt from the state_machine rule:
- spec: new server-set `ExecutionContext.seedReplay` intent flag (sibling of
`isSystem`; clients cannot inject it).
- objectql: the four `evaluateValidationRules` call sites pass
`skipStateMachine` when the context carries `seedReplay`; the rule evaluator
skips `state_machine` on both insert (initialStates) and update (transitions).
Scoped to state_machine only — format/cross_field/script/json_schema/
conditional still run.
- metadata-protocol: `SeedLoaderService.SEED_OPTIONS` sets `seedReplay: true`, so
all seed paths (boot inline, marketplace runInlineSeed, per-org replay,
http-dispatcher, protocol) are covered with no call-site changes.
The showcase project seed drops its three-phase FSM-walk workaround (#3415) and
seeds each project directly at its real status again.
Regression tests span rule-validator (skip is FSM-scoped), the real engine
(seedReplay context bypasses enforcement), and the seed loader (threads the flag,
loads all mid-lifecycle rows). Verified on a real empty-DB boot:
showcase_project=5, showcase_task=10, no rejected seed rows.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(showcase): retarget seed-vs-FSM guard to the #3433 exemption; regen exec-context ref doc
Two CI follow-ups to the #3433 seed exemption:
- examples/app-showcase/test/seed.test.ts — the #3415 guard asserted every
seeded status enters through `initialStates`, the exact constraint #3433
removes. Retargeted to the new contract: a seeded value must be a state the
FSM declares (not a typo), and the fixture must seed ≥1 non-initial state so
a regression back to a planned-only walk fails here.
- content/docs/references/kernel/execution-context.mdx — regenerated so the
spec reference doc reflects the new `seedReplay` field (generated-artifact
drift gate).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments