Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Nondeterministic codegen: Next.js app-page-turbo.runtime.prod.js and server.js objects differ between identical compiles

Open
#12,693 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active

Research direction

Start with the cpar lane’s full.sh setup and reproduce by compiling the Next.js standalone server twice with PERRY_NO_AUTO_OPTIMIZE=1, then compare per-module objects. Trace id or symbol-suffix assignment during lowering or codegen for app-page-turbo.runtime.prod.js and server.js; the issue does not name the responsible source file or test location. Done means identical inputs produce byte-identical objects across runs and a fixture test verifies this.

Written by the indexing model from the issue text.

Description

Found by the cpar lane (compile parallelism) while checking byte-identity.

Compiling the same Next.js standalone input three times on the same base (b3fed79c8a lineage, before the scheduler change) gives different module objects for app-page-turbo.runtime.prod.js and server.js. Every other module (762 of 764) is byte-identical across runs. The diff shows wrapper and object-method numbering that changes between runs. That points to iteration over an unordered container (e.g. a HashMap/HashSet) when ids or symbol suffixes are assigned during lowering or codegen for those modules.

Why it matters: object caching and A/B measurement both assume that the same input gives the same bytes.

Repro: compile the Next standalone server (env as in the nextrun lane's full.sh) twice with PERRY_NO_AUTO_OPTIMIZE=1, then md5 the per-module objects. Fix: give the id/suffix assignment a deterministic order (source order, or a sort by a stable key), then add a test that compiles a fixture twice and compares the objects.

Dominant language
Rust
Stars
4.9k
Forks
166
Avg merge
3h 23m
Merged PRs (30d)
911

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.