Skip to content

Commit 70e9daf

Browse files
author
Onur Solmaz
committed
docs(spritz): define workspace release semantics
1 parent 9b3ce00 commit 70e9daf

3 files changed

Lines changed: 59 additions & 32 deletions

docs/2026-03-23-shared-app-tenant-routing-architecture.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ The intended default behavior should be:
677677
not on first inbound message
678678
- install handling should be idempotent
679679
- disconnect should stop routing immediately
680-
- reconnect should reuse the same concierge instance identity when the
681-
deployment still considers that installation valid
680+
- reconnect should reuse the same concierge instance identity only while the
681+
deployment still considers that installation active and valid
682682
- outbound channel actions should go back through the shared channel gateway,
683683
not directly from the concierge runtime to the provider
684684

@@ -698,21 +698,25 @@ Spritz should then either:
698698

699699
This gives each tenant a stable concierge before the first real conversation.
700700

701-
### Disconnect and reconnect
701+
### Disconnect and later reinstall
702702

703703
When an installation is disconnected:
704704

705-
- the external registry should mark it disconnected
705+
- the external registry should stop treating that route as actively claimed
706706
- `channel.route.resolve` should return `unresolved`
707-
- the concierge instance may remain in place for later reuse, depending on
708-
deployment policy
707+
- the previous owner should no longer retain an active reservation on that
708+
route
709+
- any retained concierge/runtime may remain only as detached history or a
710+
reusable artifact, depending on deployment policy
709711

710-
When an installation reconnects:
712+
When the workspace is installed again later:
711713

712-
- the external registry should upsert it back to an active state
713-
- the same concierge instance identity should be reused when possible
714-
- only if policy requires a clean replacement should a new concierge be
715-
created
714+
- the external registry should create a fresh active claim for that route
715+
- the new owner may be the same as the previous owner or a different
716+
authorized owner
717+
- the same concierge instance identity may be reused under the hood only if
718+
deployment policy explicitly allows it
719+
- otherwise a new concierge should be created
716720

717721
If the installation is still active but the runtime has disappeared:
718722

@@ -783,15 +787,18 @@ Validation for this architecture should include:
783787
- `principalId + provider + externalScopeType + externalTenantId`
784788
5. Send inbound events from both tenants through the same app integration.
785789
6. Verify each event routes to the correct concierge instance.
786-
7. Verify reinstall or reconnect returns the same concierge instance identity.
790+
7. Verify active-route reinstall remains idempotent while the route is still
791+
claimed.
787792
8. Verify runtime replacement preserves concierge instance identity.
788793
9. Verify uninstall or disconnect disables routing for that tenant.
789794

790795
Disconnect and uninstall behavior should be explicit:
791796

792-
- uninstall or disconnect sets `spritz.sh/concierge.state=disconnected`
793-
- routing must stop immediately for disconnected instances
794-
- reconnect may reuse the same instance identity if policy allows
797+
- uninstall or disconnect must remove the route from the active registry used
798+
for route resolution
799+
- routing must stop immediately for released routes
800+
- a later install may reuse the same runtime identity only if deployment
801+
policy allows it, but it must be treated as a fresh active claim
795802

796803
## Follow-ups
797804

docs/2026-03-24-slack-channel-gateway-implementation-plan.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ The gateway provides:
9292
The resolver returns:
9393

9494
- `instanceId`
95-
- route state such as `ready` or `disconnected`
95+
- route state such as `ready`
96+
97+
Released or disconnected workspace routes should resolve as `unresolved`
98+
rather than surfacing a reserved `disconnected` active state.
9699

97100
### 2. Installation registry client
98101

@@ -182,8 +185,10 @@ Install must be idempotent:
182185
2. Gateway calls the external disconnect API for the same routing identity.
183186
3. Route resolution must immediately stop returning a concierge for that
184187
workspace.
185-
4. The concierge instance may remain for later reuse, depending on deployment
186-
policy.
188+
4. The active workspace claim must be released so a later install may bind the
189+
same workspace to a different owner.
190+
5. Any retained concierge/runtime may remain only as detached history or a
191+
reusable artifact, depending on deployment policy.
187192

188193
## Inbound Event Flow
189194

docs/2026-04-17-channel-install-ownership-and-management-architecture.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -234,20 +234,24 @@ Those settings may affect runtime behavior, but they are not the same concept
234234
as target selection and should evolve through a separate installation-config
235235
surface.
236236

237-
### Disconnect and uninstall are soft
237+
### Disconnect and uninstall release the active workspace claim
238238

239-
Provider uninstall or product-side disconnect should soft-disconnect the
240-
installation, not hard-delete it immediately.
239+
Provider uninstall or product-side disconnect should release the active
240+
installation claim for that route.
241241

242242
Pinned rule:
243243

244244
- routing stops immediately
245-
- provider auth may be cleared according to deployment policy
246-
- the durable installation record remains
247-
- the logical concierge binding may remain for later reuse
245+
- provider auth tied to the released installation should be cleared or revoked
246+
according to deployment policy
247+
- the active installation row should no longer reserve that route
248+
- any retained concierge/runtime may remain only as detached history or a
249+
reusable artifact, not as an active claim
250+
- a later install for the same route should be treated as a fresh install,
251+
even when the same runtime is reused under the hood
248252

249-
This keeps reconnect flows simple and consistent with the existing shared
250-
channel lifecycle model.
253+
History and audit may still be retained, but they should not live in the same
254+
table or record that answers "who currently owns this workspace route."
251255

252256
## UX Consequences For Spritz
253257

@@ -264,9 +268,13 @@ For each manageable installation, Spritz should show at least:
264268
The minimum action set is:
265269

266270
- change target
267-
- reconnect
268271
- disconnect
269272

273+
`reconnect` may still exist as a repair action for an active installation that
274+
is temporarily broken or missing provider auth, but it is not the path after a
275+
user-facing disconnect. After disconnect, the route has been released and the
276+
next claim should come from a fresh install flow.
277+
270278
When an installation is in a broken but still durable state, the UI should
271279
still render the row and show a repair-needed state through `problemCode`
272280
rather than dropping the installation from the page.
@@ -286,22 +294,29 @@ shapes vary by deployment:
286294
installation
287295
- install-management APIs must authorize against the effective owner, not just
288296
the original installer
289-
- reinstall APIs must detect effective-owner mismatch and return conflict
297+
- reinstall APIs must detect effective-owner mismatch and return conflict only
298+
while an active claim still exists for that route
290299
- management-target-change APIs must update target and owner together
291300
- mutable installation-config APIs must stay separate from target-selection APIs
301+
- disconnect APIs must release the active claim instead of keeping a
302+
disconnected reservation behind
303+
- audit/history for released installations must stay separate from the active
304+
registry used for ownership conflicts and route resolution
292305

293306
These behaviors matter more than the exact transport details.
294307

295308
## Validation
296309

297310
At minimum, an implementation should validate:
298311

299-
- reinstall of the same route and same effective owner updates in place
300-
- reinstall of the same route and different effective owner returns conflict
312+
- reinstall of the same active route and same effective owner updates in place
313+
- reinstall of the same active route and different effective owner returns
314+
conflict
301315
- changing to a new valid target updates the installation atomically
302316
- changing to a target owned by a different principal updates effective owner
303317
- deleting or invalidating the saved target blocks routing until repair
304-
- disconnect stops routing but preserves the installation for reconnect
318+
- disconnect stops routing and releases the route for a later fresh install by
319+
the same or a different authorized owner
305320
- install rows expose the correct `allowedActions` and `problemCode`
306321
- future provider-specific configuration can change without rewriting saved
307322
target selection
@@ -315,7 +330,7 @@ needs for:
315330

316331
- listing manageable installations
317332
- updating the selected target on an installation
318-
- reconnecting a disconnected installation
333+
- reconnecting an active but temporarily broken installation
319334
- surfacing repair-needed state when the saved target is no longer valid
320335
- defining the generic installation-config surface for provider-specific
321336
mutable settings

0 commit comments

Comments
 (0)