Wave 1 — Contracts & schemas#7
Conversation
…config Re-baselined all three units against feat/package-quality. Real dry-run shows 0 slow types for all (stale audit claimed 35/30/1). Locked 8 decisions, 27 commit slices, archetype = 1 for all three. Artifacts: - research.md: verified findings with per-unit dry-run output - plan.md: locked decisions, open-decision sweep, risk register, gates - worklog.md: Design checkpoint with public surface, 27 slices - drift.md: re-baseline drift logged - context-pack.md: run status updated
|
@copilot use harness run evaluator pass on the plan phase above, proceed to adjustment before giving verdict if surface of change is reasonable. Comment your verdict with a summary on the PR |
PLAN-EVAL verdict: ✅
|
| Plan-Gate box | Result |
|---|---|
Research present & current (re-baselined vs feat/package-quality) |
PASS |
| Decisions locked (L1–L8 w/ rationale) | PASS |
| Open-decision sweep (4 defer + 1 must-resolve, resolved) | PASS |
| Commit slices (27, ordered, gate+files each) | PASS |
| Risk register | PASS |
| Gate set selected | PASS after adjustment |
| Deferred scope explicit | PASS |
| jsr-audit surface scan | PASS |
Adjustment applied (surface reasonable → fixed in place rather than FAIL_PLAN)
The selected Archetype-1 gate set omitted two gates the matrix marks required:
- F-14 Console-log lint — directly material: it's the proving gate for L5 (
runtime-configconsole → return-value diagnostics). Added and mapped into the validation plan (grep console.after slices 3–5). - F-17 Abstract-derived co-location — added as
PENDING_SCRIPT, no violation (all three are type-only + factory surfaces).
Edits landed in plan.md §Fitness Gates + Validation Plan, worklog.md gate table, with a drift.md entry and plan-eval.md verdict.
Spot-checks confirmed
config/helpers.ts, contracts/helpers/{paginated-query,transform}.ts, contracts/crud/ at root, runtime-config/mod.ts = 415 LOC with console.* at 334–405 and no README/docs/tests, config/src/domain/mod.ts barrel — all match the plan's findings.
Caveat for IMPL-EVAL
The deno publish --dry-run = 0 slow types re-baseline could not be independently re-run here (deno unavailable / not installable in this sandbox). All structural findings the plan rests on were verified; IMPL-EVAL must still confirm F-6 (0 slow types on all three) at the implement gate.
Implementation may begin. No slice should be committed beyond this point without the F-14/F-17 additions in the gate sweep.
Evaluator PASS (adjusted). Added: - F-14 Console-log lint (proving gate for L5 runtime-config console removal) - F-17 Abstract-derived co-location (PENDING_SCRIPT, no violation) Updated plan.md Fitness Gates, Validation Plan, worklog.md gate table. Wrote plan-eval.md verdict.
Implementation update — slice 1Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 2Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 3Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 4Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 5Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 6Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 7Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 8Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 9Run: Work completed
Gate evidence
Next slice
|
Implementation update — slice 10Run: Work completed
Gate evidence
Next slice
|
./paths doc-lint)|
Fixed the Deno 2.8.2 JSR/type-check failures. Summary of fixes: Added explicit z.ZodType annotations to @netscript/config exported schemas to satisfy --isolatedDeclarations. packages/config: publish dry-run PASS; tests PASS; lint PASS. |
|
CLI E2E merge-readiness gate completed. Command run from deno task e2e:cli run scaffold.plugins --cleanup --format prettyResult: PASS, exit code 0. Gate summary:
Summary reported by runner: Also pushed |
CLI E2E follow-upPushed Result
Cleanup also completed: Coverage exercisedThe bare task now runs the full Fixes made while adapting the suite
Additional focused checks run before the final full E2E pass: |
AGENTS.md follow-upPushed I reviewed
I intentionally did not port stale old-repo references such as Validation: |
Playground example removalPushed What changed
Verification
|
Config doc-lint merge blocker fixedPushed What changed
Verification
Worktree is clean after the push. |
…ries polish (#684) * docs(storefront): add typed storefront UI chapter, renumber deploy (proposal #6) Add 06-storefront-ui.md showcasing the frontend typed spine the storefront series never touched: a bound route contract (createRouteReference / defineRouteContract / bindRoutePattern), a per-service createServiceClient + createServiceQueryUtils clients module, and a Fresh island reading with useIslandQuery and beginning checkout with useIslandMutation. Deploy renumbered 06 -> 07; prev/next/learningPath/xref navigation rewired across the series. Every API grounded via deno doc + two scratch deno checks against packages/sdk and packages/fresh; the island uses contract-derived keys with typed client calls (the SDK queryOptions/mutationOptions result is not raw-spreadable into the zero-arg island hooks). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM * docs(storefront): index differentiator lede, deploy one-command framing, PORT note - index.md: name the differentiator the series proves + a 'what this replaces' contrast sentence (proposal #17). - 02-catalog-service.md: note that Aspire injects PORT and services.<name>.port in netscript.config.ts is the typed source of truth (proposal #7). - 07-deploy.md one-command scaffold-to-Aspire framing shipped with commit 1; worklog records the full run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Aspire injects PORT at runtime; netscript.config.ts services.<name>.port (apps.<name>.port for Fresh apps) is the typed source of truth the scaffold wires as the fallback default. One shared sentence at each first parseInt occurrence so the raw-env read no longer reads as the canonical pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM
…-tos, auth example (#686) * docs: clarify PORT/typed-config relationship across 8 pages (#660 #7) Aspire injects PORT at runtime; netscript.config.ts services.<name>.port (apps.<name>.port for Fresh apps) is the typed source of truth the scaffold wires as the fallback default. One shared sentence at each first parseInt occurrence so the raw-env read no longer reads as the canonical pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM * docs: reference showcase ledes, see-it-live links, streams framing (#660 #8 #9 #10 #15) - reference/ai: explicit note that AI provider keys have no typed config surface; raw Deno.env.get is the supported path (#8). - reference/queue + reference/kv: See-it-live link blocks to the queue-kv-cron how-to and data-persistence concept page (#9). - reference/contracts + reference/sdk: showcase sentence per lede — contracts obviate manual req.json() validation; defineServices() wires the whole typed stack in one call (#10). - durable-workflows/streams: one sentence reframing no in-process subscribe() as an intentional single HTTP/SSE surface (#15). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM * docs: add runnable end-to-end blocks to three decision how-tos (#660 #11) discover-services, choose-a-queue-provider, and add-a-task-runtime-adapter each gain one copy-pasteable end-to-end block (resulting file + full command sequence) at deploy-local-aspire density, demonstrating the pluggability the pages previously only asserted. All commands/APIs grounded in package source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM * docs: add complete route-protection example to better-auth-plugins (#660 #12) A real Fresh routes/*.tsx handler gated on an active session and an admin role, at sibling auth.md's depth: resolves the session via backend.sessions.getSession, maps to a Principal with principalMapper, and fails closed on both checks. Grounded in packages/auth-better-auth + @netscript/service/auth exports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM * chore(run): docs-660b sweep worklog (#660) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VifzAytcxBk5odEMaCXihM --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Wave 1 — Contracts & schemas (Implementation Complete — READY FOR MERGE)
Run ID:
feat-package-quality-wave1-contracts--contractsBranch:
feat/package-quality-wave1-contractsBase:
feat/package-qualityPLAN-EVAL: ✅
PASS(adjusted) — see commentUnits (3)
deno doc --lint/docs@netscript/runtime-config@netscript/config@netscript/contractsChanges
@netscript/runtime-config: Split 415-linemod.tsintosrc/domain/,src/application/,src/diagnostics/. Added README, docs, tests,deno.jsontasks. Removedconsole.*from package code (structured diagnostics viasummarizeRuntimeConfig()).@netscript/config: Renamedhelpers.ts→src/domain/saga-inputs.ts. Fixedprivate-type-refon subpaths. Added JSDoc to all exported types. Removed Zod internal (z.ZodType) from public schema signatures. Expanded docs.@netscript/contracts: Movedhelpers/→src/application/. Exported referenced types (ContractSchema,ContractObjectSchema,BaseContractProcedure) to fix subpathprivate-type-ref. Addedgetting-started.mdandadvanced/extending.md.packages/cli,plugins/sagas,plugins/workers.Review feedback addressed
runtime-configloader: hardenedisVersionPointerguard, added test for malformed pointer paths (e4353a3)runtime-configwatcher: fixed unhandled rejection insetTimeoutcallback, cleareddebounceTimeron abort (1ae5ca2)configmod.ts: fixed JSDoc example to use realinspectConfigAPIconfigschema: replacedz.unknown().transform()with explicitSagasConfigSectionSchema/TriggersConfigSectionSchemaGate results (all 3 packages)
deno publish --dry-rundeno doc --lintdeno checkdeno lintdeno fmt --checkdeno test --allow-allsrc/Architecture debt
runtime-configsingle-file refactor,configAP-16 (helpers.ts),contractsAP-16 (helpers/)contracts/crud/at root (inconsistent layout — acceptable for subpath stability),config/src/domain/mod.tsjustified barrel (arch:barrel-ok)Merge readiness
Per
AGENTS.md, the full CLI E2E suite is the merge-readiness gate. It has completed successfully.deno task e2e:clipassed=41 failed=0 skipped=0docker psempty afterward;aspire psreported no running apphostThe full suite exercised project scaffold, plugin add/list, DB init/generate/seed, generated checks, Aspire launch/waits, worker/saga/trigger runtime gates, plugin doctor, OTEL webhook, OTEL trace-chain validation, and cleanup.
Plan & Design phase: see original PR description