Skip to content

refactor(core): remove duplicate PREnrichmentData / BatchObserver interface declarations #2028

@harshitsinghbhandari

Description

@harshitsinghbhandari

Pre-existing issue (surfaced during #2026 review)

PREnrichmentData and BatchObserver are each declared twice in the core types. TypeScript interface merging makes this compile, but the duplication is confusing and the first copy of each is an older, less-complete version.

Current location (after the #2026 types split): packages/core/src/types/scm.ts

  • PREnrichmentData — lines ~126 (older) and ~330 (current, includes ciChecks)
  • BatchObserver — lines ~155 (older) and ~361 (current)

Origin: this is NOT introduced by #2026 — the duplicates already existed in the monolithic types.ts on main (lines 906/1110 and 935/1141). The split relocated them verbatim, which is why they're now more visible side-by-side in scm.ts.

Proposed fix

Delete the older/incomplete first declaration of each interface, keeping the complete version. Verify the merged shape is identical to today's (so no behavior change) — i.e. the older copy is a strict subset of the current one.

Why a separate issue

#2026 is a pure, verbatim relocation with a guaranteed-unchanged public surface; deleting declarations there would break that invariant and the byte-for-byte review guarantee. This cleanup is a small, independent follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions