Skip to content

FIX-2242: the FIX-2070 closure walk, workers talk together - #4129

Merged
jhoffner merged 22 commits into
mainfrom
claude/project-thread-n6abql
Oct 29, 2026
Merged

jhoffner merged 22 commits into
mainfrom
claude/project-thread-n6abql

Conversation

@jhoffner

Copy link
Copy Markdown
Collaborator

The problem

FIX-2070 gave workers a way to talk to each other: they send messages, call each other and wait for the answer, deliver once across a crash, tell a filer its task's question midway, and stop a ring at its budget. Each child proved its own leg on a calm host. Nobody had checked that the legs still work when they happen at once, on one durable host, with a crash in the middle. The closure (FIX-2242) is that check.

What this does

  • The closure walk. It adds a new goal, goals/shift-manager/workers-talk-together/, that runs on a real model against Shift Manager's DevTeam over SQLite. Scene ac is a call across a crash. Scene ed is a parked call while a task asks its filer a question and a ring runs. Scene b covers messages to a task. The run also does the removed-names sweep and a browser journey. It has six controls, each of which must fail on its own assertion, and a before-state on e2c190e64.
  • The D2 sweep rows. FIX-2070's removed names (message-names, message-reply-to) are now rows in the vocabulary sweep that CI runs.
  • Re-runs of the children's checks, with every control (plan row 3).

Verdict: FAIL, on two open findings. Everything else passes:

Check Result
Closure walk passes except a:answer-in-request (FIX-2269) and e:steer-releases (FIX-2279)
Closure controls all 6 fail on their named assertion, as they must
Before-state e2c190e64 a, b, c, e and the sweep fail
workers-message-each-other all 14 legs pass, and all 26 controls fail on their named assertion
every-stop-is-one-inbox-item PASS, and all 6 controls fail on their named assertion

What's asked of you

  • FIX-2279's design call is on the card in the epic thread. A filer that hears its task's question while its own call waits can't see that waiting request in its history, so it guesses the answer. My recommendation is that history shows the waiting turn's settled part.
  • Don't merge this as the closure yet. It can merge as a goal at any time, but FIX-2070 closes only after FIX-2269, FIX-2279 and FIX-2263 merge and a re-run here comes back green. I'll push that verdict to this PR.

Parts worth reviewing closely

  • scenes.mts → sceneED: the timing grades (e:heard-while-calling reads the received item's stamp against the request's resume and the call's deadlineAt). It also reads the question from the received q:<task>:<hold> id when the question is asked and answered between two polls, because the task list shows only open holds.
  • controls.mts → call-holds-session, the one new control.
  • goals/vocabulary/one-word-per-thing/rules.mjs: the two new RETIRED rows and their scopes.

Links: spec specs/issues/FIX-2242/ (#4024) · epic FIX-2070 · Linear FIX-2242 · merges as a goal; the closure verdict waits on the blockers above.

How to review this

This is a goal, an on-demand acceptance check on a real model. It is not a CI gate. Read goal.md first. It is the contract: input, signal, anti-game rules and controls. Then check that each assertion in scenes.mts grades what goal.md says it does.

Engineering calls
  • j1:states grades the ring's six delivered messages, not a seventh refused row. A budget refusal writes no row (FIX-2238), and goal.md records the difference from the spec.
  • The fault parameter faultPatches(faults, sender) lets leg c's crash fire only on Helper A's messages. workers-message-each-other now exports the helpers this goal reuses, and checkoutFor moved to its own file.
  • Judgment misses were retried and their prompts tightened, never their grades:
    • Helper A's cast file says to answer a question by message, so scene ed gives Helper A a standing rule through rules_add first.
    • The ring passes text on word for word and never waits.
    • Leg 1 of workers-message-each-other now asks for a send rather than a call, since sendMessage can wait.
  • Structural misses were filed instead:
    • FIX-2276: the call mark (merged).
    • FIX-2277: questions: [] (merged).
    • FIX-2263: goal fixtures with no onMessageReceived (moved under the epic).
    • FIX-2300: a call to a worker with no message turn answers "". Not a blocker, since no shipped flow has no turn.
Everything else
  • Run: unset FSDEV_DEFAULT_MODEL; PLAYWRIGHT_BROWSERS_PATH=<chromium> pnpm tsx goals/shift-manager/workers-talk-together/run.mts. Use GOAL_SCENES, GOAL_CONTROL, GOAL_COMMIT and GOAL_KEEP_STORE as goal.md describes.
  • goals typecheck is clean for these files. The vocabulary sweep reports 0 hits on HEAD and 77 on e2c190e, and --control catches each plant with its own rule.
  • No changeset: goals are private.

Generated by Claude Code

claude added 12 commits October 28, 2026 16:30
…bulary sweep (D2)

message-names and message-reply-to join RETIRED, so CI fails a later PR that
brings back messageWorker, the relay or an old refusal. --control plants one
hit per row. workers-message-each-other's sweep reads the rows instead of its
own copy. The Shift Manager fixture rendering takes_tasks_only now renders
task_sessions_only, a refusal that exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
Scenes ac, ed and b walk the epic's legs together on one durable host,
plus the D2 sweep and the j1 browser journey, with six controls and a
before-state. workers-message-each-other exports the helpers it reuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
…y what only it was told

Helper A gets a standing rule to answer a task's question with updateTask; the
ring passes text on word for word; the wait-again line gives the exact input;
the question is caught while it is open, since the task read lists open holds
only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
…ge can wait

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
…ad from its message and steer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
…stion counts without a matching steer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
@jhoffner jhoffner self-assigned this Oct 28, 2026
@linear-code

linear-code Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

FIX-2242

FIX-2070

Copy link
Copy Markdown
Collaborator Author

@codex review

I'm least sure about two things in goals/shift-manager/workers-talk-together/scenes.mts. First, whether e:heard-while-calling and d:seventh-refused can pass for the wrong reason, for example from clock stamps taken from different sources. Second, whether the question fallback (reading the hold id from the received q:<task>:<hold> id) lets a task that never asked midway count as asked.


Generated by Claude Code

@vercel

vercel Bot commented Oct 28, 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 28, 2026 11:45pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 28, 2026 11:45pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 28, 2026 11:45pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T23:47:10.030944Z b4a6049 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

Second look + architecture pass (read-only; for the follow-up agent)

Overall: the approach earns its scope. Reusing the children's legs, controls and fault patches instead of re-implementing them is right, and folding the REMOVED regexes into the vocabulary sweep's RETIRED rows (one list, CI-enforced) is a real improvement. Nothing blocking. Findings below are ordered by value; items 1–2 are the ones worth doing in this PR because this PR is what creates the second copy / second consumer.

1. The sweep walker now exists twice (do in this PR)

workers-message-each-other/run.mts sweep() and workers-talk-together/run.mts (~L69–110) both: dynamic-import rules.mjs, filter RETIRED to message-names/message-reply-to, walk packages/*/src, and grep line by line. This PR created the second copy. The vocabulary goal already owns the scan (sweep.mjs, including inScope, git ls-files, REFUSAL_MARKER handling). Better shape: have both goals call sweep.mjs with a root/--only message- argument (it already has an only/inScope mechanism, L29) against the served checkout, rather than re-walking the tree with a weaker reader. Note the hand-rolled walkers also skip the retired-name-refusal marker and KEEP entries, so they can disagree with CI's sweep on the same tree, which is the failure the "one list" change was meant to remove. Only the GOAL_COMMIT before-state case needs a root parameter.

2. checkout.mts is "shared" but lives in a sibling goal (do in this PR)

The header says "Shared with FIX-2242's closure goal", and it's imported as ../workers-message-each-other/checkout.mts. Same for the closure's imports from legs.mts, legs-calls.mts, legs-delivery.mts, legs-targets.mts and faults.mts (RESEND_FROM, TAKEOVER_MS, senderOf, tookWithin, file, rowOf, sessionOfTask…). Moving only checkoutFor to its own file is the right instinct; finish it by putting it (and the other genuinely shared helpers: connect, hireTeam, act, until, quiet, word) under goals/lib/ (it already hosts shift-manager.mts, module-patch.mts, playwright.mts) or a goals/shift-manager/_shared/. Otherwise a rename inside workers-message-each-other silently breaks the closure, and the closure can't be deleted/moved independently. Low risk, mechanical.

3. faultPatches(faults, sender) rewrites patch text with replaceAll('"herald"', …) (small, optional-but-cheap)

faults.mts L102–104 substitutes on rendered source strings. It works today because every fault spells the literal "herald" exactly once per check, but a future patch that mentions "herald" in a comment/does-style string inside to (or the prose in log(...)) gets rewritten too, and the failure mode is a fault that fires for the wrong sender with no error. Safer: build the patches from (sender) => ModulePatch[] in FAULTS (the herald case becomes the default arg) so the sender is a parameter, not a search-and-replace. assertPatched would already catch a total miss but not a partial one.

4. Hardcoded model name

scenes.mts hireRing uses settings: { model: "openai/gpt-5.4-mini" }. CLAUDE.md retires legacy names in favor of openai/gpt-6-luna. Goals aren't docs, but if that's the model the other legs use, centralize it in one constant in the shared helpers (see 2); if it's deliberately pinned for the ring's reliability (the PR notes ring prompt tightening), say so in a comment.

5. Observations, no change asked

  • faults.mts header comment line now runs past the file's wrapping (one 130+ char line); reflow when touching it for (3).
  • Sweep scope widened from packages/*/src to CODE_OR_PUBLISHED, which is why messages-view.test.tsx needed editing. That's the right direction (tests and READMEs were unguarded), just worth knowing the old goal's coverage claim changed.
  • j1:states documenting "six delivered messages, no refused row" in goal.md is the right place for a spec deviation.
  • Merge posture in the description (mergeable as a goal; closure verdict waits on FIX-2269/2279/2263) is clear. Nothing here changes it.

Not worth doing: splitting scenes.mts (460 lines) further; each scene is one narrative with shared locals, and the file header maps them.


Generated by Claude Code

@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: e75e349484

ℹ️ 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".

…wn, the ring overlaps an observed park, b's second answer is new

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiDWiB5JZRCvyAFUpe9
…nused import

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

@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: 66bd6ce762

ℹ️ 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".

…wn rows, b's first message must overlap the task's turn, kept-once compares the call's hop before and after

Scene b's task now writes a long essay so the herald's message reaches it
while it runs, and only the task's own turns (not other queued messages)
bound when it ended.

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

@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: b468a04d6b

ℹ️ 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".

@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.

ℹ️ 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".

Also ports main's one-line fix for the human_input reason left in the
task-board settle test, which reds the vocabulary sweep on main.

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

Copy link
Copy Markdown
Collaborator Author

Process guards failed in the vocabulary sweep's human-reasons rule, which FIX-2151 (#4093) added on main. It had two hits. One was this PR's goal, which still read the stop's reason as human_approval. The other is on main itself: packages/orchestration/test/task-board/settles-when-its-work-is-over.test.ts:786 still has human_input, left behind by #4094, and #4142 also fixes it. e493cb8 renames both to the user_ reasons. With that, the sweep passes locally and the 35 tests in that file pass.


Generated by Claude Code

@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: e493cb86f0

ℹ️ 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".

… plants

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

# Conflicts:
#	goals/shift-manager/workers-message-each-other/legs.mts
#	goals/vocabulary/one-word-per-thing/rules.mjs
@jhoffner
jhoffner merged commit dd5f323 into main Oct 29, 2026
18 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-n6abql branch October 29, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants