Skip to content

pm-aggregator: decisions.ts declares listDecisionSets twice (TS2323/TS2393), hidden behind the broken typecheck #16856

Done

Description

@dezren39

Problem

pm-stack/aggregator/src/decisions.ts declares the exported function listDecisionSets twice in one module: line 757 and line 1242 (both export async function listDecisionSets(file: string): Promise<DecisionSet[]>). TypeScript reports TS2323 (cannot redeclare exported variable) and TS2393 (duplicate function implementation) for both sites.

Verified at merge commit c61f509 (current main content): grep -c "export async function listDecisionSets" on the file returns 2.

Why it has gone unnoticed

Bun's transpiler tolerates the duplicate (the later definition wins at runtime), so the test suite passes. The project's typecheck would catch it, but the typecheck cannot currently run at all: the tsconfig fails under the pinned TypeScript 7 (TS5102, #16835), and in CI the typecheck step is skipped whenever the test step fails (#16785 keeps it failing). This duplicate is the next error in line once #16835 is fixed.

Evidence

Fleet-command run 46281012731 (developing-today/fleet), target developing-today/code at c61f509, running tsc with the tsconfig's own flags (project config bypassed per #16835):

src/decisions.ts(757,23): error TS2323: Cannot redeclare exported variable 'listDecisionSets'.
src/decisions.ts(757,23): error TS2393: Duplicate function implementation.
src/decisions.ts(1242,23): error TS2323: Cannot redeclare exported variable 'listDecisionSets'.
src/decisions.ts(1242,23): error TS2393: Duplicate function implementation.

Fix shape

Diff the two bodies, keep the one callers intend (or merge them if they have diverged), and delete the other. Check callers of listDecisionSets against both bodies before choosing: if the bodies differ, the runtime has been using the second one, and deleting the first is the behavior-preserving choice.

Filed from lane 0647-L15R while completing the typecheck verification for #12351. Not enqueued: the repo-queue broker tunnel from this seat is down; recorded here per the file-and-enqueue rule.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T16:13:32Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "5d959fc685bbfcdcd72c5372fd0c1343cc279e30"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    Lane 0647-L11 claim (Xaltha seat, 2026-11-29). Taking #16856: diff the two listDecisionSets bodies in pm-stack/aggregator/src/decisions.ts, keep the runtime-effective one (the later definition wins under Bun; deleting the first is the behavior-preserving choice if they have diverged), delete the other, and verify with tsc (project config bypassed per #16835) plus the aggregator test suite via remote dispatch.

  2. added a commit that references this issue on Nov 29, 2026
    b532eed
  3. added a commit that references this issue on Nov 29, 2026
  4. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    Landed: PR #16881 merged 2026-11-29T16:46:06Z (merge commit 06ae739); this issue auto-closed via the PR's Closes line. Verification at head b532eed (fleet-run 46285445108): decisions test family 91 pass / 0 fail, tsc free of TS2323/TS2393; the run's only red was two pre-existing server.ts TS2339 errors, filed as #16901. Current main confirmed to carry exactly one listDecisionSets declaration. — lane 0647-L11

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