Skip to content

Fix pm-aggregator typecheck: 8 errors across 5 files (#15718) - #16351

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
queue/24370-15718-typecheck
Nov 27, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
queue/24370-15718-typecheck

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the Typecheck step failure of the pm-aggregator workflow (run 46065979204, head d4b6f2f): bunx tsc --noEmit reported 8 errors across 5 files, so the aggregator test step never ran.

Cause (verified against the run log, reproduced locally pre-fix)

  • src/work-mobile-views.ts(288-290) TS2678 x3: dead switch cases (needs_triage/recent/cold_backlog) unreachable after the view-level early returns narrow MobileViewId. Removed; behavior-preserving by construction.
  • test/aa-explorer-computations.test.ts(515,534) TS7006 x2: untyped byCost/bandOf lambdas. Annotated as (p: (typeof rows)[number]).
  • test/actions-exec-apply-alerts.test.ts(59) TS2353: incident literal carried state/attempts/updatedAt outside the Pick contract buildApplyFailureIncident declares. Trimmed to the contract.
  • test/actions-exec-apply.test.ts(194) TS2322: decide mock's ok widened to boolean against the narrowed DecideResult union. Annotated Promise<DecideResult>.
  • test/work-mobile-views.test.ts(23) TS2459: type WorkView imported from a module that only holds it locally. Imported from defining module work-projection.ts (type-only; runtime dep unchanged).

Evidence

  • Before: bunx tsc --noEmit in pm-stack/aggregator reproduced all 8 errors on current origin/main; matches run 46065979204's log.
  • After: bunx tsc --noEmit exit 0.
  • PM_AGG_SOURCE=fixtures PM_AGG_DEV=1 bun test on the 4 touched test files: 67 pass, 0 fail.
  • All edits are type-level or dead-code removal; runtime behavior unchanged. Full local bun test shows only seat-environment timeouts (dashboard-assembly deadlines, ~381s wall on this seat vs 46s on CI), none in touched files.

Merge danger

Low: no runtime code paths change (one unreachable-branch deletion, four test-only type corrections). Remaining CI aggregator-test failures (loadConfig x6, resolveBrokerAnswer x4, schedule-registry x3 per run 46043832873) live in untouched files owned by other tracks; this PR unblocks the Typecheck step so those surface again.

Task: 24370 (repo-health-code-pilot).

{
  "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-27T23:03:47Z",
    "session_id": "ses_e5de28b39c7ffelCdE4agb6tHs",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/24370-15718-typecheck",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/24370-15718-typecheck",
      "repo": "developing-today/code",
      "branch": "queue/24370-15718-typecheck",
      "sha": "b61c88985b187a6993b82bae1c8e54a0ae0e2537"
    },
    "auth_subject": "oc-code-01",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Run 46065979204 fails the Typecheck step (bunx tsc --noEmit) with
8 errors; the aggregator test step never runs. Fix at cause:

- src/work-mobile-views.ts: drop 3 dead switch cases
  (needs_triage/recent/cold_backlog). The view-level early returns
  above narrow MobileViewId, so these cases are unreachable (TS2678).
  Behavior-preserving by construction.
- test/aa-explorer-computations.test.ts: annotate byCost/bandOf
  params as (typeof rows)[number] (2x TS7006).
- test/actions-exec-apply-alerts.test.ts: trim the incident literal
  to the Pick contract buildApplyFailureIncident declares (TS2353).
- test/actions-exec-apply.test.ts: annotate the failing decide mock
  as Promise<DecideResult> against the narrowed union (TS2322).
- test/work-mobile-views.test.ts: import type WorkView from its
  defining module work-projection.ts (TS2459; type-only, runtime
  dep unchanged).

Verification: bunx tsc --noEmit exit 0 (was 8 errors); 67/67 tests
pass across the 4 touched test files. Remaining CI aggregator-test
failures (loadConfig/resolveBrokerAnswer/schedule-registry) are in
untouched files owned by other tracks.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1836d741-6d12-47d4-8144-9c7b249d562c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Lane 1707-E (landings discovery, charlie ADVANCE 2026-11-27 17:07 CST) — claiming verification + merge shepherding for this PR.

Claim-scan firsthand: ALL comments (1 — CodeRabbit skip only) and ALL reviews (0) on this PR; no live claim. Linked issue #15718's latest note (oc-code-03, task 24370, 23:04:31Z) records this PR as open with the fix complete; no verification dispatch is recorded on the PR itself.

Gate I will merge on: PR OPEN/non-draft/CLEAN/MERGEABLE at exact head b61c88985b187a6993b82bae1c8e54a0ae0e2537 (stable across two reads) + a passing exact-head verification run. Dispatching fleet-command now: bunx tsc --noEmit plus bun test on the 4 touched test files in pm-stack/aggregator (mirrors the PR body's evidence, on the exact head in a clean runner).

@developing-today-fleet
developing-today-fleet Bot merged commit 608e8db into main Nov 27, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the queue/24370-15718-typecheck branch November 27, 2026 23:56
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Lane 1707-E — MERGED.

  • Gate evidence: fleet-command run 46084170402 (dispatch 1707E-16351b) completed SUCCESS on the exact head: bun install && bunx tsc --noEmit clean, and bun test on the 4 touched test files 67 pass / 0 fail (log-verified firsthand).
  • First dispatch 46081441497 failed in the runner only: without bun install the checkout lacks the bun type definitions (TS2688) and the unpinned tsc rejects baseUrl (TS5102) — the two pre-existing repo-wide config errors, unrelated to this diff; the corrected dispatch with bun install is the passing run above.
  • Head b61c88985b187a6993b82bae1c8e54a0ae0e2537 stable across two reads immediately before merge (OPEN/non-draft/CLEAN/MERGEABLE); merged with --match-head-commit pinning that head.
  • Merge commit: 608e8dbea5acbb282aa836643d477c8bdb17ca51, merged 2026-11-27T23:56:23Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants