carlos / platform Public

cert import (#1429): Luna copy pass 2 applied

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 54fb2e576cee2aaa8e2499cb0cad2b5e7ccbddf4 parent a7952ca
3 files changed, +20 −8
  • docs/site/cli.md +1 −1
  • docs/superpowers/reviews/cert-import-1429/LUNA-COPY-RESULT-2.md +12 −0
  • internal/console/domaincert_copy.go +7 −7

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-JntaHF
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec

amadan: job cancelled — a newer push superseded it
diff --git a/docs/site/cli.md b/docs/site/cli.md
index 872bfbff2..549024fff 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -2037,7 +2037,7 @@ carlos domains cert remove --app shop shop.example.com
This stops serving the imported certificate. Edges usually stop serving it
within seconds, and at worst within 30 minutes. Detaching the hostname also
-removes its import, within minutes.
+removes its import within minutes.
### carlos features
diff --git a/docs/superpowers/reviews/cert-import-1429/LUNA-COPY-RESULT-2.md b/docs/superpowers/reviews/cert-import-1429/LUNA-COPY-RESULT-2.md
new file mode 100644
index 000000000..55245e153
--- /dev/null
+++ b/docs/superpowers/reviews/cert-import-1429/LUNA-COPY-RESULT-2.md
@@ -0,0 +1,12 @@
+Verdict: changes requested. No files changed and no server started.
+
+| Key | New text | Why |
+|---|---|---|
+| `certWildcardCovered` | `this hostname is already covered by a wildcard certificate, so an imported certificate would not be served` | More natural, and makes clear the refusal applies to the import, not removal. |
+| `certStoreUnsupported` (503) | `this deployment's storage does not support conditional deletes, so it cannot hold imported certificates` | States why the deployment returns 503, as required. |
+| `certWithdrawFailed` (500) | `the certificate was written but could not be confirmed; the issuer's cleanup removes it within minutes. Try again` | Clearly identifies the written-but-unconfirmed case, cleanup timing, and the operator's next action. |
+| `cli.md: carlos domains cert remove` paragraph | `This stops serving the imported certificate. Edges usually stop serving it within seconds, and at worst within 30 minutes. Detaching the hostname also removes its import within minutes.` | Preserves both timing guarantees and removes the awkward comma in “within minutes.” |
+
+Flags for substance:
+
+- None beyond the copy changes above. The revised text preserves the required 500, 503, wildcard-scope, and removal-timing facts.
\ No newline at end of file
diff --git a/internal/console/domaincert_copy.go b/internal/console/domaincert_copy.go
index 8399ff981..cde7a5ce5 100644
--- a/internal/console/domaincert_copy.go
+++ b/internal/console/domaincert_copy.go
@@ -37,9 +37,9 @@ const (
certChainExpired = "a certificate in the chain has expired or is not valid yet"
certNotTrusted = "the certificate does not lead to a publicly trusted authority. Include the intermediate certificates after it. Self-signed and private certificates are not accepted"
// certWildcardCovered: the name is under a wildcard the deployment
- // serves, which the edge serves ahead of an import. (Not yet reviewed
- // by Luna.)
- certWildcardCovered = "this hostname is covered by a wildcard certificate already, so an import would not be served"
+ // serves; the door refuses an import there (#1429 option 1). Reviewed
+ // by Luna, pass 2.
+ certWildcardCovered = "this hostname is already covered by a wildcard certificate, so an imported certificate would not be served"
certWildcardOnly = "the certificate covers this hostname only through a wildcard. Import it again with --allow-wildcard to use it for this hostname"
certReadFailed = "could not look up the hostname. Try again"
@@ -48,11 +48,11 @@ const (
// certStoreUnsupported: the deployment's store cannot delete
// conditionally, so the import invariant cannot be kept.
- certStoreUnsupported = "this deployment's storage cannot hold imported certificates"
+ certStoreUnsupported = "this deployment's storage does not support conditional deletes, so it cannot hold imported certificates"
// certWithdrawFailed: the entry was written, could not be confirmed
- // against the claim, and could not be withdrawn. (Not yet reviewed by
- // Luna.)
- certWithdrawFailed = "the certificate was saved but could not be confirmed; the issuer removes it within minutes. Try again"
+ // against the claim, and could not be withdrawn. Reviewed by Luna,
+ // pass 2.
+ certWithdrawFailed = "the certificate was written but could not be confirmed; the issuer's cleanup removes it within minutes. Try again"
// The Activity rows. %s are the host, the leaf's SHA-256 (hex), the
// issuer's common name and the expiry (RFC 3339).