Skip to content

fix(goals): DevTeam wake check reads the current worker list and allows the EM's post entry (FIX-1966) - #3299

Merged
jhoffner merged 3 commits into
mainfrom
claude/project-thread-1fv4vm
Oct 14, 2026
Merged

jhoffner merged 3 commits into
mainfrom
claude/project-thread-1fv4vm

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

Before: goals/devforce-lab/it-wakes-the-seat-a-file-declared fails on main. It expects 7 workers but DevTeam now hires 9 (FIX-1920 added the org's general-lead and researcher), and it refuses eng.em's onDelegatedPost task entry as "a route to a harness".

After: the check passes. The worker list includes the general lead and researcher on agent. The EM may declare its delegated post entry and nothing else as a task entry, and em.mts may not import a harness package.

The delegated post entry is what FIX-1872 D1 gives the EM: it runs the EM's own turn, which files rows for other workers, so it dispatches rather than running a harness. The rule's intent (no coordinator runs a harness itself) is kept by refusing any other task entry and by the new import check, which covers a harness run from inside the post entry's turn.

Verification

  • On main 7c9cc1bb: FAIL on the hired list and on eng.em declares task entries ["onDelegatedPost"].
  • On this branch: PASS, all seven legs.
  • All five controls still FAIL at their named legs (address-the-reviewer, no-commit, swap-documents, drop-own-skill, stopped-at-limit).
  • Red states for the changed rule, each applied to em.mts and reverted: a work task entry beside the post entry fails with eng.em declares task entries ["work"] beside its delegated post; an @flow-state-dev/harness-manager import fails with the em kind's own file imports [...].

Sibling work: #3291 (FIX-1964) removes ops.oncall; whichever lands second drops it from this fixture's teamCoordinators. No changeset: goals are private.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TukfpBf4vLMrHcW584uZeF


Generated by Claude Code


Note

Low Risk
Changes are limited to a private goals fixture, runner assertions, and goal documentation; no production runtime behavior.

Overview
Updates the it-wakes-the-seat-a-file-declared DevForce lab so it matches current DevTeam roster and EM behavior (FIX-1966).

The fixture now expects org general-lead and researcher on agent, so leg (a)’s hired-worker list matches FIX-1920. Leg (b) no longer requires eng.em to declare zero task entries: it must declare only the delegated-post entry (DELEGATED_POST_ENTRY), reflecting FIX-1872 D1 (EM turn files rows; it does not run a coding harness). run.mts enforces that with sameSet(emEntries, [DELEGATED_POST_ENTRY]) and adds a source check that em.mts does not import harness packages (HARNESS_PACKAGES), so a harness cannot be wired in via imports even if the flow shape hides it.

goal.md documents the revised signals and adds a 2026-10-13 verdict log row for main + FIX-1966.

Reviewed by Cursor Bugbot for commit 29bd0e7. Configure here.

…ws the EM's post entry (FIX-1966)

The check failed on main twice over: its worker list predates the org's
general lead and researcher (FIX-1920), and it refused eng.em's
`onDelegatedPost` task entry, which FIX-1872 D1 gives the EM. That entry
runs the EM's own turn and dispatches; it runs no harness. Leg b now
refuses any task entry beside the delegated post, and any harness package
import in em.mts, so no coordinator can still run a harness.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TukfpBf4vLMrHcW584uZeF
@jhoffner jhoffner self-assigned this Oct 13, 2026
@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

FIX-1966

@vercel

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

Request Review

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass (read-only, no edits made)

Verdict: the approach is right and proportionate. Updating the roster fixture, loosening the "no task entry" rule to "only the delegated post", and importing DELEGATED_POST_ENTRY instead of hard-coding the string is the smallest honest fix. No refactor is warranted here. The notes below are for the implementing agent to take or leave.

1. The harness-import check is narrower than the claim it backs (worth fixing in this PR)

run.mts ~L454-460. The goal text says "its file imports no harness package", but the check is:

HARNESS_PACKAGES.filter((pkg) => emSource.includes(`"${pkg}`))
  • Single-quoted imports slip through. from '@flow-state-dev/codex' passes. A regex such as /from\s+["'](@flow-state-dev\/(?:harness-manager|claude-code|codex|cursor))/ closes this, and import(...) / require(...) can be covered the same way if you care.
  • It only reads em.mts. The delegated post entry's turn can call into other files (phase.mts, org/*, shared helpers). A harness run from one of those is exactly the "harness run from inside the post entry's turn" the PR text says the check covers, but it would pass. If a transitive check is too much, narrow the claim in goal.md and the evidence line to "em.mts itself", rather than "its file imports no harness package" implying more.
  • Redundant with the line above it. emSource.includes("harnessManager") and the @flow-state-dev/harness-manager entry in HARNESS_PACKAGES both guard the same thing, so one violation produces two notes. Either fold the first into the second or keep it only for the identifier-without-import case, and say so in a comment.
  • HARNESS_PACKAGES is a hand-maintained deny-list. A new harness adapter package (the package map already has three) silently passes. If the repo has a way to enumerate harness packages (a naming convention, a package.json field, or the harness-manager's own list), derive from it; if not, a one-line comment saying "add new harness adapters here" is the cheap fix.

You did red-state the harness-manager import, which is good. Please also red-state the single-quote and non-em.mts cases once the check is widened, since BP-003 asks that a check demonstrably reaches the code it covers.

2. Fixture drift is a recurring tax, not a one-off

This is the third time the same hand-typed worker list has gone stale (FIX-1883 removed workstream-coordinator, FIX-1920 added two, #3291 removes ops.oncall). The exact-set assertion is intentional, so it should stay strict, but nothing here is derived from LAB_ROOT. Leg 1 compares the hired list to fixture.seats + orgWorkers + teamCoordinators; the test file then needs a manual edit for every roster change in packages/shift-manager/teams/devteam. Not a blocker for this fix. If it recurs, derive orgWorkers/teamCoordinators from readDeclaredRoster(LAB_TREE) (already imported at L47 and used at ~L697) and keep only the kind expectations hand-written. That keeps the check pinning "kind per worker" without making roster additions a goal-edit.

3. Merge-order heads-up

#3291 edits the same teamCoordinators block in fixtures/input.json and the same goal.md leg-1 sentence ("eng.triage, ops.oncall"). Whichever lands second will conflict on those two lines. Already flagged in the PR body; just confirming it is a real textual conflict, not only a semantic one.

4. Nits

  • goal.md leg 2 now reads as three clauses in one sentence; consider splitting "the coordinator kind declares no task entry but its delegated post" and "its file imports no harness package" into separate legs-of-the-leg so a failure maps to one named claim.
  • The new row in the goal's run log is long. Other rows are one or two sentences; the red-state details live in the PR body already.

No correctness bugs found in the diff. The otherEntries filter and the note text read correctly, and the entriesOf(assignedSeat).length === 0 guard is untouched.


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.

Problem

After FIX-1920 (org general-lead / researcher) and FIX-1872 D1 (EM gets onDelegatedPost), the DevTeam wake goal was red on main for two independent reasons: the hired-worker oracle was stale, and leg (b) still treated any EM task entry as a harness route.

Assessment

This PR is the right shape of fix: extend the fixture roster and allow exactly DELEGATED_POST_ENTRY on the coordinator seat, with a static em.mts guard so BR-4 survives refactors that hide imports inside the delegated-post turn. Scope stays inside one goal — no framework churn.

I do not think a fundamentally different approach is required. What follows are tighten-ups that would make the assertion smaller and harder to game, not a rewrite.

Simpler / cleaner options (optional)

  1. EM task entries — Today leg (b) only fails when there are keys besides DELEGATED_POST_ENTRY. An empty task.actions object would pass even though BR-4 requires the delegated post. You already have sameSet in this file; sameSet(emEntries, [DELEGATED_POST_ENTRY]) states the invariant in one place and covers missing post + extra entries.

  2. HARNESS_PACKAGES — A four-package denylist plus substring "${pkg} scans is maintenance-heavy and weaker than harness-manager’s own slot.spec.ts import sweep (from "..." parsing). Unless product explicitly needs to block direct @flow-state-dev/codex / cursor imports on em.mts, a single check for @flow-state-dev/harness-manager (plus the existing harnessManager identifier guard, if kept) may be enough and easier to keep aligned with the lab’s real harness surface (coder.mts).

  3. Reuse — takesDelegatedPost / takesConversationTasks in workforce already encode delegate vs conversation-task shape, but they are not on the public package surface today, so the goal’s key-filter is understandable. Exporting a small test-facing helper (or takesDelegatedPost) would be a follow-up, not a blocker for this PR.

  4. Fixture roster — Adding general-lead and researcher to orgWorkers is the minimal fix. Deriving wanted ids from readDeclaredRoster (you already use it in leg (g)) would reduce fixture/tree skew later, at the cost of the explicit anti-game roster the goal documents — I would not switch without a deliberate contract change.

  5. Copy — Signal #2 and the leg (b) evidence string still read like “no task entry but its delegated post,” which contradicts FIX-1872 (the EM does declare a task entry; the claim is only that one). Wording like “declares only onDelegatedPost” would match the code.

  6. Evidence log — The 2026-10-13 row says manual red states were checked for a work entry beside the post and a harness-manager import. GOAL_CONTROL still lists only the five perturbation controls — fine if those reds stay manual, but worth calling out so nobody assumes CI replays them.

Verdict

Comment, not blocking. The direction matches FIX-1966; merge is reasonable as-is. The sameSet tightening and harness-import simplification are the highest-value nits if you want one more pass before merge.

(Simplify automation — read-only review; no code pushed.)

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

…IX-1966)

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

@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 — already tight. No POC.

Read goals/devforce-lab/it-wakes-the-seat-a-file-declared/fixtures/input.json, goal.md, run.mts (hired-list loop and the BR-4 block), and packages/shift-manager/teams/devteam/workforce/flows/workers/em.mts.

The hired-list check already spreads fixture.orgWorkers. general-lead and researcher are the same three-line kind entries as the coordinators already in that object.

DELEGATED_POST_ENTRY is the one string. otherEntries is the list the note prints. The assigned seat still calls entriesOf.

harnessManager and "@flow-state-dev/harness-manager" are different needles. The two notes are the two red states this PR records. No harness-package list exists in code to import; the four names are README prose. Inlining HARNESS_PACKAGES moves those four lines onto the filter.

The BR-4 quote had to change. The two sentences after it restate em.mts's header and the note; cutting them, and the one-line HARNESS_PACKAGES JSDoc, leaves the check the same length. The section banner still says the EM kind has no entry; rewriting that clause leaves the check the same length. Leg 2 in goal.md is the signal. The verdict row matches the longer red-state rows already in that table.

Left as recorded: the constant import, the kind pins in the fixture, both source notes, the package list as written.

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

@jhoffner

Copy link
Copy Markdown
Collaborator Author

@codex review

@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 — already tight. No POC. This note counts for 43488866. The earlier note described 014f0ca3e, which still filtered otherEntries.

Read goals/devforce-lab/it-wakes-the-seat-a-file-declared/fixtures/input.json, goal.md, run.mts (hired-list loop and the BR-4 block), and packages/shift-manager/teams/devteam/workforce/flows/workers/em.mts.

The hired-list check already spreads fixture.orgWorkers. general-lead and researcher are the same three-line kind entries as the coordinators already in that object.

sameSet(emEntries, [DELEGATED_POST_ENTRY]) is the comparison this file already uses for the hired list and the skill unions. emEntries is the list the note prints. The assigned seat still calls entriesOf. A filter of anything-but-the-post is the longer check, and it lets an empty list pass.

harnessManager and "@flow-state-dev/harness-manager" are different needles. The two notes are the two red states this PR records. No harness-package list exists in code to import; the four names are README prose. Inlining HARNESS_PACKAGES moves those four lines onto the filter.

The BR-4 quote had to change. The two sentences after it restate em.mts's header and the note; cutting them, and the one-line HARNESS_PACKAGES JSDoc, leaves the check the same length. The section banner still says the EM kind has no entry; rewriting that clause leaves the check the same length. Leg 2 in goal.md is the signal. The verdict row matches the longer red-state rows already in that table.

Left as recorded: the constant import, the kind pins in the fixture, sameSet on exactly that one entry, both source notes, the package list as written.

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-13T23:55:11.589056Z 4348886 Manual 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" 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.

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

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

…X-1966)

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

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 53dd6b89-b6f7-4a0d-83ad-d0936ea12377)

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