@supacloud/cli 0.77.0 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,6 +79,94 @@ deployment. An unknown mutation outcome remains unknown; reconcile the same
79
79
  activation identity rather than blindly deploying again. These commands require
80
80
  Management API credentials except local plan/build and authoring commands.
81
81
 
82
+ ### Isolated Application Previews
83
+
84
+ ```sh
85
+ supacloud-cli app preview-plan --env test --id orders --environment_id test --release_id RELEASE_SHA256 --branch_ref preview-orders
86
+ supacloud-cli app preview --env test --id orders --environment_id test --release_id RELEASE_SHA256 --configuration_id CONFIG_UUID --ttl_seconds 3600 --wait --timeout_seconds 300
87
+ supacloud-cli app previews --env test --id orders --environment_id test
88
+ supacloud-cli app preview-status --env test --id orders --environment_id test --preview_id PREVIEW_UUID --wait --timeout_seconds 300
89
+ supacloud-cli app preview-cleanup --env test --id orders --environment_id test --preview_id PREVIEW_UUID
90
+ ```
91
+
92
+ The platform owns branch provisioning, queue/Storage namespaces, test Secrets,
93
+ configuration cloning, activation and runtime readiness. The CLI never performs
94
+ these operations through SSH or sequential client-side resource mutations.
95
+ Creation defaults to `schema_only`; copying source rows requires explicitly
96
+ selecting `--data_mode full_clone`. Creation requires an immutable source
97
+ configuration ID and verifies the branch release identity against the source
98
+ manifest. A `provisioning` receipt means accepted, not ready.
99
+
100
+ New previews use the platform's default 24-hour TTL. `--ttl_seconds` accepts 300
101
+ through 604800 seconds for creation or read-only planning. `expires_at` remains
102
+ in the public receipt; a plan has no deadline unless a TTL is requested. Receipt
103
+ expiry requires the matching platform cleanup contract (#1774), not the older
104
+ CLI-only lifecycle contract.
105
+
106
+ `--wait` on creation observes only the accepted Preview ID; it never repeats
107
+ creation. `preview-status --wait` continues observing that same ID. The observation
108
+ budget is 300 seconds by default and accepts 1 through 3600 seconds with
109
+ `--timeout_seconds`; creation's source verification and initial POST precede that
110
+ budget, while status includes its initial GET. Header and body share the remaining
111
+ request budget. Completed readiness ends waiting; a failed/cleaned receipt, failed
112
+ query or identity drift ends it with nonzero status. A wait timeout returns
113
+ `waiting.status: "timed_out"` with the last validated receipt and the exact
114
+ same-ID continuation in `reconciliation`. It does not mark provisioning failed,
115
+ retry a failed lifecycle GET, delete resources or promote an environment.
116
+
117
+ `preview-plan` is read-only. Preview list/status requests may resume persisted
118
+ provisioning on the server, so they are classified as writes, including in
119
+ read-only and production profiles. The platform may clean eligible expired
120
+ previews, but never interrupts a serving preview or empties nonempty Storage
121
+ automatically. Explicit cleanup remains available. Failed previews return
122
+ nonzero with the validated receipt and cleanup state. Unknown create outcomes
123
+ are never retried: list existing previews and reconcile their receipts first.
124
+ No production deployment, database promotion or data rollback is implied.
125
+ Runtime readiness is not authenticated business-flow acceptance.
126
+
127
+ ```gherkin
128
+ Feature: Platform-owned application previews
129
+ Scenario: Read-only planning
130
+ Given an explicit release and proposed branch ref
131
+ When preview-plan runs in read-only mode
132
+ Then only a GET plan request is sent
133
+ And no preview is created
134
+
135
+ Scenario: Accepted is not ready
136
+ Given an immutable source release and configuration
137
+ When preview creates an isolated environment
138
+ Then exactly one create request is sent
139
+ And a provisioning receipt is returned without claiming readiness
140
+
141
+ Scenario: TTL is validated before dispatch
142
+ Given a lifetime outside 300 through 604800 integer seconds
143
+ When preview or preview-plan is requested
144
+ Then no HTTP request is sent
145
+
146
+ Scenario: Wait preserves the selected preview
147
+ Given a valid provisioning receipt and an exhausted observation budget
148
+ When preview --wait returns
149
+ Then its exit status is nonzero and the accepted receipt is preserved
150
+ And reconciliation selects the same Preview ID without another creation
151
+
152
+ Scenario: Ready requires verified platform evidence
153
+ Given a provisioning preview selected by its scope, digest and Preview ID
154
+ When its complete readiness receipt is observed
155
+ Then waiting succeeds with that receipt
156
+ And foreign or malformed receipts never become success
157
+
158
+ Scenario: Safety guards precede effects
159
+ Given a read-only or unconfirmed production profile
160
+ When preview creation, status recovery or cleanup is requested
161
+ Then the CLI rejects the request before HTTP dispatch
162
+
163
+ Scenario: Unknown outcome preserves reconciliation
164
+ Given a create response is lost or belongs to another environment
165
+ When the CLI handles that response
166
+ Then it reports OUTCOME_UNKNOWN without retrying creation
167
+ And it retains the selected scope for receipt reconciliation
168
+ ```
169
+
82
170
  ### Framework source upgrades
83
171
 
84
172
  Breaking source-contract changes use the compiler's migration command, which is