Skip to content

[Deploy-S6] Deno Deploy tier-1 adapter (marquee)#359

Merged
rickylabs merged 14 commits into
mainfrom
feat/deploy-s6-deno-deploy
Jul 3, 2026
Merged

[Deploy-S6] Deno Deploy tier-1 adapter (marquee)#359
rickylabs merged 14 commits into
mainfrom
feat/deploy-s6-deno-deploy

Conversation

@rickylabs

@rickylabs rickylabs commented Jul 3, 2026

Copy link
Copy Markdown
Owner

[Deploy-S6] Deno Deploy tier-1 adapter (marquee) — RESEARCH + PLAN

Planning-only until PLAN-EVAL PASS. This PR carries the harness run docs
(research.md + plan.md) for slice #342, Phase 2 of the deployment epic, decision D2
(the deno-native beta marquee). No adapter/CLI/schema code is included — implementation begins only
after a separate-session PLAN-EVAL passes and the prerequisite slices merge.

Closes #342
Refs #327

Revision 2 (post-FAIL_PLAN). Rev 1 misattributed the 3-op deploy port to #338, demoted the
ratified 7-op contract, and premised "#337 not merged." Rev 2 selects Archetype 7 (composite),
conforms to the canonical 7-op deploy contract, records that the port expansion is owned by
#339/#340
(#342 consumes it), and re-baselines against merged main (#352 config + 3137e455
seed port already landed). Still planning-only.

Summary

A tier-1 Deno Deploy deployment target: deploy.targets['deno-deploy'] config member (spreads
#352's merged deployTargetBaseShape) + resolver + a DenoDeployTarget adapter implementing the
subset of the canonical 7-op deploy port (plan/emit · up · down · status · logs · rollback · secrets) that Deno Deploy supports, shelling the native deno deploy CLI (source build, no
Dockerfile) to push a scaffolded NetScript project to the new Deno Deploy platform
(console.deno.com) — reachable as netscript deploy deno-deploy <verb>. up is the marquee
one-click; host install/uninstall is explicitly unsupported (declared subset); secrets/rollback
route through the deploy core conventions (R-DEPLOY-3). Includes a required unstable-API
preflight guard
in plan (Deno Deploy rejects --unstable-*, which NetScript KV plugins rely on).

Scope (planned; 4 commit slices, all < 30)

  • S1packages/config: DenoDeployTarget type + DenoDeployTargetSchema (z.ZodType<…>,
    spread-composed like windows) + targets['deno-deploy'] key. Published-surface gate.
  • S2 — unstable-API preflight guard (kernel, pure) + fixture tests.
  • S3DenoDeployTarget adapter + DenoDeployCliAdapter (ProcessPort, mirrors
    ServyCliAdapter) + DEFAULT_DEPLOY_TARGETS registration.
  • S4resolveDenoDeployTarget resolver + minimal CLI reach + README permissions + arch-debt
    update.

Archetype: ARCHETYPE-7 — Deploy Target Adapter (composite), composing ARCHETYPE-2
(Integration — the deno deploy port/adapter wrap) and ARCHETYPE-6 (CLI/Tooling — the thin
netscript deploy <target> <verb> router), folding neither. Config member follows the merged #352
small-contract spread pattern. Adapter satisfies R-DEPLOY-1..5 + gates F-DEPLOY-1/2.

Dependency note (Implement-phase merge order)

Merge order: #357#339/#340 port-expansion commit → rebase #342 (onto main, which already
carries #352 + 3137e455).

Open decisions surfaced (not decided here)

  • NEEDS USER: CLI-push vs GitHub-push default for the marquee (proceeding on CLI-push as a
    reversible assumption).
  • NEEDS USER: non-interactive CI auth for the new deno deploy (keyring/interactive confirmed;
    a documented env-var/org-token path is not) — blocks automated real pushes, not the design.

Validation for the evaluator

Static: scoped run-deno-check.ts/lint/fmt on packages/config + packages/cli;
deno publish --dry-run for the config surface; semantic fake-ProcessPort adapter tests. Merge
readiness is the scaffold.runtime E2E (deno task e2e:cli run scaffold.runtime --cleanup --format pretty) — evaluator-run, not per-slice.

🤖 Generated with Claude Code

https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN

@rickylabs

Copy link
Copy Markdown
Owner Author

Rev 2 pushed — ready for PLAN-EVAL re-run

Addresses the peer FAIL_PLAN (blocking finding B1). Commits 0c760b3c (docs) + 8fe49901 (ledger), fast-forward on bf0beeef.

Corrections:

Two NEEDS USER items remain (CLI-push-vs-GitHub-push default; non-interactive CI auth) — both reversible, neither blocks the port/schema/guard/convention design. Still planning-only; not marking ready.

rickylabs and others added 13 commits July 4, 2026 00:06
…ter (#342)

Planning-only harness run docs (research.md + plan.md) for the Deno Deploy
marquee target (D2). Grounds against #337 deploy.targets.* contract and #338
DeployTargetPort archetype; enumerates 4 commit slices, change map, fitness
gates, and open decisions (CLI-push default, CI auth) as NEEDS USER.

Refs #342 #327

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN
…ntract (#342)

Rev 2 after peer FAIL_PLAN (B1): select Archetype 7 (composite Arch2+Arch6),
conform to the canonical 7-op deploy contract, record that the 3-op->7-op port
expansion is owned by #339/#340 (this slice CONSUMES it, does not redefine it),
re-baseline against merged main (#352 config + 3137e45 seed port already landed),
add the 7-op->Deno-Deploy op-mapping, and correct the dispatch lane to Opus 4.8
sub-agents. Still planning-only; awaits PLAN-EVAL.

Refs #342 #327
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN
Add the `deploy.targets['deno-deploy']` config member to @netscript/config:
a `DenoDeployTarget` interface extending `DeployTargetBase` and a
`DenoDeployTargetSchema` (z.ZodType<DenoDeployTarget>, spread-composed on
`deployTargetBaseShape` per R-DEPLOY-4). Wires the `deno-deploy` key into
`DeployConfigSchema.targets` and exports the new type + schema from the public
surface. The explicit `z.ZodType` annotation preserves JSR fast-types.

Consumes the merged base (#352); does not touch the deploy port contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a pure `scanUnstableApis` guard (D9 / research Finding 9) that flags
`--unstable-*`-requiring APIs before a `deno deploy` push, since Deno Deploy
rejects those flags. Detects features declared in `deno.json`'s `unstable`
list and direct unstable-API tokens (Deno.openKv/cron, BroadcastChannel,
Temporal) in supplied entrypoint sources. Pure by design: callers supply
already-read file contents so FS access stays out of the domain (A11/F-CLI-16);
the `plan` op wires this to an FS reader in S3. Best-effort (no transitive
graph walk); bound recorded for arch-debt in S4.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement the tier-1 Deno Deploy deployment-target adapter consuming the
canonical DeployTargetPort. Declares the supported op subset
plan/up/down/status/logs; rollback/secrets are omitted pending the deploy
core convention seam (#341/#364) rather than forked adapter-locally.

- DenoDeployTarget (domain): pure target running the unstable-API guard on
  plan/up; refuses production pushes with violations, warns on preview.
- DenoDeployCliAdapter (kernel/adapters): confines `deno deploy` shelling
  behind a ProcessPort (F-CLI-16); exported argv builders unit-tested.
- DenoDeployPreflightReader (kernel/adapters): FS reader feeding the pure
  guard with deno.json + entrypoint sources.
- Register `deno-deploy` in DEFAULT_DEPLOY_TARGETS wired at the app layer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Complete the Deno Deploy tier-1 target with its thin CLI reach and config
resolution (Deploy-S6 S4).

- resolveDenoDeployTarget: merge `deploy.targets['deno-deploy']` config with
  CLI flag overrides (flags win; prod defaults false) → ResolvedDenoDeployConfig.
- createDenoDeployTarget: single composition factory wiring the CLI adapter +
  preflight reader; registry and surface both consume it (no Deno.Command leaks
  into features/presentation — F-CLI-16).
- `netscript deploy deno-deploy <plan|up|down|status|logs>`: thin router reach
  (R-DEPLOY-2) mapping --org/--app/--prod/--entrypoint/--env-file/--dry-run onto
  the resolved config; all target logic stays in the domain/adapter layers.
- README permissions block (--allow-run/read/net/env) + unstable-API/auth caveats.
- arch-debt: advance cli-deploy-artifacts-missing (cloud target added; rollback/
  secrets + graph-complete guard + container artifacts remain).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…guard

Eval caveat B1: byte offset 3665 held a literal 0x00 that rendered as a
space, marking the whole safety-critical unstable-API guard file as
git-binary (Bin 0->4284, invisible to review/IMPL-EVAL) and a JSR/publish
landmine. Replaced 0x00 -> 0x20; file is now text and diffable. No
behavior change (dedupe key still separates api/source).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN
Rebase reconciliation: main's #364 drop-behavior test asserted the
{windows, linux} target set with `solaris` as the genuinely-unknown throwaway
key. Extend it for the deno-deploy member added by this branch — assert
`deno-deploy` is retained (org/app) alongside windows+linux and that `solaris`
is still dropped. Keeps the union honest post-rebase onto #363+#364.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN
@rickylabs
rickylabs force-pushed the feat/deploy-s6-deno-deploy branch from 570891f to 015938e Compare July 3, 2026 22:34
Rebase reconciliation: `deploy-target-port_test.ts` pinned the default
`DeployTargetRegistry` to exactly the two bare-metal OS-service targets
(linux-service, windows-service). This branch registers the tier-1
`deno-deploy` cloud target into the SAME default registry (DEFAULT_DEPLOY_TARGETS
in deploy-target-registry.ts), so the sibling assertion regressed on CI
check-test (expected [linux-service, windows-service], actual
[deno-deploy, linux-service, windows-service]).

deno-deploy is a first-class marquee deploy target and legitimately belongs in
the default registry (the deno-deploy suite already asserts
DEFAULT_DEPLOY_TARGETS registers it). Update the test's expected set to the
localeCompare-sorted three keys, rename the test to reflect that it seeds the
OS-service targets plus deno-deploy, and assert the deno-deploy label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN
@rickylabs
rickylabs marked this pull request as ready for review July 3, 2026 23:12
@rickylabs
rickylabs merged commit 7ff500e into main Jul 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Deploy-S6] Deno Deploy tier-1 adapter (marquee)

1 participant