Repository navigation
fix(workflow): keep the team revision of unchanged workflow bytes - #1214
Merged
jeff-r2026 merged 4 commits intoOct 20, 2026
Merged
Conversation
|
No findings in the specified diff. The PR description includes sufficient testing: a representative real-CLI before/after record, targeted unit tests, type checking, lint, and a reports-branch e2e run. Additional provider/agent coverage is explicitly deferred to CI. Review was read-only; I did not run, build, or install anything from the PR. |
jeff-r2026
approved these changes
Oct 20, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow-up to #1201. That PR took a workflow's
teamRevisiononly from the current HEAD. When HEAD moved to an unpushed commit that did not touch the workflow, the next pull or push rewrote the cache entry without its revision. The run then published noteamRevision, although the earlier commit still holds those bytes and origin still reaches it. This is the normal state in self mode, where.teamai/lives in the project repo.An equal
sourceHashmeans equal bytes. The kept loop already removed any earlier revision that origin does not reach, so a carried revision always stores the cached bytes and is reachable. A test now pins this ordering.Also from the #1201 review:
remotelyReachableRevisionresolves HEAD withgetHeadCommit, the helper [feat] Record the agent each workflow step ran as #1176 and [feat] Run benchmark suites as workflows #1180 use for the team commit.cat-file -eandgit showin a fresh clone of origin, not in the clone that produced the value.Evidence
Before:
keeps a verified revision when an unrelated unpushed commit moves HEADfails onmain:Real CLI, built from
main. Self mode,teamai pull, an unrelated local commit, thenteamai pullandteamai workflow start verify --driver local:After: the same script on this branch:
drops an unchanged workflow revision that the team remote no longer reachesfails when the kept loop cleans only invalid files (1 failed, 172 passed). It passes with the code as it is.npx vitest run src/__tests__/workflow-cache.test.ts src/__tests__/workflow-records.test.ts: 216 passed.npx tsc --noEmitandnpm run lintare clean.npm run test:e2e -- src/__tests__/e2e/workflow-records-reports-branch-1083.test.ts: 1 passed.I did not run the full
npx vitest runlocally. CI covers it, along with the other providers and agents.Merge Danger
Door: two-way
Only the cache write path changes. Records keep the same shape. Reverting returns to the earlier behavior, which omits the revision.
Blast Radius: narrow
Workflow cache entries and the
teamRevisionof run records. A run can now publish a revision in a case where it used to publish none. The revision still has to be reachable from origin and store the exact bytes.