Skip to content

feat(entrypoints): schema, Neo4j projection and the level-free pass skeleton (unit 1) #153

Description

@rahlk

Problem

TypeScript has no entrypoint fields at all — they were de-advertised in #60 because nothing populated
them. Unit 1 of docs/design/specs/entrypoint-detection.md
(#150) lands the contract so the fields exist at every -a before any detector does: the schema,
the Neo4j projection including the report on :TSApplication, and the level-free post-pass that
stamps them.

Scope boundary

Shape only. Every callable and class is stamped entrypoints: [] / is_entrypoint: false; the report
is empty. No framework gate, no rules file, no matcher — those are units 2-5 (#72).

Goals

  • TSEntrypoint and TSEntrypointReport mirror PyEntrypoint / PyEntrypointReport field for field
  • entrypoints + is_entrypoint on TSCallable and TSType, stamped per-run by a pass (like
    heritage), so the cached tree stays free of them and the wire always carries them
  • entrypoint_report on the application root
  • Neo4j: is_entrypoint / entrypoint_frameworks on :TSClass and :TSCallable;
    entrypoint_frameworks / entrypoint_report_json on :TSApplication — python's exact projection
  • Identical at every -a, asserted by a test

Caveats and known risks

  • Class only, not every TSType. Python stamps PyClass; interfaces, enums, aliases and namespaces
    cannot be entrypoints. The field is declared on TSType (optional) but the pass stamps classes, and
    Neo4j declares it on :TSClass only — so a dead is_entrypoint: false never appears on an interface.
  • Additive, SCHEMA_VERSION unmoved (chore(schema)!: collapse the schema version back to 2.0.0 #144). No existing field or relationship changes.
  • Best-effort by contract. The pass records into report.errors rather than throwing — a failure
    here must lose flags, never the analysis.
  • The report will be honest-but-empty until unit 2: frameworks_detected: [] here means "no gate
    ran", not "no frameworks". Unit 2 is what makes that distinction real.

Definition of done

  • Every callable and every class in the sample-app output carries the two fields, empty
  • An interface carries neither
  • entrypoint_report is present and empty at the root
  • The stamped fields and the report are byte-identical across -a 1..-a 4
  • project() emits the four Neo4j properties and the conformance test accepts them
  • bun test green, container tests run

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions