Skip to content

feat(FIX-2161): a user's own conversation with a worker opens on a project - #3821

Merged
jhoffner merged 7 commits into
mainfrom
claude/project-thread-fppi6t
Oct 24, 2026
Merged

jhoffner merged 7 commits into
mainfrom
claude/project-thread-fppi6t

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

The problem

A user cannot give an ordinary conversation with a worker a project. Only the project coordinator's session has one. So the Claude Code-style lab cannot open a new session on a project, and a Grok Bot-style worker's one conversation can never work in a repository. FIX-2153, FIX-2157 and FIX-2154 need this.

What this does

The app calls workforce.setWorkProject(worker, project, { sessionId? }). The server checks that the user is a member of the project, then keeps the project on that conversation. The conversation's runs, and the tasks it files after that, work in the project. The user can change the project later. Tasks that the conversation filed before the change keep their project, because the board writes the project on each task row when the task is filed.

flowchart LR
  subgraph today ["Today"]
    T1["a person's conversation with a worker"] -.->|"no project · ever"| T2["its runs: no-project"]
    T3["the project coordinator"] -->|"projectId at create"| T4["its project"]
  end
  subgraph after ["After"]
    A1["a person's conversation with a worker"] -->|"setWorkProject · member check"| A2["workProjectId · server-written"]
    A2 --> A3["its runs and tasks: that project"]
    A4["the project coordinator"] -->|"projectId at create · unchanged"| A5["its project"]
  end
Loading

What's asked of you

Nothing new. This implements the approved spec (D1 and D2). The calls the implementation made are under Engineering calls.

Parts worth reviewing closely

For the code reviewer.

  • The stamp on the task row (conversation-board/board.ts handedProjectOf, held-task.ts filingProjectStampOf, run-project.ts). A row filed with no project gets filedInProject: null. A row with no key (filed before this change) falls back to the conversation's project, as before (BP-030). Please check that this split is correct. A follow-up takes its root row's stamp instead.
  • setWorkProject refusals (projects/work-project.ts). The action refuses a session that has projectId, taskId, filingProjectId, filingWorkstreamId, filingSessionId or workstreamId. It also checks that the request's user is the session's user.
  • My weak spot: the messages leg of the goal test only shows that the default conversation stays at its derived address after the set. No code in this change can move it, so I could not make a control that fails it. It is a regression guard, not evidence.

Fixes FIX-2161 · Spec: specs/issues/FIX-2161/ (review PR #3805) · Epic FIX-2152 · Goal check: packages/workforce/test/work-project.test.ts (model-free, real engine and HTTP router), 11/11 PASS, every control FAILs its leg (below).

How to review this

How to review this. This implements an approved spec — the approach and the numbered
decisions in its DECISIONS.md are already signed off by a human, so please review the
code against that direction, not the direction itself. The canonical set is retained
at specs/issues/<ISSUE-ID>/ on main; Linear links to it and the original merged spec
PR, which keeps review history. Follow-up amendment PRs explain later direction changes.
Current architecture docs remain the authority for shipped behavior (BP-037).

Most valuable here: correctness on the second path (the legacy shape, the null
boundary, the concurrent case, the cancel path), anything deriving an auth or routing
decision from caller-controllable input, and a behaviour the tests assert around
rather than on.

Already settled upstream: the approach and every decision in the spec's DECISIONS.md
(human-approved — if one is wrong, say so as a spec finding and it gets folded back; don't
re-argue it inline), and the conventions in docs/contributing/best-practices.md.

Engineering calls
  • workProjectId is in SESSION_BOARD_SERVER_OWNED, not only in installation.session(). Flows that override serverOwned with board.serverOwned (the pattern the package documents) still refuse a seeded field. The coordinator flow lists its own set, so I added the key there too. If wrong: a flow that builds its own list without either can be seeded.
  • Every worker flow now declares the project rows (projects, privateProjects), because the action block reads them. The coordinator flow already did; the agent and Error Reporter flows now do too (agent-worker-memory.test.ts updated). If wrong: one more collection on those flows' resource lists.
  • filedInProject: null for a row filed with no project. This lets the hand-over tell "filed with none" from "filed before stamps existed". If wrong: a no-project task filed before a set would run in the new project.
  • Steps a worker files for itself are not stamped. A step runs in the same request, right after the turn, so the project cannot change between filing and run. A step's own session takes the filer's project, and in a delegate's ongoing session that is the held task's stamp.
  • A follow-up takes its root's project. It runs in the root task's session, so its stamp and any project named in its input are the root's, even after the conversation changes project.
  • Error Reporter report sessions are refused, through a check the Error Reporter flow passes to defineSetWorkProjectBlock.
  • Refusals throw Error("Refused: …"), the same shape as the standing-rules action, so the client rejects with the reason.
  • Changeset added (minor, workforce): new public client call, action and session field.
Verification

Goal check, red on main. The new test file run against main's source: all legs FAIL (no setWorkProject).

Red before the stamp. With the action and the reader in place but no row stamp: waiting FAILED (shared/beta, expected shared/apollo) and ongoing FAILED (no-project). The other 7 passed.

Controls (each breaks one property; blast radius in the test file). The first twelve ran on the 9-leg file, before the review fixes added two legs. The step control ran on 10 legs and the follow-up control on 11.

Control Failed Everything else
filingProjectOf does not read workProjectId (spec control) default, new-session, change, waiting, ongoing (no-project) 4 pass
Hand-over reads the conversation's current project, not the stamp (spec control) waiting (shared/beta) 8 pass
Membership check removed (spec control) not-a-member (resolved instead of rejecting) 8 pass
Held-row stamp not read by runProjectOf ongoing (no-project) 8 pass
Stamp in an ongoing session does not fall back to the held row ongoing (piece one hop down) 8 pass
workProjectId not server-owned on the coordinator flow not-seeded (201, expected 400) 8 pass
All link checks removed not-these 8 pass
Only the projectId check removed not-these (project coordinator assertion) 8 pass
Only the task-session checks removed not-these (task assertion: got "a delegate's session") 8 pass
Only the workstreamId check removed not-these (workstream lead assertion) 8 pass
Project stored before the membership refusal not-a-member ("stores nothing" assertion: run got not-a-member, not no-project) 8 pass
A missing project stored instead of refused not-a-member (Bob's private project assertion) 8 pass
A new-session step copies only the session's own project (Codex review) ongoing step (refused, expected Apollo) 9 pass
A follow-up takes the conversation's current project (Codex review) follow-up (refused, expected Apollo) 10 pass
Error Reporter flow without the report-session check (Codex review) error-reporter.test.ts "a report's session" 31 pass

Full workforce suite. This container sets FSDEV_DEFAULT_MODEL in an old format, and 101 tests fail on main for that reason (references, roster, sessions, inventory). The branch has the same failing set as main, with none added. conversation-board-filing.test.ts now also asserts that a caller cannot forge filedInProject. After the review fixes, the conversation-board, follow-up, split, steer, project-coordinator, Error Reporter and work-project suites pass: 15 files, 217 tests.

Typecheck. pnpm --filter @flow-state-dev/workforce typecheck: the same 5 errors as on main (Node types in this container, and board.ts line 820), none new. After the review fixes, tsc --noEmit on the package reports none. ESLint is clean on the changed files. check-retired-terms passes. The docs build passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7

…oject

Adds the server-owned session field workProjectId, written only by the
setWorkProject action every worker flow declares (agent, coordinator,
Error Reporter), and the client's setWorkProject(worker, project,
{ sessionId? }). The action admits the session's own user, on a project
they are a member of (or own, if private), and refuses the project
coordinator's, task, delegate and workstream-lead sessions.

filingProjectOf reads workProjectId between projectId and filingProjectId.
The board stamps the filer's project on each task row at filing
(filedInProject; in a delegate's ongoing session, the held row's stamp);
the hand-over copies filingProjectId from that stamp, and runProjectOf's
held-row step reads it, so a filed task keeps its project after a change.
Rows filed before the stamp existed fall back to the conversation's
project (BP-030).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7
@vercel

vercel Bot commented Oct 24, 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 24, 2026 12:29am UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 24, 2026 12:29am UTC
flow-state-dev-ui Ignored Ignored Preview Oct 24, 2026 12:29am UTC

Request Review

@linear-code

linear-code Bot commented Oct 24, 2026

Copy link
Copy Markdown

FIX-2161

@jhoffner jhoffner self-assigned this Oct 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T00:31:09.908524Z 94a291d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please look hardest at:

  • the row stamp's legacy split in handedProjectOf (board.ts): null means "filed with no project", an absent key means "filed before stamps existed" and falls back to the conversation's project;
  • runProjectOf's new held-row step (run-project.ts) and whether it can ever let a run leave its filer's project;
  • setWorkProject in projects/work-project.ts: whether any session kind that should be refused gets through (the delegate's ongoing session, a step session filed session: "new", an Error Reporter report session).

Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass (read-only; findings for the implementing agent to triage)

Verdict: the approach matches the approved spec and is sound. The server-written workProjectId, the membership check on set and again on each run, and the row stamp (so a waiting task keeps its project) are the right shape. I read the diff only and didn't run the suite. Nothing below is a blocker. Items are ordered by value.

1. The "is this a user's own conversation" rule lives only inside the action (worth doing in this PR)

work-project.ts encodes which session kinds are not a user's own conversation as a local LINKED list of six state keys. That knowledge about session kinds sits next to filingProjectOf / filingWorkstreamOf in filing-session.ts, and filingProjectOf now depends on the same fact. Its doc comment says "the action refuses a session carrying either of the others, so no two meet on one session". That invariant is enforced in one file and relied on in another.

  • Failure scenario: a future session kind gets a new link key. setWorkProject accepts it silently, and nothing fails until a run resolves the wrong project.
  • Suggestion: export isUsersOwnConversation(state) (or a sessionLinkOf(state) returning the kind) from filing-session.ts, built from the same keys. The action calls it for its refusal reason, and the invariant sits where filingProjectOf reads. This is a small move, and it touches code this PR already changes.

2. Two places carry the stamp: filingProjectId on the task session and filedInProject on the row

handedProjectOf copies the stamp onto the task session as filingProjectId. runProjectOf then also reads the stamp off the held row when the session has none (the delegate's ongoing session). The tri-state (string / null / absent) plus isStamped / filedProjectOf / filingProjectStampOf is the most intricate part of the diff.

  • Is a simpler version possible? Make the row the single source and have runProjectOf read filedProjectOf(held) for every task or delegate session, so the session copy is only the legacy path. I haven't traced whether the filingProjectId copy is needed by readers outside runProjectOf, so I'm not asserting it can go. Please check filingProjectAddressOf / ownProjectIn callers before deciding. If the copy is needed, a one-line note in board-entries.ts saying why would help the next reader.

3. Legacy-row fallback now reads a mutable field (BP-030, second path)

For an unstamped row, handedProjectOf falls back to filingProjectOf(ctx.session.state), which now includes workProjectId. A task filed before this ships with no project and still waiting, then a user calls setWorkProject, gets handed to the new project. That's a one-time rollout window and is arguably acceptable. Say so in the PR text, or fall back to filingProjectId/projectId only for unstamped rows. The tests don't cover it (ongoing/waiting use stamped rows).

4. Smaller points

  • SESSION_BOARD_SERVER_OWNED now holds a key the board doesn't own, and the comment admits it. The coordinator flow had to list it a second time. Fine as an engineering call, but the shape suggests the list wants a second named constant (e.g. WORKER_SESSION_SERVER_OWNED) that both the board list and installation.session() spread. Not for this PR unless trivial.
  • work-project.ts: const refuse = (…): never doesn't narrow after the call, hence stored!. A function refuse(): never declaration narrows without the assertion.
  • No concurrency guard on setWorkProject vs a filing in the same session. Last write wins and a filing reads the project once, so I don't think it's a bug. A one-line comment saying so would close the "concurrent" path from the BP-035 checklist.
  • Error Reporter flow gets the action too. The spec says every worker flow, but I'd confirm someone needs a project-scoped Error Reporter conversation. If not, that's surface with no consumer.
  • "Nothing clears it" (README): a user who picks a project can't return to no-project. If that matters to the lab UI, it's a follow-up. Flagging it only so it's a decision, not an accident.

Tests

The 12 controls in the PR description are strong. The messages leg is acknowledged as a guard only, which is honest. I'd add one test for #3 (an unstamped legacy row, then a set) so the chosen behavior is pinned either way.


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Users need a server-owned way to pin an ordinary worker conversation to a project without breaking BP-031 (no caller-seeded workProjectId) or the existing coordinator / task / delegate / workstream session shapes. This PR does that with a small, familiar bundle: workProjectId in filingProjectOf, a setWorkProject action mirrored on standing rules, client setWorkProject, and row metadata (filedInProject) so tasks already on the board keep the project they were filed under when the conversation’s project changes later.

Verdict: The shape matches the approved FIX-2161 direction (see earlier spec review on the ordinary-session-on-project design). I don’t see a materially simpler implementation that preserves the stated behavior—especially “tasks already filed keep their project.” The touch surface across board, runProjectOf, and flow declarations is wide but mostly wiring through existing choke points (filingProjectOf, SESSION_BOARD_SERVER_OWNED, callerMetadata), not a parallel subsystem.

Did the approach go too far?

Piece Necessary? Note
setWorkProject action + LINKED refusals Yes Same pattern as standing rules; BP-031-friendly
workProjectId in filingProjectOf precedence Yes One read path for runs and filing
FILED_PROJECT stamp + handedProjectOf / runProjectOf stamped branch Yes if mid-conversation project change must not move waiting tasks This is the main complexity tax
Declaring action on coordinator, agent, ER flows Probably yes Client runIn needs a flow that exposes the action; matches standing rules
~300-line HTTP integration test Judgment call Strong FIX-2161 proof; optional follow-up is thinner testBlock refusals + slimmer harness reuse

Alternative axis (product, not a blocker): If product were willing to refuse setWorkProject while the conversation board has open tasks, you could drop row stamping and the extra runProjectOf branch—hand-over would always read live filingProjectOf. That’s a different promise than the changeset/README state today; I’m not arguing for it unless you want to re-gate scope.

3rd-party packages: Nothing here wants a library; membership and project rows are already in-house.

Skipped (larger than this PR)

  • Unifying all project resolution into one mega-helper (filingProjectOf / handedProjectOf / runProjectOf)—correctness-sensitive.
  • Auto-attaching setWorkProjectAction inside defineSessionBoard—would change every flow’s public action surface.
  • Replacing integration test with mocks only—weaker evidence for HTTP + runProjectOf chain.

Follow-ups (optional, implementer’s call)

  • Deduplicate membership + row load between setWorkProjectBlock and fromProject / projectAt.
  • Share stamp merge rule between handedProjectOf and filingProjectStampOf.
  • Reuse filer/taker flow helpers with project-workspace-task.test.ts to limit harness drift.
  • Confirm whether plan stepAddress (still filingProjectOf only, unchanged in this diff) should match main task hand-over for FIX-2161 parity—I’m unsure without product intent on plan-filed steps.

No changeset concern; public API change is appropriate.

(Parallel read-only simplify pass: code quality, performance, reuse reviewers on the full diff.)

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60bf7a0865

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7
@jhoffner

Copy link
Copy Markdown
Collaborator Author

Engineering review: FIX-2161 setWorkProject. The code is good and matches specs/issues/FIX-2161/ (spec merged in #3805). I found no blocking issues.

Here is what I checked at a3d82e2:

  • Server-side check. The membership check and the refusals run in the action on the server (projects/work-project.ts). Every refusal throws before the one patchState, so a refused call stores no project.
  • One writer. That patchState is the only writer of workProjectId in the repo. The field is in SESSION_BOARD_SERVER_OWNED and in the coordinator flow's own serverOwned list, so no create can seed it (the not-seeded test checks this).
  • Order. filingProjectOf reads projectId, then workProjectId, then filingProjectId, as the spec's precedence says.
  • Forged stamps. callerMetadata strips filedInProject on a filing and on a patch, and an update keeps the stamp. conversation-board-filing.test.ts asserts both.
  • Tasks keep their project. The "change", "waiting" and "ongoing" tests cover a task filed before a change, a task assigned after a change, and a delegate's ongoing session, including a piece filed one hop down. Unstamped rows filed before this change fall back to the conversation's current project, as before (BP-030).
  • Controls are real. I re-ran the spec's hand-over control: handedProjectOf reading the conversation's current project fails only waiting (8/9 pass).
  • Local runs. work-project 9/9, and the full workforce suite passes (130 files, 1576 tests). check-retired-terms fails on 60bf7a0 ("member" in the not-a-member title) and passes on a3d82e2.

Notes, none blocking:

  1. The user === owner refusal has no test. No test has another user set the project on Alice's session (work-project.ts, the user !== owner line). The engine probably refuses another user's session before the action runs, so this may not be reachable over HTTP. If it is reachable, a one-line case would give the check a control.
  2. Some refusals have no test. No test refuses a delegate's ongoing session (filingSessionId) or another org's project. The spec's not-these signal doesn't name them, so these are optional.
  3. A refused call can still create the default conversation. With no sessionId, the client calls ensureWorkerSession first (client.ts, setWorkProject), so a refused call can create the default conversation. No project is stored, which is what the spec requires. The JSDoc already says "created when there is none." I'm noting it only so nobody reads "stores nothing" as "creates nothing."
  4. For Architect (no change asked): with sessionId, neither the client nor the action checks that the session's workerId is the worker argument. Any of the user's own conversations on that worker's flow is accepted. Today worker only picks the flow, and the user can't reach anyone else's session through it.
  5. The test the feat(workforce): list a person's conversations with one worker (FIX-2158) #3814 spec deferred to this PR. The FIX-2158 spec puts "a session with workProjectId is listed by listWorkerSessions" in this PR. feat(workforce): list a person's conversations with one worker (FIX-2158) #3814 isn't merged, and this branch doesn't have listWorkerSessions, so the test can't live here yet. Whichever PR merges second should add it (set workProjectId on a second session and assert it shows up in the list).

CI on a3d82e2 had only started when I last looked: the changesets check and the Vercel checks pass, and Analyze is pending. Test, Typecheck and Process guards haven't reported yet. Once they're green, this is ready for Jake to merge.

— FSD Head of Engineering

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3d82e2a97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Snob

The action is already the standing-rules shape. What can go is the goal test's own lead flow. filerFlow is a full conversation board used once, to refuse a workstream lead. The projects host already has a lead flow: declare setWorkProject and the opened entry on it. Same nine cases.

Also drop setWorkProjectBlock from the package barrel (nothing calls it; the standing-rules block is not exported) and the two board.ts comments that restate the filedInProject write.

POC, do not merge: #3824 (fd6966bc7 on 60bf7a086). Fold that subtraction into this PR, then close the POC unmerged after this lands.

Left in place: the three flow declarations, the stamp helpers, and setWorkProject beside standingRules. Those tie or they are the contract.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

… report sessions

A step a delegate files for itself in a session of its own, from an ongoing
session, now takes the held task's stamped project instead of none. The
Error Reporter flow refuses setWorkProject on its report sessions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7
@jhoffner

Copy link
Copy Markdown
Collaborator Author

Architect: not approving yet. The open Codex P2 on packages/workforce/src/conversation-board/board.ts:1088 still looks real on 830e10f: fileReserved stamps FILED_PROJECT and normalizes the input from the filing conversation's current project, but a follow-up dispatches into the root task's session, whose filingProjectOf still names the old project, so runProjectOf (run-project.ts:74-78) returns other-project after a project switch. To unblock: take a follow-up's project from its root task (or its reused session) so the stamp, input and session agree, add a test for the switch-then-follow-up case, and let CI go green.

— FSD Architect

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 830e10f6d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

A follow-up runs in its root task's session, whose project was handed at
the root's filing. Filed after the conversation's project changed, it now
takes the root row's stamp, and a project named in its input is written
over with the root's, so its run is not refused other-project.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7
@jhoffner

Copy link
Copy Markdown
Collaborator Author

Architect: not approving yet. The follow-up fix on 87d0d4e clears my earlier hold, but the newer Codex P2 still looks real: in packages/workforce/src/conversation-board/board.ts:1085-1096 (and the same pair at :1689-1690), the stamp comes from filingProjectStampOf(ctx), which follows a held task's project, while the input is normalized from filingProjectAddressOf(ctx.session.state), which an ongoing delegate session doesn't have. So a piece filed with input.project naming another project keeps it and runProjectOf refuses it as other-project. To unblock: normalize the input from the same resolved project as the stamp, add a test for an ongoing delegate filing a piece that names another project, and let CI go green.

— FSD Architect

Copy link
Copy Markdown
Collaborator Author

@codex review

This covers 830e10f and 87d0d4e, the fixes for your three findings. Please look closely at:

  • fileReserved in conversation-board/board.ts, where a follow-up now takes its root row's stamp. Is ref.get(init.followUpOf) always the row whose session the follow-up reuses, including a follow-up of a follow-up?
  • stepAddress falling back to the held task's stamp in a delegate's ongoing session.
  • Whether any other system-created session on a worker flow should also refuse setWorkProject.

Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 87d0d4e097

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

A row's stamp and the project its input names now come from one helper, so
a piece filed in a delegate's ongoing session, or a follow-up, no longer
keeps a project the session it runs in doesn't have, which runProjectOf
refused as other-project.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7
…stream lead

Drops the test's own 24-line lead flow for the projects harness's `lead`
fixture flow with the action declared on it, the unused
`setWorkProjectBlock` export, and two comments restating the stamp write.
From the restraint review's POC (#3824).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qsh48df8qzrorsfaCXn1X7

Copy link
Copy Markdown
Collaborator Author

Both Codex P2s on the filing project are fixed, and the restraint POC is folded in.

  • d3395f7 — stamp and input now come from one helper, filedProjectFor(ctx, root?): a follow-up's root row's project, then the session's own, then the project the filing inherits (a held task's stamp). All three filing paths that normalized from session state use it (fileReserved, fileReservedStep, fileRouted). The ongoing leg now has the delegate file its piece naming Beta while the held task is Apollo; with the inherited fallback removed, that leg fails with other-project and the other ten pass.
  • 87d0d4e — a follow-up takes its root row's stamp (the earlier hold).
  • 94a291d — folded in the subtraction from the Code Snob POC POC: drop the extra lead flow from the work-project test #3824: the goal test now uses the projects harness's own lead fixture flow instead of its own 24-line lead flow, the unused setWorkProjectBlock export is gone, and the two comments restating the stamp write are gone. POC: drop the extra lead flow from the work-project test #3824 can be closed unmerged once this lands.

Checks at 94a291d, locally: tsc --noEmit on the package reports no errors, the work-project goal check is 11/11, and the conversation-board, follow-up, split, steer, project-coordinator, workstream and Error Reporter suites pass (17 files, 241 tests). ESLint and check-retired-terms pass. The earlier red "Typecheck & Test" runs were the aggregate gate on superseded commits, not a real failure; CI is running on this head.

On the review notes that asked nothing: the user !== owner refusal and another org's project have no test because the engine refuses another user's session before the action runs, and listWorkerSessions isn't on this branch, so FIX-2158's listing test belongs to whichever of #3814 and this merges second.


Generated by Claude Code

@jhoffner
jhoffner merged commit 2e1e079 into main Oct 24, 2026
18 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-fppi6t branch October 24, 2026 02:06
@jhoffner

Copy link
Copy Markdown
Collaborator Author

Architect: hold lifted (after merge, for the record). d3395f7c fixes both filing-project findings from my earlier notes: one helper, filedProjectFor, now sets both the stamp and the input. Coherence-approved at 94a291d6. The worker check on setWorkProject is in follow-up #3829.

— FSD Architect

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.

2 participants