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
fix(server): an infinite workflow interval no longer breaks unrelated workflow sweeps - #45371
every("Infinity") accepts an interval that cannot produce a valid next date. Formatting that date aborts the entire sweep before it reaches later schedules, forge triggers, watches, or reconciliation.
Deterministic repro on origin/main (8ce22420f98324cfa2bafa7d787d95a28e61a282)
In a clean checkout of that base, apply only the regression tests from the proposed commit and run them:
git diff 8ce22420f98324cfa2bafa7d787d95a28e61a282 f654e2ef1982164d5ede1926c00e00e93fa02f10 -- apps/server/src/workflows/Workflows.test.ts | git apply
vp test run apps/server/src/workflows/Workflows.test.ts -t 'workflow interval'
The constructor case calls every("Infinity"). The SQLite-backed engine case starts its synthetic clock at 2026-01-01T00:00:00Z, registers every("20000000 weeks") before every("1 minute"), and calls Workflows.sweep.
Observed: The constructor accepts Infinity, and the finite boundary case aborts the sweep with RangeError: Invalid time value. Expected: The constructor rejects Infinity, and the sweep skips an unrepresentable next date and still starts the healthy workflow when due.
Change
Reject non-finite intervals in every(). Before writing the next run time, the shared server engine checks that the date is representable; it warns once per trigger per engine and continues the sweep. This covers workflows regardless of client or connection mode, without client or protocol changes.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
Both focused cases failed on base and passed on head. The engine case verifies that the healthy workflow starts despite the oversized interval.
vp run check:changed exited 0; all 74 affected tests passed.
Macroscope's review found this PR approvable — Rejects non-finite workflow intervals and skips out-of-range next-run dates so they do not interrupt unrelated schedule sweeps. Valid schedules and product defaults remain unchanged.
No code changes detected at 68ecc73. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between abfa223 and 68ecc73.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The workflow interval validation now rejects non-finite values. Schedule processing skips invalid next-run dates and logs a warning once per affected trigger. Tests cover both behaviors.
every rejects non-finite intervals before applying the minimum-duration check. Tests cover the error and retain bigint equivalence and short-interval assertions.
Invalid schedule date handling apps/server/src/workflows/WorkflowEngine.ts, apps/server/src/workflows/Workflows.test.ts
The engine skips triggers with no next run. It warns once per trigger ID and leaves the stored schedule time unchanged when the next-run date is invalid. The regression test checks that the healthy schedule runs.
This change rejects infinite workflow intervals and keeps a workflow with an oversized interval from aborting the sweep, so healthy schedules still run. The behavior change is narrow and has focused test coverage, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: an infinite workflow interval no longer breaks unrelated workflow sweeps. The changeset rejects non-finite intervals in every() and makes the engine skip unrepresentab…
Description check
The description covers the problem, the change, scope, and verification. It has a clear reproduction with commands, observed and expected behavior, and a focused test run. The Problem, Change, Scope, …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: an infinite workflow interval no longer breaks unrelated workflow sweeps. The changeset rejects non-finite intervals in every() and makes the engine skip unrepresentable next-run dates, which matches the title. The title uses the conventional commit format and is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description covers the problem, the change, scope, and verification. It has a clear reproduction with commands, observed and expected behavior, and a focused test run. The Problem, Change, Scope, and Verification sections match the template. It also states what was not tested (live forge calls, external providers, client UI). The template's conventional-commit guidance is followed by the title. The description does not link an issue, but it explains why none is needed for a small obvious bug fix, as the template allows.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 8ce2242 and f654e2e.
Files selected for processing: 3
apps/server/src/workflows/WorkflowEngine.ts
apps/server/src/workflows/Workflows.test.ts
apps/server/src/workflows/triggers.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Real Linux server/CLI reproduction on fresh isolated databases, 2026-11-29 09:31–09:37 UTC. On each commit, start two real Node T3 servers on loopback using separate fresh data directories, workflowsEnabled=true and T3CODE_DEV_SEED=0. Server A loads oversized every("20000000 weeks") before healthy every("1 minute"), both returning Effect.void. Server B starts with healthy only. Capture server output and t3 workflow list --json about once a minute. After three minutes, hot-load a second file on B declaring infinite every("Infinity"); observe for another three minutes. No clocks, services, or providers are mocked.
Videos render captured timestamped output at 10× speed (1600×1000); CLI JSON is projected to workflow, status and startedAt for readability. Full CLI output is in the transcripts. These are server-output recordings, not web UI screenshots.
Oversized server: zero runs. Control: three completed healthy runs, then Infinity accepted and no further runs. 39 sweep failures across both servers.
Oversized server: six completed healthy runs and one out-of-range warning. Control: Infinity rejected with a finite-interval error; six healthy runs, including three after rejection. Zero sweep failures.
Not exercised: forge triggers, pull-request watches, or crash-recovery reconciliation; the evidence directly demonstrates definition rejection and continued healthy scheduling.
Not shown:
Forge triggers, pull-request watches, and crash-recovery reconciliation were not independently exercised; the supplied reproduction uses interval schedules and definition hot reload.
Merges `pingdotgg/t3code` `c16ad0ce17` (186 commits, base `72d700a78c`)
into the fork. Branched from `main`; no open merge PR to stack on.
- **Landed:** 633 files vs 630 in the upstream range. The 3 extra are
fork docs. Fork delta: 794 files.
- **Conflicts:** 8, all `converged`, resolved by their verdicts. Details
are in `docs/fork/upstream-merge-log.md` (2026-11-30). Two of them were
restructures:
- `ThreadDetailsPanel.tsx`: upstream moved the sections into
user-ordered blocks. The fork's sandbox row, scheduled-tasks gate and
artifacts section now ride inside the existing `environment`,
`automations` and `relationships` blocks, with no new block id.
- `SidebarThreadRow.tsx`: upstream made the row a token layout. The
fork's owner name, parent link and child-task badge now render with the
`agents` (provider) item.
- **Contracts:** added `UnsupportedMethodError` to
`threadHandoff.options`/`start`/`cancel`/`adopt` and `tools.list`. The
derivation reports no ADD or DROP now.
- **Inventory:**
- New `web-translations` path policy.
- `useThreadActionMenu.test.ts` added to the thread-visibility entry.
- Replaced the stale duplicate-add exception with the
`Sidebar.logic.test.ts` `new Set(),` one.
- Updated anchors for the two restructured deltas.
- **Gaps:**
- Extended "Methods the backend does not dispatch" with handoff and
`tools.list`.
- Added the c16ad0c range to "Runtime fixes upstream made to its own
server".
- Added ServerBrowser's `Uint8Array.fromBase64` to the Node 24 entry.
## Verification
`verify.mjs` full run. Duplicate-adds, tripwires, resolution-check,
unsupported-methods, lockfile, fmt, lint, typecheck and build are all
green.
- `@t3tools/web`: 3 files failed in the full run. On the rerun alone all
750 passed.
- `t3`: 9 files failed. All are registered sandbox gaps:
- Node 24 lacks `StatementSync.stat`, `setTypeOfService` and
`Uint8Array.fromBase64`.
- The sandbox `/tmp` has no sticky bit (Codex token broker).
- The global git `insteadOf` rewrites the test remotes.
- Every other package passed.
- The commit used `--no-verify` for the known knip failure (the same 27
fork exports).
## Usable as-is
- Customizable sidebar thread rows and a reorderable Thread Details card
(pingdotgg#42576). These read the `sidebarRowLayout` and `threadDetailsOrder`
client settings. Not checked: whether Moatless stores them.
- Provider icon stack on thread rows (pingdotgg#44794).
- The machine-overload warning is now a smaller pill you can dismiss
(pingdotgg#45775, pingdotgg#45273). Without `severeSince` a dismissal does not reset when
a new overload episode starts.
- About 60 web UI fixes: keybinding editor, branch and diff pickers,
find bar, file previews (spreadsheet, TSV, TAR, RTF, ODT, Markdown
tables), pull request views, the composer and queued messages.
- Text fixes: text direction, monograms, work-log command labels,
Markdown recovery.
- Mobile-only fixes: inbox scroll and swipe, Android split screen, iPad
keyboard.
## Unsupported in Moatless / needs implementation
- **Continue a thread on another machine** (pingdotgg#44775, pingdotgg#44774, pingdotgg#44773).
Methods: `threadHandoff.options`, `start`, `cancel`, `adopt`. UI:
`HandoffRequestCard`, `ThreadHandoffDialog`, and a thread-menu item.
- Hidden against Moatless, because `canMoveThreadsAtom` requires
`offersLinkedEnvironments`.
- To implement: linked environments plus a thread import. Alternatively,
keep the capability absent.
- **`tools.list`** (`packages/contracts/src/agentTools.ts`). Lists the
MCP servers and skills a thread's agent gets. No web surface reads it
yet.
- To implement: return Moatless's tool list in the `AgentToolsList`
shape.
- **MCP servers and disabled skills per thread and per project**
(pingdotgg#45175, pingdotgg#45306, pingdotgg#45362, pingdotgg#45320). These are `mcpServers` and
`disabledSkills` in settings and in `projectSettingsOverrides`, saved
through `server.updateSettings`.
- To implement: Moatless would have to persist them, redact secrets on
read, and pass them into provider sessions. Until then the setting
probably appears to save and does nothing. This was not checked against
the Moatless settings handler.
- **`severeSince` on host pressure** (`resourceTelemetry.ts`). Optional,
low priority.
## Backend behavior to consider reproducing in Moatless
- **Agent tools:** `pull_request_create` adds labels (pingdotgg#45533).
Per-project MCP servers keep their secrets out of `settings.json`
(pingdotgg#45362, pingdotgg#45306). `t3_thread_read` no longer splits a surrogate pair at
`textOffset`, and a `t3_thread_launch` replay keeps the launched
thread's model selection (pingdotgg#45509, pingdotgg#42115).
- **VCS:**
- Forgejo auto-merges once checks pass (pingdotgg#38773), and its single-page
issue lists stop claiming more items (pingdotgg#45591).
- GitLab reads and retries CI jobs (pingdotgg#45027).
- A new worktree's index swap no longer locks out Git (pingdotgg#42260).
- A task folder that loses a branch race leaves the winner's checkout
alone (pingdotgg#45618).
- A worktree thread in a plain folder runs in the folder (pingdotgg#44799,
pingdotgg#45560).
- Selected-file commits still refuse a merge when the project folder is
a symlink (pingdotgg#45592).
- **Thread search:**
- Lists every older settled thread that matches (pingdotgg#44741).
- Skips link addresses (pingdotgg#45499, pingdotgg#45271, pingdotgg#45354).
- Finds non-ASCII whole words (pingdotgg#45582).
- Includes folders re-included by `.ignore` before the index is ready
(pingdotgg#45482).
- Stops listing nested worktree files as `.worktrees/x/./path` (pingdotgg#45481).
- **Runtime:**
- Repeated thread actions no longer stay pending (pingdotgg#45565).
- Cancelling a queued follow-up cancels only its own run (pingdotgg#45414).
- Evicted terminals are removed from connected clients (pingdotgg#45506).
- Switching providers no longer waits on the old one's background work
(pingdotgg#45373).
- Checkpoint cleanup no longer enumerates active threads' refs (pingdotgg#45516).
- Remote delegated subagents no longer trigger completion notifications
(pingdotgg#45297).
- **Providers:**
- Codex: a stopped partial plan no longer stays streaming (pingdotgg#45590), and
a partitioned `models_cache` no longer breaks shadow homes (pingdotgg#45450).
- ACP: the `/` menu lists commands advertised late (pingdotgg#45286), and a
failed history read no longer reports the session as imported (pingdotgg#45410).
- **Workflows:** daily interval and weekday fixes, and no duplicate runs
for equivalent label filters (pingdotgg#45371, pingdotgg#45312, pingdotgg#45281, pingdotgg#45264, pingdotgg#45276).
- **Machine-load warnings:** stop while the CPUs sit idle, and ignore
jobs outside T3 stalling at their own memory limit (pingdotgg#45531).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
Moatless task:
https://moatless.soaplabstest.com/tasks/350bcaee-9e40-4d3b-83f5-1ea4e9e745e6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
every("Infinity")accepts an interval that cannot produce a valid next date. Formatting that date aborts the entire sweep before it reaches later schedules, forge triggers, watches, or reconciliation.Deterministic repro on
origin/main(8ce22420f98324cfa2bafa7d787d95a28e61a282)In a clean checkout of that base, apply only the regression tests from the proposed commit and run them:
The constructor case calls
every("Infinity"). The SQLite-backed engine case starts its synthetic clock at2026-01-01T00:00:00Z, registersevery("20000000 weeks")beforeevery("1 minute"), and callsWorkflows.sweep.Observed: The constructor accepts Infinity, and the finite boundary case aborts the sweep with
RangeError: Invalid time value.Expected: The constructor rejects Infinity, and the sweep skips an unrepresentable next date and still starts the healthy workflow when due.
Change
Reject non-finite intervals in
every(). Before writing the next run time, the shared server engine checks that the date is representable; it warns once per trigger per engine and continues the sweep. This covers workflows regardless of client or connection mode, without client or protocol changes.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
vp run check:changedexited 0; all 74 affected tests passed.Not shown: Live forge calls, external providers, or client UI; the proof exercises the shared workflow engine with an isolated SQLite database.
Authored by GPT-6.2 Sol (Codex); reviewed by Claude Opus 5.5 (Model Hub).