Skip to content

console: split edge.ts into five stores (#16255 slice 22) - #17029

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16255-edge-split
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16255-edge-split

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

Slice 22 of #16255 (production-line guard): pm-stack/console/edge/src/edge.ts was 3,742 lines, over the 2,500 limit. Five clusters move into sibling modules along the file's own seams, following the pattern of slices 18/19 (PRs #16988/#16995) — each store is fed by the Edge through a small host interface of closures, so a store asks at the time it acts. No behavior change.

  • relays.ts (140 lines): relay markers for actions asked of a host
  • config-store.ts (244): what this side goes by, route flips, the owner's settings
  • machines.ts (232): machine keys, enrolment, worker checks, queue-transport probes
  • held.ts (755): what is held, handed over, and taken to do, plus the hold/keep intake
  • wake.ts (278): scheduling, the alarm, and change/trend watching

edge.ts is now ~2,468 lines and no longer appears in the guard's over-limit list (the guard still fails overall on the files other slices own). The Edge keeps thin delegating wrappers only where its public surface or many call sites use them (config(), setOwnerSetting/clearOwnerSetting, alarm(), lastWorkerChecks(), lastQueueTransport()); imports the moved clusters no longer need were dropped from edge.ts.

Local evidence (iteration only; the remote gate is the record): tsc -p tsconfig.json clean; local bun test run shows no failure that a pristine origin/main run on the same seat does not also show (this seat times out a set of environment-sensitive tests under load in both).

Gate: fleet-command run of the console suite (bun test from pm-stack/console) + typecheck at this head, dispatched by lane 0640-EW; verdict will be posted here and on #16255.

Refs #16255 (does not close it: atlas-search/fleet-search parity, fleet-cert cli.rs, fleet gh.rs (slice 20), and id-cli serve.rs (slice 21) remain).

{
  "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-30T00:22:55Z",
    "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": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

edge.ts was 3,742 lines, over the 2,500 production-line limit. Five
clusters move into sibling modules along the file's own seams, each
fed by the Edge through a small host interface, no behavior change:

- relays.ts: the relay markers for actions asked of a host
- config-store.ts: what this side goes by, and the owner's settings
- machines.ts: machine keys, enrolment, worker checks, transport probes
- held.ts: what is held, handed over, and taken to do
- wake.ts: the waking — scheduling, the alarm, and what changed

edge.ts is now 2,467 lines. The Edge keeps thin delegating wrappers
only where its public surface or many call sites use them.
@coderabbitai

coderabbitai Bot commented Nov 30, 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: 8fb1cb68-a8ad-49e1-92aa-4eaf78c2d94c

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

Gate adjudication — lane 0640-EW, log of run 46328646691 read firsthand:

  • Console suite: GREEN — 892 pass / 0 fail (295,127 expect() calls, 42 files, 25.72s in the executor). The split is behavior-verified at this head.
  • The run's failure conclusion comes from the typecheck leg of my own gate command: ./edge/node_modules/.bin/tsc died instantly with /usr/bin/env: 'node': No such file or directory (exit 127) — the executor has no node on PATH and the typescript shim needs it. The typecheck never executed; that is an environment artifact, not a code signal. (The same tsconfig typechecks clean locally.)
  • Corrected typecheck-only re-dispatch: run 46329610712 (node via nix shell). Verdict to follow when it finalizes.

Merge recommendation stands on the suite result; the tsc leg is confirmatory.

@developing-today-fleet
developing-today-fleet Bot merged commit 0a71a86 into main Nov 30, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/16255-edge-split branch November 30, 2026 00:35
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