T-YCHZ-replace-setup-ts-s-hand-rolled-readleaseauthority-with-lib
State: closed/done · Impact: low · Complexity: small
From the Phase-4 audit’s recommended task list
(docs/planning/notes/N-OCUK-2026-09-24-sdlc-1-0-audit.md, on origin/sdlc/p4-audit): Replace
setup.ts’s hand-rolled readLeaseAuthority with @lib/config’s resolveAuthority; extract a shared
parseDashboardArgs.
| Area | Note |
|---|---|
lib/services/project/ | setup.ts |
lib/services/dashboard/ | dashboard-service.ts, dashboard-service-main.ts |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: setup.ts calls resolveAuthority instead of a hand-rolled reader.
- AC-2: A shared parseDashboardArgs is used by both dashboard-service.ts and dashboard-service-main.ts.
Out of scope
Section titled “Out of scope”- none
Both ACs are complete. AC-1 (resolveAuthority swap) was addressed in an
earlier pass: readLeaseAuthority is gone, and setup.ts now calls
@lib/config’s resolveAuthority(null, resolvedRoot) directly.
AC-2 (parseDashboardArgs extraction) was deferred pending P12’s dashboard/
ownership handoff; P12 is now merged to main, so the byte-identical
parseStartArgs/parseServeArgs duplicates in dashboard-service.ts and
dashboard-service-main.ts were replaced with one shared parseDashboardArgs
(plus a DashboardArgs type) exported from server.ts, which both files
already import from.
Dependencies
Section titled “Dependencies”- none