PolicyEngine / PolicyEngine/calibration-diagnostics

Remove stray committed .next build traces and close the gitignore gap that let them in

Open Beginner friendly
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
1d 9h
Merged PRs (30d)
13

Description

Two Next.js build-trace files are tracked at the repository root. They are regenerable build artifacts, they were committed by accident, and nothing reads them.

.next/trace        819 B
.next/trace-build  217 B

To be clear about scope: the actual build output is not committed. frontend/.next/ is correctly ignored. This is only the two stray root-level trace files.

Diagnostics

1. Exactly two .next files are tracked, both at the root — none under frontend/.

$ git ls-files '.next*'
.next/trace
.next/trace-build

$ git ls-files 'frontend/.next*'
(empty)

2. The ignore rule is scoped to frontend/, so a root-level .next/ slips through.

.gitignore:11 reads frontend/.next/, which matches the app directory but not the repo root:

$ git check-ignore -v 'frontend/.next/'
.gitignore:11:frontend/.next/	frontend/.next/

$ git check-ignore -v .next/trace
(no match, exit 1)

3. They entered in a single unrelated commit.

$ git log --oneline -- .next
630d24d Correct four externally-audited benchmark values in the national-only override (#85)

$ git show --stat 630d24d
 .next/trace                                        |  1 +
 .next/trace-build                                  |  1 +
 ...0-refit-57k-71a0887-national-only-20260701.json | 64 +++++++---------------
 3 files changed, 22 insertions(+), 44 deletions(-)

Build artifacts have no relationship to a benchmark-value correction; they were almost certainly swept in by a broad git add. Commit: 630d24db007c0dfad0775105fe4d157c8d73638e (#85).

4. The contents show a failed build run from the wrong directory.

.next/trace-build is a single trace span:

{"name":"next-build","duration":3171290,"tags":{"buildMode":"default","version":"16.2.10","bundler":"turbopack","failed":true}}

"failed":true, and the artifacts sit at the repo root rather than in frontend/. That is the signature of next build being invoked one directory up from the app. The run got far enough to write traces and no further, which is why there is no accompanying build tree.

Why they should go

  • Not required for deployment. Vercel clones the source and runs the build itself; a committed .next is not consumed. These two files are profiling/telemetry traces (next build --profile), not build output — they are inert either way.
  • Not conventional. create-next-app gitignores .next by default; it is machine-specific and regenerable.
  • The gap that let them in is still open, so the same mistake will recommit them.

Proposed fix

git rm -r --cached .next

and tighten .gitignore:11 from

frontend/.next/

to

.next/

An unanchored .next/ pattern matches a directory of that name at any depth, so it covers both the root and frontend/ and closes the gap for good.

Contributor guide

Open the contributing guide

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.

Research direction

Start with .gitignore:11 and the tracked paths listed by git ls-files '.next*'. Remove the two root-level .next trace files from Git and broaden the ignore rule to .next/. Verify the files are no longer tracked and that git check-ignore matches both root and frontend build directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, next.js, typescript
Domain
build-system
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.