Skip to content

Commit 32caa77

Browse files
authored
Merge pull request #12 from dhawal-ss/codex/integrate-production-readiness
Integrate Mesh production readiness foundation
2 parents 72f093c + 1a35005 commit 32caa77

487 files changed

Lines changed: 35433 additions & 5636 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* @dhawal-ss
2+
3+
# Release publication and its security policy require an owner review.
4+
/.github/workflows/release-beta.yml @dhawal-ss
5+
/.github/workflows/security.yml @dhawal-ss
6+
/.github/dependency-review-config.yml @dhawal-ss
7+
/mesh/scripts/beta-release-preflight.ps1 @dhawal-ss
8+
/mesh/scripts/check-matrix-release-dependencies.ps1 @dhawal-ss
9+
/mesh/scripts/rust-dependency-policy.json @dhawal-ss
10+
/mesh/src-tauri/tauri.conf.json @dhawal-ss
11+
/mesh/src-tauri/Cargo.toml @dhawal-ss
12+
/mesh/src-tauri/Cargo.lock @dhawal-ss

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: "08:00"
9+
timezone: America/Chicago
10+
open-pull-requests-limit: 5
11+
labels:
12+
- dependencies
13+
- ci
14+
15+
- package-ecosystem: npm
16+
directory: /mesh
17+
schedule:
18+
interval: weekly
19+
day: monday
20+
time: "08:15"
21+
timezone: America/Chicago
22+
open-pull-requests-limit: 5
23+
groups:
24+
npm-minor-and-patch:
25+
update-types:
26+
- minor
27+
- patch
28+
labels:
29+
- dependencies
30+
- frontend
31+
32+
- package-ecosystem: cargo
33+
directory: /mesh/src-tauri
34+
schedule:
35+
interval: weekly
36+
day: monday
37+
time: "08:30"
38+
timezone: America/Chicago
39+
open-pull-requests-limit: 5
40+
groups:
41+
cargo-minor-and-patch:
42+
update-types:
43+
- minor
44+
- patch
45+
labels:
46+
- dependencies
47+
- rust
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
fail-on-severity: moderate
2+
license-check: true
3+
allow-licenses:
4+
- 0BSD
5+
- AGPL-3.0-only
6+
- Apache-2.0
7+
- BSD-1-Clause
8+
- BSD-2-Clause
9+
- BSD-3-Clause
10+
- BlueOak-1.0.0
11+
- BSL-1.0
12+
- CC-BY-4.0
13+
- CC0-1.0
14+
- CDLA-Permissive-2.0
15+
- ISC
16+
- MIT
17+
- MIT-0
18+
- MPL-2.0
19+
- OFL-1.1
20+
- Unicode-3.0
21+
- Unlicense
22+
- Zlib
23+
vulnerability-check: true
24+
# These exact advisories are retained in the raw Cargo audit and are confined
25+
# to the legacy-p2p graph, which every shipping Matrix artifact excludes.
26+
allow-ghsas: GHSA-3v94-mw7p-v465, GHSA-q2qq-hmj6-3wpp
27+
show-openssf-scorecard: true
28+
warn-only: false

.github/workflows/ci.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ jobs:
2424
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
2525

2626
- name: Install Rust toolchain
27-
uses: dtolnay/rust-toolchain@387aeee55b189f024a4f6d94890c5b18d73339cc
27+
uses: dtolnay/rust-toolchain@d0befba8b9ddf874327619e84c39b094edd58b66 # 1.93.0
2828
with:
29-
toolchain: 1.93.0
3029
components: clippy, rustfmt
3130

3231
- name: Install system dependencies (Linux)
@@ -82,9 +81,7 @@ jobs:
8281
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
8382

8483
- name: Install Rust toolchain
85-
uses: dtolnay/rust-toolchain@387aeee55b189f024a4f6d94890c5b18d73339cc
86-
with:
87-
toolchain: 1.93.0
84+
uses: dtolnay/rust-toolchain@d0befba8b9ddf874327619e84c39b094edd58b66 # 1.93.0
8885

8986
- name: Install system dependencies
9087
run: |
@@ -109,7 +106,7 @@ jobs:
109106

110107
- name: Check legacy LAN backend
111108
working-directory: mesh/src-tauri
112-
run: cargo check --no-default-features --features legacy-p2p --locked
109+
run: cargo check --no-default-features --features legacy-p2p --locked --jobs 1
113110

114111
- name: Test legacy LAN backend
115112
working-directory: mesh/src-tauri
@@ -160,10 +157,34 @@ jobs:
160157
working-directory: mesh
161158
run: npm run check:public-services
162159

160+
- name: Check production readiness ledger
161+
working-directory: mesh
162+
run: |
163+
node --test scripts/check-readiness-ledger.test.mjs
164+
npm run check:readiness-ledger
165+
166+
- name: Check fail-closed external acceptance contract
167+
working-directory: mesh
168+
run: |
169+
node --test scripts/check-external-acceptance.test.mjs
170+
node scripts/check-external-acceptance.mjs
171+
163172
- name: Check public site source
164173
working-directory: mesh
165174
run: npm run check:public-site
166175

176+
- name: Check beta product boundary
177+
working-directory: mesh
178+
run: npm run check:beta-contract
179+
180+
- name: Check production operations boundary
181+
working-directory: mesh
182+
run: npm run check:operations-contract
183+
184+
- name: Check third-party notices and licenses
185+
working-directory: mesh
186+
run: npm run check:third-party-notices
187+
167188
- name: Check homeserver recovery scripts
168189
working-directory: mesh
169190
run: |

.github/workflows/developer-preview.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
node-version: 22
2727
cache: npm
2828
cache-dependency-path: mesh/package-lock.json
29-
- uses: dtolnay/rust-toolchain@387aeee55b189f024a4f6d94890c5b18d73339cc
30-
with:
31-
toolchain: 1.93.0
29+
- uses: dtolnay/rust-toolchain@d0befba8b9ddf874327619e84c39b094edd58b66 # 1.93.0
3230

3331
- name: Validate developer-preview source
3432
working-directory: mesh
@@ -46,6 +44,7 @@ jobs:
4644
working-directory: mesh/src-tauri
4745
shell: bash
4846
run: |
47+
set -o pipefail
4948
cargo check --no-default-features --features matrix-backend --locked --jobs 1
5049
if cargo tree --no-default-features --features matrix-backend -e normal,build --locked | grep -Eq '(^| )libp2p v'; then
5150
echo 'Developer preview unexpectedly contains legacy libp2p.' >&2
@@ -66,7 +65,7 @@ jobs:
6665
cargo install cargo-cyclonedx --version 0.5.9 --locked
6766
cargo cyclonedx --manifest-path mesh/src-tauri/Cargo.toml --format json
6867
69-
$staging = Join-Path $env:RUNNER_TEMP "mesh-developer-preview"
68+
$staging = Join-Path $PWD "mesh/developer-preview-staging"
7069
New-Item -ItemType Directory -Path $staging | Out-Null
7170
$installers = @(
7271
Get-ChildItem mesh/src-tauri/target/release/bundle -Recurse -File |
@@ -99,17 +98,16 @@ jobs:
9998
} |
10099
Sort-Object |
101100
Out-File (Join-Path $staging "SHA256SUMS.txt") -Encoding ascii
102-
"MESH_PREVIEW_STAGING=$staging" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
103101
104102
- name: Attest developer-preview provenance
105103
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2
106104
with:
107-
subject-path: "${{ env.MESH_PREVIEW_STAGING }}/*"
105+
subject-path: "mesh/developer-preview-staging/*"
108106

109107
- name: Upload developer-preview artifact
110108
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
111109
with:
112110
name: Mesh-Windows-UNSIGNED-DEVELOPER-PREVIEW-${{ github.sha }}
113-
path: "${{ env.MESH_PREVIEW_STAGING }}"
111+
path: mesh/developer-preview-staging/
114112
if-no-files-found: error
115113
retention-days: 30

.github/workflows/matrix-federation-acceptance.yml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ jobs:
3838
cache-dependency-path: mesh/package-lock.json
3939

4040
- name: Install Rust 1.93
41-
uses: dtolnay/rust-toolchain@387aeee55b189f024a4f6d94890c5b18d73339cc
42-
with:
43-
toolchain: 1.93.0
41+
uses: dtolnay/rust-toolchain@d0befba8b9ddf874327619e84c39b094edd58b66 # 1.93.0
4442

4543
- name: Install Matrix test build dependencies
4644
run: |
@@ -65,29 +63,41 @@ jobs:
6563
key: ${{ runner.os }}-cargo-matrix-acceptance-${{ hashFiles('mesh/src-tauri/Cargo.lock') }}
6664
restore-keys: ${{ runner.os }}-cargo-matrix-acceptance-
6765

68-
- name: Reset and start disposable homeservers
66+
- name: Run two independent federated encryption and recovery cycles
6967
working-directory: mesh
7068
shell: bash
7169
run: |
7270
set -o pipefail
7371
mkdir -p matrix-spike-logs
74-
npm run setup:matrix-spike:reset 2>&1 | tee matrix-spike-logs/setup.log
75-
76-
- name: Run federated encryption and recovery acceptance
77-
working-directory: mesh
78-
shell: bash
79-
run: |
80-
set -o pipefail
8172
# The app's Linux keyring backend requires a Secret Service. This
8273
# disposable, empty-password keyring exists only for the isolated
8374
# runner and is destroyed with it; no production credential is used.
84-
dbus-run-session -- bash -c '
85-
set -o pipefail
86-
printf "\n" | gnome-keyring-daemon \
87-
--unlock --components=secrets >/dev/null
88-
npm run test:matrix-spike 2>&1 |
89-
tee matrix-spike-logs/acceptance.log
90-
'
75+
for cycle in 1 2; do
76+
npm run setup:matrix-spike:reset 2>&1 |
77+
tee "matrix-spike-logs/setup-cycle-$cycle.log"
78+
MESH_ACCEPTANCE_LOG="matrix-spike-logs/acceptance-cycle-$cycle.log" \
79+
dbus-run-session -- bash -c '
80+
set -o pipefail
81+
printf "\n" | gnome-keyring-daemon \
82+
--unlock --components=secrets >/dev/null
83+
npm run test:matrix-spike 2>&1 | tee "$MESH_ACCEPTANCE_LOG"
84+
'
85+
done
86+
87+
source_sha="$(git rev-parse HEAD)"
88+
cycle_1_sha="$(sha256sum matrix-spike-logs/acceptance-cycle-1.log | awk '{ print $1 }')"
89+
cycle_2_sha="$(sha256sum matrix-spike-logs/acceptance-cycle-2.log | awk '{ print $1 }')"
90+
printf '%s\n' \
91+
'{' \
92+
' "schemaVersion": 1,' \
93+
" \"sourceSha\": \"$source_sha\"," \
94+
' "status": "passed",' \
95+
' "independentResetTestCycles": 2,' \
96+
' "cycles": [' \
97+
" { \"iteration\": 1, \"log\": \"acceptance-cycle-1.log\", \"sha256\": \"$cycle_1_sha\" }," \
98+
" { \"iteration\": 2, \"log\": \"acceptance-cycle-2.log\", \"sha256\": \"$cycle_2_sha\" }" \
99+
' ]' \
100+
'}' > matrix-spike-logs/acceptance-report.json
91101
92102
- name: Capture service diagnostics
93103
if: ${{ always() }}
@@ -105,7 +115,7 @@ jobs:
105115
if: ${{ always() }}
106116
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
107117
with:
108-
name: matrix-federation-acceptance-${{ github.run_number }}
118+
name: matrix-federation-acceptance-${{ github.sha }}-${{ github.run_number }}
109119
path: mesh/matrix-spike-logs/
110120
if-no-files-found: error
111121
retention-days: 14

0 commit comments

Comments
 (0)