Skip to content

fix(deps): migrate fake-lib call sites - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
self-maintain/fake-lib
Open

fix(deps): migrate fake-lib call sites#2
github-actions[bot] wants to merge 1 commit into
mainfrom
self-maintain/fake-lib

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Automated dependency fix: fake-lib

This PR was opened by Patchery. An AI agent read the
breaking change for fake-lib, migrated the call sites to the new API, and ran the tests.

Verification

Step Result
npm test before the fix failed (exit 1)
npm test after the fix passed
Were any test files modified No - enforced by CI

Changed files

  • test-fixture/app.js
test-fixture/app.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

What the agent said

The migration is complete and the tests pass. Here's the report:

What changed in fake-lib (from node_modules/fake-lib/CHANGELOG.md)

fake-lib 2.0.0 (breaking):

  • Removed formatPrice(amount) — the single-argument form no longer works and throws a TypeError.
  • Added formatPrice(amount, currency) — now requires an explicit ISO currency code (e.g. "USD") and returns a locale-formatted string including the currency symbol:
    • Before (1.x): formatPrice(19.9)"19.90"
    • After (2.x): formatPrice(19.9, "USD")"$19.90"

Call sites found

A search for formatPrice across the project's own source found exactly one affected call site:

  • app.js line 4 (inside renderCartTotal) — used the removed one-argument form formatPrice(amount).

(The only other references were in node_modules/fake-lib itself and in the test file, neither of which I touched.)

File changed

app.js — the single migration edit:

 function renderCartTotal(amount) {
-  return `Total: ${formatPrice(amount)}`;
+  return `Total: ${formatPrice(amount, "USD")}`;
 }

Why "USD": the project's test (app.test.js, which defines correct behaviour) asserts renderCartTotal(19.9) === "Total: $19.90". The new formatPrice(19.9, "USD") returns "$19.90", exactly matching that expectation. This is the minimal change — no signatures, control flow, or error handling were altered, and no code was deleted or bypassed.

Final test output

> toy-project@1.0.0 test
> node app.test.js

PASS: app.test.js

npm test passes cleanly — the project's source is now fully migrated to the fake-lib 2.0.0 API.

Test output after the fix

show
> toy-project@1.0.0 test
> node app.test.js

PASS: app.test.js

Model: glm-5.3 - turns: 10 - cost estimate (Anthropic pricing; actual cost may differ if a different provider was used): $0.1958

Needs human review. This PR was opened automatically, but it is never merged automatically.

Generated with Patchery — catches breaking changes, migrates call sites, and verifies against your tests.

Fixed fake-lib (1 file(s)), tests pass.
@github-actions
github-actions Bot force-pushed the self-maintain/fake-lib branch from ae25f16 to dc3922e Compare September 5, 2026 20:48
ugursku added a commit that referenced this pull request Sep 5, 2026
Three corrections, all in the same direction: nothing on the page should
imply more evidence than it puts in front of the reader.

The status ledger said "three are waiting" about open-source pull
requests while the page shows two. There is in fact a third open
contribution, but it is not on this page, and a number the reader cannot
check is worth less than a smaller one they can. Now reads "the two
below are waiting".

The Proof section's "All three are still open" was already correct — it
refers to the three pull requests shown there, which is exactly the set
the live audit verifies. The audit's own wording now says so explicitly
rather than leaving "three" to be inferred.

The breaking-changes ticker listed twelve packages with no context, which
could be read as twelve things Patchery has handled. It has handled none
of them. The strip now carries a caption saying it is a sample of real
breaking releases chosen to show how ordinary this is, that these are not
packages Patchery fixed, and which two of them were in fact migrated —
by hand, with the pull requests linked below.

Figures re-checked against the GitHub API: #2 is
open with 1 file and +1 -1, ChainForge#416 and ToolJet#17829 are open and
unmerged. The cost and turn count still match the run that produced them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ugursku added a commit that referenced this pull request Sep 6, 2026
Read the whole project vault and put on the page the one thing it
records that the site never said: the runs that came back empty.

New section 06, "What stopped it" — four runs on repositories we do
not own, all of which wrote nothing, with the turn count of each drawn
as one tick per turn beside a nought. SocratiCode (25 turns, $0.88),
terminal-ai (15, 22 and 40, each attempt deeper than the last, cut off
twice by our own stall detector at the moment it was about to write),
postiz-agent (a real filed bug our newer Node had already healed, so
the baseline passed and the agent never ran) and activepieces (never
started). The closing argument is that none of them is a wrong fix,
stated without crediting gates that never ran.

Section 04 now states the off-limits check's own blind spot: it reads
which files moved, never what the change did to them. src/auth/validate.ts
is a chip you can try, and it is allowed.

Corrections found while checking the new copy against the sources:

- Pull request #2 is 10 turns and $0.1958, not 11 and $0.1213. The
  correct figures are in the pull request's own body, which the page
  links to. Fixed on the page and in the README, and audit.js grew a
  sixth check that reads them out of that body so the page cannot
  drift from it again.
- Section 03 quoted an eight-turn stall threshold; the product uses
  fifteen. It also called the 25-turn run confused, which the record
  does not support.
- Section 08's "every number comes from a run you can open" stopped
  being true the moment section 06 landed, and now says which numbers
  do not.
- The blind spot is deferred, not next in the queue. Says so.
- A skip returned by an audit check was being counted as a failure.

Mobile: below 1080px the header links did not fit, and below 860px they
vanished with nothing in their place. They are replaced by a numbered
<details> index — no script opens it, so no script can break it — with
48px rows, a paper-mode palette and the brand wordmark dropped under
460px. Verified at 320, 360, 375, 390, 430, 600, 768, 844 landscape,
900, 1080, 1100, 1240 and 1440: no horizontal overflow anywhere.

Also fixes .spec__k, which used the CSS Modules `composes` keyword and
therefore had no styles at all on the live site.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant