Repository navigation
POC: fold the unaddressable-row catch into the hire try - #2110
Closed
cursor[bot] wants to merge 4 commits into
Closed
cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Collaborator
|
from: epic-lifecycle Closing unmerged, as the sketch asked. The subtraction was folded into #2104 (ab86bb8), and #2104 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.
Sketch for #2104. This PR does not merge.
Subtracted.
reloadHiredSeatsalready catches a per-rowhireWorkforcerefusal and recordsorganization …, row … — <message>. The new try aroundhiredSeatManifestdid the same record-and-skip, and the comment above it repeated the file header.hiredSeatManifestnow sits in that existing try, ahead of the owning-orgproblemcheck. The second catch, thelet, and the comment are gone (net −15 lines inpackages/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 returnsproblemand is not hired.After #2104 lands, fold this subtraction into that PR and close this POC unmerged.