Skip to content

Honest lifecycle: create, destroy, status, billing, TTL, and doctor - #6

Merged
sgr0691 merged 3 commits into
mainfrom
cursor/trust-layer-cli-hardening-4f95
Sep 6, 2026
Merged

sgr0691 merged 3 commits into
mainfrom
cursor/trust-layer-cli-hardening-4f95

Conversation

@sgr0691

@sgr0691 sgr0691 commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Makes Sandman’s create/destroy/status/cost/enable path match what the CLI already advertised, then adds billing, TTL, and doctor.

Honest lifecycle

  • Create calls adapter.init() and optional setRegion. Destroyed names can be recreated.
  • AWS create persists partial IDs (failed vs active), resolves AL2023 AMI via SSM, and verifies ownership before destroy (including versioned S3).
  • GCP refuses deleteProject unless the id starts with sandman-.
  • Status refreshes from the cloud adapter. Cloudflare/Vercel token errors map to AUTH_REQUIRED. Config writes take a .lock.

Follow-up

  • GCP billing on init/create (--billing-account, GCP_BILLING_ACCOUNT, or parent project). Unlinkable projects are failed, not active.
  • enable returns mode / provisioned / localOnly. AWS lambda and CF/Vercel are local-only.
  • AWS status checks DescribeInstances + HeadBucket.
  • create --strict exits non-zero with PARTIAL when create finishes failed.
  • --ttl 30m|2h|1d with lazy reap; sandman doctor / whoami.
  • Repo URLs point at BoringInfraCo/Sandman. CI runs npm audit --omit=dev --audit-level=high.

JSON compatibility: same envelope keys, list --json stays a raw array, destroy --json still requires -y.

Tests

npm test (123) and npm run build pass.

Open in Web Open in Cursor 

Give humans and agents a stable --json envelope (code, hint, next),
stop hanging destroy in JSON mode, and surface provider maturity via
`sandman providers`. Harden state-file permissions, refuse to wipe
corrupt config, redact connect secrets, close default SSH to the
internet, and lock down new S3 buckets.

Co-authored-by: Sergio Rovira <sgr0691@users.noreply.github.com>
Wire adapter.init and optional setRegion on create, fail closed on
partial AWS provisioning, recycle names after successful destroy, and
refresh status from the cloud. Auth mapping, state locks, and agent
skills now match that lifecycle.

Co-authored-by: Sergio Rovira <sgr0691@users.noreply.github.com>
Wire GCP billing on init/create so unlinkable projects are failed,
not active. Enable reports provisioned vs local-only. AWS status
checks instance and bucket state. Create --strict exits non-zero on
partial failure. Add --ttl lazy reap, sandman doctor/whoami, repo
metadata, dependency overrides, and a high-severity npm audit CI gate.

Co-authored-by: Sergio Rovira <sgr0691@users.noreply.github.com>
@sgr0691
sgr0691 marked this pull request as ready for review September 6, 2026 23:12
@sgr0691
sgr0691 merged commit 96c9040 into main Sep 6, 2026
1 check passed
@sgr0691
sgr0691 deleted the cursor/trust-layer-cli-hardening-4f95 branch September 6, 2026 23:12
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.

1 participant