Add workspace snapshots and full reset
Implement the 2.8.0 workspace milestone with named snapshots and full-sandbox reset across the CLI, Python SDK, and MCP server. Persist the immutable baseline plus named snapshot archives under each workspace, add workspace reset metadata, and make reset recreate the sandbox while clearing command history, shells, and services without changing the workspace identity or diff baseline. Refresh the 2.8.0 docs, roadmap, and Python example around reset-over-repair, then validate with uv lock, UV_CACHE_DIR=.uv-cache make check, UV_CACHE_DIR=.uv-cache make dist-check, and a real guest-backed create/snapshot/reset/diff smoke test outside the sandbox.
This commit is contained in:
parent
f504f0a331
commit
18b8fd2a7d
20 changed files with 1429 additions and 29 deletions
|
|
@ -20,6 +20,7 @@ from pyro_mcp.contract import (
|
|||
PUBLIC_CLI_WORKSPACE_CREATE_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_DIFF_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_EXPORT_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_RESET_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_LIST_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_LOGS_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_START_FLAGS,
|
||||
|
|
@ -32,6 +33,10 @@ from pyro_mcp.contract import (
|
|||
PUBLIC_CLI_WORKSPACE_SHELL_SIGNAL_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SHELL_SUBCOMMANDS,
|
||||
PUBLIC_CLI_WORKSPACE_SHELL_WRITE_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SNAPSHOT_CREATE_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SNAPSHOT_DELETE_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SNAPSHOT_LIST_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SNAPSHOT_SUBCOMMANDS,
|
||||
PUBLIC_CLI_WORKSPACE_SUBCOMMANDS,
|
||||
PUBLIC_CLI_WORKSPACE_SYNC_PUSH_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SYNC_SUBCOMMANDS,
|
||||
|
|
@ -110,6 +115,35 @@ def test_public_cli_help_lists_commands_and_run_flags() -> None:
|
|||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_DIFF_FLAGS:
|
||||
assert flag in workspace_diff_help_text
|
||||
workspace_snapshot_help_text = _subparser_choice(
|
||||
_subparser_choice(parser, "workspace"),
|
||||
"snapshot",
|
||||
).format_help()
|
||||
for subcommand_name in PUBLIC_CLI_WORKSPACE_SNAPSHOT_SUBCOMMANDS:
|
||||
assert subcommand_name in workspace_snapshot_help_text
|
||||
workspace_snapshot_create_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "snapshot"),
|
||||
"create",
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SNAPSHOT_CREATE_FLAGS:
|
||||
assert flag in workspace_snapshot_create_help_text
|
||||
workspace_snapshot_list_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "snapshot"),
|
||||
"list",
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SNAPSHOT_LIST_FLAGS:
|
||||
assert flag in workspace_snapshot_list_help_text
|
||||
workspace_snapshot_delete_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "snapshot"),
|
||||
"delete",
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SNAPSHOT_DELETE_FLAGS:
|
||||
assert flag in workspace_snapshot_delete_help_text
|
||||
workspace_reset_help_text = _subparser_choice(
|
||||
_subparser_choice(parser, "workspace"), "reset"
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_RESET_FLAGS:
|
||||
assert flag in workspace_reset_help_text
|
||||
workspace_shell_help_text = _subparser_choice(
|
||||
_subparser_choice(parser, "workspace"),
|
||||
"shell",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue