Skip to content

fix(cli): resolve project config under projectRoot deno.json (prod D1)#148

Merged
rickylabs merged 3 commits into
mainfrom
fix/cli-config-loader-resolution
Jun 26, 2026
Merged

fix(cli): resolve project config under projectRoot deno.json (prod D1)#148
rickylabs merged 3 commits into
mainfrom
fix/cli-config-loader-resolution

Conversation

@rickylabs

Copy link
Copy Markdown
Owner

Summary

Fixes the prod-only CLI config-loading failure by loading project config through a CLI-owned child Deno process rooted at the scaffolded project's deno.json. This keeps @netscript/config pure while making netscript plugin list and other config-loading CLI paths resolve @netscript/config from the generated project import map.

Scope

  • Archetype / area: packages/cli Archetype 6 CLI/tooling; consumed @netscript/config contract remains Archetype 1
  • Run dir: .llm/tmp/run/fix-cli-config-loader-resolution--prod-d1/

Slices

  • S1 project-root config loader adapter — a5e95ad8
  • Harness commit tracking — 7d077cbb
  • IMPL-EVAL artifact — 788e16ec

Validation

  • PLAN-EVAL — PASS (attempt 2)
  • IMPL-EVAL — PASS (attempt 2)
  • deno test --allow-all packages/cli/src/kernel/adapters/config/project-config-loader_test.ts packages/cli/src/kernel/adapters/config/plugin-registry.test.ts — PASS, 7 passed / 0 failed
  • deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/cli --ext ts,tsx --pretty — PASS, 524 files, 5 batches, 0 failed
  • Focused deno lint --no-config <9 touched CLI files> — PASS
  • Focused deno fmt --check <9 touched CLI files> with repo-style inline config — PASS
  • Local prod-mode repro with public CLI JSR-mode scaffold: plugin list from inside project and via --project-root — PASS
  • deno task publish:dry-run — PASS, existing warnings only
  • deno task e2e:cli run scaffold.runtime --cleanup --format pretty — PASS, 47 passed / 0 failed
  • deno task arch:check — BLOCKED_UNRELATED by pre-existing DEPS-JSR-CENTRALIZATION failures for divergent @netscript/aspire and @netscript/plugin ranges; this PR does not touch dependency ranges

Harness

  • Run dir: .llm/tmp/run/fix-cli-config-loader-resolution--prod-d1/
  • Phase: IMPL-EVAL PASS; PR opened for review.

Drift / Debt

  • No new architecture debt.
  • Recorded minor drift: local contributor plugin group also consumed the old pluginListCommand symbol and was updated to the new factory.

Release Gate

Do not treat this defect as finally closed until alpha.9 is published and the release-triggered e2e-cli-prod run is GREEN against the freshly published prerelease.

Copy link
Copy Markdown
Owner Author

[PHASE: IMPL] [VERDICT: PASS]

Implemented the prod D1 config-loader fix and completed separate IMPL-EVAL PASS.

Scope

  • Added CLI-owned project-root config loader adapter: packages/cli/src/kernel/adapters/config/project-config-loader.ts.
  • Added checked-in child loader entrypoint: project-config-loader-child.ts.
  • Routed public/local plugin list, plugin host/doctor/runtime-schema dependency loading, plugin registry fallback loading, and deploy config loading through the project-rooted loader.
  • Kept @netscript/config unchanged as an Archetype 1 small-contract package.

Commits

  • a5e95ad8fix(cli): resolve project config under project deno config
  • 7d077cbbchore(harness): record config loader slice
  • 788e16ecchore(harness): add config loader impl evaluation

Validation

  • PLAN-EVAL — PASS attempt 2.
  • IMPL-EVAL — PASS attempt 2.
  • deno test --allow-all packages/cli/src/kernel/adapters/config/project-config-loader_test.ts packages/cli/src/kernel/adapters/config/plugin-registry.test.ts — PASS, 7 passed / 0 failed.
  • deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/cli --ext ts,tsx --pretty — PASS, 524 files, 5 batches, 0 failed.
  • Focused deno lint --no-config on 9 touched CLI files — PASS.
  • Focused deno fmt --check on 9 touched CLI files with repo-style inline config — PASS.
  • Local prod-mode repro with public CLI JSR-mode scaffold: plugin list from inside the project and via --project-root from repo root — PASS.
  • deno task publish:dry-run — PASS, exit 0 with existing warnings only.
  • deno task e2e:cli run scaffold.runtime --cleanup --format pretty — PASS, 47 passed / 0 failed.
  • deno task arch:check — BLOCKED_UNRELATED before doctrine checks by pre-existing DEPS-JSR-CENTRALIZATION failures for divergent @netscript/aspire and @netscript/plugin ranges; this PR does not touch dependency ranges.

Release Gate

Final closure still requires publishing alpha.9 and observing a GREEN release-triggered e2e-cli-prod run against that freshly published prerelease. PR checks and the local/public CLI repro are necessary but not authoritative for this defect class.

@rickylabs
rickylabs marked this pull request as ready for review June 26, 2026 22:52
@rickylabs
rickylabs merged commit 1af1950 into main Jun 26, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant