Relationships
#4756 Swampify: comparison v3 records the latest run, build sessions, unrecorded model usage and occurrences with no calls
Opened by skunk-ape · 11/14/2026· Shipped 11/14/2026
Part of the Swampify onboarding project. swamp-club#4755 (swamp-extensions, @swamp/agent-sessions compare) needs the comparison to say more than v2 can hold. Core's SwampifyComparisonV2Schema (src/domain/agent_sessions/swampify.ts, from #4650) is a strict object, so new fields need comparison v3. swamp-club#4755 waits for this release.
Why
From an external tester's Swampify run: the comparison showed zero tokens for a workflow whose steps call a model, described only the first (wrong) run after a fix, counted only the first session as build cost, and counted an occurrence with no attributed calls as zero. compare can now measure all of that from records (agent-runner step usage via swamp workflow history outputs, fixing sessions from session records), but v2 has nowhere to put it.
Changes
Comparison v3 (schemaVersion: 3), with v2 still read:
swampRun.unrecordedSteps(optional count): model steps in the run whose token usage was not recorded, so zero tokens is not reported as a measurement.latestRun(optional): the latest successful run of the target when it differs from the first, withstartedAt,wallMs,tokens,outcomeand optionalunrecordedSteps. Break-even is computed against it when present.build.sessions(integer, at least 1): how many agent sessions the build took, the first build session plus later sessions that fixed the target.history.noCallOccurrences(optional count): occurrences that attributed no calls, reported and left out of the per-occurrence figures rather than counted as zero.
Also:
- The comparison summary and tags carry what the page needs (for example the latest run's outcome and the build session count).
- The Swampify page shows the new fields: both runs, the number of build sessions, and a note when model usage was not recorded or occurrences had no attributed calls.
- The refinements stay:
chorewithinwholeTurns,perOccurrencepresent exactly when occurrences are counted, break-evenlow<=high.
Out of scope
- How
comparecomputes the figures (swamp-club#4755, swamp-extensions).
Done when
- v3 parses with and without each optional field; v2 items still read; a v4 item is skipped as newer.
- Unit tests cover the new fields' validation and the summary.
- The page renders a v3 comparison with both runs, build sessions and the unrecorded-usage note, and still renders v2.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.