You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
11 server tests fail on main: FoundationPersistence (9) and Orchestrator.control-reads (2) #449
Found by the independent review of PR #443 on 2026-11-17. Both files fail the same way on clean main 0f7b792335 and on the #443 head, so #443 didn't cause them.
apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts: 2 of 33 fail.
delegated-task history read volume: "expected 49655 to be at most 2479.4";
the message.dispatch query plan shows SEARCH … waiting_link_idx.
FoundationPersistence.test.ts: 9 of 70 fail.
durable-effect recovery;
single-worker claiming;
provider-turn start beside title work;
the pending-title cap;
then "does not reclaim a running effect after its process-local lease expires", which hangs to the 120 s timeout, and 5 more after it.
The read-volume failure could be a real performance regression, since it reads about 20 times more than the test allows.
Three more failures already on main, found by the #434 worker (PR #459): apps/server/src/orchestration-v2/ProjectionStore.fork.test.ts fails 3 tests on main 2178125d7c, and the same 3 on the PR branch. That makes 14 known failures on main: control-reads 2, FoundationPersistence 9, ProjectionStore.fork 3. The investigation running for this issue should cover this file too.
Detail from the PR #459 review. Two of the three ProjectionStore.fork.test.ts failures are query-plan checks (:1222, :1332). The third, :906, checks a value and may be a real bug. getLimitRecoveryCandidates still returns an archived thread that hit a usage-limit failure ("expected {…} to equal undefined", the first case in that loop). That could auto-resume an archived thread once the limit resets. Not verified at runtime. Treat it as the top priority of this issue.
Web: the ChatMarkdown.browser.test.tsx double-click selection test fails.
Lint: the touched issue files carry 32 lint diagnostics, which fail check:changed's lint step and the pre-commit hook. The PR had to commit with --no-verify.
Typecheck:apps/mobile has 3 typecheck errors.
The archived-thread recovery case (ProjectionStore.fork.test.ts:906) is still the top priority.
All 14 failures came from the fork's sync merge 721ba11236, "chore(sync): merge upstream nightly 20261116.4800", which landed through PR #428 as 7abb7f1cbe. They are sync regressions, not upstream bugs and not older fork bugs.
Upstream main13ecf5b22e and the nightly7d32075e37: control-reads 31/31 and FoundationPersistence 64/64 pass.
Fork parentd9c88282ab: control-reads 29/29, FoundationPersistence 67/67 and ProjectionStore.fork 14/14 pass.
The merge and every main commit since fail the same 11 + 3. The cause is how the two sides were combined; no single commit on either side causes it.
Runtime risk. The failing tests describe real behavior:
two workers claiming one durable effect ("allows only one worker to claim": 2 instead of 1);
title generations taking every effect worker, so provider-turn.start is never claimed;
recovery after process loss requeuing 2–4 effects instead of 1;
a delegated task reading about 20 times the allowed history (49,655 against a limit of about 2,479);
an archived thread with a usage-limit failure still counted as a recovery candidate;
the recovery-index and queued-message queries not using their indexes.
All 14 tests that failed on main now pass on my branch, and draft PR #466 is open with "Closes #449". I haven't merged it.
Verification: the four affected test files pass (123/123), including the 3 originally named plus ProjectionSettlement.test.ts, where I added the assertion you asked for. vp run check:changed also passes (format, lint, knip, typecheck, 8 test files). The branch merges cleanly onto the current origin/main. The PR body lists the 14 failing tests on main and the passing run on the branch.
Why it failed, by group:
FoundationPersistence (9): the merge took upstream's version of the "filters worker replay and live queues" test, which dropped the fork's Layer.fresh(layerTest). That test leaves two pending run.silence.check effects from the fork's silent-completion check. Without the fresh layer they stayed in the shared test database and broke every later claim, title-cap, lease and requeue test. The fix puts back .pipe(Effect.scoped, Effect.provide(Layer.fresh(layerTest))). This was test isolation only, not a product bug.
control-reads (2): these tests come from upstream and catch fork reads that walk a thread's whole history.
For delegated tasks, the merge kept the fork's broad reads in three places where upstream had narrowed them. I put back upstream's getRunProviderRecords, the subagentChildThreadIds filter, and run-scoped reads in offerDelegatedCompletionDelivery. The fork's run-less delegation keeps working.
continueAdmissions loaded the full thread shell; it now reads only the thread row, still skipping deleted threads.
EndedRunTurnItems walked the thread; turn-item reads filtered by run now use upstream's existing rowid IN (…) lookup.
ProjectionStore.fork (3):
The subagent usage-limit lookup lost its index to a new upstream index, so I pinned it with INDEXED BY on the fork's usage-limit index.
The other two were stale tests. I fixed them as you approved: the archive step now also sets the archived_at column, and the expected query plan line is now upstream's bounded covering-index search.
Your two conditions:
Archive proof: no existing test checked archived_at after a real archive event. I added one assertion to "sql: a subagent thread becomes a candidate once its parent is done" in ProjectionSettlement.test.ts. It passes, so the archived-thread auto-resume risk wasn't real. The PR quotes the assertion.
turn_items_recovery_idx: no query names it now, upstream or fork. An upstream migration creates it, not a fork one, so dropping it is your follow-up call. The planner can still pick it on its own. I left it in place.
The test at ProjectionStore.fork.test.ts:1222 is still titled "search the recovery index", which no longer matches; I didn't rename it.
PR #466, head 376ee7a, checks and reviews: none reported yet (draft, no checks running, no review)
Correction to the 2026-11-17 "Investigation result" comment's runtime-risk list, based on the root cause in PR #466:
FoundationPersistence (9): these were not product bugs. The merge dropped Layer.fresh(layerTest) from one upstream test, which left two run.silence.check effects in the shared test database. Those leftovers broke every later claim, title-cap, lease and requeue test. So "two workers claim one effect", "title generations block turns" and "over-requeue" were test artifacts, not live behavior.
Archived-thread recovery: this was a stale test, not a bug. A real archive writes the archived_at column, which the new assertion in ProjectionSettlement.test.ts confirms.
PR #466 is in Checker review before merge. Follow-up for the owner to decide: the upstream-created turn_items_recovery_idx index is no longer named by any query.
Activity
tannerpolley commentedon Nov 17, 2026
Three more failures already on main, found by the #434 worker (PR #459):
apps/server/src/orchestration-v2/ProjectionStore.fork.test.tsfails 3 tests on main2178125d7c, and the same 3 on the PR branch. That makes 14 known failures on main: control-reads 2, FoundationPersistence 9, ProjectionStore.fork 3. The investigation running for this issue should cover this file too.tannerpolley commentedon Nov 17, 2026
Detail from the PR #459 review. Two of the three
ProjectionStore.fork.test.tsfailures are query-plan checks (:1222,:1332). The third,:906, checks a value and may be a real bug.getLimitRecoveryCandidatesstill returns an archived thread that hit a usage-limit failure ("expected {…} to equal undefined", the first case in that loop). That could auto-resume an archived thread once the limit resets. Not verified at runtime. Treat it as the top priority of this issue.tannerpolley commentedon Nov 17, 2026
More failures already on main, found by the #452 worker (PR #460) and re-run on main:
apps/web/src/lib/openIssueLink.test.ts(nowopenRepositoryIssueLink.test.ts) still expects Forgejo to count as an issue host. That's probably a stale test left from refactor(issues): use GitHub as the only active issue host #431 (GitHub only).ChatMarkdown.browser.test.tsxdouble-click selection test fails.check:changed's lint step and the pre-commit hook. The PR had to commit with--no-verify.apps/mobilehas 3 typecheck errors.The archived-thread recovery case (
ProjectionStore.fork.test.ts:906) is still the top priority.tannerpolley commentedon Nov 17, 2026
Investigation result (2026-11-17)
All 14 failures came from the fork's sync merge
721ba11236, "chore(sync): merge upstream nightly 20261116.4800", which landed through PR #428 as7abb7f1cbe. They are sync regressions, not upstream bugs and not older fork bugs.13ecf5b22eand the nightly7d32075e37: control-reads 31/31 and FoundationPersistence 64/64 pass.d9c88282ab: control-reads 29/29, FoundationPersistence 67/67 and ProjectionStore.fork 14/14 pass.Runtime risk. The failing tests describe real behavior:
provider-turn.startis never claimed;These may explain the unexplained stalls in #367.
Full failure messages and per-commit logs are in the investigator's report (thread result). The fix comes next, on main.
tannerpolley commentedon Nov 17, 2026
T3 Code status: Done
Issue: #449 11 server tests fail on main: FoundationPersistence (9) and Orchestrator.control-reads (2)
Thread: thread:delegated-task:command%3Amcp%3A53eed4d4-49de-4205-ba6f-a35a0b15b7c9%3Adelegate-task%3Aissue-449-fix-2026-11-17
Model: claude-opus-5-5
Branch: issue-449-11-server-tests-fail-on-main
Updated: 2026-11-17T22:27:46.268Z
tannerpolley commentedon Nov 17, 2026
T3 Code closeout: done
Issue: #449 11 server tests fail on main: FoundationPersistence (9) and Orchestrator.control-reads (2)
Thread: thread:delegated-task:command%3Amcp%3A53eed4d4-49de-4205-ba6f-a35a0b15b7c9%3Adelegate-task%3Aissue-449-fix-2026-11-17
Model: claude-opus-5-5
Branch: issue-449-11-server-tests-fail-on-main
Completed: 2026-11-17T22:27:45.880Z
All 14 tests that failed on main now pass on my branch, and draft PR #466 is open with "Closes #449". I haven't merged it.
Verification: the four affected test files pass (123/123), including the 3 originally named plus
ProjectionSettlement.test.ts, where I added the assertion you asked for.vp run check:changedalso passes (format, lint, knip, typecheck, 8 test files). The branch merges cleanly onto the currentorigin/main. The PR body lists the 14 failing tests on main and the passing run on the branch.Why it failed, by group:
Layer.fresh(layerTest). That test leaves two pendingrun.silence.checkeffects from the fork's silent-completion check. Without the fresh layer they stayed in the shared test database and broke every later claim, title-cap, lease and requeue test. The fix puts back.pipe(Effect.scoped, Effect.provide(Layer.fresh(layerTest))). This was test isolation only, not a product bug.getRunProviderRecords, thesubagentChildThreadIdsfilter, and run-scoped reads inofferDelegatedCompletionDelivery. The fork's run-less delegation keeps working.continueAdmissionsloaded the full thread shell; it now reads only the thread row, still skipping deleted threads.EndedRunTurnItemswalked the thread; turn-item reads filtered by run now use upstream's existingrowid IN (…)lookup.INDEXED BYon the fork's usage-limit index.archived_atcolumn, and the expected query plan line is now upstream's bounded covering-index search.Your two conditions:
archived_atafter a real archive event. I added one assertion to "sql: a subagent thread becomes a candidate once its parent is done" inProjectionSettlement.test.ts. It passes, so the archived-thread auto-resume risk wasn't real. The PR quotes the assertion.turn_items_recovery_idx: no query names it now, upstream or fork. An upstream migration creates it, not a fork one, so dropping it is your follow-up call. The planner can still pick it on its own. I left it in place.The test at
ProjectionStore.fork.test.ts:1222is still titled "search the recovery index", which no longer matches; I didn't rename it.PR #466, head 376ee7a, checks and reviews: none reported yet (draft, no checks running, no review)
tannerpolley commentedon Nov 17, 2026
Correction to the 2026-11-17 "Investigation result" comment's runtime-risk list, based on the root cause in PR #466:
Layer.fresh(layerTest)from one upstream test, which left tworun.silence.checkeffects in the shared test database. Those leftovers broke every later claim, title-cap, lease and requeue test. So "two workers claim one effect", "title generations block turns" and "over-requeue" were test artifacts, not live behavior.archived_atcolumn, which the new assertion inProjectionSettlement.test.tsconfirms.PR #466 is in Checker review before merge. Follow-up for the owner to decide: the upstream-created
turn_items_recovery_idxindex is no longer named by any query.