Skip to content

fix(verify): a build failing the same way before and after the upgrade is not checked, not failed (UPT-122) - #260

Merged
lucasbraum merged 2 commits into
mainfrom
lucasbraum/upt-122-build-failing-identically
Oct 19, 2026
Merged

lucasbraum merged 2 commits into
mainfrom
lucasbraum/upt-122-build-failing-identically

Conversation

@lucasbraum

@lucasbraum lucasbraum commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes UPT-122, from the UpgradeBench v1 pre-run (#256, issue 4, run 0e732dab).

On sCypher-me/cypher-browser (lucide-react 0.468 → 1.57), npm run build starts with pwsh scripts. On machines without PowerShell it exits 127 (sh: pwsh: command not found) before tsc or vite run, both at baseline and after the bump. The lucide-react pack sets requiresBuild, so verification.passed was false and the run exited 1, on an upgrade that matches the human's.

Change

Builds are now compared to the baseline the same way tests are (markPreexisting):

  • markPreexistingBuilds (baseline.ts) marks a failed or timed-out build preexisting: true when the baseline build in the same workspace ran the same command, with the same status and the same output. Only durations (2.4s, 340ms) and clock times may differ; error codes, positions and counts may not.
  • fix and verify skip preexisting builds in both build gates, the required-build gate included. verify compares against the stored baselineBuild.
  • Verified by row: ⚠️ build: failing at baseline, not checked. The build details header says (failing at baseline, not checked).
  • Verdict: no new errors (compared), not verification passed, because a build that checks nothing proves nothing.
  • The required-build publication blocker skips preexisting builds.

Unchanged: a build that passed at baseline and fails after still fails verification, and so does one that failed at baseline but fails differently after (tested).

Interaction with #236 (UPT-110, parent build on failure)

There's no overlap. The parent build only runs when the pack does not require a build (!needsBuild), and it already reports already failing before this upgrade without failing the run. When the build is required, or there's no pack, the baseline build was taken on the same commit before anything changed, so it plays the parent's role. No second parent build is added.

Decisions to flag

  • A required build failing at baseline no longer blocks publication. This follows "compare the build to the baseline as tests are": a test failing at baseline doesn't block a packed run either. The cost is that a contract only the bundler would catch (lucide deep imports) goes unchecked on such repos. The PR says so in its Verified by row, and the verdict is no new errors, not verification passed. Say if you want a required build that wasn't checked to keep blocking publication, or to open as a draft.
  • Without a pack, it still does not publish. It adds no pack yet: the build fails, already before the upgrade, so it cannot verify it, the same rule as for tests failing at baseline. Before this change the run failed verification instead.
  • "The same way" is a match on the whole output with only durations and clock times normalized, not on the first error line: the pwsh output has no error line at all. A failure output that varies in any other way falls back to today's behavior (fails), which is the safe direction.

Reproduction

  • Fork (uptide-bench/sCypher-me--cypher-browser at 9e770c9e): after npm ci --ignore-scripts, Uptide's own buildWorkspaces, run twice, gives the same failed result both times (sh: pwsh: command not found), and markPreexistingBuilds marks the second one preexisting. The full fix run, with the paid agent, was not rerun.
  • Fixtures: required-build.test.ts (the pwsh output, which differs only in its duration, fails the same way at baseline and after → passed, compared, published; it fails differently → still fails) and generic.test.ts (no-pack case → passed, blocked by the new no-pack reason). Both "same way" tests fail without the fix. Two existing tests that mocked a build failing identically at baseline now pass at baseline, so they still test "broken by the upgrade".

Checks

pnpm typecheck, pnpm lint and pnpm test all pass (core: 2370 passed, 32 skipped; CLI: 536 passed).

🤖 Generated with Claude Code

…e is not checked, not failed (UPT-122)

On sCypher-me/cypher-browser (lucide-react 0.468 → 1.57) the build runs
pwsh scripts and fails on machines without PowerShell, both at baseline
and after the bump. Type-check, lint and tests were green, but the
required build failed verification and the run exited 1.

Builds are now compared to the baseline as tests are:

- markPreexistingBuilds marks a failed or timed-out build `preexisting`
  when the baseline build in the same workspace ran the same command
  with the same status and output (digits ignored: durations vary).
- fix and verify skip preexisting builds in the build gates, the
  required-build gate included. A build that passed at baseline and
  fails after, or fails differently, still fails.
- The PR's Verified by row says "build: failing at baseline, not
  checked"; the verdict reads "no new errors", not "verification
  passed"; the required-build publication blocker skips it.
- Without a pack the build is what verifies a bump: a preexisting
  build blocks publication there, as preexisting failing tests do.

Runs whose pack does not require a build keep UPT-110's parent build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
@luxor-code-review

luxor-code-review Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 2 medium

💬 Inline comments (2)

  • 🟡 Preexisting marking skipped by parent-build and reporting paths — run.ts:1352
  • 🟡 Digit-stripped output match masks new build failures — baseline.ts:112

The change introduces baseline comparison for build failures in packages/core/src/fix: new baseline.ts helpers store and match baseline builds and mark failures as preexisting, while run.ts, reverify.ts, publish.ts, no-pack.ts, report.ts, and types.ts thread that flag through the gate, re-verification, publication blockers, and verdict text. Tests in generic.test.ts and required-build.test.ts cover the new behavior, and a changeset plus docs/packs.md document the relaxed gate.

Files Change
packages/core/src/fix/baseline.ts, types.ts Add baseline build storage and preexisting matching for build failures.
packages/core/src/fix/run.ts, reverify.ts Apply baseline matching in the fix and reverify gates, including parent-build/broken checks.
packages/core/src/fix/publish.ts, no-pack.ts, report.ts Filter publication blockers and reporting for preexisting build failures.
packages/core/src/fix/generic.test.ts, required-build.test.ts Add unit tests for the preexisting-build paths.
docs/packs.md, .changeset/build-failing-at-baseline.md Document the relaxed gate and record the changeset.

Reviewed commit: 916c988

@luxor-code-review luxor-code-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR relaxes the required-build gate so builds failing identically at the baseline are marked preexisting and excused, updating gating, reverify, reporting, and publication-blocker logic accordingly.

Key findings

  • 🟡 Preexisting marking skipped by parent-build and reporting paths — run.ts:1352
  • 🟡 Digit-stripped output match masks new build failures — baseline.ts:112

Comment thread packages/core/src/fix/run.ts Resolved
Comment thread packages/core/src/fix/baseline.ts Resolved
… its digits (UPT-122)

Stripping every digit made TS2322 and TS2339, src/a.ts(3,8) and (9,1),
and "Found 1 error" and "Found 2 errors" compare equal, so a new build
error could pass as one the baseline already had. Only durations and
clock times are normalized now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
@lucasbraum
lucasbraum merged commit 8ea1a87 into main Oct 19, 2026
28 checks passed
@lucasbraum
lucasbraum deleted the lucasbraum/upt-122-build-failing-identically branch October 19, 2026 16:46
@uptide-release uptide-release Bot mentioned this pull request Oct 19, 2026
lucasbraum pushed a commit that referenced this pull request Oct 19, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## [email protected]

### Minor Changes

- [#261](#261)
[`93f029e`](93f029e)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Sentry 10 → 11:
report every `Sentry.init` whose data collection widens because
`dataCollection` is unset, citing the migration guide, and give the
agent the guide's exact v10 baseline. After a fix, a site counts as kept
only when every category is at least that restrictive, so a partial edit
such as a cookie deny list stays open in the PR instead of being
reported as kept. The agent now keeps privacy settings at their most
restrictive value, or leaves them as a decision, when no cited edit
exists.

- [#253](#253)
[`e48373d`](e48373d)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Find Stripe's
clover billing-mode default change at subscription creation sites,
across the six affected APIs. Respect request API-version pins, preserve
classic billing at documented parameter paths, and report unresolved
parameters or semantics as decisions. Verify quoted sources against
full-page hashes at pack-build time without vendoring Stripe pages.
Score the dms-saas silent billing change in UpgradeBench.

### Patch Changes

- [#260](#260)
[`8ea1a87`](8ea1a87)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - A build that
fails the same way before and after the upgrade (same command, status
and output; only durations and clock times may differ) no longer fails
verification. Builds are now compared to the baseline the same way tests
are. The PR says `⚠️ build: failing at baseline, not checked`, and the
verdict reads `no new errors`, not `verification passed`. A build that
passed at baseline and fails after the upgrade still fails, and so does
one that fails differently. Without a pack, a run like this still does
not publish, because its build cannot verify the bump.

- [#259](#259)
[`0db73c8`](0db73c8)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Let the agent add
a property the upgraded types made required to a test fixture: only to
the object the compiler's TS2739, TS2740 or TS2741 error points at, and
only with a literal value. Every other test input change is still
rejected. Each such property is listed under "Tests changed: review" in
the PR body and in report.json (file, line, property and the value the
agent chose). Name a test that asserts a dependency default the upgrade
changed (Sentry's `dataCollection` and `attachStacktrace`) under
"Decisions for you", instead of leaving it to fail unexplained.

- [#251](#251)
[`773dbbe`](773dbbe)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Calibrate the SDK
pre-run cost estimate from recorded migrations, accounting for shared
rule knowledge instead of charging a full session allowance per site.
Keep the configured spending limit and per-call budget enforcement
unchanged.

- [#258](#258)
[`3a4898f`](3a4898f)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Discover
independent nested projects when fixing a dependency absent from the
root project. Run installation, migration and verification in the
selected project's directory, preserving its lockfile and package
manager. When several projects declare the dependency, name their
manifests and require an explicit directory.

- [#257](#257)
[`7b9ed7f`](7b9ed7f)
Thanks [@lucasbraum](https://github.com/lucasbraum)! - Run pinned npm
through Corepack when local npm differs. When the pin is unavailable,
allow local npm with a compatible v3 lockfile, record the fallback in
the report, and reject frozen installs that rewrite the lockfile.

Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
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