Skip to content

Derive idle suspension from the checkpoint declaration - #538

Merged
SaladDay merged 1 commit into
mainfrom
refactor/suspension-from-declaration
Oct 8, 2026
Merged

SaladDay merged 1 commit into
mainfrom
refactor/suspension-from-declaration

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Idle suspension is now one Core policy: 300 seconds idle and 86400 seconds snapshot retention. Core applies it to every Provider that declares checkpoint support. Before this change it was a microsandbox constant in the Provider registry, copied into two deployment columns and read back.

  • Registry and registration: the registry no longer carries IdleSeconds/RetentionSeconds, and sandbox.Description no longer copies them. Registration keeps only the declared rule "checkpoint support ⇒ nodes mode".
  • Migration 000094: drops runtime_deployment.idle_seconds/retention_seconds and rewrites runtime_deployment_setup_check without them. Down restores the old columns and values.
  • Service: deployment.Service derives View.Suspension and Setup.Suspension from the checkpoint declaration in one helper.
  • API: suspension keeps its shape. Its description now names the declaration rule, not a vendor.
  • Docs: docs/sandbox-provider.md (en and zh) states the nodes-only rule and owns the values. sandbox-deployment.md links to them.

Production behaviour is unchanged.

Checks run locally:

  • go build and go vet;
  • sqlc and OpenAPI regeneration, which produced only the expected diff;
  • the dependent packages with the DB (915 tests), the whole execution package and the whole tests/integration package (370 tests);
  • the migration up, down and up again on a scratch DB with a configured microsandbox deployment;
  • the names, link and translation checks.

This is architecture alignment T5c (decision D2). It got no blind review, because it is a small deletion lane with no behaviour change.

Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@SaladDay
SaladDay merged commit 77ab191 into main Oct 8, 2026
@SaladDay
SaladDay deleted the refactor/suspension-from-declaration branch October 8, 2026 02:28
Core owns one idle suspension policy (300 seconds idle, 86400 seconds
retention) and reports it for every Provider that declares checkpoint
support. The microsandbox registry constant, its copy in the provider
description and the idle_seconds/retention_seconds deployment columns are
deleted; migration 000094 drops the columns and rewrites
runtime_deployment_setup_check without them.

Registration keeps only the declared rule that checkpoint support needs a
nodes registration. The API suspension shape is unchanged; its description
names the declaration rule instead of a vendor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant