Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5446d09
test(goals): closure check for the Shift Manager epic (FIX-1663)
claude Oct 2, 2026
3aca2f2
goals(FIX-1663): optimistic-post swaps the @worker send too
claude Oct 2, 2026
9bbc77b
Merge origin/main into fix/FIX-1663-closure
claude Oct 2, 2026
cb49d3e
test(goals): verdict log for the FIX-1663 re-run on main 48c31cfa6
claude Oct 2, 2026
e5ccf68
fix(goals): Part 3 children get the launch NODE_ENV, not vite.build()…
claude Oct 2, 2026
a1cbcbb
Merge origin/main into fix/FIX-1663-closure
claude Oct 4, 2026
3537738
goals(FIX-1663): closure leg d runs FIX-1737's v2 look with its contr…
claude Oct 4, 2026
f7269f5
goals(FIX-1663): part 3 reads it-opens-a-lab's unanswerable-asks cont…
claude Oct 4, 2026
35e3c0a
test(goals): verdict log for the FIX-1663 closure on main a01a0b7bd (…
claude Oct 4, 2026
1d1e1cb
fix(shift-manager): the sidebar's nav icons paint no fill (FIX-1663)
claude Oct 4, 2026
fc97cbc
goals(FIX-1663): it-shows-and-stops-a-task-run turns Queued on before…
claude Oct 4, 2026
5d82d5d
goals(FIX-1663): it-ships-an-artifact reads the channel's declared me…
claude Oct 4, 2026
1fdbfe8
goals(FIX-1663): the closure grades the project level FIX-1718 shipped
claude Oct 4, 2026
600853c
goals(FIX-1663): a1 and c read the Stream's ask card at feed-ask
claude Oct 4, 2026
dd90545
goals(FIX-1663): a1 reads Inbox's detail as its question heading and …
claude Oct 4, 2026
6e02013
test(goals): verdict log for the FIX-1663 closure on main a01a0b7bd (…
claude Oct 4, 2026
6c60309
goals(FIX-1663): a1 holds Inbox to every channel the asking seat is in
claude Oct 4, 2026
c59c574
goals(FIX-1663): ER-15's seam list names the project room's writes, p…
claude Oct 4, 2026
25d0265
docs(shift-manager): the devteam excerpt shows the SQLite store devte…
claude Oct 4, 2026
49fd744
test(goals): verdict log for the FIX-1663 closure on main a01a0b7bd (…
claude Oct 4, 2026
34d0034
POC: closure shell uses the shared Shift Manager helper
cursoragent Oct 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import { harnessTaskId } from "@flow-state-dev/harness-manager/checkout";
import type { Task } from "@flow-state-dev/orchestration/tasks";
import { z } from "zod";
import { RUN_STAMP, runGoal, silentLogger, stripIntentOverrides } from "../../lib/index.mts";
import { LAB_ORG_ID, LAB_TREE, LAB_USER_ID, openLab, type Lab } from "../lab/host.mts";
import { boardChannelOf, LAB_ORG_ID, LAB_TREE, LAB_USER_ID, openLab, type Lab } from "../lab/host.mts";
import { PHASE } from "../lab/phase.mts";
import { createNotifyLog, type NotifyLog } from "../lab/notify.mts";
import { ACCEPTANCE_MODULE, runAcceptance } from "../lab/acceptance.mts";
Expand All @@ -112,8 +112,6 @@ const ASSIGNED_SEAT = "eng.coder";
const COORDINATOR_SEAT = "eng.em";
/** Declared on the channel, hired into the same kind as the coder, and never given work. */
const REVIEWER_SEAT = "eng.reviewer";
/** Every member `CHANNEL.md` declares, in the order the fan-out walks them. */
const DECLARED_MEMBERS = [COORDINATOR_SEAT, ASSIGNED_SEAT, REVIEWER_SEAT];

/** The feature, and the line an operator posts to ask for it. */
const ISSUE = "greeting-module";
Expand Down Expand Up @@ -743,9 +741,8 @@ await runGoal(async () => {
coderSeatId: ASSIGNED_SEAT,
runTimeoutMs: RUN_TIMEOUT_MS,
logger: silentLogger,
// Only the EM is addressed. The coder and the reviewer are declared members
// of the channel and are true no-ops in the fan-out — recorded and skipped,
// never dispatched to.
// Only the EM is addressed. Every other declared member of the channel is a
// true no-op in the fan-out — recorded and skipped, never dispatched to.
channels: { addresses: { [COORDINATOR_SEAT]: COORDINATOR_SEAT }, log: notifyLog },
harness: ({ cwd, resume, onSession }) =>
sequencer({
Expand Down Expand Up @@ -829,10 +826,12 @@ await runGoal(async () => {
}
if (failures.length > 0) return { failures, evidence: "" };

// BR-8's positive half: exactly the EM was addressed, and the other two
// declared members were seen and skipped. Not an absence — a record.
// BR-8's positive half: exactly the EM was addressed, and every other
// declared member was seen and skipped. Not an absence — a record.
const skipped = [...notifyLog.skipped].sort();
const expectedSkips = DECLARED_MEMBERS.filter((m) => m !== COORDINATOR_SEAT).sort();
// Every member the board's `CHANNEL.md` declares, read off the tree the lab opened.
const declaredMembers = (boardChannelOf(lab.roster).declared.members as string[] | undefined) ?? [];
const expectedSkips = declaredMembers.filter((m) => m !== COORDINATOR_SEAT).sort();
if (notifyLog.addressed.join(",") !== COORDINATOR_SEAT) {
failures.push(
`the fan-out addressed [${notifyLog.addressed.join(", ")}]; wanted only ${COORDINATOR_SEAT}`,
Expand Down
7 changes: 4 additions & 3 deletions goals/lib/shift-manager.mts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,13 @@ export function labApi(origin: string, bearer: string | undefined) {
}
return rows;
};
/** Every item of the given types in one session, oldest first. */
const items = async (sessionId: string, types: string[]): Promise<Array<Record<string, any>>> => {
/** Every item in one session, oldest first. `types` limits the query to those item types; omit it for every type. */
const items = async (sessionId: string, types: string[] = []): Promise<Array<Record<string, any>>> => {
const out: Array<Record<string, any>> = [];
const typeQuery = types.length === 0 ? "" : `&item_types=${types.join(",")}`;
for (let offset = 0, page = 0; page < 100; page += 1) {
const body = await get(
`/sessions/${encodeURIComponent(sessionId)}/state?include_items=true&item_types=${types.join(",")}&offset=${offset}&limit=200`,
`/sessions/${encodeURIComponent(sessionId)}/state?include_items=true${typeQuery}&offset=${offset}&limit=200`,
);
out.push(...(body.items ?? []));
if (body.pagination?.hasMore !== true) break;
Expand Down

Large diffs are not rendered by default.

832 changes: 832 additions & 0 deletions goals/shift-manager/a-lab-is-worked-through-one-skinned-shell/legs.mts

Large diffs are not rendered by default.

Large diffs are not rendered by default.

571 changes: 571 additions & 0 deletions goals/shift-manager/a-lab-is-worked-through-one-skinned-shell/run.mts

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions goals/shift-manager/it-shows-and-stops-a-task-run/run.mts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ async function reach(page: Page, origin: string, tree: Tree, row: Row) {
await page.locator(`[data-testid=board-card][data-task-id="${row.id}"]`).click();
} else {
await page.getByTestId("tasks-table").waitFor({ timeout: 20_000 });
// Tasks hides queued rows until Queued is on; a person looking for any open row turns it on.
const queued = page.getByTestId("tasks-queued-toggle");
if ((await queued.getAttribute("aria-pressed")) !== "true") await queued.click();
await page.locator(`[data-testid=task-row][data-task-id="${row.id}"]`).click();
}
await page.locator(`[data-testid=task-frame][data-task-id="${row.id}"]`).waitFor({ timeout: 10_000 });
Expand Down
2 changes: 1 addition & 1 deletion labs/shift-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ A host module can do some of this setup for you. When its options say they open

```ts title="teams/devteam/fsdev.config.mts (excerpt)"
const lab = await openLab({
stores: inMemoryStores(),
stores: sqliteStores({ filename: STORE }),
inventory: true, // its host opens the channels, then the inventory
devtool: true, // its host hands the page the Lab's user
// ...options of its own
Expand Down
4 changes: 2 additions & 2 deletions labs/shift-manager/src/surfaces/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ const ICON_PATHS = {

function NavIcon({ name }: { name: keyof typeof ICON_PATHS }) {
return (
<svg viewBox="0 0 14 14" className="size-3.5 shrink-0 text-foreground" aria-hidden data-look="nav-icon">
<path d={ICON_PATHS[name]} fill="none" stroke="currentColor" strokeWidth={1.2} />
<svg viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth={1.2} className="size-3.5 shrink-0 text-foreground" aria-hidden data-look="nav-icon">
<path d={ICON_PATHS[name]} />
</svg>
);
}
Expand Down
2 changes: 1 addition & 1 deletion specs/epics/FIX-1649/BUSINESS-RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ checks. Each says who owns it and where it's checked.
| ER-6 | No child restyles an FSD component or hardcodes paint on it inside App Lab. Registry components arrive by `fsdev ui add` and stay unedited copies of their source; a component that can't take the skin is fixed at its source by FIX-1655 and re-synced, and FIX-1655's re-sync check fails on any App Lab copy that differs from its source | [D2](DECISIONS.md#d2). A restyled copy drifts from every later FSD fix, and a stale one makes leg c test the copy, not the skin |
| ER-7 | No child adds an L1 noun (Agent, Team, Channel, MessageBoard, Project-as-required) or puts Workforce concepts into `core` or `engine`; the design-system package imports nothing from `@flow-state-dev/workforce` | Jake's layer rule. L1 offers generic hooks only |
| ER-8 | No child builds anything below [the box's fence](SPEC.md#whats-in-the-box), and none adds `CHANNELS.md` or `kind:` frontmatter | The PRD's and the Architect's invent-kills, and D-12; the fence is their one list |
| ER-15 | No child writes into a worker's session except through that session's shipped operations: a turn from the task composer, a workstream's `@worker` or a reply from Inbox, Interrupt, Hand off. The shell writes no session item of its own and shows a message as delivered only when the session says so. Owned by FIX-1664; FIX-1662's composers (a workstream's, Inbox's reply) consume it | A second write path into a harness session is a model the shell invented; the stream's "sent into PAY-14" line must be the session's answer, not the shell's hope |
| ER-15 | No child writes into a worker's session except through that session's shipped operations: a turn from the task composer, a workstream's `@worker` or a reply from Inbox, Interrupt, Hand off. The shell writes no session item of its own and shows a message as delivered only when the session says so. Owned by FIX-1664; FIX-1662's composers (a workstream's, Inbox's reply) consume it. Two writes go to the person's own sessions, never a worker's:<br>· a project room's `read`, `post` and `join`, on the room kind (FIX-1718)<br>· opening the person's room session, on the room kind (FIX-1718, FIX-1752) | A second write path into a harness session is a model the shell invented; the stream's "sent into PAY-14" line must be the session's answer, not the shell's hope |

## How the set is run

Expand Down
Loading