refactor(server): unify policy persistence in objects table#972
refactor(server): unify policy persistence in objects table#972johntmyers merged 6 commits intomainfrom
Conversation
|
/ok to test ed81ed9 |
ed81ed9 to
031134b
Compare
|
/ok to test 031134b |
|
Sandbox settings are now keyed by Potential fixes: key sandbox settings by immutable sandbox id using Related question: should the local cleanup portion of API-driven deletes and driver/watch/reconcile-driven deletes be unified? The full flows differ because API delete still has to call the driver, but the gateway-owned cleanup probably wants one shared helper for sandbox row, sandbox settings, SSH sessions, indexes, watch/log buses, and any other sandbox-scoped state. |
Left settings keyed by name still and added a shared helper that centralizes gateway-owned sb cleanup that deletes ssh sessions plus the settings row. |
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
beb9fdd to
a21ff9e
Compare
|
/ok to test a21ff9e |
|
Label |
|
Label |
|
/ok to test 42f6ff3 |
Summary
This PR moves sandbox policy revisions, draft policy chunks, and settings persistence onto the unified
objectstable for the greenfield OS-103 schema.It replaces the old dedicated policy/chunk tables, switches singleton settings writes to name-based upserts, and adds handler-level coverage for the draft chunk lifecycle.
Related Issue
closes OS-103
Changes
objectsschema and remove the old002/003policy-specific migrationsPolicyRevisionPayloadandDraftChunkPayloadwrappers in the proto layer and update persistence backends to store policy revisions and draft chunks insideobjectsname, update sandbox teardown cleanup, and tighten CAS retry logic to use typed unique-constraint handlingTesting
mise run pre-commitpassesCommands run:
cargo fmt --all -- --checkRUSTC_WRAPPER= cargo test -p openshell-server persistence::tests -- --nocaptureRUSTC_WRAPPER= cargo test -p openshell-server sandbox_settings_save_and_load_round_trip -- --nocaptureRUSTC_WRAPPER= cargo test -p openshell-server delete_unlock_sandbox_set_succeeds_after_global_delete -- --nocaptureRUSTC_WRAPPER= cargo test -p openshell-server draft_chunk_handler_lifecycle_round_trip -- --nocaptureRUSTC_WRAPPER= cargo test --manifest-path e2e/rust/Cargo.toml --features e2e --test host_gateway_alias -- --nocaptureRUSTC_WRAPPER= UV_NO_SYNC=1 uv run pytest python/openshell/sandbox_test.py -k no_verifyRUSTC_WRAPPER= mise run e2e:rustRUSTC_WRAPPER= mise run e2e:pythonmise run pre-commitwas attempted but is still blocked locally by two non-branch issues: ignoredarchitecture/plans/*files without SPDX headers and the workspaceopenshell-provertest link step failing withld: library 'z3' not found.Checklist