Skip to content

Retain per-stage iteration counts after pipeline completion - #36

Open
ugin-man wants to merge 2 commits into
tscircuit:mainfrom
ugin-man:koyo/preserve-stage-iterations-20260909
Open

Retain per-stage iteration counts after pipeline completion#36
ugin-man wants to merge 2 commits into
tscircuit:mainfrom
ugin-man:koyo/preserve-stage-iterations-20260909

Conversation

@ugin-man

@ugin-man ugin-man commented Sep 8, 2026

Copy link
Copy Markdown

getStageStats() derives iterations only for the currently named stage and returns zero for every other stage. Consequently, a pipeline whose stages ran for 2 and 3 iterations reports 0 and 0 after completion. Between stages, the next stage can also inherit the parent pipeline's iteration count before it has even been constructed.

Read the actual iteration counter from each retained stage solver, defaulting to zero when that solver does not exist. This preserves completed-stage counts, keeps unstarted stages at zero and retains the current count for active/failed stages. Timing and completion fields are unchanged.

Four regression/control tests cover the stage handoff, complete execution, unstarted/active stages and failure. In an isolated Node 22.16.0 harness running the actual TypeScript solver classes, the new cases produced 2 failures and 2 passes before the fix, and 4 passes after it. For that local run, the committed Bun test assertions were adapted to equivalent node:test / node:assert/strict assertions; no solver methods were mocked.

Upstream CI verification

At head ff72ea3f7e57c57dd7e646a65cdcc9ad01b54450, all three upstream checks passed:

Base: a72b99f60680ffbe56a4c72e113ca52c9469921e. This branch is independent of #35 and the pending explicit-failure handling change #30. No production build or browser check is claimed.

Prepared with ChatGPT assistance and the account owner's authorization. No manual human testing is claimed.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

@ugin-man is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant