Repository navigation
POC: one fixture door instead of eighteen copies - #2849
Closed
cursor[bot] wants to merge 2 commits into
Closed
cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Collaborator
|
Folded into #2847, which has merged: Generated by Claude Code |
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.
Subtracted
Eighteen copies of the same fixture door (the public
messageaction that answersHeard: …) 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-managertest/run.test.tsandtest/task-screen.test.tsx— 30 passedworkerFlowProblemson desk-clerk, the caller's agent, and request-triage — no problemsDo not merge
This PR does not merge. It is a subtraction sketch for #2847. Fold the helper into that branch, then close this unmerged.