Skip to content

tmp-idempotency-check.js is a leftover ad hoc debug script committed to the repo root #425

Description

@abayomicornelius

Where: tmp-idempotency-check.js (repo root).

What's wrong: this file is a one-off manual test script — it monkey-patches
Node's internal Module._load to stub out ./iot, ./satellite-sources,
./scoring, and ./registry, then calls
require('./src/lib/scoreService').updateScoreForProject(42) and
console.logs the result. It isn't referenced by any package.json
script, any file under src/__tests__/, any CI workflow, or any
documentation:

$ grep -rn "tmp-idempotency-check" . --include="*.json" --include="*.yml" --include="*.md" --include="*.ts" | grep -v node_modules
(no results)

It's exactly the kind of scratch file .gitignore's tmp-* pattern would
normally exclude — and .dockerignore does have a tmp-* entry — but
.gitignore has no equivalent pattern, so this one was committed to
source control (and .gitignore's own fix.md entry suggests scratch
files like this are a recurring, usually-caught pattern in this repo's
workflow — this one just slipped through).

Suggested fix: delete the file (its purpose is already covered by the
real idempotency.test.ts suite), and add a tmp-* pattern to
.gitignore to catch future scratch files before they're committed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueGood for newcomerslowCosmetic, minor improvement, code quality, documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions