Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
8c42d32
feat(engine): record where a turn's history starts and open the windo…
claude Oct 28, 2026
822db69
feat(core): historySummary capability and fold, and a capability hist…
claude Oct 28, 2026
f8afedb
feat(workforce,client): beforeAnswer step and historyStart on the cli…
claude Oct 28, 2026
966b1d9
FIX-2154: wire the Teammates lab to the real packages
claude Oct 28, 2026
830c32d
FIX-2154: record the goal's verdicts and controls, file the gaps
claude Oct 28, 2026
944bbca
FIX-2154: say user, not person, in the lab's comments
claude Oct 28, 2026
2fd0c09
FIX-2154: name the Teammates lab's server config as a fallow entry
claude Oct 28, 2026
95fe4cf
FIX-2154: keep host.mts's own constants unexported
claude Oct 28, 2026
4d397d8
FIX-2154: answer review on the adapter and the goal
claude Oct 28, 2026
0660cd6
FIX-2154: read the feed's snapshot again when the history moves while…
claude Oct 28, 2026
fa17caf
test(goals): history window goal check, and the changeset (FIX-1613)
claude Oct 28, 2026
ed88b9f
FIX-2154: hand the lab's Codex runs only the environment Codex needs
claude Oct 28, 2026
e8207d9
FIX-2154: follow a task's run by the session its card already names
claude Oct 28, 2026
e7ea812
FIX-2154: name the issue in the Codex pass-list changeset
claude Oct 28, 2026
76912b7
docs: summarizing turns past the history window (FIX-1613)
claude Oct 28, 2026
2b7d23d
fix(core): a failed fold records the oldest unfolded turn, so lost tu…
claude Oct 28, 2026
b4a59d6
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
82caf8a
fix(engine): history after a mark that has not settled starts after i…
claude Oct 28, 2026
9812eaa
fix(core): a fold is stale when any other fold committed, not only on…
claude Oct 28, 2026
aace8e4
FIX-2154: the Teammates lab keeps what left its history window, and d…
claude Oct 28, 2026
6693940
fix(core): a fold keeps the summarizer's key points with its summary …
claude Oct 28, 2026
bb004bc
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
ae48471
fix(core): FIX-1613 keep a turn sharing the mark's start time once th…
claude Oct 28, 2026
04cd8b9
fix(engine): FIX-1613 trim the window's extra row before reordering it
claude Oct 28, 2026
7c98af9
fix(engine): FIX-1613 order same-millisecond turns by id everywhere
claude Oct 28, 2026
4e01de4
FIX-2289: render worker text as Markdown in the Teammates lab
claude Oct 28, 2026
068ae50
FIX-2154: step 4 waits for each answer, and the summary keeps earlier…
claude Oct 28, 2026
920da34
FIX-2289: keep MessageResponse internal to the lab's Markdown component
claude Oct 28, 2026
0fa923c
fix(engine,core): FIX-1613 a summary mark newer than the loaded window
claude Oct 28, 2026
cac199d
fix(core): FIX-1613 waiting turns no longer take the fold's places
claude Oct 28, 2026
5c49f84
Merge remote-tracking branch 'origin/claude/project-thread-e54cfm' in…
claude Oct 28, 2026
e40aca5
FIX-2154: step 3 may redden under the step-4 controls, with the reason
claude Oct 28, 2026
a2caae9
FIX-2154: the lab's inventory table, current
claude Oct 28, 2026
649e971
FIX-2289: read the lab's entries as shown in the goal check
claude Oct 28, 2026
fd11163
Merge remote-tracking branch 'origin/claude/project-thread-e54cfm' in…
claude Oct 28, 2026
b854692
FIX-2154: step 4's verdict log
claude Oct 28, 2026
8d89ce6
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
7102c9e
FIX-2289: show a worker's answer as it is written
claude Oct 28, 2026
c2b6995
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 28, 2026
0e07742
fix(engine): FIX-1613 a retried turn keeps its place in turns()
claude Oct 28, 2026
cb5024e
Merge remote-tracking branch 'origin/main' into fix/fix-1613
claude Oct 28, 2026
c295253
Merge main into FIX-2154 lab branch
claude Oct 28, 2026
7366a3c
Merge remote-tracking branch 'origin/claude/project-thread-e54cfm' in…
claude Oct 28, 2026
2fbbedc
FIX-2154: the lab's inventory table, current
claude Oct 28, 2026
14fa6b0
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
6318c46
fix(core): FIX-1613 a resumed pending turn stays pending; lost check …
claude Oct 28, 2026
7bd40d0
Teammates lab: an unlinked task answer is not drawn as failed; lead n…
claude Oct 28, 2026
5ca7328
fix(engine): FIX-1613 a retried turn read by id has nothing to read
claude Oct 28, 2026
f00be8d
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
00e8f07
FIX-2154: step 4 reads lead's answer once it is fully drawn
claude Oct 28, 2026
b82f66d
Teammates lab: researcher answers only through sendMessage; goal wait…
claude Oct 28, 2026
0ca38f2
fix(engine): FIX-1613 read turns by id fresh, and ended turns as empty
claude Oct 28, 2026
2c3596a
FIX-2154: record step 4's pass at 00e8f07
claude Oct 28, 2026
1f46ec3
Merge #4079 at b82f66de into claude/project-thread-6ydn0c
claude Oct 28, 2026
73315bd
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
6cff931
FIX-2154: the lab's inventory table, current
claude Oct 28, 2026
a8a7e5f
FIX-1613: read a shared dependency's history once through dynamic uses
claude Oct 28, 2026
406590f
FIX-1613: say turns were lost when settled turns leave behind an olde…
claude Oct 28, 2026
d2034b1
FIX-1613: list a continuable interrupted turn as open
claude Oct 28, 2026
9074de4
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
872a7c1
Merge remote-tracking branch 'origin/main' into fix/fix-1613
claude Oct 28, 2026
bf6daac
test(orchestration): a steer turn's stop reason says user, as FIX-215…
claude Oct 28, 2026
4af4dd3
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
8fbfca6
Store a received worker message as a user line in the recipient's his…
jhoffner Oct 28, 2026
8daa709
FIX-1613: resolve a history mark that names the resuming request
claude Oct 28, 2026
1fde086
FIX-1613: a fold keeps the request running it pending when it moves p…
claude Oct 28, 2026
39a8c5c
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
224f1ae
Merge main (with #4079) into claude/project-thread-6ydn0c
claude Oct 28, 2026
dd547f7
FIX-1613: list a turn that settled after the window loaded as open
claude Oct 28, 2026
bee72e8
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
b734df3
FIX-1613: drop a pending turn that retention deleted before it settled
claude Oct 28, 2026
1840bd2
FIX-2154: place the divider by the order turns started
claude Oct 28, 2026
f04b409
Merge remote-tracking branch 'origin/fix/fix-1613' into claude/projec…
claude Oct 28, 2026
c9d25cc
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 28, 2026
129959f
FIX-2154: regenerate the Teammates lab inventory after merging main
claude Oct 28, 2026
741c030
FIX-2154: keep the summary's mark when it has a hole; the hole only d…
claude Oct 28, 2026
1202202
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 28, 2026
0ff68c4
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 29, 2026
5d93f27
FIX-2154: regenerate the Teammates lab inventory after merging main
claude Oct 29, 2026
0066eb7
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Oct 29, 2026
5e1a3f9
FIX-2154: regenerate the Teammates lab inventory after merging main
claude Oct 29, 2026
792d751
FIX-2154: goal verdicts on the merged real-tools lab
claude Oct 29, 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
14 changes: 8 additions & 6 deletions packages/core/src/utility/history-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,14 @@ export function historySummary(options: HistorySummaryOptions) {
? await ctx.session.items.turns({ requestIds: state.pending })
: [];
const settledPending = pendingTurns.filter((t) => t.settled);
// Every pending turn not read as settled stays pending, the one running
// this fold included: a resumed turn cannot read itself, and it is
// behind the mark, so no later window would fold it.
const settledIds = new Set(settledPending.map((t) => t.requestId));
const stillPending = state.pending.filter((id) => !settledIds.has(id));
// A pending turn read as still open stays pending, and so does the one
// running this fold: a resumed turn cannot read itself, and it is behind
// the mark, so no later window would fold it. One the read no longer
// finds was deleted before it settled (retention): nothing is left to
// fold, so it is dropped.
const self = ctx.request.identity.id;
const openIds = new Set(pendingTurns.filter((t) => !t.settled).map((t) => t.requestId));
const stillPending = state.pending.filter((id) => id === self || openIds.has(id));

const all = await ctx.session.items.turns();
// After the mark by position, since two turns can share a start
Expand Down Expand Up @@ -215,7 +218,6 @@ export function historySummary(options: HistorySummaryOptions) {
// This request is listed open where it started, so a fold that moves
// past it keeps it pending; it is not a past turn, so it does not count
// toward the window's fill.
const self = ctx.request.identity.id;
const due = after.filter((t) => t.requestId !== self).length > window.turns - quarter;
// A quarter of settled turns per fold; the waiting turns among them move
// to pending without taking a place, or enough of them could hold every
Expand Down
20 changes: 20 additions & 0 deletions packages/engine/test/history-summary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,26 @@ describe("historySummary on the engine", () => {
expect(state.pending).toContain("req_run_1");
});

it("drops a pending turn that retention deleted before it settled", async () => {
const stores = createInMemoryStores();
const calls: ModelCall[] = [];
const flow = chatFlow({ window: 4, summarize: foldingSummarize() });
await talk(stores, flow, calls, 3);
const third = (await stores.request.get("req_003"))!;
await stores.request.set("req_wait", { ...third, id: "req_wait", status: "suspended", startedAtMs: third.startedAtMs + 1, items: [] }, "any");
await new Promise((resolve) => setTimeout(resolve, 2));
await talk(stores, flow, calls, 5, 4);
const held = (await stores.resourceState.get("session", "s", "historySummary"))?.state as { pending: string[] };
expect(held.pending).toEqual(["req_wait"]);

// Retention deletes it while it still waits: nothing is left to fold.
await stores.request.delete("req_wait");
await talk(stores, flow, calls, 1, 9);

const state = (await stores.resourceState.get("session", "s", "historySummary"))?.state as { pending: string[]; complete: boolean };
expect(state).toMatchObject({ pending: [], complete: true });
});

it("keeps this turn pending when it is itself a pending turn the fold cannot read yet", async () => {
const stores = createInMemoryStores();
const calls: ModelCall[] = [];
Expand Down
Loading