Skip to content

[Thermo-Nuclear][Wave 3] Decompose skills/poteto-mode/scripts/orch/store.ts below 1,000 lines #648

Closed

Description

@tommy-ca

Parent #645 (Program Epic). Detail report: docs/audit/thermo-nuclear-636/04_codebase_file_size_and_complexity_thresholds.md.

Problem

skills/poteto-mode/scripts/orch/store.ts has grown to 1,677 lines, severely breaching the thermo-nuclear 1,000-line ceiling. It bundles domain types/errors, PID lock acquisition and probes, GitHub and Origin CLI base-chain traversal and loop detection, and TSV store CRUD operations into a single monolith.

Scope

  • Extract skills/poteto-mode/scripts/orch/types.ts (~260 lines) for domain interfaces, errors, and validator parsers.
  • Extract skills/poteto-mode/scripts/orch/lock.ts (~120 lines) for PID lock acquisition, holderIsDead, and release logic.
  • Extract skills/poteto-mode/scripts/orch/frontier.ts (~320 lines) for Forge CLI querying (gh/origin), loop detection, and linear chain validation.
  • Keep store.ts strictly under 950 lines, focused solely on table CRUD operations and re-exporting modules for full backwards compatibility.
  • Ensure all 101 tests in skills/poteto-mode/scripts pass cleanly (bun test).

Activity

  1. tommy-ca commented on Oct 20, 2026

    @tommy-ca
    OwnerAuthor

    Resolved via PR #652. Independent verification PASS confirmed. All orch submodules < 500 lines.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions