Skip to content

Delete the dead TS_PREFIX constant on main #89

Open

Description

@rahlk

Is your feature request related to a problem? Please describe.

TS_PREFIX is dead on main. It is declared and re-exported, and nothing reads it:

src/build/neo4j/schema.ts:46   export const TS_PREFIX = "TS";
src/build/neo4j/index.ts:6     export { SCHEMA_VERSION, TS_PREFIX, ... } from "./schema";

git grep TS_PREFIX main -- src test scripts returns exactly those two lines — the declaration and its re-export. No third hit.

It is a leftover, not an oversight. On the 0.x line the same constant is live:

v0.5.0:src/build/neo4j/schema.ts:48   export const twinOf = (label) => `${TS_PREFIX}${label}`;
v0.5.0:src/build/neo4j/schema.ts:58   if (l === "Symbol" || l.startsWith(TS_PREFIX)) continue;

The v2 rewrite dropped twinOf/withTwins and declares labels as literals instead (label: "TSApplication", "TSModule", … at schema.ts:56-128), which orphaned the constant.

Describe the solution you'd like

  • Delete TS_PREFIX from src/build/neo4j/schema.ts and from the index.ts re-export list
  • Confirm schema.neo4j.json is unchanged after bun run gen:schema — proof that nothing observable moved

Describe alternatives you've considered

Not stated in the original issue.

Additional context

Scope boundary

Deletes a dead constant on main only. Does not:

Caveats and known risks

  • It is a public export. Anything importing TS_PREFIX from the package breaks. src/index.ts is a CLI main() with no library exports, so there is no published surface today — but check before deleting rather than assuming.
  • Do not "fix" it by using it. The obvious alternative — wire it back in so labels are built from the prefix rather than written literally — silently pre-decides the prefix scheme that neo4j: relationship types are not namespaced, unlike every other analyzer's #88 exists to settle. Delete, or leave it; do not re-activate it here.
  • Removing it slightly increases the chance someone re-invents the constant when neo4j: relationship types are not namespaced, unlike every other analyzer's #88 lands. That is acceptable: a constant is cheap, a dead export that looks like an existing convention is misleading.

Definition of done

  • git grep TS_PREFIX on main returns nothing under src/.
  • bun test and bun run typecheck pass.
  • bun run gen:schema produces a schema.neo4j.json byte-identical to the committed one.

Activity

  1. added
    refactorCode change without behavior change
    on Aug 6, 2026
  2. added
    choreRepo upkeep: config, templates, tooling
    on Sep 15, 2026
  3. changed the title [-]chore(neo4j): delete the dead TS_PREFIX constant on main[/-] [+]Delete the dead `TS_PREFIX` constant on main[/+] on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreRepo upkeep: config, templates, toolingrefactorCode change without behavior change

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions