Skip to content

S27: TeployAdapter behind SHIP_DEPLOY_ADAPTER=teploy (default off) - #54

Merged
im-tyler merged 2 commits into
mainfrom
claude/w4-teploy-adapter
Oct 4, 2026
Merged

im-tyler merged 2 commits into
mainfrom
claude/w4-teploy-adapter

Conversation

@im-tyler

@im-tyler im-tyler commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Changes

  • src/teploy-adapter.ts: TeployAdapter implements DeploymentAdapter over the same argv runner and commands delivery.ts uses (status --json, deploy --image --version --skip-dns-check, rollback --to, exec ... docker image inspect). Bound to one service@destination; status.app must match or the answer is unknown. Ship-host file lease (fencing: lease). capabilities().unsupported (new optional field in deployment-adapter.ts) declares: destination fence vs manual teploy deploy, provider dry-run, target generation token, recovery artifact digest, logs, provisioning, other recovery modes.
  • src/delivery.ts: optional adapter factory on executeDelivery and executeDeliveryRollback. Absent means the legacy code runs unchanged. Present: preconditions/build stay shared; only the deploy command and rollback go through the adapter journey. Record states unchanged (acted -> unknown, not acted -> held); the legacy sweep still confirms.
  • src/worker.ts: passes the factory only when SHIP_DEPLOY_ADAPTER=teploy.
  • src/fixtures/fake-teploy.mjs: fake CLI (real child process) with unreadable status, wrong service, hidden artifact, ID-form images, racing rival, failing deploy.

Checks

  • lint clean; root suite 2107 pass / 0 fail (28 new). Grader-sensitivity and pj-b grader skipped (fixed port 8901); scripts/web untouched and not run.
  • 27-check conformance suite: 22 pass, 5 skipped (deploy-fenced-on-generation, journey-refuses-stale-plan, logs-attribute-service, observe-attributes-service, no-readback-never-confirms), 0 fail. Skips tie to declared gaps.
  • Default-off: explicit test that omitted and adapter: undefined give identical records, the legacy argv and a single status read, and no lease dir.
  • Negative controls (mutate, watch fail, restore): 10 mutations all caught (no app attribution, unreadable-as-absent, nonzero-exit=rejected, non-exclusive lease, no pre-command compare, argv drift, any recovery mode, falsely declaring CAS, held-only-when-not-acted, skipped already-recovered check).

Not verified / still open

  • No real teploy binary was run; fake CLI shape follows the live capture in delivery.test.ts. teploy logs flags unverified, so logs undeclared.
  • Declared gap pinned by a test: a rival landing inside the deploy command is overwritten (no destination fence). Lease is Ship-host local.
  • Adapter path is stricter than legacy: unreadable status (including a brand-new destination with no deployment) holds instead of proceeding.
  • readBackDelivery/reconcileStaleRollback not moved to the adapter.
  • Upstream requests (not filed here): teploy deploy --dry-run; status --json exposing a deploy generation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX


Generated by Claude Code

claude added 2 commits October 4, 2026 03:26
…Y_ADAPTER=teploy (default off)

Implements DeploymentAdapter for Teploy (status --json, deploy, rollback --to,
exec image inspect) and an optional adapter path in executeDelivery and
executeDeliveryRollback. Legacy path is untouched when the flag is off.
Capabilities the CLI cannot honestly provide are declared in
capabilities().unsupported and the dependent conformance checks report skipped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX
@im-tyler
im-tyler merged commit d4529ec into main Oct 4, 2026
4 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.

2 participants