Skip to content

[S6] Stale-code + stale-file elimination #307

Description

@rickylabs

Child of the Road-to-0.0.1-stable umbrella. NetScript was alpha — no backward-compat promises. Delete stale code and stale files. Every candidate is looked at before deletion (delete-safety rule).

Baseline

All candidates verified against origin/main (f3d7f1dc) — not the working checkout, which ran 380 commits behind and still holds 216 files main already deleted. Cut every deletion branch from origin/main.

Wave 1 — CERTAIN dead code (0 importers repo-wide; safe mechanical delete) — FIRST

16 files/symbol-groups + 1 vestigial dir:

  • CLI: runtime-override.ts, runtime-detect.ts, loggers/json-logger.ts, loggers/silent-logger.ts, runtime/clock/system-clock.ts (+empties runtime/clock/), ports/clock-port.ts (dead cluster), application/abstracts/cli-command-group.ts, presentation/abstracts/list-command.ts, constants/paths.ts, constants/platform.ts, public/templates/plugins/public-plugin-generators.ts
  • queue: internal/mod.ts + internal/distributed-queue.ts pair (keep internal/parallel-queue.ts)
  • plugins: plugins/workers/contracts/v1/workers.contract.ts (compat re-export, bypassed)
  • dead exports (edit-in-file): fresh form/runtime/state.ts (createFormPageProps/resolveFormPageProps), sdk ports/client-link-factory.ts (ClientLinkFactory), ports/transport.ts (ServiceTransport), ports/metadata.ts (3 types); whole-file fresh-ui/src/presentation/data-grid.css

Wave 2 — LIKELY (~18; quick human glance)

CLI extension-points.ts barrel + compile.test.ts doublet; sdk collections/*, openapi/helpers.ts, discovery/service-discovery.ts, query/composite-query.ts, query-client/kv-cache-persister.ts; plugins workers/bin/{combined,scheduler,worker}.ts, workers|sagas/services/src/routers/health.ts; plugin-streams-core/src/domain/errors.ts; orphan public barrels (plugin, plugin-workers-core, telemetry src/public/mod.ts); fresh-ui data-grid.tsx DataGrid.

Wave 3 — infra tooling orphans (20 scripts) — BLOCKED on doctrine drift

17-script CLI-fitness cluster + check-architecture-gates.ts + generate-package-plans.ts + agentic/gh-watch.ts, all unwired. Prerequisite: fitness-gates.md + doctrine 09-* reference a phantom differently-named script set — reconcile which is canonical (ties to S4) before deleting. Keep cli-fitness-shared.ts.

Wave 4 — .llm/tmp bulk purge

2799 tracked files that are git-excluded scratch; single git rm -r PR. MERGE with S3 PR-3b.

Wave 5 — NEEDS-HUMAN-LOOK (per-item decision; not blind deletes)

--legacy-aspire C# AppHost removal (largest shim, genuinely wired; alpha = strong removal candidate → coordinated sub-epic, user approval); packages/runtime-config whole-package orphan (roadmap-or-retire); packages/ai+plugin-ai-core (HOLD — AI lane owns); auth presets/reference impls; fresh/fresh-ui transitional surfaces; plugin back-compat shims (sagas codemod, legacy job/saga config schemas, command-form fallback); kv redis pre-envelope fallback; packagesAsWorkspaceMembers simplification; dangling plugins/sagas test:api task ref.

Carve-outs

ROUTE-TO-DOCS (6 items) → docs lane. ROUTE-TO-PRISMA (DB layer) → do not touch.

Acceptance criteria

Waves 1-2 deleted with deno task check + test green per package; Wave 3 after doctrine reconcile; Wave 4 purged; Wave 5 items each carry an explicit decision. Beta gate (wave 1).


Parent epic: #301

Part of #301

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions