From f6ba5634fd5bdc620b99985b5332b50858cfeeda Mon Sep 17 00:00:00 2001 From: shankar0123 Date: Sun, 3 May 2026 18:58:00 +0000 Subject: [PATCH] ci: fix Phase 4 post-push gofmt failure (map-literal alignment) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI on commit 4dc8d3f (Phase 4) failed gofmt on internal/api/router/openapi_parity_test.go. The 6 new SpecParity- Exceptions entries I added for the Phase 4 routes had over-padded whitespace between key and value; the longest new key is '"GET /acme/profile/{id}/renewal-info/{cert_id}":' which sets the gofmt-canonical column width for the surrounding block, but my hand-aligned values used the wider Phase-2 column width (set by the even-longer 'POST /acme/profile/{id}/order/{ord_id}/finalize' key in that block). gofmt aligns map-literal columns per contiguous run between blank lines / structural breaks, not file-globally. The Phase 4 entries form their own run because they're separated from the Phase 2 block by the '// Phase 4 — key rollover + revocation + ARI.' comment. Fix: 'gofmt -w' on the file, which rewrote the 6 lines with the correct (narrower) intra-block alignment. No semantic change — just whitespace. Confirmed: 'gofmt -l .' clean; 'go vet ./internal/api/router/' clean (the test still passes after the formatting change). --- internal/api/router/openapi_parity_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/api/router/openapi_parity_test.go b/internal/api/router/openapi_parity_test.go index a08c6de..e81c70f 100644 --- a/internal/api/router/openapi_parity_test.go +++ b/internal/api/router/openapi_parity_test.go @@ -86,12 +86,12 @@ var SpecParityExceptions = map[string]string{ "POST /acme/challenge/{chall_id}": "Phase 3 default-profile shorthand for challenge response.", "POST /acme/cert/{cert_id}": "Phase 2 default-profile shorthand for cert download.", // Phase 4 — key rollover + revocation + ARI. - "POST /acme/profile/{id}/key-change": "RFC 8555 §7.3.5 doubly-signed key rollover; documented in docs/acme-server.md", - "POST /acme/profile/{id}/revoke-cert": "RFC 8555 §7.6 revoke-cert (kid OR cert-key auth); documented in docs/acme-server.md", - "GET /acme/profile/{id}/renewal-info/{cert_id}": "RFC 9773 ACME Renewal Information (unauthenticated GET); documented in docs/acme-server.md", - "POST /acme/key-change": "Phase 4 default-profile shorthand for key rollover.", - "POST /acme/revoke-cert": "Phase 4 default-profile shorthand for revoke-cert.", - "GET /acme/renewal-info/{cert_id}": "Phase 4 default-profile shorthand for ARI.", + "POST /acme/profile/{id}/key-change": "RFC 8555 §7.3.5 doubly-signed key rollover; documented in docs/acme-server.md", + "POST /acme/profile/{id}/revoke-cert": "RFC 8555 §7.6 revoke-cert (kid OR cert-key auth); documented in docs/acme-server.md", + "GET /acme/profile/{id}/renewal-info/{cert_id}": "RFC 9773 ACME Renewal Information (unauthenticated GET); documented in docs/acme-server.md", + "POST /acme/key-change": "Phase 4 default-profile shorthand for key rollover.", + "POST /acme/revoke-cert": "Phase 4 default-profile shorthand for revoke-cert.", + "GET /acme/renewal-info/{cert_id}": "Phase 4 default-profile shorthand for ARI.", } func TestRouter_OpenAPIParity(t *testing.T) {