Repository navigation
spec(FIX-2368): j2 covers Shift Manager; the memory-bus control shows B never updating - #5469
Conversation
… B never updating The Teammates and claude-code-style labs move to FIX-2843: both run only model-backed workers, and the closure keeps the model n/a. Since FIX-2545 the in-memory bus is single-process, so on two processes B never updates; the epic's D6 and control line follow. The closure run's two failures are tracked as FIX-2841 and FIX-2842. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UNkLEJU1iqxFYoPadTRfn
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…IX-2545 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UNkLEJU1iqxFYoPadTRfn
|
Note Automatic reviews are paused because your team has used its included automatic processing for this billing period (headroom scales with your seat count). You can still comment "Gitar review" to run one anytime, and automatic reviews resume on their own by December 1. Add seats for more headroom. Code Review ✅ Approved 🟡 Medium risk 3 closed / 3 findingsMoving the labs out of j2 narrows closure coverage and could defer detecting lab-specific realtime issues until FIX-2843; runtime code is unchanged. Amends the FIX-2368 and FIX-2367 closure specs to limit j2 coverage to Shift Manager, move the Teammates and claude-code-style labs to FIX-2843, and state that the memory-bus control expects B never to update. Spec text only, no code changes. The previously open D6 Because row, the unmarked Nov 2 changelog entry, and the D2/SPEC lab-scope references were resolved in this session. No open issues remain. ✅ 3 closed✅ Quality: D6's Because row still says the in-memory bus keeps the timed read
✅ Quality: Nov 2 changelog entry left as-is while PR supersedes it without marker
✅ Quality: FIX-2368 still describes labs as in scope for j2 in D2 and SPEC
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledWas this helpful? React with 👍 / 👎 | Gitar |
|
@codex review What I'm unsure of: whether any other spec text still says the in-memory bus keeps a timer or a timed read on two processes. Since FIX-2545 it reports that it crosses. I've fixed the epic's D6, its control line, FIX-2428's D3 and FIX-2368's spec. Please also check that the amended closure scope (j2 = Shift Manager only; the labs moved to FIX-2843) doesn't contradict the closure goal's own Generated by Claude Code |
Codex Review Summary: ✅ CompletedThis 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f6b737698
ℹ️ 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".
| | **Because** | That read costs a store read a second for every open connection, whether or not anything changed. Woken, an idle view costs nothing, and the bus has a real consumer the day it lands. The stream also sends other callers' items and run changes, which a plain reply makes with no resource, state or task write, so the bus child publishes the session topic from every request and session store write, through one wrapper applied in `resolveStores` and at each entry that takes a raw registry (`runAction`, BullMQ's job processor, `fsdev run` and `chat`), or turning the timer off would strand them. The stream's cross-process reach then rests on the bus, so the timed read stays as a slow fallback where the bus can't cross processes: the in-memory bus on two or more processes, and serverless hosts. The wake goes in the bus child, because the delivery child is already the largest | | ||
| | **Locks in** | The bus child owns the wake and its publisher: an item persisted under a session's request, a request status change, and a run created or updated each publish that session's topic. The timed read stays **only** where the bus can't cross processes (the in-memory bus on two or more processes, and serverless hosts); with a cross-process bus it is off. No child adds an always-on poll beside the session stream and the socket (ER-3). The bus child changes a route that works today across processes, so it proves both the woken and the fallback path, and a reply with no other write (closure leg d) | | ||
| | **Because** | That read costs a store read a second for every open connection, whether or not anything changed. Woken, an idle view costs nothing, and the bus has a real consumer the day it lands. The stream also sends other callers' items and run changes, which a plain reply makes with no resource, state or task write, so the bus child publishes the session topic from every request and session store write, through one wrapper applied in `resolveStores` and at each entry that takes a raw registry (`runAction`, BullMQ's job processor, `fsdev run` and `chat`), or turning the timer off would strand them. The stream's cross-process reach then rests on the bus, so the timed read stays as a slow fallback where the bus can't cross processes: serverless hosts. (The in-memory bus is single-process by decision, FIX-2545, and reports that it crosses.) The wake goes in the bus child, because the delivery child is already the largest | | ||
| | **Locks in** | The bus child owns the wake and its publisher: an item persisted under a session's request, a request status change, and a run created or updated each publish that session's topic. The timed read stays **only** where the bus can't cross processes (serverless hosts); with a cross-process bus it is off. The in-memory bus is single-process by decision (FIX-2545): it reports that it crosses, so it keeps no timed read, and two processes need a bus that crosses. No child adds an always-on poll beside the session stream and the socket (ER-3). The bus child changes a route that works today across processes, so it proves both the woken and the fallback path, and a reply with no other write (closure leg d) | |
There was a problem hiding this comment.
Supersede FIX-2426's timed-read contract
This reverses the bus invariant without amending the child spec that owns and tests it: specs/issues/FIX-2426/SPEC.md still requires two processes on separate in-memory buses to receive a reply within two seconds via the timed read (lines 11, 33, and 44), and its D1 still locks that behavior in. Because the closure plan reruns every child's goal check, FIX-2426's documented check can no longer pass after FIX-2545 makes the bus report crossing and disables that read. Supersede D1 and its signal/control alongside this epic amendment.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Half right. Fixed in 968aaa0.
The text is stale. FIX-2426's D1 now carries a "Superseded (Nov 19) by FIX-2545" note: the owner took the flip D1 named, so the in-memory bus keeps no timed read. The SPEC carries a matching note under "The goal", and "How it got here" has the entry. Per the repo's retained-spec practice, the original decision stays as written, under a dated note.
The check is not broken, though. FIX-2426's goal (goals/session-stream/wakes-on-a-change) exercises its fallback as c:fallback, "each server on its own Postgres bus with no tail pool". That is a non-crossing Postgres bus, not the in-memory bus. In the closure's row-3 run on main it passed: c: reply 481 ms after saved. So the closure's rerun of this child check stays valid.
Generated by Claude Code
| |---|---| | ||
| | **Instead of** | Reading on a timer only when `GET /capabilities` says there is no push · a server that sends a synthetic notice at the poll pace where its bus can't cross, so the client needs no `crossing` frame. That adds a server timer per connection, while the client already keeps one for a dropped socket | | ||
| | **Because** | A socket can be up and still miss a change made on another process, when its process's bus doesn't cross processes (the in-memory bus on two processes, a Postgres bus that stopped hearing its ping). FIX-2426 keeps the session stream's timer there; the hook keeps its own the same way. And a socket on a host with push still drops: a proxy's idle timeout, a deploy, a laptop that sleeps, a ticket that lands on another process. With the timer tied to capabilities alone, the screen goes stale with no sign of it. So `client.subscribe` reads on its timer from the first failed reconnect, the pace `followSession` already treats as lapsed, until the socket is back, and while the socket says its bus doesn't cross (an open Ably connection always crosses, [below](#decided-not-asked)). Each connect and reconnect calls `onChange` once. The timer lives in `client.subscribe`, not in each hook, so every consumer gets one fallback. Epic ER-5 says the same | | ||
| | **Because** | A socket can be up and still miss a change made on another process, when its process's bus doesn't cross processes (a Postgres bus that stopped hearing its ping; the in-memory bus on two processes was one until FIX-2545 made it single-process). FIX-2426 keeps the session stream's timer there; the hook keeps its own the same way. And a socket on a host with push still drops: a proxy's idle timeout, a deploy, a laptop that sleeps, a ticket that lands on another process. With the timer tied to capabilities alone, the screen goes stale with no sign of it. So `client.subscribe` reads on its timer from the first failed reconnect, the pace `followSession` already treats as lapsed, until the socket is back, and while the socket says its bus doesn't cross (an open Ably connection always crosses, [below](#decided-not-asked)). Each connect and reconnect calls `onChange` once. The timer lives in `client.subscribe`, not in each hook, so every consumer gets one fallback. Epic ER-5 says the same | |
There was a problem hiding this comment.
Update FIX-2428's in-memory control
The FIX-2545 qualification conflicts with this decision's next Locks in row, which still says the in-memory bus always polls even on one process, while specs/issues/FIX-2428/SPEC.md still requires its second-process in-memory-bus leg to update within a poll interval (lines 56–57). The closure also reruns this child check, but under the newly documented behavior the second process never updates, so that expected PASS is impossible. Update the lock-in, spec signal, and goal control together.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Text fixed in 968aaa0. FIX-2428's D3 now carries an "Amended (Nov 19) by FIX-2545" note: the hook keeps no timer on the in-memory bus, on one process or two. The SPEC notes that leg c's second in-memory process describes the case before FIX-2545, and "How it got here" has the entry.
The check itself still passes. FIX-2428's goal (goals/realtime/websocket-delivery) passed on main in the closure's row-3 run, and its no-socket, skip-check and ignore-crossing controls each failed as named. So its leg c isn't graded on two in-memory processes as the old spec text describes. I'm not changing its goal or its controls in this spec PR.
Generated by Claude Code
| Since the Nov 19 amendment the closure grades only Shift Manager on this copy; the Teammates and | ||
| claude-code-style labs follow in [FIX-2843](https://linear.app/fixpoint-labs/issue/FIX-2843). |
There was a problem hiding this comment.
Rewrite D2 to match the narrowed j2 scope
The Shift-Manager-only amendment matches the goal's goal.md, but D2's heading, rationale, lock-in, and figure still define the closure as grading Shift Manager and both labs, and specs/issues/FIX-2368/SPEC.md:138-140 still signs off that old scope. Leaving the original decision intact beneath this postscript gives the retained closure spec two incompatible completion criteria; rewrite D2 and its sign-off summary to delegate the labs to FIX-2843.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Partly fixed in 968aaa0. The SPEC's sign-off item for D2 now reads "(since the Nov 19 amendment, Shift Manager only; the labs follow in FIX-2843)".
I'm keeping D2's own heading, rationale and figure as decided, with the dated note under it, which is how this repo amends a retained spec. That leaves one completion criterion. The plan row is what the closure grades, and it now says j2 is Shift Manager only. D2 is the method (a scratch copy on Postgres), and that still holds for Shift Manager.
Generated by Claude Code
…2's sign-off follows j2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UNkLEJU1iqxFYoPadTRfn
There was a problem hiding this comment.
Simplify / review (automation)
Spec-only amendment after #5280 — direction looks right. I'm not proposing a different macro approach; the open questions are incomplete cross-file sync and how much FIX-2545 prose to spread.
Macro direction (keep)
- j2 → Shift Manager only, labs → FIX-2843 is the cleaner fix for "model
n/a+ model-backed hosts" than bolting a test worker into the closure or re-opening D2 with a Lab product option. - memory-bus control → B never updates matches FIX-2545 and what the run already showed; reverting the Nov 2 "may update at poll pace" fork in
decided-not-askedis correct. - Touching epic D6 + FIX-2426/2428 +
goal.mdis justified for retained specs (row 3 re-runs children as written) and for the runnable goal; a FIX-2368-only PR would leave epic control and child D1/D3 tables actively wrong for anyone who stops at the old text.
Simpler alternative considered (not recommending a rewrite)
A minimal blast radius could have been: epic D6 + FIX-2368 (decided-not-asked, controls, plan row) + goal.md, plus one-line supersession blockquotes on FIX-2426 D1 / FIX-2428 D3 with active table rows fixed, and links everywhere else (epic control → FIX-2368). This PR chose full narrative sync across six surfaces — coherent, but FIX-2545 is explained many times; future readers may prefer epic D6 + closure decided-not-asked as canonical and shorter pointers in child logs (optional follow-up, not a direction fork).
Should fix in this PR (or immediate follow-up)
- FIX-2428 D3
Locks instill says the in-memory bus "is always" non-crossing for hook timer purposes — contradicts the Nov 19 blockquote you added in the same file. Table scanners will miss the amendment. SPEC.mddebt table ("What's already here") still says the memory-bus FAIL is graded on the 1 s signal only, whiledecided-not-askedand the control table now also encode B never updates — one phrase alignment.
Nice-to-have (I would not block merge)
- D2 primary labels (section title, mermaid,
d2-scratch-postgres.svg, plan journey name*runs the labs or Shift Manager*) still advertise labs in-scope; the new paragraph under D2 is accurate but navigation smells like pre-amendment scope. Retitle + figure refresh would be cleaner than more inline caveats. - Epic
FIX-2367/SPEC.mddocs line (~"cost of the fallback timer on the default in-memory bus") still reads pre–FIX-2545; out of this diff but worth a line when someone touches release-docs / epic SPEC again. - Epic
How it got here: Nov 2 memory-bus bullet and Nov 19 supersedes line coexist — correct history; an inline[superseded Nov 19]on Nov 2 would reduce dual-authority skimming.
Verification
Re-read diff + validate-spec-folder claim in PR body; no code to run. Parallel simplify reviewers only (read-only).
Verdict: Comment — ship the direction; tighten FIX-2428 D3 Locks in (and ideally the FIX-2368 debt row) before or right after merge so row-3 child specs and closure debt don't contradict FIX-2545.
Sent by Cursor Automation: Review For Best Approach
| | **Instead of** | Reading on a timer only when `GET /capabilities` says there is no push · a server that sends a synthetic notice at the poll pace where its bus can't cross, so the client needs no `crossing` frame. That adds a server timer per connection, while the client already keeps one for a dropped socket | | ||
| | **Because** | A socket can be up and still miss a change made on another process, when its process's bus doesn't cross processes (the in-memory bus on two processes, a Postgres bus that stopped hearing its ping). FIX-2426 keeps the session stream's timer there; the hook keeps its own the same way. And a socket on a host with push still drops: a proxy's idle timeout, a deploy, a laptop that sleeps, a ticket that lands on another process. With the timer tied to capabilities alone, the screen goes stale with no sign of it. So `client.subscribe` reads on its timer from the first failed reconnect, the pace `followSession` already treats as lapsed, until the socket is back, and while the socket says its bus doesn't cross (an open Ably connection always crosses, [below](#decided-not-asked)). Each connect and reconnect calls `onChange` once. The timer lives in `client.subscribe`, not in each hook, so every consumer gets one fallback. Epic ER-5 says the same | | ||
| | **Because** | A socket can be up and still miss a change made on another process, when its process's bus doesn't cross processes (a Postgres bus that stopped hearing its ping; the in-memory bus on two processes was one until FIX-2545 made it single-process). FIX-2426 keeps the session stream's timer there; the hook keeps its own the same way. And a socket on a host with push still drops: a proxy's idle timeout, a deploy, a laptop that sleeps, a ticket that lands on another process. With the timer tied to capabilities alone, the screen goes stale with no sign of it. So `client.subscribe` reads on its timer from the first failed reconnect, the pace `followSession` already treats as lapsed, until the socket is back, and while the socket says its bus doesn't cross (an open Ably connection always crosses, [below](#decided-not-asked)). Each connect and reconnect calls `onChange` once. The timer lives in `client.subscribe`, not in each hook, so every consumer gets one fallback. Epic ER-5 says the same | | ||
| | **Locks in** | `pollIntervalMs` on `client.subscribe` and `useSubscription`, a public name. A screen on a push host still costs a read per interval while its socket is down or its bus doesn't cross, which on the in-memory bus is always, even on one process (FIX-2426 D1) | |
There was a problem hiding this comment.
The Nov 19 blockquote above says the in-memory bus keeps no hook timer (FIX-2545). This Locks in row still says a screen on the in-memory bus pays a read per interval because the bus "is always" non-crossing — that was pre-2545 FIX-2426 D1. Since this PR already amends D3 for 2545, I'd update this cell (or add a > Superseded clause on the row) so table-first readers don't get the wrong hook behavior.
| | **Because** | DevTeam's and the Teammates lab's configs build `sqliteStores` themselves. SQLite's bus doesn't cross, so under [FIX-2429's call](../FIX-2429/DECISIONS.md#decided-not-asked) Shift Manager's board keeps its 3 s timer while a task is open, and leg b's "no read between notices" can never pass there. The epic's *not done if* already reads "still polls … with the Postgres bus configured". Grading a scratch copy with only the store line changed tests Shift Manager's and the labs' own views on the bus that crosses. `buildShiftManagerCopy` already patches copies in scratch, so it needs no product change. A Lab option would be product surface no person has asked for | | ||
| | **Locks in** | The run proves the views on Postgres. As shipped, the labs still read every 3 s while a task is open, and the report says so in one line | | ||
|
|
||
| Since the Nov 19 amendment the closure grades only Shift Manager on this copy; the Teammates and |
There was a problem hiding this comment.
Content is right; navigation is still heavy: H2, mermaid, figure caption, and plan label all say "Shift Manager and the labs." A retitle (e.g. Shift Manager on scratch Postgres; labs → FIX-2843) plus a small d2-scratch-postgres.svg refresh would be simpler than stacking amendments under the old heading — optional here, but worth doing before the closure gate if implementers live in figures/titles.
| |---|---|---| | ||
| | 1 | Legs a to d ([the signal](SPEC.md#the-signal)) | Each green; each control red where named | | ||
| | 2 | One journey per team whose *after* row 1 doesn't walk. *Builds a screen two people watch* is leg a. **j2** *runs the labs or Shift Manager*: Shift Manager and the Teammates and claude-code-style labs, each on D2's copy, a conversation open with a task open and its message, request, project and activity views mounted; over 10 s from the first `crosses: true` frame, with nothing written, 0 reads (`j2:no-poll`); a message sent from another session shows within 1 s (`j2:message`). **j3** *runs more than one process*, on row 1's two processes plus one: process 1 on BullMQ `dispatch-only`, a `worker-only` process runs A's action, B on process 2 shows the reply within 1 s (`j3:worker-reply`); then over 10 s idle, with nothing written, 0 session-stream statements from process 2 (`j3:no-timed-read`), as in FIX-2427's signal, so the read the reply's notice wakes is not counted; `no-request-publish` must FAIL `j3:worker-reply`. **j4** *deploys to Vercel or Next*, the polling fallback only ([D3](#d3)): the fixture behind `createNextHandler`, `GET /capabilities` reports no push and B updates within the hook's poll interval plus 1 s (`j4:polls`) | Each green | | ||
| | 2 | One journey per team whose *after* row 1 doesn't walk. *Builds a screen two people watch* is leg a. **j2** *runs the labs or Shift Manager*: Shift Manager on D2's copy (the Teammates and claude-code-style labs moved to [FIX-2843](https://linear.app/fixpoint-labs/issue/FIX-2843): their hosts run only model-backed workers, and this check keeps the model `n/a`), a conversation open with a task open and its message, request, project and activity views mounted; over 10 s from the first `crosses: true` frame, with nothing written, 0 reads (`j2:no-poll`); a message sent from another session shows within 1 s (`j2:message`). **j3** *runs more than one process*, on row 1's two processes plus one: process 1 on BullMQ `dispatch-only`, a `worker-only` process runs A's action, B on process 2 shows the reply within 1 s (`j3:worker-reply`); then over 10 s idle, with nothing written, 0 session-stream statements from process 2 (`j3:no-timed-read`), as in FIX-2427's signal, so the read the reply's notice wakes is not counted; `no-request-publish` must FAIL `j3:worker-reply`. **j4** *deploys to Vercel or Next*, the polling fallback only ([D3](#d3)): the fixture behind `createNextHandler`, `GET /capabilities` reports no push and B updates within the hook's poll interval plus 1 s (`j4:polls`) | Each green | |
There was a problem hiding this comment.
Body correctly narrows j2 to Shift Manager + FIX-2843; the journey label is still *runs the labs or Shift Manager*. Renaming the label to match (even (labs → FIX-2843)) would cut skimming errors without changing semantics.
| timer where the bus can't cross, so under the in-memory bus B may update at the poll pace. The | ||
| control grades `a:org-state` and `a:org-row` on the 1 s. The epic's control line says the same, | ||
| amended in this PR. | ||
| - **The epic's memory-bus control fails on the 1 s signal, and B never updates.** The in-memory |
There was a problem hiding this comment.
This decided-not-asked flip is the right canonical place for memory-bus grading post-2545. +1 on pointing at FIX-2545 explicitly; consider trimming duplicate FIX-2545 essays elsewhere and relying on this anchor + epic D6.
There was a problem hiding this comment.
No security findings.
This diff is spec and goal text only. It records FIX-2545 (the in-memory bus is single-process and reports that it crosses, so the timed read and the hook timer stay off) and narrows closure journey j2 to Shift Manager. It does not add a route, a store query, a principal read, a tool, or a network call.
Checked against the diff:
- Identity and authorization.
skip-checkstill must failc:refused. The mint is unchanged: a session topic goes throughauthorizeManagementRouteandloadCheckedSession(packages/engine/src/push/push-delivery.ts), and a user or org topic id is taken from the verified principal, not the wire body.crossesProcessesis not an input to that check. Reconnect still re-mints (c:reconnect-refused). - Data segmentation. The session stream still publishes that session's topic only. Leg c still has user C in org 2 (
c:refused,c:other-org-silent). The in-memory bus keys subscribers by scope, tenant, and id (scopeKeyinpackages/engine/src/bus/in-memory-bus.ts). Dropping the Teammates and claude-code-style labs from j2 moves those runs to FIX-2843; it does not remove the cross-org refusal assertions. - Trusted-source gating. Not touched.
- Prompt injection and model-facing text. Not touched.
- Harnesses and host tools. Not touched. j2 no longer grades the claude-code-style lab; no sandbox, tool allow-list, or env change.
- Outbound requests. Not touched.
- Persistence and limits. The timed read is now specified only for serverless hosts. That matches
createInMemoryBus, which already setscrossesProcesses: true, so two processes on that bus do not poll and do not see each other's writes (the control's “B never updates”). Those missed updates are a freshness failure on a bus that does not deliver across processes. They are not a read of another user's or tenant's rows: a read that does run is still the authorized session-stream or mint path. The D3 “Locks in” cell still says the in-memory bus always polls; that sentence was not edited and, either way, the read stays on the same authorized routes. - Supply chain and CI. Not touched.
Sent by Cursor Automation: Security Review


This amends FIX-2368's closure spec, and the epic FIX-2367's, after the closure run (#5280). It changes spec text only, no code.
What changes
n/a, so those journeys need a test worker first. This settles the scope question Codex and the architect raised on goals(FIX-2368): closure check, a change reaches every screen #5280 (DECISIONS.mdplan row 2).a:org-stateanda:org-rowon the 1 s, so its verdict doesn't change. The epic's D6 "locks in" line, its control line and its "leaves" line follow, as does the goal'sgoal.md.j2:message(Shift Manager shows another screen's line 0.5–1.1 s late) is FIX-2841. FIX-2429's failing check is FIX-2842.Checks
scripts/validate-spec-folder.mjspasses onspecs/issues/FIX-2368andspecs/epics/FIX-2367.check-retired-terms, the vocabulary sweep and lint pass, all from the push hook.No changeset: this changes spec text only.
Generated by Claude Code


Confidence Score: 5/5
This documentation-only amendment appears safe to merge; it does not mark the known closure failures as resolved.Summary
This spec-only amendment narrows the closure journey to Shift Manager and updates the memory-bus control to match its single-process behavior. No actionable issues found.
No runtime code changes or tests were run.
Reviews (1) · Last reviewed commit: "spec(FIX-2368): FIX-2426 D1 and FIX-2428..." · Reviewed by Greptile