Repository navigation
123 lines (102 loc) · 4.72 KB
/
Copy pathreliability-gate.yml
File metadata and controls
123 lines (102 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Deterministic Reliability Gate
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: reliability-gate-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
jobs:
rust:
name: Rust reliability and security
needs: web
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Download tested Web assets
uses: actions/download-artifact@v4
with:
name: merry-web-dist
path: web/dist
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install shell and sandbox test dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --yes bubblewrap fish ripgrep gnupg openssh-client
- name: Enable unprivileged sandbox namespaces
run: |
set -euo pipefail
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
sudo sysctl -w kernel.unprivileged_userns_clone=1 || true
bwrap --unshare-user --die-with-parent --ro-bind / / -- /usr/bin/true
- name: Check formatting
run: cargo fmt --all --check
- name: Verify scenario selection fails closed
run: bash .github/scripts/tests/cargo-test-scenario.sh
- name: Run named T6 evidence scenario
run: >-
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test provider_boundary
t6_failure_evidence
- name: Run deterministic security and lifecycle scenarios
run: |
set -euo pipefail
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test provider_boundary provider_stream_eof_before_completed_emits_failed
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test provider_boundary provider_stream_error_emits_failed_without_step_completed
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test provider_boundary duplicate_tool_result_after_resolved_does_not_mutate_session
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test provider_boundary provider_cancel_keeps_tool_exchange_for_retry
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test cancellation cancelling_
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test agent_loop agent_loop_process_command_invalid_arguments
bash .github/scripts/cargo-test-scenario.sh -p merry-runtime --test agent_loop provider_request_trace_includes_checkpoint_budget_diagnostics
bash .github/scripts/cargo-test-scenario.sh -p merry-tools --test runtime_integration denied_apply_patch
bash .github/scripts/cargo-test-scenario.sh -p merry-tools --test runtime_integration registered_read_text_domain_failure
bash .github/scripts/cargo-test-scenario.sh -p merry-process --lib bwrap_process_plan_hides_unapproved_host_integrations
bash .github/scripts/cargo-test-scenario.sh -p merry-cli --bin merry settings_debug_does_not_include_secret_material
bash .github/scripts/cargo-test-scenario.sh -p merry-cli --bin merry sandbox_supports_symlinked_product_write_roots
- name: Run deterministic Rust suite
run: cargo test --locked --all
- name: Run Rust lint gate
run: cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Summarize deterministic diagnostics
if: always()
run: |
{
echo "## Deterministic reliability/security gate"
echo "- revision: \`${GITHUB_SHA}\`"
echo "- named evidence scenario: \`t6_failure_evidence\`"
echo "- live provider and Harbor: not used"
echo "- runtime event, artifact, ledger, trajectory, and test-result links are asserted by the named scenario"
} >> "$GITHUB_STEP_SUMMARY"
web:
name: Web trajectory contract
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: web/package-lock.json
- name: Build and test Web assets
working-directory: web
run: npm ci && npm test
- name: Verify generated Web sources
run: git diff --exit-code -- web/src/trajectory-contract.generated.ts
- name: Upload tested Web assets
uses: actions/upload-artifact@v4
with:
name: merry-web-dist
path: web/dist
if-no-files-found: error