feat(stacks): anonymous stacks expire after 6h, not 24h#214
Merged
Conversation
A stack is live compute (build pod + running services), so the anonymous
window should be tighter than the 24h anon data-resource TTL. The
zero-signup wedge stays — agents ship a working app URL anonymously — but
the free compute window is bounded; claim/upgrade keeps an app past 6h.
Introduce anonymousStackTTL (6h) + anonymousStackTTLLabel ("6h") as named
constants so the expires_at write, the response expires_in field, and the
upgrade-nudge note copy stay in lock-step (rule 16: one token, all sites).
TestStackNew_Anonymous_Returns202 now asserts expires_in="6h", the 6h
note copy, and expires_at ≈ now()+6h on the persisted row.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Anonymous (
team_id IS NULL) stacks now expire after 6h instead of 24h.POST /stacks/newis the existing anonymous-capable deploy path (OptionalAuthStrict;migration 005_stacks_anon.sqlmadestacks.team_idnullable). A stack is live compute (build pod + running services), so the anonymous free-compute window should be tighter than the 24h anon data-resource TTL. The zero-signup wedge is unchanged — an agent ships a working app URL anonymously — but the window is bounded; claim/upgrade keeps an app past 6h.Changes
anonymousStackTTL = 6 * time.Hour+anonymousStackTTLLabel = "6h"named constants (rule 16: one token, all call sites —expires_atwrite,expires_inresponse field, upgrade-nudge note).TestStackNew_Anonymous_Returns202assertsexpires_in="6h", the 6h note copy, andexpires_at ≈ now()+6hon the persisted row.Contract sync (rule 22)
Docs updated in sibling repos (separate deploys):
content/llms.txt,web/llms.txt,web/llms-full.txt,web/docs/{quickstart,api-reference}.md,web/content/landing.md.Test evidence
go build ./...+go vetclean.TestStack*pass against a migrated test DB (incl. the new 6h assertions).TestQueue_*/TestBulkTwin_*failures locally are NATS/customer-DB infra artifacts (no backend in the ad-hoc local DB) — CI runs the authoritative suite with service containers.