Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Clarify trial proof boundaries

rcourtman8c6e6081b413
diff --git a/docs/release-control/v6/internal/records/hosted-signup-billing-replay-2026-03-12.md b/docs/release-control/v6/internal/records/hosted-signup-billing-replay-2026-03-12.md
index c21480645e..f0d4791c98 100644
--- a/docs/release-control/v6/internal/records/hosted-signup-billing-replay-2026-03-12.md
+++ b/docs/release-control/v6/internal/records/hosted-signup-billing-replay-2026-03-12.md
@@ -28,6 +28,7 @@
- `code=trial_signup_required`
- `details.action_url` pointed at the hosted checkout origin with `org_id=default` and `return_url=http://127.0.0.1:17765/auth/trial-activate`
- `GET /api/license/entitlements` stayed `tier=free` and `subscription_state=expired` before and after the redirect handoff
+ - this live hosted replay exercised only the canonical handoff branch; the later `429 trial_rate_limited` plus `Retry-After` limiter branch stays covered by the owned local trial-start contract proof in `tests/integration/scripts/trial-signup-contract.sh` and `tests/integration/tests/07-trial-signup-return.spec.ts`
3. Exercised real hosted signup on the live HTTP surface via `POST /api/public/signup` and confirmed:
- `201 Created`
- returned `org_id=0147dd50-38db-4316-8d46-0e1f0d754bf6`
diff --git a/tests/integration/tests/07-trial-signup-return.spec.ts b/tests/integration/tests/07-trial-signup-return.spec.ts
index cae8f7350c..654588ee14 100644
--- a/tests/integration/tests/07-trial-signup-return.spec.ts
+++ b/tests/integration/tests/07-trial-signup-return.spec.ts
@@ -63,10 +63,12 @@ test.describe.serial('Trial signup return flow', () => {
).toContain(startRes.status());
const startPayload = (await startRes.json()) as TrialStartPayload;
+ // Playwright lowercases response header keys; this still reads the canonical Retry-After header.
+ const startRetryAfterHeader = startRes.headers()['retry-after'] ?? null;
if (startRes.status() === 409) {
expectHostedTrialRedirect(startPayload);
} else {
- expectTrialRateLimited(startPayload, startRes.headers()['retry-after'] ?? null);
+ expectTrialRateLimited(startPayload, startRetryAfterHeader);
}
// Verify entitlements remain unchanged until the hosted flow returns.
@@ -90,14 +92,16 @@ test.describe.serial('Trial signup return flow', () => {
method: 'POST',
});
const secondPayload = (await secondRes.json()) as TrialStartPayload;
+ // Playwright lowercases response header keys; this still reads the canonical Retry-After header.
+ const secondRetryAfterHeader = secondRes.headers()['retry-after'] ?? null;
if (startRes.status() === 429) {
expect(secondRes.status()).toBe(429);
- expectTrialRateLimited(secondPayload, secondRes.headers()['retry-after'] ?? null);
+ expectTrialRateLimited(secondPayload, secondRetryAfterHeader);
} else if (secondRes.status() === 409) {
expectHostedTrialRedirect(secondPayload);
} else {
expect(secondRes.status()).toBe(429);
- expectTrialRateLimited(secondPayload, secondRes.headers()['retry-after'] ?? null);
+ expectTrialRateLimited(secondPayload, secondRetryAfterHeader);
}
});
});
diff --git a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
index ccaafa642d..27d3f7014b 100644
--- a/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
+++ b/tests/integration/tests/53-demo-mode-commercial-boundary.spec.ts
@@ -393,6 +393,9 @@ base.describe('Demo mode commercial boundary', () => {
await hiddenNotFound('**/api/license/entitlements');
await hiddenNotFound('**/api/license/activate');
await hiddenNotFound('**/api/license/clear');
+ // Demo mode must fail closed on the trial-start route before either
+ // `trial_signup_required` or `trial_rate_limited` plus `Retry-After`
+ // can surface.
await hiddenNotFound('**/api/license/trial/start');
await hiddenNotFound('**/api/license/monitored-system-ledger**');
await hiddenNotFound('**/api/admin/orgs/**/billing-state');