@cynodia/axiom 0.14.0-alpha.1 → 0.14.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,7 @@ Shorter forms of the same routing: [`AGENTS.md`](AGENTS.md) and [`llms.txt`](llm
33
33
  at this package's root.
34
34
 
35
35
  **Status: experimental / alpha.** The API may change between alpha releases. The
36
- documentation in `docs/` describes this exact version, `0.14.0-alpha.1`.
36
+ documentation in `docs/` describes this exact version, `0.14.0-alpha.2`.
37
37
 
38
38
  ## Installation
39
39
 
@@ -47,7 +47,7 @@ Every release of this project is a pre-release and npm's `latest` tag points at
47
47
  plain command above installs the current version. **There is no `alpha` dist-tag** — the tag
48
48
  was removed once it stopped tracking releases, and `npm install @cynodia/axiom@alpha` now
49
49
  fails with a 404. Pin the exact version instead when one is needed:
50
- `npm install @cynodia/axiom@0.14.0-alpha.1`.
50
+ `npm install @cynodia/axiom@0.14.0-alpha.2`.
51
51
 
52
52
  These are ES modules compiled to ES2022; import them with `import`, not `require`. There is
53
53
  no published Axiom CLI. `@cynodia/axiom-server`'s SQLite persistence adapter additionally
@@ -1,6 +1,6 @@
1
1
  # Actions and transactions
2
2
 
3
- Axiom 0.14.0-alpha.1. An action is behavior expressed as data, executed as a transaction.
3
+ Axiom 0.14.0-alpha.2. An action is behavior expressed as data, executed as a transaction.
4
4
 
5
5
  ```ts
6
6
  {
package/docs/AGENT_API.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Agent API
2
2
 
3
- Axiom 0.14.0-alpha.1. The machine-facing interface. Agents query semantics and apply
3
+ Axiom 0.14.0-alpha.2. The machine-facing interface. Agents query semantics and apply
4
4
  structural transformations; they never edit generated code.
5
5
 
6
6
  ```ts
@@ -1,6 +1,6 @@
1
1
  # Agent reference
2
2
 
3
- Axiom 0.14.0-alpha.1. Compressed operational contract. Read this plus the `.d.ts`
3
+ Axiom 0.14.0-alpha.2. Compressed operational contract. Read this plus the `.d.ts`
4
4
  declarations before authoring or modifying an Axiom application.
5
5
 
6
6
  Formal guarantees: [`SEMANTIC_CONTRACT.md`](SEMANTIC_CONTRACT.md). Mistakes that compile:
@@ -1181,12 +1181,28 @@ Multi-authority: leaderless. Any compatible authority advances any eligible inst
1181
1181
  per-instance lease+fence (reused 0.12 `CoordinationProvider`); stale owner refused. Startup
1182
1182
  discovers runnable / retry-due / timer-due / recoverably-waiting instances and advances them
1183
1183
  — the application does **not** scan stuck workflows, call `resumeWorkflow`, or re-register
1184
- timers/waits. Same logical outcome at 1 or N authorities. Incompatible build refuses to
1185
- advance an instance (fail-closed).
1184
+ timers/waits. Same logical outcome at 1 or N authorities.
1185
+
1186
+ Compatibility (safety boundary, not deployment metadata): an instance durably records the
1187
+ `AuthorityCompatibilityKey` at creation. `semanticFingerprint` covers `WorkflowDef`
1188
+ executable meaning — **changing a step's `action` / `event` target, argument or `where`
1189
+ expression, `retry` policy, `timer` duration, `branch` predicate, `complete`/`fail` output,
1190
+ or any control-flow edge (`next` / `then` / `else` / `onError` / `onTimeout` / `entry`), or
1191
+ the body of a referenced `ActionDef` / `EventDef`, makes existing in-flight instances
1192
+ incompatible with the new build.** An incompatible authority fails closed *before* any
1193
+ semantic step — no transition, no `ActionDef` invoke, no event/timer/branch, no
1194
+ `instanceRevision` advance — and leaves the instance for a compatible authority; it is never
1195
+ auto-failed or auto-cancelled, and `cancelWorkflow` from an incompatible build is refused.
1196
+ Presentation-only changes (`name` / `description` / `label`) and step declaration order are
1197
+ **not** semantic. A semantically identical fresh process recovers instances normally. There
1198
+ is no workflow instance migration in 0.14. Structurally invalid workflow IR is refused at
1199
+ `createAxiomServer` (`WorkflowIRError`); a malformed step reaches `validateGraph` as a
1200
+ `WORKFLOW_INVALID_STEP` diagnostic, never a native error.
1186
1201
 
1187
1202
  Inspection: `server.getWorkflow(instanceId)` / `inspectWorkflows(limit)` — `status`,
1188
1203
  `currentStepId`, `activationId`, `attempt`, `waitingReason`, `nextEligibleAt`,
1189
- `instanceRevision`, `failure`, `output` (no secrets). `server.workflowHistory(instanceId)`
1204
+ `instanceRevision`, `failure`, `output`, `compatible` /
1205
+ `incompatibleReason: 'incompatible-build'` (no secrets). `server.workflowHistory(instanceId)`
1190
1206
  — the durable transition log. `AgentAPI.analyzeWorkflow(workflowId)` — static: inputs, steps
1191
1207
  + edges, action/event dependencies, terminal outcomes, acyclicity, possible wait reasons.
1192
1208
 
@@ -1,6 +1,6 @@
1
1
  # Anti-patterns
2
2
 
3
- Axiom 0.14.0-alpha.1. Each of these compiles. Each is wrong. Each is followed by the correct
3
+ Axiom 0.14.0-alpha.2. Each of these compiles. Each is wrong. Each is followed by the correct
4
4
  alternative.
5
5
 
6
6
  ## 1. Field names as entity runtime keys
@@ -1046,3 +1046,51 @@ Why wrong: workflow execution is leaderless — any compatible authority advance
1046
1046
  instance under a fenced per-instance lease. Recovery discovery is bounded and indexed and
1047
1047
  runs on startup automatically. Reading status is safe through any authority. The application
1048
1048
  writes none of this.
1049
+
1050
+ ## 78. Treating matching ids, or a matching Server IR version, as workflow compatibility
1051
+
1052
+ ```ts
1053
+ // WRONG — every one of these can be true while the executable meaning has changed.
1054
+ if (a.workflowId === b.workflowId && sameStepIds(a, b)) continueUnderNewBuild();
1055
+ if (a.contract === 'axiom.server.v8' && b.contract === 'axiom.server.v8') safe();
1056
+ if (a.packageVersion === b.packageVersion) safe();
1057
+ ```
1058
+
1059
+ Why wrong: Phase 22 proved a workflow's meaning can change while `workflowId`, every step id
1060
+ and the active step id stay identical — a different `action` / `event` target, a different
1061
+ `branch` predicate, a different `timer` duration, a rewired `next` edge. IR-version
1062
+ compatibility only means both runtimes understand the *vocabulary*; it says nothing about
1063
+ whether two graphs contain equivalent executable semantics, and neither does the package
1064
+ version string. The only authority is the executable `semanticFingerprint`, which now covers
1065
+ `WorkflowDef`. Keep distinct: IR protocol compatibility, graph semantic compatibility,
1066
+ workflow instance compatibility.
1067
+
1068
+ ## 79. Continuing an in-flight workflow under changed executable semantics
1069
+
1070
+ ```ts
1071
+ // WRONG — reinterpreting durable meaning under a new definition.
1072
+ const inst = load(id); // created under build A
1073
+ replayHistory(inst, buildB.workflowDef); // "catch up" under B
1074
+ advance(inst, buildB.workflowDef); // B chooses B's branch / event / timer
1075
+ ```
1076
+
1077
+ Why wrong: a durable workflow instance is bound to the semantics it was created and advanced
1078
+ under. An authority whose graph changes the executable meaning must **fail closed** — leave
1079
+ the instance untouched for a compatible authority — not replay its history under the new
1080
+ definition, not pick the new branch, not match the new event, not recompute the new timer,
1081
+ and not "find the closest step" for a renamed one. There is no workflow instance migration
1082
+ in 0.14. This is framework-owned: the application does not route by build, keep a
1083
+ compatibility registry, or migrate instances by hand.
1084
+
1085
+ ## 80. Hashing workflow presentation metadata to make mixed-build checks stricter
1086
+
1087
+ ```ts
1088
+ // WRONG — an over-tight fingerprint breaks rolling deploys for no safety gain.
1089
+ const key = sha256(JSON.stringify(workflowDef)); // includes name / description / step order
1090
+ ```
1091
+
1092
+ Why wrong: a compatibility check that fires on a `description` edit or a reordered (but
1093
+ edge-identical) step list is a defect too — it strands instances that a semantically
1094
+ identical authority could safely resume. `semanticFingerprint` deliberately strips
1095
+ `name` / `description` / `label` and is independent of step declaration order. Fingerprint
1096
+ *meaning*, not bytes.
package/docs/AUTHORITY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Authority
2
2
 
3
- Axiom 0.14.0-alpha.1. How an application crosses the trust boundary.
3
+ Axiom 0.14.0-alpha.2. How an application crosses the trust boundary.
4
4
 
5
5
  Until 0.5.x an Axiom application executed locally. 0.6 adds an **authority**: a generic
6
6
  runtime that owns state, decides mutations and persists them. The same semantic graph
@@ -1,6 +1,6 @@
1
1
  # Constraints
2
2
 
3
- Axiom 0.14.0-alpha.1. Two constructs, answering different questions. They are not
3
+ Axiom 0.14.0-alpha.2. Two constructs, answering different questions. They are not
4
4
  interchangeable.
5
5
 
6
6
  | | Question | Sees |
@@ -1,6 +1,6 @@
1
1
  # Distributed authority
2
2
 
3
- *This document describes Axiom `0.14.0-alpha.1`.*
3
+ *This document describes Axiom `0.14.0-alpha.2`.*
4
4
 
5
5
  The authoritative runtime (`docs/AUTHORITY.md`) may run as **more than one process at the
6
6
  same time**, over one shared persistence provider, without any change to the
@@ -294,19 +294,31 @@ An authority's **compatibility key** is four fields:
294
294
  - `schemaVersion` / `schemaFingerprint` — the 0.11 persistence-relevant identity. A schema
295
295
  mismatch is already fatal per 0.11 migration safety.
296
296
  - `serverContract` — the Server IR contract the document declares.
297
- - `semanticFingerprint` — a **new**, versioned, deterministic hash over the *executable
298
- server-side meaning*: action bodies, guards and operations, integration operation
299
- definitions, triggers, events, subscription policy, read-policy predicates, query
300
- semantics, expression definitions, constraints. It **excludes** everything a rename
301
- touches — names, descriptions, labels, free-form metadata, all UI / routes / themes /
302
- presentation, and declaration order. It is distinct from `schemaFingerprint`, which
303
- deliberately excludes executable meaning: two graphs whose actions do entirely different
304
- things but store the same shapes have the same `schemaFingerprint` and different
297
+ - `semanticFingerprint` — a versioned, deterministic hash over the *executable server-side
298
+ meaning* of **every** executable graph kind (`core`'s single `EXECUTABLE_KINDS` list):
299
+ action bodies, guards and operations, integration operation definitions, triggers, events,
300
+ subscription policy, read-policy predicates, query semantics, expression definitions,
301
+ constraints, storage authorization, relationships, **and `WorkflowDef` executable meaning**
302
+ — a workflow's inputs / bindings / entry, and every step's kind, control-flow edges and
303
+ step-specific semantics (the `ActionDef` / `EventDef` it targets and, transitively, those
304
+ bodies; argument / `where` / `bind` / `when` / output expressions; `retry` policy; `timer`
305
+ duration). The authority-side projection derives from the same `EXECUTABLE_KINDS` list as
306
+ the graph-level `semanticFingerprint`, so a future graph primitive cannot alter executable
307
+ meaning yet escape authority compatibility. It **excludes** everything a rename touches —
308
+ names, descriptions, labels, free-form metadata, all UI / routes / themes / presentation,
309
+ and declaration order (workflow steps included). It is distinct from `schemaFingerprint`,
310
+ which deliberately excludes executable meaning: two graphs whose actions do entirely
311
+ different things but store the same shapes have the same `schemaFingerprint` and different
305
312
  `semanticFingerprint`s.
306
313
 
307
- Durable work records the compatibility key of the build that created it. An authority whose
308
- key differs **refuses to claim** that work (`INCOMPATIBLE_AUTHORITY` / the item is simply
309
- not claimed and stays visible as incompatible). A compatible authority runs it. During a
314
+ Durable work — and every **durable workflow instance** — records the compatibility key of
315
+ the build that created it. An authority whose key differs **refuses to claim** that work
316
+ (`INCOMPATIBLE_AUTHORITY` / the item is simply not claimed and stays visible as
317
+ incompatible). For a workflow instance the refusal is checked before *any* semantic step
318
+ (action invocation, event match, timer fire, branch, retry, terminal transition, or a
319
+ cancellation that would transition it); the instance is left untouched for a compatible
320
+ authority to resume — never auto-failed or auto-cancelled. A compatible authority — topology
321
+ and process identity aside — runs it. During a
310
322
  schema migration, incompatible workers stop claiming new work, ordinary serving is refused
311
323
  per 0.11, the migration completes, and compatible new authorities resume — migration
312
324
  ownership stays host-controlled and separate from ordinary distributed-work ownership; there
package/docs/EFFECTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Effects
2
2
 
3
- Axiom 0.14.0-alpha.1. External effects are not rollback-capable state mutations. This file
3
+ Axiom 0.14.0-alpha.2. External effects are not rollback-capable state mutations. This file
4
4
  is the delivery model; [`AUTHORITY.md`](AUTHORITY.md#external-effects) is the load-bearing
5
5
  statement of why, and [`INTEGRATIONS.md`](INTEGRATIONS.md) is the operation vocabulary this
6
6
  builds on.
package/docs/EVENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Events
2
2
 
3
- Axiom 0.14.0-alpha.1. An event is a typed fact — something that happened — never work
3
+ Axiom 0.14.0-alpha.2. An event is a typed fact — something that happened — never work
4
4
  itself. [`AUTHORITY.md`](AUTHORITY.md#external-events) is the load-bearing statement;
5
5
  this file is the vocabulary and the webhook delivery mechanism. A **subscription** is the
6
6
  other way an external fact becomes an `EventDef` payload — see
@@ -1,6 +1,6 @@
1
1
  # Expressions
2
2
 
3
- Axiom 0.14.0-alpha.1. An expression describes **what value is computed**. It is a tree of
3
+ Axiom 0.14.0-alpha.2. An expression describes **what value is computed**. It is a tree of
4
4
  plain data, never source text and never a callback. Evaluation is pure: an expression MUST
5
5
  NOT change state.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Graph model
2
2
 
3
- Axiom 0.14.0-alpha.1. The `ApplicationGraph` is the authoritative representation of an
3
+ Axiom 0.14.0-alpha.2. The `ApplicationGraph` is the authoritative representation of an
4
4
  application. Everything else — the IR, the page, the DOM — is derived from it and is never
5
5
  edited.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Integrations
2
2
 
3
- Axiom 0.14.0-alpha.1. How an application declares and calls an external system, without
3
+ Axiom 0.14.0-alpha.2. How an application declares and calls an external system, without
4
4
  embedding a transport, an SDK or a secret in the graph. The authority boundary this
5
5
  depends on is [`AUTHORITY.md`](AUTHORITY.md#external-systems); this file is the vocabulary.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Realtime — live canonical queries
2
2
 
3
- Axiom 0.14.0-alpha.1. The operational contract for **observing a `QueryDef` result over
3
+ Axiom 0.14.0-alpha.2. The operational contract for **observing a `QueryDef` result over
4
4
  time**: subscribe once, receive an initial coherent result, then receive canonical changes
5
5
  as authoritative committed state moves — through any compatible authority, across
6
6
  reconnects. `axiom.server.v7` (0.13 adds no IR vocabulary).
package/docs/LOCATIONS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Locations
2
2
 
3
- Axiom 0.14.0-alpha.1.
3
+ Axiom 0.14.0-alpha.2.
4
4
 
5
5
  ```text
6
6
  Expression = a value
@@ -1,6 +1,6 @@
1
1
  # Schema evolution & semantic migrations
2
2
 
3
- Axiom 0.14.0-alpha.1. The operational contract for evolving a deployed application's
3
+ Axiom 0.14.0-alpha.2. The operational contract for evolving a deployed application's
4
4
  semantic model and its persisted canonical data over time — adding a required field,
5
5
  splitting one field into two, removing an obsolete one, migrating millions of
6
6
  provider-backed rows — **without** an application-authored SQL migration, an ORM migration,
@@ -1,6 +1,6 @@
1
1
  # Presentation
2
2
 
3
- Axiom 0.14.0-alpha.1. Presentation is **semantic UX intent**, expressed as data on a UI
3
+ Axiom 0.14.0-alpha.2. Presentation is **semantic UX intent**, expressed as data on a UI
4
4
  node. It names roles, tokens and device classes. It never names a colour, a length, a media
5
5
  query or a CSS property.
6
6
 
package/docs/QUERIES.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Semantic data access & the query layer
2
2
 
3
- Axiom 0.14.0-alpha.1. The operational contract for demand-driven reads over authoritative
3
+ Axiom 0.14.0-alpha.2. The operational contract for demand-driven reads over authoritative
4
4
  data that is too large to materialize as a `StateDef` — 500,000 orders, 5,000,000 order
5
5
  lines, years of audit rows. `axiom.server.v6`.
6
6
 
package/docs/RUNTIME.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Runtime
2
2
 
3
- Axiom 0.14.0-alpha.1. The runtime executes an `ApplicationIR`. It is domain-independent: it
3
+ Axiom 0.14.0-alpha.2. The runtime executes an `ApplicationIR`. It is domain-independent: it
4
4
  contains no knowledge of any application.
5
5
 
6
6
  ## Constructing
@@ -1,6 +1,6 @@
1
1
  # Semantic contract
2
2
 
3
- Axiom 0.14.0-alpha.1. Runtime guarantees, stated formally. This file defines behavior; it
3
+ Axiom 0.14.0-alpha.2. Runtime guarantees, stated formally. This file defines behavior; it
4
4
  does not teach. Where this file and any specification in `../specs/` disagree, this file
5
5
  describes the implementation and is authoritative.
6
6
 
package/docs/STATE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # State
2
2
 
3
- Axiom 0.14.0-alpha.1. A `StateDef` is a named application value: stored, or computed from
3
+ Axiom 0.14.0-alpha.2. A `StateDef` is a named application value: stored, or computed from
4
4
  other state.
5
5
 
6
6
  ```ts
package/docs/STORAGE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Storage and blobs
2
2
 
3
- Axiom 0.14.0-alpha.1. How an application stores, references, serves and deletes binary data —
3
+ Axiom 0.14.0-alpha.2. How an application stores, references, serves and deletes binary data —
4
4
  an attachment, a document, a photograph, a diagnostic log — with no filesystem path, no
5
5
  upload route and no download route anywhere in it.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Subscriptions
2
2
 
3
- Axiom 0.14.0-alpha.1. How an application receives a stream of external events — an MQTT
3
+ Axiom 0.14.0-alpha.2. How an application receives a stream of external events — an MQTT
4
4
  topic, a WebSocket feed, a queue consumer, a filesystem watcher, a serial port — without a
5
5
  client, a socket or a callback anywhere in the graph.
6
6
 
package/docs/TRIGGERS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Triggers
2
2
 
3
- Axiom 0.14.0-alpha.1. A `TriggerDef` says **when** an action should be invoked, without
3
+ Axiom 0.14.0-alpha.2. A `TriggerDef` says **when** an action should be invoked, without
4
4
  embedding callback code. `docs/AUTHORITY.md`
5
5
  [§ Triggers](AUTHORITY.md#triggers) is the load-bearing statement of the execution model;
6
6
  this file is the vocabulary.
package/docs/UI.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UI
2
2
 
3
- Axiom 0.14.0-alpha.1. Eleven semantic UI node kinds describe **what exists and what it does**.
3
+ Axiom 0.14.0-alpha.2. Eleven semantic UI node kinds describe **what exists and what it does**.
4
4
  How it looks is [presentation](PRESENTATION.md).
5
5
 
6
6
  All eleven share `UIBase`:
@@ -1,6 +1,6 @@
1
1
  # Validation
2
2
 
3
- Axiom 0.14.0-alpha.1. Validation is authoring-time structural checking. It is not the same
3
+ Axiom 0.14.0-alpha.2. Validation is authoring-time structural checking. It is not the same
4
4
  as runtime constraint evaluation — see [`CONSTRAINTS.md`](CONSTRAINTS.md) for the four
5
5
  layers of correctness.
6
6
 
@@ -202,7 +202,7 @@ to `axiom.server.v8` or executed. Every failure is a structured diagnostic — n
202
202
  | `WORKFLOW_ENTRY_NOT_FOUND` | `WorkflowDef.entry` does not name a step of that workflow. |
203
203
  | `WORKFLOW_STEP_NOT_FOUND` | A control-flow edge (`next` / `onError` / `then` / `else` / `onTimeout`) or a binding's `producedBy` names a step that does not exist. |
204
204
  | `WORKFLOW_DUPLICATE_STEP_ID` | Two steps in one workflow share an id, or a step id collides with a graph node id. |
205
- | `WORKFLOW_INVALID_STEP` | A step with no id, or a `type` outside the six (`action`, `wait-event`, `timer`, `branch`, `complete`, `fail`). |
205
+ | `WORKFLOW_INVALID_STEP` | A step with no id, a non-object step (`null`, a string, an array), or a `type` outside the six (`action`, `wait-event`, `timer`, `branch`, `complete`, `fail`). Any malformed step shape produces this diagnostic — never a native `TypeError` (spec14pt3 F1). |
206
206
  | `WORKFLOW_CYCLE_NOT_ALLOWED` | The workflow control-flow graph contains a cycle. Retries are runtime policy, not graph edges. |
207
207
  | `WORKFLOW_ACTION_NOT_FOUND` | An `action` step references an `action` node that does not exist. |
208
208
  | `WORKFLOW_EVENT_NOT_FOUND` | A `wait-event` step references an `event` node that does not exist. |
package/docs/WORKFLOWS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Durable workflows
2
2
 
3
- Axiom 0.14.0-alpha.1. The operational contract for **long-running semantic computations with
3
+ Axiom 0.14.0-alpha.2. The operational contract for **long-running semantic computations with
4
4
  a durable control position** — orchestration that survives process death, authority
5
5
  failover, retries, timer delivery, event delivery and ordinary distributed contention
6
6
  without application-owned infrastructure. `axiom.server.v8`.
@@ -211,14 +211,45 @@ logical outcome.
211
211
 
212
212
  ## Compatibility
213
213
 
214
- A running instance stores the `AuthorityCompatibilityKey` (`{ schemaVersion,
215
- schemaFingerprint, serverContract, semanticFingerprint }`) at start. An authority whose key
216
- differs **refuses to advance it**, fail-closed — the same mechanism the distributed work
217
- store applies. A presentation-only graph change moves no fingerprint and stays compatible. A
218
- semantic workflow change makes new instances incompatible with old authorities; old
219
- instances are not auto-migrated — they run to completion on a compatible authority or are
220
- surfaced as stranded. A graph with **no** `WorkflowDef` compiles to the byte-identical
221
- `axiom.server.v1`–`v7` document it always did, and its `semanticFingerprint` is unchanged.
214
+ > Durable workflow instances are bound to **executable semantic compatibility**. An
215
+ > authority whose graph changes the executable meaning of the workflow must fail closed
216
+ > rather than continue the instance under changed semantics.
217
+
218
+ A running instance durably stores the `AuthorityCompatibilityKey` (`{ schemaVersion,
219
+ schemaFingerprint, serverContract, semanticFingerprint }`) at creation, in the same
220
+ transaction that creates it. Before **any** semantic step — action invocation, event match,
221
+ timer fire, branch evaluation, retry, `complete` / `fail`, or a cancellation that would
222
+ transition the instance — an authority checks that key against its own. If it differs the
223
+ authority **refuses**: no `instanceRevision` advance, no `ActionDef` invocation, no event or
224
+ timer transition, no binding write. The instance is left exactly as it stands for a
225
+ compatible authority to resume; incompatibility is an execution-environment condition, never
226
+ an automatic `failed` or `cancelled`.
227
+
228
+ `semanticFingerprint` covers `WorkflowDef` executable meaning: `inputs`, `bindings`, `entry`,
229
+ every step's kind and control-flow edges, and step-specific semantics — the `ActionDef` /
230
+ `EventDef` a step targets (and, transitively, those definitions' own bodies), an `action`
231
+ step's argument expressions / `retry` policy, a `wait-event` step's `where` / `bind` /
232
+ `timeout`, a `timer` step's `after` / `at`, a `branch` step's `when` and edges, and
233
+ `complete` / `fail` output/error expressions. It is computed from `core`'s single
234
+ `EXECUTABLE_KINDS` list, so it and the authority-compatibility fingerprint cannot disagree.
235
+
236
+ - **Semantically incompatible workflow definitions fail closed.** Changing any of the above
237
+ while an instance is in flight strands that instance on incompatible authorities.
238
+ - **Presentation-only changes stay compatible.** `name`, `description`, `label` — anywhere
239
+ in the workflow — move no fingerprint. Step *declaration order* is not semantic either
240
+ (control flow is by explicit edges).
241
+ - **Authority / process identity is irrelevant.** A fresh process running a semantically
242
+ identical build recovers the instance normally; topology and authority count may change
243
+ freely.
244
+ - **Workflow migration across incompatible definitions is not provided in 0.14.** An old
245
+ instance waits for a compatible authority; there is no instance upgrader, step remapping
246
+ or binding migration, and none is inferred ("closest step" recovery never happens).
247
+ - A graph with **no** `WorkflowDef` compiles to the byte-identical `axiom.server.v1`–`v7`
248
+ document it always did, and its `semanticFingerprint` / `schemaFingerprint` are unchanged.
249
+ - Pre-`0.14.0-alpha.2` instances carry a compatibility key computed before `WorkflowDef`
250
+ participated; a corrected authority treats them as incompatible and fails closed (these
251
+ are pre-freeze alpha releases — silent reinterpretation is the only unacceptable
252
+ outcome).
222
253
 
223
254
  ---
224
255
 
@@ -226,8 +257,11 @@ surfaced as stranded. A graph with **no** `WorkflowDef` compiles to the byte-ide
226
257
 
227
258
  `server.getWorkflow(instanceId)` / `server.inspectWorkflows(limit)` return the semantic
228
259
  fields — `status`, `currentStepId`, `activationId`, `attempt`, `waitingReason`,
229
- `nextEligibleAt`, `createdAt`, `updatedAt`, `instanceRevision`, `failure`, `output` — and
230
- **no** secrets (no HMAC keys, database paths, raw SQL, credentials).
260
+ `nextEligibleAt`, `createdAt`, `updatedAt`, `instanceRevision`, `failure`, `output`,
261
+ `compatible` (whether *this* build may advance it; `incompatibleReason: 'incompatible-build'`
262
+ when not) — and **no** secrets (no HMAC keys, database paths, raw SQL, credentials).
263
+ Read-only inspection of an incompatible instance stays available so an operator can see
264
+ *why* it is not progressing rather than finding it silently stuck.
231
265
  `server.workflowHistory(instanceId)` is the durable semantic transition log (`started`,
232
266
  `step-activated`, `step-succeeded`, `step-failed`, `retry-scheduled`, `event-matched`,
233
267
  `timer-fired`, `timeout-fired`, `branch-chosen`, `completed`, `failed`, `cancelled`) — a
@@ -280,3 +314,8 @@ the fixtures from the contract alone.
280
314
  is retained past its `sinceEventSeq` is an implementation-owned retention concern.
281
315
  - `WorkflowStore` bounded retention of terminal instances and history is
282
316
  implementation-owned; an active workflow never expires.
317
+ - Structurally invalid workflow IR (unknown step kind, dangling edge, malformed
318
+ timer/terminal, missing entry) is refused at authority admission — `createAxiomServer`
319
+ throws `WorkflowIRError` rather than starting with a workflow it cannot execute. Malformed
320
+ step input to `validateGraph` produces a `WORKFLOW_INVALID_STEP` diagnostic, never a
321
+ native error.
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # Axiom
2
2
 
3
- > AI-native semantic application framework, version 0.14.0-alpha.1. An Axiom application is a
3
+ > AI-native semantic application framework, version 0.14.0-alpha.2. An Axiom application is a
4
4
  > typed semantic graph — state, behavior, constraints, UI structure, presentation and
5
5
  > authority as structured data — executed by generic runtimes. The JavaScript, HTML and CSS
6
6
  > that reach a browser are compiler output and are never authored or edited. The primary
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cynodia/axiom",
3
- "version": "0.14.0-alpha.1",
3
+ "version": "0.14.0-alpha.2",
4
4
  "description": "AI-native semantic web application framework.",
5
5
  "license": "MIT",
6
6
  "author": "AskTech AS",
@@ -34,10 +34,10 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@cynodia/axiom-core": "0.14.0-alpha.1",
38
- "@cynodia/axiom-runtime": "0.14.0-alpha.1",
39
- "@cynodia/axiom-compiler": "0.14.0-alpha.1",
40
- "@cynodia/axiom-agent-api": "0.14.0-alpha.1"
37
+ "@cynodia/axiom-core": "0.14.0-alpha.2",
38
+ "@cynodia/axiom-runtime": "0.14.0-alpha.2",
39
+ "@cynodia/axiom-compiler": "0.14.0-alpha.2",
40
+ "@cynodia/axiom-agent-api": "0.14.0-alpha.2"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsc -b tsconfig.json"