Skip to content

Harden release gates for channels, recovery, and policy review#163

Merged
jsugg merged 8 commits intomainfrom
fix/release-readiness-gates
Apr 2, 2026
Merged

Harden release gates for channels, recovery, and policy review#163
jsugg merged 8 commits intomainfrom
fix/release-readiness-gates

Conversation

@jsugg
Copy link
Copy Markdown
Owner

@jsugg jsugg commented Apr 2, 2026

Summary

This updates launch-facing operational gates so release evidence is executable and policy controls are enforceable by default.

Changes

  • Add security-workflow commands and CI steps for:
    • channel rollout contract verification (verify-channels-contract)
    • disposable backup/verify/restore smoke (run-recovery-smoke)
  • Extend unit + repo-contract tests to lock those workflow surfaces and command dispatch paths.
  • Expand the production readiness checklist with concrete command-backed launch checks, recovery verification steps, and explicit host-only diagnostic caveats.
  • Harden approval/journal artifacts to owner-only permissions on supported POSIX hosts.
  • Keep packaged docs mirrored with source docs for CI/security and production-readiness surfaces.
  • Refresh README entrypoint coverage and docs parity assertions for security/operations documentation.

@jsugg jsugg force-pushed the fix/release-readiness-gates branch 2 times, most recently from ea09789 to a164cac Compare April 2, 2026 14:01
jsugg added 8 commits April 2, 2026 11:01
This hardens launch-readiness evidence by running two semantic checks in the
existing security workflow: channels contract parity and a disposable
backup/verify/restore smoke cycle. The helper CLI and tests were extended to
keep the workflow thin and to lock behavior with unit+contract coverage.

Constraint: Workflow contract forbids shell blobs and heredoc Python in YAML
Rejected: Add checks as inline multi-command shell blocks | violates workflow-thin contract and is harder to test
Rejected: Keep checks as documentation-only evidence | does not produce executable CI proof
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep new security workflow checks routed through tests/scripts/security_workflow.py rather than embedding ad-hoc shell logic
Tested: ruff targeted checks; pyright; mypy; pytest tests/suites/unit/ci/test_security_workflow.py tests/suites/contracts/repo/test_ci_workflow_surfaces.py
Not-tested: Full GitHub Actions matrix execution (deferred to PR checks)
This converts the production readiness checklist into an explicit launch gate
with concrete verification commands and an out-of-scope note for host-only
doctor shortcuts. A docs parity contract test now locks those required commands
so checklist drift is caught in CI.

Constraint: Checklist guidance must match actual CLI command surfaces in source code
Rejected: Keep checklist as high-level bullets without executable commands | too ambiguous for launch evidence collection
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep checklist command examples aligned with real CLI argument contracts (especially recovery restore positional destination)
Tested: ruff check tests/suites/contracts/repo/test_docs_parity.py; pytest tests/suites/contracts/repo/test_docs_parity.py tests/suites/contracts/repo/test_ci_workflow_surfaces.py tests/suites/unit/ci/test_security_workflow.py
Not-tested: Full CI matrix rerun (deferred to PR checks)
The source docs were expanded to add executable launch checks, so the packaged
runtime doc copies are updated to preserve source-vs-packaged parity contracts
used in CI and release verification.

Constraint: Packaged runtime assets must byte-match source docs for parity contracts
Rejected: Leave packaged docs stale and rely on source docs only | breaks packaged-runtime contract tests
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Whenever platform/docs docs change, mirror updates under src/clawops/assets/platform/docs in the same change
Tested: pytest tests/suites/contracts/repo/test_packaged_runtime_assets.py tests/suites/contracts/repo/test_docs_parity.py
Not-tested: Full compatibility matrix rerun (deferred to PR checks)
Normalize op-journal and review packet artifacts to owner-only modes on supported POSIX hosts, and surface the security-policy docs in the operator entrypoint list so the launch-readiness lane is easier to verify.

Constraint: RC8 task 2 is limited to security/policy/host/degradation hardening with no .omx artifact changes
Rejected: Leave filesystem hardening as documentation only | approval packets and journal state should default closed on disk
Directive: Keep platform/docs and src/clawops/assets/platform/docs mirrored whenever operator-facing policy docs change
Confidence: high
Scope-risk: narrow
Tested: uv run --project . pytest -q tests/suites/unit/clawops/test_op_journal.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/contracts/repo/test_docs_parity.py
Tested: uv run --project . ruff check src/clawops/op_journal.py src/clawops/approval_dispatch.py tests/suites/unit/clawops/test_op_journal.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/contracts/repo/test_docs_parity.py
Tested: uv run --project . pyright src/clawops/op_journal.py src/clawops/approval_dispatch.py tests/suites/unit/clawops/test_op_journal.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/contracts/repo/test_docs_parity.py
Tested: uv run --project . python -m compileall -q src tests
Not-tested: make typecheck / full-project mypy did not complete within this worker session
Constraint: RC8 task 1 is limited to docs and contract coverage; no .omx artifacts
Directive: Keep README launch entrypoints and CI/security workflow docs aligned with the repo contract tests
Confidence: high
Scope-risk: narrow
Tested: uv run --locked pytest -q tests/suites/contracts/repo/test_docs_parity.py
Tested: uv run ruff check tests/suites/contracts/repo/test_docs_parity.py
Tested: uv run pyright
Tested: uv run python -m compileall -q src tests
Not-tested: uv run mypy remained slow/non-terminating in this worker session
The source CI/security doc gained additional fresh-host workflow context in the launch-readiness documentation pass, so the packaged asset copy must mirror it byte-for-byte to keep packaged-runtime parity checks green.

Constraint: Packaged platform docs must stay byte-identical to platform/docs counterparts

Rejected: Leave packaged copy stale and rely on source docs at runtime | breaks packaged-runtime parity contract

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Mirror every source doc edit under src/clawops/assets/platform/docs in the same patch

Tested: uv run --project . pytest -q tests/suites/contracts/repo/test_packaged_runtime_assets.py tests/suites/contracts/repo/test_docs_parity.py tests/suites/contracts/repo/test_ci_workflow_surfaces.py tests/suites/unit/ci/test_security_workflow.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/unit/clawops/test_op_journal.py

Tested: uv run --project . pyright src/clawops/approval_dispatch.py src/clawops/op_journal.py tests/scripts/security_workflow.py tests/utils/helpers/_ci_workflows/security.py tests/utils/helpers/ci_workflows.py tests/suites/unit/ci/test_security_workflow.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/unit/clawops/test_op_journal.py

Tested: uv run --project . mypy src/clawops/approval_dispatch.py src/clawops/op_journal.py tests/scripts/security_workflow.py tests/utils/helpers/_ci_workflows/security.py tests/utils/helpers/ci_workflows.py tests/suites/unit/ci/test_security_workflow.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/unit/clawops/test_op_journal.py

Tested: uv run --project . ruff check src/clawops/approval_dispatch.py src/clawops/op_journal.py tests/scripts/security_workflow.py tests/utils/helpers/_ci_workflows/security.py tests/utils/helpers/ci_workflows.py tests/suites/unit/ci/test_security_workflow.py tests/suites/unit/clawops/test_approval_dispatch.py tests/suites/unit/clawops/test_op_journal.py tests/suites/contracts/repo/test_ci_workflow_surfaces.py tests/suites/contracts/repo/test_docs_parity.py

Tested: uv run --project . python -m compileall -q src tests
The security lane recovery smoke failed in CI because OpenClaw CLI verification rejected the disposable archive format. The helper now forces the strongclaw_recovery tar fallback path during the smoke cycle so backup/verify/restore evidence remains stable across runner environments, and unit coverage now locks that behavior.

Constraint: Recovery smoke must run in generic CI runners where OpenClaw CLI behavior can differ from fallback tar semantics

Rejected: Require OpenClaw-manifest-complete backup fixtures in the smoke helper | adds brittle environment coupling to a lightweight gate

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep recovery smoke self-contained and environment-agnostic; do not depend on host OpenClaw backup manifest conventions

Tested: uv run --project . ruff check tests/utils/helpers/_ci_workflows/security.py tests/suites/unit/ci/test_security_workflow.py

Tested: uv run --project . pyright tests/utils/helpers/_ci_workflows/security.py tests/suites/unit/ci/test_security_workflow.py

Tested: uv run --project . mypy tests/utils/helpers/_ci_workflows/security.py tests/suites/unit/ci/test_security_workflow.py

Tested: uv run --project . pytest -q tests/suites/unit/ci/test_security_workflow.py tests/suites/contracts/repo/test_ci_workflow_surfaces.py

Tested: uv run --project . python3 ./tests/scripts/security_workflow.py run-recovery-smoke --tmp-root /tmp
The security workflow invoked tests/scripts/security_workflow.py with the host python interpreter, which bypassed the uv-managed environment and caused dependency/import failures in CI. Scripted security checks now run through uv so channel verification, recovery smoke, and SARIF fallback generation execute with the same project runtime contract as local verification.

Constraint: Workflow helper scripts import project modules that depend on uv-managed environment packages

Rejected: Keep plain python3 invocations and trim helper imports | hides environment drift and weakens workflow-thin helper reuse

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Any tests/scripts helper that imports project modules must run via uv in GitHub Actions

Tested: uv run --project . pytest -q tests/suites/contracts/repo/test_ci_workflow_surfaces.py tests/suites/unit/ci/test_security_workflow.py

Tested: actionlint .github/workflows/security.yml
@jsugg jsugg force-pushed the fix/release-readiness-gates branch from a164cac to bb4a04a Compare April 2, 2026 14:02
@jsugg jsugg merged commit ef02e14 into main Apr 2, 2026
9 checks passed
@jsugg jsugg deleted the fix/release-readiness-gates branch April 2, 2026 14:06
jsugg added a commit that referenced this pull request Apr 2, 2026
Harden release gates for channels, recovery, and policy review
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