diff --git a/specs/epics/FIX-1786/BUSINESS-RULES.md b/specs/epics/FIX-1786/BUSINESS-RULES.md index b319e6c88d..28531aebe6 100644 --- a/specs/epics/FIX-1786/BUSINESS-RULES.md +++ b/specs/epics/FIX-1786/BUSINESS-RULES.md @@ -37,7 +37,7 @@ seven rules explains is a bug in the model. | ER-19 | Special-case a tool name to refresh a view | FIX-1761: nothing records which collections a request wrote, so a view reloads after every turn (the floor), and no tool name is treated specially | | ER-20 | Remove flow instances or owner pins from the engine | They stay in the engine untouched, with no deprecation markers ([D9](DECISIONS.md#d9)); [FIX-1798](https://linear.app/fixpoint-labs/issue/FIX-1798), outside this epic, deletes them once FIX-1788 lands. Channels are out of scope ([ER-21](#what-no-child-may-do)), and nothing renames them: they have no paths on `main`, where no `flows/channels/` path is tracked, and today's by-name refusal of `CHANNEL.md` goes with the mailbox code ([D9](DECISIONS.md#d9)) | | ER-21 | Build channels, user-to-user communication, transcript resources, or files as migrations | The PRD's out-of-scope list | -| ER-22 | Add a Layer 1 noun, or a Layer 1 change outside [D3](DECISIONS.md#d3)'s seven mechanism changes, two public renames ([D7](DECISIONS.md#d7)) and two public removals (discovery's `mailboxes` domain, and skill sub-agents, [D10](DECISIONS.md#d10)) | An escalation to this epic, not a child's call. When the change is needed to keep a worker's own state per user on shared singleton flows, the outcome itself, the [kill line](SPEC.md#the-goal-and-how-well-know-its-met) applies: the epic goes back to the objective gate rather than add it | +| ER-22 | Add a Layer 1 noun, or a Layer 1 change outside [D3](DECISIONS.md#d3)'s nine mechanism changes, two public renames ([D7](DECISIONS.md#d7)), two public removals (discovery's `mailboxes` domain, and skill sub-agents, [D10](DECISIONS.md#d10)) and four additions to existing surfaces | An escalation to this epic, not a child's call. When the change is needed to keep a worker's own state per user on shared singleton flows, the outcome itself, the [kill line](SPEC.md#the-goal-and-how-well-know-its-met) applies: the epic goes back to the objective gate rather than add it | | ER-31 | Build a migration, an operator upgrade step, a dual-read, an alias, an upgrade page, or a refusal of an old shape by name, while Workforce has no consumers. Old data is dropped. One exception: a `SKILL.md` that still declares `agents:` is refused loudly, saying skill sub-agents were removed (FIX-1814) | [D9](DECISIONS.md#d9), the product owner (2026-10-07). BP-030 doesn't apply to this epic until a consumer exists. The exception is the product owner's later, more specific call (2026-10-08, [D10](DECISIONS.md#d10)) | | ER-32 | Put a second set of task tools on one turn. A worker's turn carries each of the eight task tools once, from one capability instance, with or without a loaded skill | Core refuses two tools of one name, so the turn fails every time. FIX-1814 removes the skills library's set ([D10](DECISIONS.md#d10)); FIX-1794's V3 and FIX-1802's V1 prove one set, each with a control that adds a second instance and must throw | diff --git a/specs/epics/FIX-1786/DECISIONS.md b/specs/epics/FIX-1786/DECISIONS.md index 8363a975b3..a3c3a92f4b 100644 --- a/specs/epics/FIX-1786/DECISIONS.md +++ b/specs/epics/FIX-1786/DECISIONS.md @@ -24,7 +24,7 @@ flowchart TD D1 -.->|"rejected"| X1["rename only · or fix privacy in place"] E --> D2["D2 · one coordinator flow, a routing setting"] D2 -.->|"rejected"| X2["coordinator and relay"] - E --> D3["D3 · seven Layer 1 mechanism changes, two renames and two removals, the rest Layer 2"] + E --> D3["D3 · nine Layer 1 mechanism changes, two renames, two removals and four additions, the rest Layer 2"] D3 -.->|"rejected"| X3["an engine rule on org-scope writes"] E --> D4["D4 · contract and org keys first, terms last"] E --> D5["D5 · a board is a session board unless people track it"] @@ -51,12 +51,12 @@ flowchart TD |---|---| | **Instead of** | Rename only (FIX-1796 alone) · or fix privacy in place: keep hires, mailboxes and rooms, and narrow the org-locked hire and the boards | | **Because** | A rename keeps the hole: an org-locked hire still reaches every member, and a drain still runs as whoever triggers it. A fix in place keeps six parts and three meanings of "shared", and each fix is a special case on a part the target model deletes. The inventory comes first because FIX-1763's mailbox children are in flight; starting under them makes each one a rebase | -| **Locks in** | A refactor across Workforce, core's document tools, the engine, the task board, the skills library and discovery's domain list (seven mechanism changes, two public renames and two public removals, [D3](#d3)), Shift Manager and the docs. Implementation waits on FIX-1787's merge-first rows. Work built on hires, mailboxes and rooms merges first and is refactored here, or closes. [D8](#d8) later added a tenth refactor child, FIX-1802, and [D10](#d10) an eleventh, FIX-1814 | +| **Locks in** | A refactor across Workforce, core's document tools, the engine, the task board, the skills library and discovery's domain list (nine mechanism changes, two public renames, two public removals and four additions to existing surfaces, [D3](#d3)), Shift Manager and the docs. Implementation waits on FIX-1787's merge-first rows. Work built on hires, mailboxes and rooms merges first and is refactored here, or closes. [D8](#d8) later added a tenth refactor child, FIX-1802, and [D10](#d10) an eleventh, FIX-1814 | **What would change my mind:** no app needing a second user or a worker of its own this year. Then fix the hole in place and rename later. -![D1: nine children after the inventory, chosen, beside rename only and fixing privacy in place. Decides it: the model a reader learns, one rule against six parts. The price: nine issues, seven mechanism changes (the fifth T1, the task tools' roster read per call; the sixth the skills library's key taken per run; the seventh a per-turn rule for which of a shared copy's resources the model reaches), two public renames (D7) and two public removals (the second, skill sub-agents, D10). Flips if no app needs a second user or its own worker this year](figures/d1-the-set.svg) +![D1: nine children after the inventory, chosen, beside rename only and fixing privacy in place. Decides it: the model a reader learns, one rule against six parts. The price: nine issues, nine mechanism changes (the fifth T1, the task tools' roster read per call; the sixth the skills library's key taken per run; the seventh a per-turn rule for which of a shared copy's resources the model reaches; the eighth a concurrency policy that holds a conversation; the ninth a task ledger's ending recorder), two public renames (D7), two public removals (the second, skill sub-agents, D10) and four additions to existing surfaces. Flips if no app needs a second user or its own worker this year](figures/d1-the-set.svg) It comes down to the model a reader learns: both cheaper options keep the six parts. @@ -74,13 +74,13 @@ session shape for more than half the flow. Then split it, with the delegate chec answer record in one shared module. -## D3 · engineering · Workforce stays Layer 2; Layer 1 changes are seven mechanisms, two renames and two removals +## D3 · engineering · Workforce stays Layer 2; Layer 1 changes are nine mechanisms, two renames, two removals and four additions | | | |---|---| | **Instead of** | A Layer 1 worker noun with its own store · or per-org user keys faked inside Workforce · or an engine rule refusing a worker flow's writes to org scope (FIX-1789's Q2) | -| **Because** | Workers, coordinators and workstreams compose what ships: resources, scopes, sessions, projected collections, boards. Seven things Workforce cannot fake: a scope key, a row rule, session state a caller can't change after create, a task ledger kept per conversation ([D6](#d6)), task tools that read their roster per call, since an action is fixed when it is defined ([D8](#d8), T1), a skills library that takes its key per run, since orchestration keys it by the flow's instance and every worker on a singleton shares that one, and one view of a shared copy's resources per turn, since every worker on a copy shares its resource registry and core's document tools list all of it ([amended after merge](EVOLUTION.md#amendment-visibility)). The other four are names and surfaces, not mechanisms. Two are renames ([D7](#d7)): discovery's `seats` domain, a `contracts` constant, becomes `workers`, and a task board's seat, in orchestration's types and the hand-off record core defines, becomes assignee. Two are removals: discovery's `mailboxes` domain goes with the mailbox, and skill sub-agents go ([D10](#d10)). So `contracts` still names one Workforce domain, as it named `seats` before; whether Layer 1 keeps that closed list is [FIX-1803](https://linear.app/fixpoint-labs/issue/FIX-1803), FIX-1575's open question. [The end-state POC](#what-the-end-state-poc-showed) settled the third: the public create stored a caller's session state unchecked, and as sent when its schema refused it, so a worker named there skipped the check the flow ran later; and a row only flow code writes outlives a deleted session id. What shipped checks the worker in the create itself and fixes it after ([amended after merge](EVOLUTION.md#amendment-binding)). No engine rule on org-scope writes (Jake, 2026-10-06): org scope is shared with the org by design, a worker flow may write there if that is how it is built to work, and the framework can't know when org data is relevant. The built-in worker flows, `agent` and the coordinator, keep a worker's own state out of it; a custom worker flow's privacy is its author's, and the contract doesn't check it ([ER-2](BUSINESS-RULES.md#what-a-team-gets-and-what-it-doesnt)) | -| **Locks in** | (1) user data keyed per (user, org) for every flow, FIX-1790, a persisted key change whose old records are dropped, never read in any org ([D9](#d9), [ER-3](BUSINESS-RULES.md#what-a-team-gets-and-what-it-doesnt)); (2) "owner writes, org reads" on a row, FIX-1793, new work the 2026-09-23 security lock left for later; (3) session state a caller can't change after create, as FIX-1788's P1 shipped it ([#2850](https://github.com/fixpoint-labs/flow-state-dev/pull/2850)) and the product owner approved it on 2026-10-07. A session's worker is a readonly field of its starting state: the caller names it with `createSession({ state })`, the flow's optional create check confirms it, the engine refuses any later change to it, and sessions can be listed by it. It is named at create, never on a turn; a session's worker can't change, and no action names a worker (Jake, 2026-10-06, on FIX-1788's spec). A coordinator's delegates are server-owned: only the server writes them, and the public create can't seed them. The item took three engine changes it didn't name as first written: a readonly guard on session state, a state filter on listing inside each store, and a refusal at create of a starting state the schema rejects, on flows that bind their sessions. They build this one mechanism, not new ones, and none names a worker: the engine knows readonly fields ([EVOLUTION.md](EVOLUTION.md#amendment-binding)). FIX-1788 picks the mechanism and builds it, FIX-1791 consumes it. Flow instances and owner pins stay in the engine untouched, with no deprecation markers, until FIX-1798 removes them ([D9](#d9)). A worker's own key for its private state is Layer 2, FIX-1788's, and so is reading a worker's configuration per run: a generator already resolves its tools per call ([ER-2](BUSINESS-RULES.md#what-a-team-gets-and-what-it-doesnt)). (4) A task ledger kept per conversation, FIX-1794, a change to the task board that leaves the engine untouched ([D6](#d6)). (5) T1, orchestration's task tools reading their roster per call, FIX-1794 as amended in [#2839](https://github.com/fixpoint-labs/flow-state-dev/pull/2839): generic, naming no worker or delegate ([D8](#d8)). (6) Orchestration's skills library taking its key per run, FIX-1788's S7: a function of the running context the composing layer supplies, the shape of [D6](#d6)'s partition, naming no worker; Workforce supplies the worker's key. (7) A per-turn resource visibility rule in core, FIX-1788's P4 (its S8 and [D7](../../issues/FIX-1788/DECISIONS.md#d7)), the product owner's call on 2026-10-07: optional, generic, naming no worker. Every model-facing listing and lookup in core honours it, its document tools and their path lookup among them, and a hidden resource answers exactly as a missing one does. With no rule, everything is visible, as before. Workforce supplies the rule from the worker verified on the turn. It governs what the model reaches through tools and context, not app code that reads a resource by reference, which is its author's, as FIX-1788's D6 has it for a custom worker flow. The option's name is FIX-1788's. And two public renames, both FIX-1796's, with no alias ([D7](#d7)): discovery's `seats` domain becomes `workers` in `MANIFEST_DOMAINS`, and a task board's seat becomes assignee in orchestration's board types and the hand-off record's field. And two public removals, with no alias. FIX-1792's (its S9, BR-5a): discovery's `mailboxes` domain leaves `MANIFEST_DOMAINS` and core's discovery tool. FIX-1814's ([D10](#d10)): skill sub-agents, which are a skill's `agents:` key, the skills library's `delegation` option, and the private board it installs with its own copy of the eight task tools and `runBoard`. A `SKILL.md` that still declares `agents:` is refused loudly. The task board, its eight task tools and its hand-off stay. Any other Layer 1 change comes back to this epic | +| **Because** | Workers, coordinators and workstreams compose what ships: resources, scopes, sessions, projected collections, boards. Nine things Workforce cannot fake: a scope key, a row rule, session state a caller can't change after create, a task ledger kept per conversation ([D6](#d6)), task tools that read their roster per call, since an action is fixed when it is defined ([D8](#d8), T1), a skills library that takes its key per run, since orchestration keys it by the flow's instance and every worker on a singleton shares that one, and one view of a shared copy's resources per turn, since every worker on a copy shares its resource registry and core's document tools list all of it ([amended after merge](EVOLUTION.md#amendment-visibility)), a turn that holds its conversation so work it started waits for it to end, since only the engine arbitrates a session's requests, and an ending recorded in the same write as the task's ending, since only the task ledger's own write is atomic ([amended after merge](EVOLUTION.md#amendment-exports)). The two renames and two removals are names, not mechanisms, and the four additions extend existing surfaces. Two are renames ([D7](#d7)): discovery's `seats` domain, a `contracts` constant, becomes `workers`, and a task board's seat, in orchestration's types and the hand-off record core defines, becomes assignee. Two are removals: discovery's `mailboxes` domain goes with the mailbox, and skill sub-agents go ([D10](#d10)). So `contracts` still names one Workforce domain, as it named `seats` before; whether Layer 1 keeps that closed list is [FIX-1803](https://linear.app/fixpoint-labs/issue/FIX-1803), FIX-1575's open question. [The end-state POC](#what-the-end-state-poc-showed) settled the third: the public create stored a caller's session state unchecked, and as sent when its schema refused it, so a worker named there skipped the check the flow ran later; and a row only flow code writes outlives a deleted session id. What shipped checks the worker in the create itself and fixes it after ([amended after merge](EVOLUTION.md#amendment-binding)). No engine rule on org-scope writes (Jake, 2026-10-06): org scope is shared with the org by design, a worker flow may write there if that is how it is built to work, and the framework can't know when org data is relevant. The built-in worker flows, `agent` and the coordinator, keep a worker's own state out of it; a custom worker flow's privacy is its author's, and the contract doesn't check it ([ER-2](BUSINESS-RULES.md#what-a-team-gets-and-what-it-doesnt)) | +| **Locks in** | (1) user data keyed per (user, org) for every flow, FIX-1790, a persisted key change whose old records are dropped, never read in any org ([D9](#d9), [ER-3](BUSINESS-RULES.md#what-a-team-gets-and-what-it-doesnt)); (2) "owner writes, org reads" on a row, FIX-1793, new work the 2026-09-23 security lock left for later; (3) session state a caller can't change after create, as FIX-1788's P1 shipped it ([#2850](https://github.com/fixpoint-labs/flow-state-dev/pull/2850)) and the product owner approved it on 2026-10-07. A session's worker is a readonly field of its starting state: the caller names it with `createSession({ state })`, the flow's optional create check confirms it, the engine refuses any later change to it, and sessions can be listed by it. It is named at create, never on a turn; a session's worker can't change, and no action names a worker (Jake, 2026-10-06, on FIX-1788's spec). A coordinator's delegates are server-owned: only the server writes them, and the public create can't seed them. The item took three engine changes it didn't name as first written: a readonly guard on session state, a state filter on listing inside each store, and a refusal at create of a starting state the schema rejects, on flows that bind their sessions. They build this one mechanism, not new ones, and none names a worker: the engine knows readonly fields ([EVOLUTION.md](EVOLUTION.md#amendment-binding)). FIX-1788 picks the mechanism and builds it, FIX-1791 consumes it. Flow instances and owner pins stay in the engine untouched, with no deprecation markers, until FIX-1798 removes them ([D9](#d9)). A worker's own key for its private state is Layer 2, FIX-1788's, and so is reading a worker's configuration per run: a generator already resolves its tools per call ([ER-2](BUSINESS-RULES.md#what-a-team-gets-and-what-it-doesnt)). (4) A task ledger kept per conversation, FIX-1794, a change to the task board that leaves the engine untouched ([D6](#d6)). (5) T1, orchestration's task tools reading their roster per call, FIX-1794 as amended in [#2839](https://github.com/fixpoint-labs/flow-state-dev/pull/2839): generic, naming no worker or delegate ([D8](#d8)). (6) Orchestration's skills library taking its key per run, FIX-1788's S7: a function of the running context the composing layer supplies, the shape of [D6](#d6)'s partition, naming no worker; Workforce supplies the worker's key. (7) A per-turn resource visibility rule in core, FIX-1788's P4 (its S8 and [D7](../../issues/FIX-1788/DECISIONS.md#d7)), the product owner's call on 2026-10-07: optional, generic, naming no worker. Every model-facing listing and lookup in core honours it, its document tools and their path lookup among them, and a hidden resource answers exactly as a missing one does. With no rule, everything is visible, as before. Workforce supplies the rule from the worker verified on the turn. It governs what the model reaches through tools and context, not app code that reads a resource by reference, which is its author's, as FIX-1788's D6 has it for a custom worker flow. The option's name is FIX-1788's. And two public renames, both FIX-1796's, with no alias ([D7](#d7)): discovery's `seats` domain becomes `workers` in `MANIFEST_DOMAINS`, and a task board's seat becomes assignee in orchestration's board types and the hand-off record's field. And two public removals, with no alias. FIX-1792's (its S9, BR-5a): discovery's `mailboxes` domain leaves `MANIFEST_DOMAINS` and core's discovery tool. FIX-1814's ([D10](#d10)): skill sub-agents, which are a skill's `agents:` key, the skills library's `delegation` option, and the private board it installs with its own copy of the eight task tools and `runBoard`. A `SKILL.md` that still declares `agents:` is refused loudly. The task board, its eight task tools and its hand-off stay. (8) A conversation-holding concurrency policy, FIX-1834 and FIX-1836: two policies, `hold` (run at once and occupy the key) and `defer` (wait until nothing holds or waits on the key, then run and occupy it), on core's `ConcurrencyPolicyName` and the engine's arbiter and host, so a task's notice waits for the reply its conversation is in. Generic: a policy on a key, naming no worker. (9) A task ledger's ending recorder, FIX-1794's P2: a ledger declared with `recordEnding` hands every ending write's row to it inside the same atomic write and keeps the metadata it returns, so a debt owed because a task ended (telling whoever filed it) can't be lost between two writes. Orchestration never reads what the recorder adds. And four additions to existing surfaces, none a mechanism, none naming a worker: core's `FlowConfigRefusalError` carries a refused config bag's reasons as data (FIX-1789); core's `TaskStateTarget` lets a `task` dispatcher look up its child session's starting state per task, part of building (3) (FIX-1788's P1); core's `SessionItem` carries a message's `role` (FIX-1828); and orchestration's `fail` takes `noRetry`, which settles a task `errored` with attempts left (FIX-1866's P1). [EVOLUTION.md](EVOLUTION.md#amendment-exports) lists every public name these added, renamed or removed. Any other Layer 1 change comes back to this epic | **What would change my mind:** a second consumer of a worker outside Workforce. Then a worker noun in core earns its place. @@ -561,5 +561,14 @@ engine rule. The closure only checks. delegate; "mailbox" kept back), in D10 and the concept's vocabulary. The follow-up epic is [FIX-1815](https://linear.app/fixpoint-labs/issue/FIX-1815). The kill line is untouched: it is about a worker's own state ([EVOLUTION.md](EVOLUTION.md#amendment-handoff)). +- **Amended after merge, the Layer 1 exports the set shipped (Oct 12)**, its own amendment PR + (FIX-1896): the closure's layer fence (FIX-1797's P4) found public Layer 1 exports this record + didn't name. A walk of every Layer 1 entry point's exports, merge by merge from the pre-epic + baseline to `main`, found two mechanisms the children built without coming back here: the + `hold` and `defer` concurrency policies (FIX-1834, FIX-1836) and a task ledger's ending + recorder (FIX-1794's P2). [D3](#d3) now counts nine mechanism changes and four additions to + existing surfaces, and ER-22, D1, the box and the kill line match. None names a worker, + coordinator, workstream or project, so no export breaks the layer rule. This record comes + after they merged, not before ([EVOLUTION.md](EVOLUTION.md#amendment-exports)). **Open: none.** diff --git a/specs/epics/FIX-1786/EVOLUTION.md b/specs/epics/FIX-1786/EVOLUTION.md index 874edb7441..fb3760a448 100644 --- a/specs/epics/FIX-1786/EVOLUTION.md +++ b/specs/epics/FIX-1786/EVOLUTION.md @@ -4,8 +4,9 @@ Lineage that spans more than one child. Two predecessor epics are superseded in part, one lock is amended, and today's code differs from the target in the ways the second table checks. -This epic's own D3 was amended after merge three times, as [the binding section](#amendment-binding), -[the visibility section](#amendment-visibility) and [the hand-off section](#amendment-handoff) record. +This epic's own D3 was amended after merge four times, as [the binding section](#amendment-binding), +[the visibility section](#amendment-visibility), [the hand-off section](#amendment-handoff) and +[the exports section](#amendment-exports) record. Child-specific lineage belongs in each child's own evolution record. ## Predecessor designs @@ -170,3 +171,61 @@ Linear issues and the shipped files. FIX-1802, FIX-1794 and FIX-1796 carry their own entries for this amendment. FIX-1791 and FIX-1792 state nothing it makes false, so they are unchanged. No stored data changes. + + +## Amended after merge: the Layer 1 exports the set shipped (2026-10-12) + +**The problem.** The closure's layer fence ([FIX-1797](https://linear.app/fixpoint-labs/issue/FIX-1797)'s +P4, [ER-22](BUSINESS-RULES.md#what-no-child-may-do)) found public Layer 1 exports that +[D3](DECISIONS.md#d3) didn't name, and filed +[FIX-1896](https://linear.app/fixpoint-labs/issue/FIX-1896). Each one is recorded here as a generic +Layer 1 change, or flagged if it breaks the layer rule. None does: no export a child added, +renamed or removed names a worker, coordinator, workstream, project, hire or roster of workers. +Original epic review: [#2795](https://github.com/fixpoint-labs/flow-state-dev/pull/2795). + +**How it was checked.** Every public entry point of `contracts`, `core`, `engine` and +`orchestration` (each `exports` path in its `package.json`) was read with the TypeScript checker +at the pre-epic baseline `cad4e278` and after every first-parent merge on `main` up to `f1ae3521` +that touched Layer 1 source, and each merge's added and removed names were diffed. The walk compares names, so a member added to a type that already existed (an option, a field) is listed from the merge's diff where it carries one of the changes below; rows that say "options on existing types" are those. The fence's +own PR list left out three children that changed Layer 1, FIX-1828, FIX-1834 and FIX-1836; this +walk doesn't depend on that list. `endingOf` and `applyEndingRecorder`, which the fence's grep +found, are on no entry point, so they aren't public. + +**What it found.** Two mechanisms the children built without coming back to this epic first, and +four additions to existing surfaces. The rest D3 already counts; this table names them. + +| Merge | Child | Public names (entry point) | D3 | +|---|---|---|---| +| [#2848](https://github.com/fixpoint-labs/flow-state-dev/pull/2848), [#2827](https://github.com/fixpoint-labs/flow-state-dev/pull/2827) | FIX-1790, FIX-1793's P1 | None added: options on existing types | (1), (2) | +| [#2850](https://github.com/fixpoint-labs/flow-state-dev/pull/2850) | FIX-1788's P1 | `core/types`: `SessionCreateCheck`, `SessionCreateCheckInput`, `SessionCreateCheckResult`, `SessionCreatePath`, `SessionCreatePrincipal` · `core/helpers`: `getReadonlyStateKeys` · `engine`: `ReadonlySessionStateError`, `SessionCreateRefusedError`, `SessionCreateRequest`, `refuseReadonlyStateChange`, `refuseServerOwnedState` | (3) | +| [#2850](https://github.com/fixpoint-labs/flow-state-dev/pull/2850) | FIX-1788's P1 | `core`, `core/types`: `TaskStateTarget`, `resolveTaskState`, a `task` dispatcher's child starting state looked up per task | Addition, building (3) | +| [#2845](https://github.com/fixpoint-labs/flow-state-dev/pull/2845) | FIX-1794's P1 | `orchestration`, `orchestration/tasks`: `TaskPartitionContext`, `TaskPartitionFn` | (4) | +| [#2935](https://github.com/fixpoint-labs/flow-state-dev/pull/2935) | FIX-1794's P2 | `orchestration`: `AssigneeRoster`, `AssigneeRosterSource`; `WorkerRoster` leaves, renamed `AssigneeRoster` | (5), T1; the rename is [D7](DECISIONS.md#d7)'s board rename, landed early | +| [#2856](https://github.com/fixpoint-labs/flow-state-dev/pull/2856) | FIX-1788's P2 | `orchestration`: `SkillsPartitionFn`, `partitionedSkillsCollection`, `resolveSkillsCollection` | (6) | +| [#2866](https://github.com/fixpoint-labs/flow-state-dev/pull/2866) | FIX-1788's P4 | `core`, `core/types`: `ResourceVisibility`, `ResourceVisibilityRule`, `ResourceVisibilityTarget` | (7) | +| [#2970](https://github.com/fixpoint-labs/flow-state-dev/pull/2970) | FIX-1834 | `core`: `ConcurrencyPolicyName` gains `hold` and `defer` · `engine`: `ConcurrencyDeferLimitError` | **(8), new** | +| [#2990](https://github.com/fixpoint-labs/flow-state-dev/pull/2990) | FIX-1836 | `engine`: `DEFER_PATIENCE_MS`, `DeferWaitStep`, `LeaseTurn`, `planDeferWait` | **(8), new** | +| [#2935](https://github.com/fixpoint-labs/flow-state-dev/pull/2935) | FIX-1794's P2 | `orchestration`, `orchestration/tasks`: `TaskEnding`, `TaskEndingRecorder`; `recordEnding` on `DefineTaskCollectionOptions`, `DefinedTaskCollection` and `ResourceBackedOptions`; `quiet` on `AwaitReviewOptions` | **(9), new** | +| [#2847](https://github.com/fixpoint-labs/flow-state-dev/pull/2847) | FIX-1789 | `core`: `FlowConfigRefusalError`, `FlowConfigIssue`, `FlowConfigPath` | **Addition, new** | +| [#2955](https://github.com/fixpoint-labs/flow-state-dev/pull/2955) | FIX-1828 | `core`: `SessionItem` gains `role` | **Addition, new** | +| [#3050](https://github.com/fixpoint-labs/flow-state-dev/pull/3050) | FIX-1866's P1 | `orchestration`, `orchestration/tasks`: `FailOptions`, with `noRetry` | **Addition, new** | +| [#2909](https://github.com/fixpoint-labs/flow-state-dev/pull/2909) | FIX-1814 | Removed. `core`: `Agent`, `AgentOverrides`, `AgentRegistry`, `AgentSpec`, `MaterializeAgentFn`, `MaterializeAgentOptions`, `PersonaInlineConfig`, `PersonaSource` · `orchestration`: `DEFAULT_WORKER_PROMPT`, `FLOOR_WORKER_KEY`, `WorkerMaterializationDeps`, `buildUserMessage`, `materializeWorker`, `workerInputSchema` | Removal, skill sub-agents ([D10](DECISIONS.md#d10)) | +| [#3071](https://github.com/fixpoint-labs/flow-state-dev/pull/3071) | FIX-1792 | `MANIFEST_DOMAINS` drops `mailboxes` | Removal | +| [#3073](https://github.com/fixpoint-labs/flow-state-dev/pull/3073) | FIX-1796 | `orchestration/task-board`: `HandOffSeat`, `TaskSeat`, `TaskSeatAddress`, `TaskSeatRegistry` become `HandOffAssignee`, `TaskAssignee`, `TaskAssigneeAddress`, `TaskAssigneeRegistry` · `MANIFEST_DOMAINS`: `seats` becomes `workers` | Renames ([D7](DECISIONS.md#d7)) | + +Every other merge in the window that changed a Layer 1 entry point is another epic's or no +epic's (FIX-1815's ask and assigned-work children, FIX-1772, FIX-1846, FIX-1128, FIX-1608), so +it isn't this record's to count. + +**What changed in this set.** + +| What | Treatment | Why | What is retained | +|---|---|---|---| +| [D3](DECISIONS.md#d3): "seven mechanisms, two renames and two removals", in its title, *Because* and *Locks in* | **Amended** to nine mechanisms and four additions to existing surfaces. *Because* gains the eighth and ninth things Workforce cannot fake; *Locks in* gains (8), (9) and the additions | A conversation's requests are arbitrated only by the engine, and only the ledger's own write is atomic, so neither can be built in Workforce. The four additions extend surfaces that shipped; none is a new behaviour a child had to come back for | D3's call: no worker noun in Layer 1, and none of these names one. "Any other Layer 1 change comes back to this epic" stands | +| The count elsewhere: D1's *Locks in* and its figure, the tree, the box's text and figure, [ER-22](BUSINESS-RULES.md#what-no-child-may-do) and the kill line | **Amended** to nine, with the additions | One count across the set. ER-22 is what a child checks before a Layer 1 change | The two public renames and the two public removals | +| The *How it got here* entries and the earlier amendment sections that count seven | **Kept as written** | They record what was decided then | A new *How it got here* entry | + +**Recorded after the fact.** ER-22 asks for an escalation to this epic before a Layer 1 change +outside D3. FIX-1834, FIX-1836 and FIX-1794's P2 merged without D3 naming their changes; this +records them after the fact, as the binding section did for FIX-1788's P1. None is about a worker's own state, so the +[kill line](SPEC.md#the-goal-and-how-well-know-its-met) isn't reached. No stored data changes. diff --git a/specs/epics/FIX-1786/SPEC.md b/specs/epics/FIX-1786/SPEC.md index d217b357a7..deca2a5510 100644 --- a/specs/epics/FIX-1786/SPEC.md +++ b/specs/epics/FIX-1786/SPEC.md @@ -69,17 +69,17 @@ makes leg c's PASS mean something. | **Anti-game** | No asserting on a child's own tests. No worker, project or delegate seeded by a fixture: the users make each one through the app. No run with one user, and no request of Bob's sent under Alice's identity | | **Control that must fail** | The worker collection at org scope, which puts a worker itself where every member reads it: leg c must FAIL. Today's `main`: all three legs FAIL | | **Milestone** | Leg c's worker steps and the control run early, on the commit FIX-1788 merges on, so the privacy fix is proved before the coordinator builds on it rather than last ([ER-30](BUSINESS-RULES.md#the-closure)) | -| **Kill line** | Confirmed by the product owner on 2026-10-07. If the [FIX-1805](https://linear.app/fixpoint-labs/issue/FIX-1805) milestone shows that a worker's own state can't be kept per user on shared singleton flows without a Layer 1 change beyond [D3](DECISIONS.md#d3)'s seven, finishing the epic as designed is the wrong call. Go back to the objective gate rather than add the change. [ER-22](BUSINESS-RULES.md#what-no-child-may-do) sends any Layer 1 change outside D3 to this epic; the kill line is the case where that change is needed to deliver the outcome itself | +| **Kill line** | Confirmed by the product owner on 2026-10-07. If the [FIX-1805](https://linear.app/fixpoint-labs/issue/FIX-1805) milestone shows that a worker's own state can't be kept per user on shared singleton flows without a Layer 1 change beyond [D3](DECISIONS.md#d3)'s nine, finishing the epic as designed is the wrong call. Go back to the objective gate rather than add the change. [ER-22](BUSINESS-RULES.md#what-no-child-may-do) sends any Layer 1 change outside D3 to this epic; the kill line is the case where that change is needed to deliver the outcome itself | ## What's in the box ![What's in the box: workers, coordinators and projects, each private to one user; composed from what ships; the app's own standard install and users; below a fence, what is not built, from channels to a session shared between users](figures/end-state.svg) -Everything in the box composes what ships, plus seven Layer 1 mechanism changes, two public -renames and two public removals ([D3](DECISIONS.md#d3)). The fifth mechanism change is T1, the task tools' roster read per +Everything in the box composes what ships, plus nine Layer 1 mechanism changes, two public +renames, two public removals and four additions to existing surfaces ([D3](DECISIONS.md#d3)). The fifth mechanism change is T1, the task tools' roster read per call, built by FIX-1794 (amended) ([D8](DECISIONS.md#d8)); the sixth is the skills library taking its key per run, built by FIX-1788; the seventh is a per-turn rule in core for which of a shared copy's -resources the model reaches, so a worker's document grants hold through every tool, built by FIX-1788. The removals are discovery's `mailboxes` domain, FIX-1792's, and skill sub-agents, FIX-1814's ([D10](DECISIONS.md#d10)). The fence is the PRD's out-of-scope list and the locks the Architect +resources the model reaches, so a worker's document grants hold through every tool, built by FIX-1788. The eighth is a concurrency policy that holds a conversation, so a task's notice waits for the reply it is in, built by FIX-1834 and FIX-1836; the ninth is a task ledger's ending recorder, so what a task's ending owes is written with it, built by FIX-1794. The removals are discovery's `mailboxes` domain, FIX-1792's, and skill sub-agents, FIX-1814's ([D10](DECISIONS.md#d10)). The fence is the PRD's out-of-scope list and the locks the Architect carried: what would turn a privacy refactor into a collaboration product. The library in the box builds after the MVP. diff --git a/specs/epics/FIX-1786/figures/d1-the-set.svg b/specs/epics/FIX-1786/figures/d1-the-set.svg index bcc08e97ae..b2e51f2d46 100644 --- a/specs/epics/FIX-1786/figures/d1-the-set.svg +++ b/specs/epics/FIX-1786/figures/d1-the-set.svg @@ -1,5 +1,5 @@ + aria-label="D1, is the model worth a refactor now. Chosen: nine refactor children after the inventory, and a closure. Instead of: rename only, or fix privacy in place. It comes down to the first row, the model a reader learns: the chosen option leaves one rule and three parts, while renaming keeps six parts under new names and fixing in place keeps six parts and three meanings of shared. Second row, an org-locked hire: private by construction, still reaching every member, or narrowed by a rule on a part the target deletes. Third row, the cost now: nine issues, nine Layer 1 mechanism changes, the fifth T1's per-call roster on the task tools, the sixth the skills library's key taken per run, the seventh a per-turn rule for which of a shared copy's resources the model reaches, the eighth a concurrency policy that holds a conversation and the ninth a task ledger's ending recorder, two public renames, the discovery domain and the task board's seat, now assignee (D7), and two public removals, discovery's mailboxes domain and skill sub-agents (D10), and four additions to existing surfaces; one issue; or about four. Locks in: a refactor across Workforce, core, the engine, the task board, discovery's domain list, Shift Manager and the docs, after the inventory's merges. Flips if no app needs a second user or its own worker this year.">