Skip to content

refactor: decompose src/service.ts (3,298 lines) #44

Description

@mostlydev

Problem

src/service.ts is 3,298 lines — roughly 28% of source LOC in a single file, and it's the coordination core of the tool.

Proposal

Decompose by responsibility, e.g.:

  • turn / stick state machine
  • persistence (SQLite / WAL access)
  • liveness / expiry / fencing
  • the public service API surface

Why it matters

The coordination core is the part that most benefits from small, focused, individually-testable modules — both for review and for reasoning about the concurrency invariants (which is where the real risk in this tool lives).

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