Skip to content

PL-0516: server backup/restore, Studio update/rollback, SBOM, ops runbook - #108

Merged
Sekiph82 merged 5 commits into
mainfrom
feat/pl-0516-ops
Dec 3, 2026
Merged

Sekiph82 merged 5 commits into
mainfrom
feat/pl-0516-ops

Conversation

@Sekiph82

@Sekiph82 Sekiph82 commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Local, testable parts of PL-0516. Does not complete the task: real-infra GitHub-blocked run, signing and installer remain external gates. Public builds stay blocked by the licence gate.

Changes

  • server/src/packlab_server/backup.py (python -m packlab_server.backup create|verify|restore): SQLite online backup API snapshot + content-addressed objects/, SHA-256 manifest; verify = per-file hash/size, no unlisted files, path allowlist, integrity_check, every revisions.assets hash present, optional off-band --expect-manifest-sha256; restore only into a missing/empty target via verified sibling temp + rename (refuses live data dir). Separate module; store.py untouched.
  • tools/release/install_update.py: manifest|stage|activate|rollback|status; side-by-side releases/<v>, atomic switch by os.replace(state.json), re-verify before switching, keep current+previous only. OwnerDev scripts/folder untouched.
  • tools/release/sbom.py: deterministic CycloneDX 1.5 JSON from uv.lock (purl, dependency graph, runtime vs dev scope); licences only from windows_component_license_registry.json, others UNREVIEWED.
  • docs/ecosystem/PL-0516_OPERATIONS.md: backup/restore + update/rollback runbooks, GitHub-blocked operation (offline wheelhouse from uv.lock, CI-less verification), private registry migration plan, limits.

No new dependencies, no workflow/gate changes, no Studio UI changes.

Tests (local)

  • pytest tests/server tests/ci tests/tools/test_install_update.py tests/tools/test_sbom.py: 509 passed, 5 skipped, 4 failed; the 4 failures are in tests/ci/test_packlab_test_runner_behavior.py (PowerShell runner taskkill child-tree termination on this host), a file this PR does not touch.
  • New tests alone: tests/server/test_backup.py 6 passed, tests/tools/test_install_update.py 3 passed, tests/tools/test_sbom.py 2 passed.
  • ruff format/check, mypy (348 files), ci_data_safety (both modes): PASS.

🤖 Generated with Claude Code

Sekiph82 and others added 5 commits December 3, 2026 23:24
…M, ops runbook

- packlab_server.backup: SQLite online-backup snapshot + content-addressed objects,
  SHA-256 manifest, verify (integrity_check, referenced assets present, no unlisted
  files, optional off-band manifest digest), restore only into an empty target via
  verified sibling temp + rename.
- tools/release/install_update.py: side-by-side stage, hash-verified atomic activate via
  state.json os.replace, one-step rollback, keeps current+previous only.
- tools/release/sbom.py: deterministic CycloneDX 1.5 from uv.lock; licences only from the
  licence registry, others UNREVIEWED; runtime vs dev scope.
- docs/ecosystem/PL-0516_OPERATIONS.md: runbooks, GitHub-blocked operation, private
  registry migration plan. Public builds stay blocked by the licence gate; signing and
  installer remain external gates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sal, state checks)

- sbom: a registry licence counts only when its recorded version (version field or
  .../tree/<version> in upstream_reference) equals the locked one; else UNREVIEWED.
- backup: refuse any symlink/junction in the backup tree incl. root and directories;
  close the source connection if opening the destination fails.
- install_update: corrupt state.json -> InstallError (exit 2); activate/rollback check
  manifest version equals the directory name; `is not None` digest check; root link refused.
- docs: server --tokens/--oidc/jwks_file live outside --data and need their own protected
  backup.
- tests: link refusal (both tools), missing referenced objects, failure after the staged
  copy (both tools), corrupt state, renamed release, version-tied licences.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… state types, junctions)

- sbom: a licence counts only when the registry entry records a version (version field or tree ref) equal to the locked one; commit pins and tag refs are UNREVIEWED.
- licence registry: record version for pyside6, pyside6-addons, pyside6-essentials, shiboken6 (6.11.2) and cadquery-ocp-novtk, cadquery-ocp-proxy (7.9.3.1.1), as already recorded in license_file and source_evidence. The same 11 components stay licensed.
- install_update: non-string state.json values are corrupt (exit 2, no TypeError).
- backup create: refuse junctions in the object store too.
- tests: commit pin unlicensed, non-string previous in state, payload root that is a junction.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Sekiph82
Sekiph82 merged commit 7d524fa into main Dec 3, 2026
2 checks passed
@Sekiph82
Sekiph82 deleted the feat/pl-0516-ops branch December 3, 2026 21:26
Sekiph82 added a commit that referenced this pull request Dec 3, 2026
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