Skip to content

Commit 5b9819b

Browse files
authored
Merge pull request #30 from dhawal-ss/codex/integrate-concurrent-hardening
Integrate concurrent production hardening
2 parents 8a1bd25 + 4e101bf commit 5b9819b

84 files changed

Lines changed: 3272 additions & 1144 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/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ jobs:
121121
runs-on: ubuntu-latest
122122
steps:
123123
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
124+
with:
125+
# The readiness validator binds sourceTreeHash to an exact historical
126+
# sourceCommit, so a synthetic depth-one PR merge is insufficient.
127+
fetch-depth: 0
124128

125129
- name: Setup Node.js
126130
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,30 @@ jobs:
8282
--unlock --components=secrets >/dev/null
8383
npm run test:matrix-spike 2>&1 | tee "$MESH_ACCEPTANCE_LOG"
8484
'
85+
docker compose -f infra/matrix-spike/docker-compose.yml \
86+
down --volumes --remove-orphans 2>&1 |
87+
tee "matrix-spike-logs/teardown-cycle-$cycle.log"
8588
done
8689
8790
source_sha="$(git rev-parse HEAD)"
91+
source_tree_hash="$(git rev-parse 'HEAD^{tree}')"
8892
cycle_1_sha="$(sha256sum matrix-spike-logs/acceptance-cycle-1.log | awk '{ print $1 }')"
8993
cycle_2_sha="$(sha256sum matrix-spike-logs/acceptance-cycle-2.log | awk '{ print $1 }')"
94+
teardown_1_sha="$(sha256sum matrix-spike-logs/teardown-cycle-1.log | awk '{ print $1 }')"
95+
teardown_2_sha="$(sha256sum matrix-spike-logs/teardown-cycle-2.log | awk '{ print $1 }')"
9096
printf '%s\n' \
9197
'{' \
9298
' "schemaVersion": 1,' \
9399
" \"sourceSha\": \"$source_sha\"," \
100+
" \"sourceTreeHash\": \"$source_tree_hash\"," \
101+
" \"workflowRunId\": \"${GITHUB_RUN_ID}\"," \
102+
" \"workflowRunAttempt\": \"${GITHUB_RUN_ATTEMPT}\"," \
103+
" \"workflowEvent\": \"${GITHUB_EVENT_NAME}\"," \
94104
' "status": "passed",' \
95105
' "independentResetTestCycles": 2,' \
96106
' "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\" }" \
107+
" { \"iteration\": 1, \"log\": \"acceptance-cycle-1.log\", \"sha256\": \"$cycle_1_sha\", \"teardownLog\": \"teardown-cycle-1.log\", \"teardownSha256\": \"$teardown_1_sha\" }," \
108+
" { \"iteration\": 2, \"log\": \"acceptance-cycle-2.log\", \"sha256\": \"$cycle_2_sha\", \"teardownLog\": \"teardown-cycle-2.log\", \"teardownSha256\": \"$teardown_2_sha\" }" \
99109
' ]' \
100110
'}' > matrix-spike-logs/acceptance-report.json
101111
@@ -118,7 +128,7 @@ jobs:
118128
name: matrix-federation-acceptance-${{ github.sha }}-${{ github.run_number }}
119129
path: mesh/matrix-spike-logs/
120130
if-no-files-found: error
121-
retention-days: 14
131+
retention-days: 30
122132

123133
- name: Tear down disposable homeservers
124134
if: ${{ always() }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ claudereview/
9999
# Generated local integration-test state
100100
**/infra/matrix-spike/runtime/
101101
**/infra/homeserver/runtime/
102+
**/infra/homeserver/rotation-evidence/
102103

103104
# Local configuration and secrets
104105
.env

MESH_PRODUCTION_READINESS_CONTINUATION_2026-08-01.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Mesh production-readiness continuation
22

3+
> **ARCHIVED 2026-08-01 SNAPSHOT.** This is historical evidence, not a current
4+
> readiness assertion. Current source and the schema-v2 readiness ledger win;
5+
> rerun every named gate before reusing any count, SHA, or completion claim.
6+
37
Status: `ALL_LOCALLY_SPECIFIABLE_FINDINGS_COMPLETE_NOT_RELEASE_READY`
48

59
Date: 2026-08-01

MESH_SOL_PRODUCTION_IMPLEMENTATION_PLAN_2026-07-31.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Mesh — Competitive Audit & Production Implementation Plan — For ChatGPT Sol
22

3+
> **ARCHIVED 2026-07-31 PLAN.** Do not execute this file as a current handoff
4+
> and do not reuse its production assertions. Current source, `AGENTS.md`, and
5+
> the schema-v2 readiness ledger supersede it.
6+
37
**Date:** 2026-07-31
48
**Branch:** `main`
59
**Integrated implementation SHA:** `7effb0cea2eba0b92aa4a62d749aad12ddbfdbbe`

MESH_SOL_REFERENCE_REPOSITORY_PRODUCTION_PLAN_2026-07-31.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Mesh reference-repository production implementation plan
22

3+
> **ARCHIVED 2026-07-31 REFERENCE PLAN.** It is retained for provenance and
4+
> design history only. Current source, `AGENTS.md`, and the schema-v2 readiness
5+
> ledger supersede every dated readiness, SHA, and implementation assertion.
6+
37
**Prepared for:** the next ChatGPT Sol implementation agent
48
**Snapshot date:** 2026-07-31
59
**Repository:** `D:\Creations\Applications\mesh`

PRODUCTION_BETA_PLAN.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Mesh: Production Beta Implementation Plan
22

3+
> **ARCHIVED EVIDENCE SNAPSHOT — NOT CURRENT RELEASE AUTHORITY.** This document
4+
> preserves dated implementation history. Current source, `AGENTS.md`, and the
5+
> schema-v2 ledger at `mesh/release/readiness.json` control every present-tense
6+
> release decision. Test counts, SHAs, workflow results, and “complete” claims
7+
> below must not be reused without fresh same-source verification.
8+
39
**Prepared:** 2026-07-29
410
**Audience:** An autonomous coding agent (and human reviewers) picking up engineering work on Mesh
511
**Purpose:** Translate a full-codebase production-readiness review into a prioritized, actionable backlog that moves Mesh from "first successful manual E2E run" to a real production beta.
612

713
The machine-readable release gate ledger is [mesh/release/readiness.json](mesh/release/readiness.json), validated by `npm run check:readiness-ledger`. It is release evidence only; runtime security and capability authority remain in the typed backend boundary.
814

9-
Evidence binding rule: `releaseSha` names the exact source snapshot on which the
10-
evidence was collected. Because a tracked ledger cannot contain the commit SHA
11-
of the commit that contains that same ledger, the release workflow permits a
12-
final metadata-only commit that changes only `mesh/release/readiness.json` after
13-
the tested source snapshot. The validator rejects any source-code delta in that
14-
case. Never update the ledger SHA and application code together when preparing a
15-
release evidence snapshot.
15+
Evidence binding rule: schema v2 records both `sourceCommit` and
16+
`sourceTreeHash`; each passing item repeats them as `testedCommit` and
17+
`testedTreeHash`. A passing ledger therefore identifies one committed source
18+
tree, while a later metadata-only ledger commit may record that already-tested
19+
tree. Never treat a dirty worktree or a different tree at the same base commit
20+
as equivalent evidence.
1621

1722
---
1823

SECURITY.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,22 @@ signed public update route is verified.
99

1010
## Report a vulnerability
1111

12-
Use GitHub's private vulnerability reporting for this repository. Do not open a
13-
public issue, discussion, or pull request containing exploit details, account
14-
tokens, invitation secrets, recovery material, personal data, signing material,
15-
or service credentials.
12+
**Confidential route status: unavailable.** GitHub private vulnerability
13+
reporting is currently disabled for this repository, and no reviewed security
14+
mailbox has been published. Do not open a public issue, discussion, pull request,
15+
or advisory draft containing exploit details, account tokens, invitation
16+
secrets, recovery material, personal data, signing material, or service
17+
credentials. The production beta is blocked until the owner enables and drills a
18+
confidential reporting route; this file and the public security page must be
19+
updated in the same reviewed change when that happens.
1620

1721
Include the affected source SHA, operating system, impact, minimal reproduction,
1822
and whether the issue may already have exposed data. Do not test against accounts,
1923
communities, or infrastructure you do not own or have explicit permission to use.
2024

21-
The owner will acknowledge a report, coordinate remediation and disclosure, and
22-
credit reporters when requested and safe. No response-time SLA is promised before
23-
the production beta exists.
25+
Once a confidential route is enabled, the owner will acknowledge reports,
26+
coordinate remediation and disclosure, and credit reporters when requested and
27+
safe. No response-time SLA is promised before the production beta exists.
2428

2529
## Release security boundary
2630

mesh/docs/architecture/on-device-ai-boundary.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Required behavior
88
-----------------
99

1010
* Inference stays on the user's device. Production code cannot add a third-party
11-
inference endpoint or AI-provider SDK without an explicit security-reviewed
12-
allowlist change in ``scripts/check-ai-boundary-lib.mjs``.
11+
inference endpoint or AI-provider SDK. The reviewed manifest at
12+
``security/ai-boundary.json`` keeps both network allowlists empty.
1313
* AI code cannot send messages, create invitations, remove or ban people, change
1414
roles, or perform moderation. Suggestions must remain drafts that a person
1515
reviews and submits through the normal product controls.
@@ -27,7 +27,13 @@ Review boundary
2727
---------------
2828

2929
The CI check scans production source and dependency manifests, not prose. It
30-
rejects known provider dependencies and endpoints globally, then applies
30+
validates the checked policy manifest, rejects known provider dependencies and
31+
endpoints globally, then applies
3132
network, feature-gate, download, resource-disclosure, and user-authority checks
3233
only to narrowly identified AI modules. Positive and negative fixtures keep the
3334
rule behavior reviewable.
35+
36+
The same manifest is embedded and validated by ``src-tauri/src/ai_boundary.rs``.
37+
Native authority permits only a draft suggestion and denies network, sending,
38+
invitation, membership, role, and moderation actions. Renderer markers and the
39+
source scanner are defense in depth; they never grant authority.

0 commit comments

Comments
 (0)