Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3d7effe
test(FIX-2087): the closure's goal and the task-surface sweep in CI
claude Oct 23, 2026
63da04f
test(FIX-2087): the closure's first verdicts
claude Oct 23, 2026
f6d06f1
test(FIX-2087): the sweep reads tools and endings by symbol; controls…
claude Oct 23, 2026
b6f75bf
test(FIX-2087): a forwarder exempts only its forwarding; every block …
claude Oct 23, 2026
fdb18c5
Merge remote-tracking branch 'origin/main' into fix/FIX-2087
claude Oct 23, 2026
b76f76b
test(FIX-2087): j1 counts only notice requests that ran a turn; j1:he…
claude Oct 23, 2026
e7c24c7
Merge remote-tracking branch 'origin/main' into fix/FIX-2087
claude Oct 23, 2026
7e07954
Merge remote-tracking branch 'origin/main' into fix/FIX-2087
claude Oct 23, 2026
deaccbd
test(FIX-2087): row 3 grades the closure's own findings
claude Oct 23, 2026
1ba899d
test(FIX-2087): classify the closure goal in FIX-1792's census
claude Oct 23, 2026
89217e4
test(FIX-2087): the closure's verdict on main with every closure fix …
claude Oct 23, 2026
024a259
Merge remote-tracking branch 'origin/main' into fix/FIX-2087
claude Oct 23, 2026
5e5ee0e
test(FIX-2087): row 3 grades FIX-2123, FIX-2135 and FIX-2136
claude Oct 23, 2026
455b3fb
test(FIX-2087): a hearing is a notice admitted, not a request started
claude Oct 23, 2026
1defdcc
Merge remote-tracking branch 'origin/main' into fix/FIX-2087
claude Oct 23, 2026
e51ac8b
test(FIX-2087): row 3 runs FIX-2138's regression test
claude Oct 23, 2026
cde0a95
test(FIX-2087): round 3's verdicts
claude Oct 23, 2026
46a6629
Merge origin/main into fix/FIX-2087
claude Oct 23, 2026
4ec08e6
test(goals): grade FIX-2147, FIX-2149 and FIX-2150 in the closure's r…
claude Oct 23, 2026
8a5ed55
refactor(goals): fold the shorter one-task notes from #3790 (083cef8a…
claude Oct 23, 2026
77dd49e
fix(goals): the closure fails closed, and grades a word-for-word foll…
claude Oct 23, 2026
683c151
fix(goals): every control's tags must go red, and the door rule reads…
claude Oct 23, 2026
9a35628
fix(goals): read a control's red from its tagged failures, and bring …
claude Oct 24, 2026
b6516a8
docs(goals): the closure's goal states how a control is read and what…
claude Oct 24, 2026
eb33735
docs(goals): round 4's verdicts in the closure's log (FIX-2087)
claude Oct 24, 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
Prev Previous commit
Next Next commit
test(FIX-2087): j1 counts only notice requests that ran a turn; j1:he…
…ard-once

FIX-2112 (#3697) stops the second notice turn when a task ends before its
filer's getTask wait. The ending still starts one onTaskSettled request,
which finds the notice no longer owed and runs no turn (output
{ owed: false }). j1:read-once now counts only the requests that admitted
the notice (owed: true), as goals/task-board/waits-on-a-task-it-filed does.
A new structural j1:heard-once holds that to its claim: the ending is heard
exactly once, by editor's getTask read in one request, and by no notice
turn. The coordinators store reader carries each request's result output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaN4uTiYqiabCbsFLWM52A
  • Loading branch information
claude committed Oct 23, 2026
commit b76f76bc0053cfe18ae3283780ae05246cb54539
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export type StoredRequest = {
createdAt: number;
/** When it ended, or its last write while it runs. */
updatedAt: number;
/** Its result's output, once it has one. */
output?: unknown;
};

export type StoredItem = Record<string, any> & { type: string; requestId: string };
Expand Down Expand Up @@ -99,7 +101,7 @@ export function sessions(file: string): StoredSession[] {
export function requests(file: string): StoredRequest[] {
return open(file, (db) =>
(db.prepare("SELECT id, session_id, flow_kind, status, created_at, updated_at, data FROM requests ORDER BY created_at").all() as Array<Record<string, any>>).map((row) => {
const data = JSON.parse(row.data) as { actionName?: string; source?: string; finalizedAtMs?: number };
const data = JSON.parse(row.data) as { actionName?: string; source?: string; finalizedAtMs?: number; result?: { output?: unknown } };
return {
id: row.id,
sessionId: row.session_id ?? null,
Expand All @@ -109,6 +111,7 @@ export function requests(file: string): StoredRequest[] {
source: data.source,
createdAt: row.created_at,
updatedAt: data.finalizedAtMs ?? row.updated_at,
...(data.result?.output !== undefined ? { output: data.result.output } : {}),
};
}),
);
Expand Down
2 changes: 1 addition & 1 deletion goals/workforce-coordination/runs-on-one-task/goal.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
**Signal:** each failure is tagged `<leg>:<assertion>`, and each assertion is **structural** or **judgment** (`TAGS` in `run.mts`, printed with every failure; D1).

- **a**, the concept's walk less the call and the Inbox: `a:routed-listed` launch's routed task for writer is in Alice's list; `a:files-research` writer files researcher's task; `a:ends-running` writer's task stays running past its first request and its research; `a:one-settled` one `onTaskSettled` per research ending starts writer again; `a:step-dispatched` writer files its fact-check as a step in a session of its own; `a:drain-waits` the task ends after that step; `a:answers-after-steps` writer gets a turn after the step ends; `a:lands-once` the draft lands once, under writer's name; `a:draft-content` with the held-out word and researcher's fact; `a:follow-up` Alice's follow-up from the finished task runs in its session and returns a new version; `a:original-unchanged` the original reads byte-identical; `a:once` every ending reaches its filer once.
- **j1** (a team that hands out work): `j1:routed` (structural) launch routed Alice's message to editor, `j1:files` (judgment) editor filed for researcher, `j1:waits-in-request` editor reads the research's ending with `getTask` in the same request, `j1:read-once` and so no notice turn runs for it, `j1:answer`, `j1:tools` no task turn is offered a task tool beyond the allow list, `j1:once`.
- **j1** (a team that hands out work): `j1:routed` (structural) launch routed Alice's message to editor, `j1:files` (judgment) editor filed for researcher, `j1:waits-in-request` editor reads the research's ending with `getTask` in the same request, `j1:read-once` and so no notice turn runs for it (an `onTaskSettled` request that finds the notice no longer owed, output `{ owed: false }`, runs no turn and isn't counted), `j1:heard-once` the ending is heard exactly once, by that read, `j1:answer`, `j1:tools` no task turn is offered a task tool beyond the allow list, `j1:once`.
- **j2** (a team that runs a coordinator): `j2:steered` Alice's steer of an open routed task is taken, `j2:steer-shows` the draft carries the steer word, `j2:cancelled` her cancel of another ends it, `j2:cancel-heard-once` launch's session hears it once and no line lands.
- **b**: `b:routed` (structural), `b:files-research` (judgment) writer filed research before the kill; `b:killed` the server dies after researcher's ending is written and before it is sent (FIX-2078's kill point, reused); `b:hears-in-due-time` after a restart with no touch, writer hears it within the due time plus 2 s; `b:once`.
- **c**: researcher's model refuses every call. `c:routed` (structural), `c:files-dependent` (judgment), `c:fails-out`, `c:dependent-cancelled`, `c:one-failure-notice` writer hears one failure notice naming the dependent it cancelled, and none for the dependent; `c:once`.
Expand Down
19 changes: 17 additions & 2 deletions goals/workforce-coordination/runs-on-one-task/run.mts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const TAGS: Record<string, Kind> = {
"j1:answer": "judgment",
"j1:tools": "structural",
"j1:read-once": "structural",
"j1:heard-once": "structural",
"j1:once": "structural",
"j2:steered": "structural",
"j2:steer-shows": "judgment",
Expand Down Expand Up @@ -232,11 +233,25 @@ function gradeJ1(store: string, j: Awaited<ReturnType<typeof journeyHandsOut>>,
f.push(`j1:waits-in-request — wanted editor's one work request to read the research's ending with getTask: task ${E.status}, ${works.length} work request(s), ${read.length} completed getTask read(s)`);
}
// That ending reaches editor once: read in the request, so no notice turn runs for it.
// An ending that lands before the getTask wait still starts one onTaskSettled request: at the
// ending nothing is waiting yet, so a notice is owed and sent. Once the wait has read the
// ending, that request finds the notice no longer owed and runs no turn: its output is
// `{ owed: false }` (FIX-2112). A request that runs no turn is not a second hearing, so only
// the requests that admitted the notice (`owed: true`) count against the read. The model-free
// case in goals/task-board/waits-on-a-task-it-filed counts the same way.
const notices = settledRequests(store, editorSession);
if (research.length > 0 && read.length > 0 && notices.length > 0) {
const heardBy = notices.filter((r) => (r.output as { owed?: unknown } | undefined)?.owed === true);
if (research.length > 0 && read.length > 0 && heardBy.length > 0) {
const ended = research[0]!.completedAt ?? 0;
const asked = Math.min(...read.map((i) => Number(i.ts ?? Infinity)));
f.push(`j1:read-once — researcher's ending reached editor twice: its work request read it with getTask (${asked - ended} ms after the ending) and ${notices.length} onTaskSettled turn(s) ran for it too`);
f.push(`j1:read-once — researcher's ending reached editor twice: its work request read it with getTask (${asked - ended} ms after the ending) and ${heardBy.length} onTaskSettled turn(s) ran for it too (${notices.length} request(s) in all)`);
}
// And it is heard exactly once, by that read: in one request, with no notice that ran a turn.
// This holds the exclusion above to its claim: discounting the `owed: false` requests must not
// let a run where nothing delivered the ending, or two requests did, pass j1:read-once.
const readIn = new Set(read.map((i) => i.requestId)).size;
if (research.length > 0 && (readIn !== 1 || heardBy.length !== 0)) {
f.push(`j1:heard-once — wanted researcher's ending heard exactly once, by editor's getTask read: read in ${readIn} request(s), ${heardBy.length} notice turn(s); ${notices.length} onTaskSettled request(s), outputs ${show(notices.map((r) => r.output), 200)}`);
Comment thread
jhoffner marked this conversation as resolved.
Resolved
}
if (!outputText(E.output).includes(cast.factMark)) f.push(`j1:answer — editor's answer lacks researcher's fact: ${show(E.output, 160)}`);
const offered = tell.over(
Expand Down
Loading