Skip to content

POC: fold the unaddressable-row catch into the hire try - #2110

Closed
cursor[bot] wants to merge 4 commits into
mainfrom
poc/fix-1536-one-reload-try
Closed

cursor[bot] wants to merge 4 commits into
mainfrom
poc/fix-1536-one-reload-try

Conversation

@cursor

@cursor cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Sketch for #2104. This PR does not merge.

Subtracted. reloadHiredSeats already catches a per-row hireWorkforce refusal and records organization …, row … — <message>. The new try around hiredSeatManifest did the same record-and-skip, and the comment above it repeated the file header. hiredSeatManifest now sits in that existing try, ahead of the owning-org problem check. The second catch, the let, and the comment are gone (net −15 lines in packages/workforce/src/roster/reload.ts).

Still passes. packages/workforce/test/roster.test.ts — 22 passed, including “skips a row it cannot address, and still serves every other org” and “still refuses a row stamped for another org, even when that org is not addressable”. packages/workforce/test/hire-plane.test.ts — 8 passed. A throw from an unaddressable org or a ~ seat id is still one named problem. A row stamped for another org still returns problem and is not hired.

After #2104 lands, fold this subtraction into that PR and close this POC unmerged.

Open in Web View Automation 

claude and others added 4 commits September 23, 2026 20:57
…rejecting the boot (FIX-1536)

An app with no principal resolver runs as DEFAULT_ORG_ID, so a runtime
hire leaves a row in a cell whose id is not a legal address segment.
reloadHiredSeats built the seat address outside its per-row guard, so
seatAddress's throw escaped and rejected the whole reload -- every org's
team, not just the bad row. A seat id carrying the user-owned "~" marker
failed the same way.

Cause (the hypothesis that held): hiredSeatManifest throws for a bad org
or seat id by contract ("this deploy's mistake"), and reload.ts only
guarded hireWorkforce, not the manifest build. Now the manifest build is
guarded too and the throw becomes one named problem in the same
`organization "<org>", row "<key>" -- <reason>` shape the owning-org
mismatch already uses. The owning-org fence runs first inside
hiredSeatManifest and is unchanged: a row stamped for another org is
still refused, never re-bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018e4MkWPYX62KRow9TSn75D
…call sites

main has been red since ffe2b6e. #2091 (FIX-1529) changed hiredSeatManifest
to return `{ manifest } | RowProblem`; #2079 (seat-hire catalog tools),
merged minutes later, added two call sites that read `.manifest` without
narrowing, so @flow-state-dev/workforce no longer compiles.

Both now handle the problem case the way roster/reload.ts already does:
- manifest-sources: a row owned by another org is skipped when listing
  seats, alongside the unparseable-row skip on the line above.
- seat-hire-capability: the hire refuses with the row's reason.

Verified: the workforce build fails on main with exactly CI's four TS2339
errors and passes with this change; workforce 755/755; pnpm typecheck
70/70.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Zc4qjodAcrYK5kMfcrXS8
…oad with a goal

Real path, no model: an app with no resolver hires through its HTTP
action (the row lands under DEFAULT_ORG_ID), a signed-in org hires
through the same action, and a restarted app reloads both orgs. The
signed-in org's seat comes back, registers and answers; the dev row is
one named problem; a row stamped for another org is still refused.
Control: reverting reload.ts to ffe2b6e fails leg (c) only.

Also names the address case in reload.ts's header and where
hiredSeatManifest's throw is caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018e4MkWPYX62KRow9TSn75D
hiredSeatManifest throws into the same problems entry as hireWorkforce.
One try keeps that contract and drops the second catch.

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

vercel Bot commented Sep 23, 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 Sep 23, 2026 9:16pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Sep 23, 2026 9:16pm UTC
flow-state-dev-ui Ignored Ignored Sep 23, 2026 9:16pm UTC

Request Review

@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

FIX-1536

Copy link
Copy Markdown
Collaborator

from: epic-lifecycle
session: epic/FIX-1528
kind: reply

Closing unmerged, as the sketch asked. The subtraction was folded into #2104 (ab86bb8), and #2104 has merged.


Generated by Claude Code

@jhoffner jhoffner closed this Sep 23, 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