Skip to content

POC: one fixture door instead of eighteen copies - #2849

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
poc/fix-1789-one-fixture-door
Closed

cursor[bot] wants to merge 2 commits into
mainfrom
poc/fix-1789-one-fixture-door

Conversation

@cursor

@cursor cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Subtracted

Eighteen copies of the same fixture door (the public message action that answers Heard: …) are one helper, goals/lib/worker-door.mts. The two identical shift-manager hearing doors are one file, packages/shift-manager/test/fixtures/hearing-door.mts.

Left in place: the contract module, hire, sharedResource, and the one goal door that returns {} (a-fresh-host-wakes-its-member-agents). The worker-contract goal's doors stay local because their replies name the flow.

What still passes

  • pnpm tsx goals/hire-plane/reload-survives-an-unaddressable-row/run.mts — PASS
  • @flow-state-dev/shift-manager test/run.test.ts and test/task-screen.test.tsx — 30 passed
  • workerFlowProblems on desk-clerk, the caller's agent, and request-triage — no problems

Do not merge

This PR does not merge. It is a subtraction sketch for #2847. Fold the helper into that branch, then close this unmerged.

Open in Web View Automation 

claude and others added 2 commits October 7, 2026 15:09
hireWorkforce takes the installation's worker flows as `workerFlows`
(renamed from `kinds`, with SeatHireCapabilityOptions and
reloadHiredSeats) and checks every one, the built-in `agent` included,
against the worker contract before any worker is hired: it takes the
configuration a real hire supplies, by key and by value; it has exactly
one door; and any `writtenBy` it declares is the shared-resource field.
One problem refuses the whole call, once per flow. The check is exported
as `workerFlowProblems` for a library's own tests.

An entry `{ flow, standardOnly: true }` keeps a flow for the workers the
installation's files define. A record carrying an owner pin (a runtime
hire, a stored roster row) is refused on it, after the `agent` default;
a stored row refused this way is reported and left as stored.

`sharedResource` declares an org-scoped collection whose entries carry a
required `writtenBy: { userId, workerId? }`, and `writeShared` stamps it
from the session, never from input.

The built-in agent keeps its skills drawer at user scope, off org scope.
The two-door warning is gone: none or two doors now refuse.

Every worker-flow map in the repo was run through the check (V0). Test
and goal fixtures without a door got one; DevForce's EM gets a real door
that files a feature from `<issue-slug>: <what>`. New goal:
goals/worker-contract/runs-workers-only-on-registered-flows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XMg2dz8sMEdyzCQTRsaMTV
The hire contract already requires one door. The goal fixtures and the two
shift-manager labs each pasted that door. Share one helper in goals/lib and
one hearing door for the shift-manager fixtures.

Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 7, 2026 3:34pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 7, 2026 3:34pm UTC
flow-state-dev-ui Ignored Ignored Oct 7, 2026 3:34pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

FIX-1789

jhoffner commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Folded into #2847, which has merged: goals/lib/worker-door.mts and a single packages/shift-manager/test/fixtures/hearing-door.mts, as this sketch proposed. Closing unmerged, as its body asks.


Generated by Claude Code

@jhoffner jhoffner closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants