Skip to content

leiden cpm.ts/modularity.ts duplicate fget/iget typed-array helpers (missed by titan batch 10) #1735

Description

@carlos-alm

While extracting shared typed-array-access helpers (`fget`/`iget`/`u8get`) from `src/graph/algorithms/leiden/{partition,adapter,index}.ts` (Titan phase 3, sync.json abstraction), found that `src/graph/algorithms/leiden/cpm.ts` and `src/graph/algorithms/leiden/modularity.ts` also each define their own private, identical `fget`/`iget` helpers:

  • `src/graph/algorithms/leiden/cpm.ts:30-35`
  • `src/graph/algorithms/leiden/modularity.ts:34-39`

These two files weren't part of the titan-gauntlet audit batch (batch 10 covered `model.ts` + the three leiden files above only), so this duplication wasn't flagged in `gauntlet.ndjson`.

Now that `src/graph/algorithms/leiden/typed-array-helpers.ts` exists (introduced in the phase-3 commit), `cpm.ts` and `modularity.ts` should import `fget`/`iget` from it instead of maintaining their own copies, for the same "prevent silent drift" reasoning that motivated the phase-3 extraction.

Low risk, small diff — drop the two local function definitions in each file and import from the shared module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions