Skip to content

Remove useless comments and tests - #149

Merged
skyfallwastaken merged 1 commit into
neofrom
cleanup
Sep 26, 2026
Merged

skyfallwastaken merged 1 commit into
neofrom
cleanup

Conversation

@skyfallwastaken

Copy link
Copy Markdown
Member

Removes comments that restate the code and tests that only check lookup tables. Behaviour is unchanged; only comments, tests, and imports those deletions left unused are removed.

Comments

  • References to the previous gateway, removed or rephrased to state the fact itself, in:

    • api-keys.ts, users.ts, proxy.ts, health.ts, rate-limit.ts, etag.ts, webhooks.ts, moderations.ts;
    • the header of allowed-replicate-model-versions.ts;
    • the header of lib/format.ts ("Ported from the old gateway").

    Facts that still matter stay, e.g. "Defaults to $3", RateLimit-* following IETF draft-6, and the balance fields kept for monitors.

  • Section dividers in replicate.ts and billing/locks.ts.

  • Doc comments that repeat a name or signature, in lifecycle.ts, request-events.ts, hackclub.ts, metered-body.ts and replicate/metering.ts.

  • A misleading test comment in metered-body.test.ts: "Today's Replicate metering lost…" became "…once lost…", since the bug is fixed.

Tests deleted

  • replicate/pricing.test.ts, "describePricing summarises both pricing kinds": it asserts the exact text of a display helper.
  • routes/replicate.test.ts, "every allowlisted version belongs to an allowlisted model": it compares two config tables.

Tests guarding money arithmetic, streaming and cancellation, auth, CSRF, SSRF, billing invariants and end-to-end flows are untouched. "JEV_MODEL accepts only the Jev family" stays too, because that regex is a billing guard.

Screenshot

diffstat and test run

🤖 Generated with Claude Code

@skyfallwastaken
skyfallwastaken merged commit 53b65cb into neo Sep 26, 2026
3 checks passed
@skyfallwastaken
skyfallwastaken deleted the cleanup branch September 26, 2026 19:36
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