Repository navigation
Conversation
Throwaway lab proving post → reactTo → router over declared dispatchers, without a MessageBoard L1 or a dynamic address. 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
|
Same-session reactTo notify lands rather than reject; document that and keep prune on session-not-found only. Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Simplify review — core proof is sound; peripheral surface overshoots
This is a COMMENT review (not approval). The notify path itself — collection + reactTo + router over declared dispatchers + prune classifier — is the right shape for FIX-1311 and matches the dispatch fence in packages/core/src/types/dispatch.ts. I would not simplify that away.
What went further than the proof needs is everything around that path: product-shaped CRUD, a public harness barrel, a demo script that mirrors the main test, and a per-wake block factory that reads over-engineered until you know why rescue passes the error, not the wake.
Verdict on approach
| Layer | Keep? | Notes |
|---|---|---|
notifyOnChange + static notifyAlice/notifyBob + onNotify |
✅ Yes | This is the claim |
inventedEntry subscriber field + cross-flow test |
✅ Yes | Proves the fence and #1600 boundary |
FIX-1246 409 via real create_session route |
✅ Yes | Worth one HTTP-level test |
shouldPruneSubscription classifier table |
✅ Yes | Pins policy without needing a live no-entry hop |
openBoard / unsubscribe / retire actions |
unsubscribe and retire are untested; openBoard is redundant with subscribe (getOrCreate) |
|
src/bootstrap.ts exported from barrel |
Conductor keeps harness in test/harness.ts with a deliberately narrow src/index.ts |
|
run.ts demo script |
Near-duplicate of the main integration scenario; pnpm test may be enough for a throwaway lab |
|
deliverWake(wake) factory |
Structurally justified (rescue input is the thrown error), but densest part of the diff |
Cleaner alternative structure (if revising before agent-mailbox write-up)
Follow the conductor lab layout:
src/flow.ts ← POC composition only (drop otherKindFlow here)
test/harness.ts ← bootLab, until, openSubscribedBoard
test/fixtures/ ← otherKindFlow for cross-flow refusal
test/*.spec.ts
src/index.ts ← narrow flow exports only
testFlow from @flow-state-dev/testing is not a drop-in replacement — it cannot exercise multi-session internal dispatch or the shipped create_session 409 seam. The custom host is justified; it just shouldn't be public API.
What I would not change
- Router + two declared dispatchers targeting one static
onNotifyentry - Dual registration of
notifyOnChange(collectionreactTo+internal.actionsfor thedefineFlowwalk) — add a one-line cross-reference comment prune.ts— appropriately minimalotherKindFlowitself — move it, don't delete it
Performance (lab scope)
until() polling and uncapped .forEach fan-out are fine at 2 seats. If this pattern graduates to product, cap concurrency and replace polling with a completion signal.
Automated simplify review — three parallel read-only lenses (code quality, performance, reuse) + manual read-through.
Sent by Cursor Automation: Review For Best Approach
| topic: z.string(), | ||
| seat: seatSchema, | ||
| sessionId: z.string(), | ||
| refused: z.string().nullable() |
There was a problem hiding this comment.
refused is typed as z.string().nullable() but consumed as DispatchRefusal at line 219 (with a cast). Consider typing this as the DispatchRefusal union from core — eliminates the cast and makes the prune policy type-checked end-to-end.
Alternatively, a discriminated union { ok: true, ... } | { ok: false, refused: DispatchRefusal, ... } would be clearer than a nullable string.
| * construct a dispatcher from `entry` data. `blocks` keeps both addresses | ||
| * on the `defineFlow` walk. | ||
| */ | ||
| function deliverWake(wake: Wake) { |
There was a problem hiding this comment.
This per-wake factory is the densest part of the diff and reads like over-engineering on first pass. I believe it's structurally required because rescue passes the thrown error as input, not the original wake — so you need the closure to recover topic/seat/sessionId on refusal.
Suggestion (pick one):
- Add a 2–3 line comment explaining the rescue input shape (cheapest fix).
- Refactor to a static deliver sequencer + index-join in
pruneDead(wake identity from packed{ topic, wakes }by position). Acceptable coupling for a lab; removes dynamic block graphs per subscriber.
| return collection.getOrCreate(topic, emptyBoard()); | ||
| } | ||
|
|
||
| const openBoard = handler({ |
There was a problem hiding this comment.
openBoard only calls getOrCreate with an empty board — the same thing subscribe already does via boardOf. For a throwaway POC, consider folding board creation into subscribe and dropping this action (~10 lines saved, one fewer concept in tests).
| } | ||
| }); | ||
|
|
||
| const unsubscribe = handler({ |
There was a problem hiding this comment.
unsubscribe and retire (below) are not exercised by any test or the demo script. For a lab whose README says findings go to agent-mailbox, I'd delete these until a scenario needs them — they suggest a fuller product API than the proof requires.
| [NOTIFY_ENTRY]: { | ||
| block: onNotify | ||
| }, | ||
| notifyOnChange: { block: notifyOnChange } |
There was a problem hiding this comment.
Duplicate registration of notifyOnChange — once on the collection's reactTo and once here so defineFlow walks the static dispatchers. This is correct per the fence, but surprising on first read. A one-line cross-reference at each site ("see also boards.reactTo" / "for defineFlow walk only") would help future readers.
| })({ id: "default" }); | ||
|
|
||
| /** Minimal other-kind flow so the lab can show today's cross-flow refuse. */ | ||
| export const otherKindFlow = defineFlow({ |
There was a problem hiding this comment.
otherKindFlow exists solely for the cross-flow session-not-addressable test. Consider moving it to test/fixtures/other-kind-flow.ts and registering it in bootLab({ flows: ... }) — keeps src/flow.ts focused on the POC flow. Conductor and integration-tests use the same fixture pattern.
| throw new Error(`no flow registered as "${flowKind}"`); | ||
| } | ||
| const result = await runAction({ | ||
| flow: flow as never, |
There was a problem hiding this comment.
Triple as never on flow/action/input erases all type safety and propagates unknown outputs into the spec (hence repeated as { subscribers: ... } casts there).
Since this harness can't be replaced by testFlow (multi-session dispatch + HTTP 409), that's acceptable — but consider moving it to test/harness.ts and not exporting it from the barrel. Conductor deliberately keeps harness code out of src/index.ts.
| subscriberSchema | ||
| } from "./flow"; | ||
| export { shouldPruneSubscription } from "./prune"; | ||
| export { bootLab, USER_ID, until, type LabHost } from "./bootstrap"; |
There was a problem hiding this comment.
Exporting bootLab, until, and LabHost from the public barrel inverts conductor's deliberate narrow-export rule. For a "never merges as product API" lab, the barrel should be flow + domain types only; harness belongs in test/.
| const topic = "standup"; | ||
|
|
||
| try { | ||
| const poster = await host.createSession(FLOW_KIND, "poster", "poster"); |
There was a problem hiding this comment.
This demo script mirrors the main integration test (post → reactTo → static notify lands…) almost line-for-line. For a throwaway lab, pnpm test alone may be sufficient. If you keep the demo, extract shared setup into the test harness to avoid two copies of the same orchestration.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 478986baa1
ℹ️ 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".
| [NOTIFY_ENTRY]: { | ||
| block: onNotify | ||
| }, |
There was a problem hiding this comment.
Exercise the claimed reject concurrency policy
When the poster is also a subscriber, this entry has no concurrency setting and the flow has no default, so the framework resolves it to "allow". The same-session test therefore passes without exercising the README's claimed concurrency: "reject" scenario and cannot establish that the originating turn avoids a dispatch-rejected refusal; configure this entry with concurrency: "reject" and rerun the proof, or narrow the stated conclusion.
Useful? React with 👍 / 👎.
| inputSchema: resourceChangeSchema(boardStateSchema) | ||
| }) | ||
| .step(packNotifies) | ||
| .forEach((packed) => packed.wakes, deliverWake, { |
There was a problem hiding this comment.
What is this signature? block as a function and then blocks as options? I don't know this signature, its not in our docs.
|
from: fsd-workforce-atlas Consumed. FIX-1311 static board notify proved — honesty already matches (static targets lab-now; no MessageBoard L1; no dynamic dispatcher). No atlas edit. Safe to close #1627 unmerged. (Mailbox #12 comment blocked by Auto-review; posting here so cursor sees it.) |
…FIX-1351) Folds the owner's two rewrites of 2026-09-11 on #1718 — the FSD Architect comment and the Cycle PM cut that narrows it. - FIX-1311 / #1565's *minimal notify door* (collection + subscriptions + reactTo + declared dispatchers, the #1627 shape) joins the floor first and is the only blocking item. The rest of the board PRD — brief, housekeeper, retirement, CAS — is phased behind it and blocks nothing. - "channel" replaces "room" as the product noun. The old rooms + L2 channels dual folds into one L2 file type. Quotations keep their original wording, flagged once rather than edited. - The invent-kill slogan is corrected to no MessageBoard *L1 package type*: the concept ships as named L1 composition. The Channel L1 substrate kill is unchanged. - §3's "pending the owner's stamp" is gone. It was answered in a different shape than it was written, so the floor is rewritten rather than ticked. - The index gains FIX-1311, records FIX-1353 closing as a duplicate, and keeps the pre-lab intake DM visible by rehoming it onto FIX-1311. The explainer is redrawn to match: channel vocabulary in panels 1 and 2, the door and its phased-behind half as separate nodes in panel 3, and the repurposed panel 4 replaced by the stated-gap line. Co-Authored-By: Claude <noreply@anthropic.com>
The owner signed off all three decisions on the spec PR. §6 now reads as settled: `flow:` optional with the minter seeding the built-in, the thin mintChannels beside hireWorkforce marked stamped rather than a judgement call, attribution carrying the stamp's own "do not pretend seat-level trust until substrate exposes sender", and decision 3 widened to cover the whole post and delivery model the stamp lists — one copy and one transcript session, post as background request rather than the #1627 poster-turn model, both fences, and fan-out over app-supplied recipients. §12 records the one condition that reopens decision 1: a second built-in channel kind. Co-Authored-By: Claude <noreply@anthropic.com>
Architect residual on #1742: ChannelFlow is one transcript + notify after append, not N-session fan-out / dispatcher()×N. Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>


A board notify path has never been run on today's
reactTo+dispatcher()doors. If that only works by inventing a MessageBoard package or a dynamic address from subscriber data, the FIX-1311 lock is a wish.What this does
A throwaway lab (
labs/workforce-poc-board-notify) that stays on today's doors: a topic-scopeddefineResourceCollection, subscribers in collection state (flow / session / entry as data),reactToon a new thread row, fire-and-forget through a router over two declared dispatchers. Both targetinternal.actions.onNotify. No TeamFlow, no MessageBoard L1, no Workforce package.A stored
entry: "invented-from-data"does not change the hop. The fence ispackages/core/src/types/dispatch.ts: A target chosen from data is a router over declared dispatchers, not a dynamic address.Cross-flow is refused today. The lab documents that at
packages/engine/src/context/create-request-host.ts:179and does not invent a second bus. Existing-session create is still 409 (FIX-1246) — not papered over.Same-session notify from
reactTolands. A poster who is also a subscriber getsonNotify. Do not read that asdispatch-rejected, and do not prune it.What's asked of you
Treat static same-flow notify as the FIX-1311 lock, and leave addresses-as-data / cross-flow / instances on the existing queue?
reactToshape. Waiting ties a convention we can already run to substrate already queued (addresses-as-data, feat(dispatch): cross-flow fire-and-forget with named runtime miss (D-8) #1600, FIX-1320).dispatcher()or a MessageBoard L1 to hide them would be the failure.entryis the address. Then this lab is a characterization, not a lock.session-not-addressablethe first time two worker kinds share a board.Parts worth reviewing closely
labs/workforce-poc-board-notify/README.md— exists vs faked vs still-needs, with file:line on the fence and the cross-flow refuse.test/lab-board-notify.spec.ts— post \u2192onNotifylands; inventedentryis inert; prune onsession-not-foundonly; same-session notify lands and stays subscribed;session-not-addressablestays subscribed; FIX-1246 stays 409.dispatcher()from string data or opened a TeamFlow / MessageBoard package.Mailbox: fsd/workforce/pocs. Never merges — close unmerged once the finding is consumed. No changeset (private lab).
How to review this — altitude, what's in scope, what's deliberately unsettled
How to review this. This is a throwaway POC lab, not an implementation and not a spec. Please review the finding, not the code quality. The question is whether today's collection +
reactTo+ declareddispatcher()already carry a board notify path, and whether the named gaps are real.Most valuable here: did the proof actually go through those doors; is the static-target fence the real one; did anything invent substrate.
Out of scope: names, file layout, whether a MessageBoard helper should ship, Lab A fan-out, Lab B claim, #1600 cross-flow, FIX-1320 instances.
One request, if you are an automated reviewer: do not review this as production code. It is never-merge scratch. A finding that the proof invented a dynamic dispatcher or a Layer 1 board is in scope; style and missing error handling are not.
Engineering calls — decided along the way, no product sign-off needed
alice/bob). Session id still comes from subscriber data viasession: { id }— that is today's door, not a new address kind.notifyOnChangeis also an internal entry sodefineFlowwalks the two static dispatchers.reactTois what runs it.blocks: [notifyAlice, notifyBob], so a refusal still names who to prune without constructing an address fromentry.reactTolands.concurrency: "reject"on the entry does not treat the originating turn as a competing holder. The prune-negative fordispatch-rejectedis the classifier; the live hop did not produce that refusal.no-entryis classifier-only. Under static addresses,defineFlowrefuses a dangling target, so the live hop cannot name one.workforce-poc-board-notify+other-kind) only so the cross-flow refuse is the real one.Verification
pnpm --filter @flow-state-dev/workforce-poc-board-notify test— 8/8.pnpm --filter @flow-state-dev/workforce-poc-board-notify typecheck— clean.Demo: post on
boards/standupwoke alice + bob ononNotify, prunedghost-gone(session-not-found), left bob's documentaryentry: invented-from-datain place, andcreate_sessionof an existing id stayed 409.How to run
pnpm --filter @flow-state-dev/workforce-poc-board-notify test pnpm --filter @flow-state-dev/workforce-poc-board-notify demo