Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
88de631
fix(autonomous-loop): Fix 8/9/10 — GUI error capture, healing verific…
Jul 5, 2026
02f3469
test(autonomous-loop): add Fix 8/9/10 regression tests (11 new tests)
Jul 5, 2026
7508afa
fix(self-observer): Fix 10b — raise metrics test timeout 300s→600s
Jul 5, 2026
dc16e1f
fix(executor): Fix 11/11b — enable LLM code generation for gui_build …
Jul 6, 2026
62cbce8
fix(optimizer): Fix 12 — GUI-aware benchmark + DailyEvolutionResult t…
Jul 6, 2026
c39a1fb
fix(executor): Fix 13 — TypeScript quality gate checks error reductio…
Jul 6, 2026
0b1b1be
fix(optimizer): Fix 14 — GUI-aware benchmark floor + LLM error detail…
Jul 6, 2026
2a3645d
fix(lint): Fix 15 — exclude build artifacts from ESLint + GUI error c…
Jul 6, 2026
8300283
fix(optimizer): Fix 17 — smart GUI file selection by ESLint rule diff…
Jul 6, 2026
a9d8761
fix(prompt): Fix 19 — expand code context to cover error lines
Jul 7, 2026
e9215c6
fix(prompt): Fix 20 — add React 19 ESLint rule fix patterns to TS sys…
Jul 7, 2026
8ec351f
feat(federation): add MAREF Agent Federation Aggregation Platform (12…
Jul 7, 2026
c001396
Merge remote-tracking branch 'origin/main'
Jul 8, 2026
129fd67
feat(eu-ai-act): add risk classifier (Art.6-7 + Annex III)
Jul 11, 2026
bb0664d
feat(eu-ai-act): add V2 compliance engine (M1-T2 through T9)
Jul 11, 2026
507d5c9
feat(eu-ai-act): add data governance module (Art.10)
Jul 11, 2026
3259912
fix(eu-ai-act): address M2-T1 code review issues
Jul 11, 2026
96a850c
feat(eu-ai-act): add record-keeping module (Art.12)
Jul 11, 2026
2fcdddb
fix(eu-ai-act): address M2-T2 code review issues
Jul 11, 2026
bc96036
feat(eu-ai-act): add accuracy, robustness & cybersecurity module (Art…
Jul 11, 2026
23e97df
fix(eu-ai-act): address M2-T3 code review issues
Jul 11, 2026
17d067b
feat(eu-ai-act): integrate M2 modules (Art.10,12,15) into engine
Jul 11, 2026
3bb8288
feat(eu-ai-act): add M2 integration tests for engine (Art.10,12,15)
Jul 11, 2026
da826fc
feat(eu-ai-act): add QMS module (Art.17)
Jul 11, 2026
fc45ca2
feat(eu-ai-act): add FRIA module (Art.27)
Jul 11, 2026
bc963c6
feat(eu-ai-act): add incident reporting module (Art.20+73)
Jul 11, 2026
6b0a273
feat(eu-ai-act): add post-market monitoring module (Art.61)
Jul 11, 2026
15ee924
fix(eu-ai-act): add QMS and FRIA exports to __init__.py
Jul 11, 2026
ee2c2ff
feat(eu-ai-act): integrate M3 modules into engine (Art.17,20,27,61+73)
Jul 11, 2026
bbbc32e
feat(eu-ai-act): add M3 integration tests for engine (Art.17,20,27,61)
Jul 11, 2026
a25e403
docs: publish W2-W10 blog posts — governance, TLA+, benchmarks, case …
Jul 12, 2026
f101c80
docs: add MCP comparison case study + marketing distribution assets
Jul 12, 2026
6895602
fix(ci): add setuptools upgrade + PYSEC-2026-3447 ignore for dependen…
Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .evolution_daemon_state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"last_run": "2026-07-01T02:44:22.890674+00:00",
"total_runs": 100,
"last_run": "2026-07-11T02:59:57.440567+00:00",
"total_runs": 130,
"failed_runs": 0
}
7 changes: 7 additions & 0 deletions .github/workflows/formal-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ on:
paths:
- 'src/formal/**'
- 'src/maref/governance/**'
- 'src/maref/integration/test_platform/**'
- 'src/maref/security/steg_sanitizer.py'
pull_request:
paths:
- 'src/formal/**'
- 'src/maref/governance/**'
- 'src/maref/integration/test_platform/**'
- 'src/maref/security/steg_sanitizer.py'
workflow_dispatch:

jobs:
Expand All @@ -32,3 +36,6 @@ jobs:
- name: Verify Constitutional Red Lines (RL-001 ~ RL-005)
run: |
java -cp /tmp/tla2tools.jar tlc2.TLC -config src/formal/MAREF_ConstitutionalRedLinesMC.cfg src/formal/MAREF_ConstitutionalRedLines.tla
- name: Verify Test Integration Theorems (含 StenoDetectionComplete)
run: |
java -cp /tmp/tla2tools.jar tlc2.TLC src/formal/MAREF_TestIntegration.tla -config src/formal/MAREF_TestIntegrationMC.cfg
4 changes: 3 additions & 1 deletion .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ jobs:
run: pip install -e ".[dev]"
- name: Install pip-audit
run: pip install pip-audit
- name: Upgrade setuptools (fix PYSEC-2026-3447)
run: pip install --upgrade setuptools>=83.0.0
- name: pip-audit
run: pip-audit --ignore-vuln PYSEC-2026-196
run: pip-audit --ignore-vuln PYSEC-2026-196 --ignore-vuln PYSEC-2026-3447

trivy-scan:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ telemetry-server/data/
# OpenCode config
.opencode/

# Website (maref.cc)
# Website (maref.cc) — ignore build output only
website/
!docs/website/blog/
!docs/website/blog/**

# Policy versions (runtime generated)
policy_versions/
Expand Down
244 changes: 244 additions & 0 deletions .repair-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
# MAREF 网站 vs 仓库一致性修复方案

> 编制日期: 2026-07-04 | 状态: 待审批

---

## 修复原则

1. **先降级营销到真实水平,再补齐仓库能力** — 避免审计风险
2. **Lyapunov 分析本身是真实技术工作**(白皮书有完整数学推导),问题在于错误标记为"TLA+ 验证" → 改为「实证验证」
3. **Sperner 完备性零实现** → 完全删除
4. **`docker run maref/lite` 镜像不存在** → 改为真实命令

---

## 决策记录(2026-07-04)

| 决策项 | 决定 |
|--------|------|
| 六层架构 | 保留六层视觉设计,但重命名层以匹配实际代码目录 |
| Lyapunov 措辞 | 改为「实证验证」(Lyapunov-validated / empirically validated) |
| Sperner | 完全删除,替换为实际已验证的不变量 |
| tla_replay.py | LyapunovConvergence 从 TLA invariant 改为 empirical_check 类型 |
| 执行方式 | 分批执行,每 Phase 完成后 review |

---

## P0: 网站修复(营销对齐现实)

### P0-A: Docker 命令修正(1 文件,2 处)

| 文件 | 行 | 原内容 | 改为 |
|------|-----|--------|------|
| `website/src/components/sections/MarefLiteSection.astro:14` | en | `docker run maref/lite` | `docker run maref/maref` |
| `website/src/components/sections/MarefLiteSection.astro:27` | zh | `docker run maref/lite` | `docker run maref/maref` |

**说明**: 真实镜像名为 `maref/maref`(CI 中 `DOCKERHUB_IMAGE: maref/maref`),`maref/lite` 从未发布过。

### P0-B: 六层架构修正(1 文件 + 1 SVG)

**决策: 保留六层视觉设计,重命名层名以匹配代码**。

| 文件 | 问题 | 修复方案 |
|------|------|---------|
| `website/src/components/sections/ArchitectureShowcase.astro` | 6 层名与目录结构不匹配 | 保留 6 层布局,层名改为匹配实际代码 |
| `website/public/images/architecture-layers.svg` | SVG 图与代码不符 | 更新 SVG |

**新旧层名对应**:

| 原层名 | 新层名 | 实际目录 | 组件标签 |
|--------|--------|---------|---------|
| Application | **Agent & Tools** | `agent/`, `tool/`, `desktop/`, `human/` | Agent System, Browser Control, Desktop Automation |
| Orchestration | **Orchestration** (保留) | `orchestration/`, `recursive/` (Self-*) | TaskDAG, Saga, Self-* (8) |
| Governance | **Governance** (保留) | `governance/`, `recursive/` | Gray Code FSM, Policy Decision Tree, CircuitBreaker |
| Safety | **Security & Compliance** | `security/`, `compliance/`, `desktop/` (safety) | 8-Layer Defense, Trust Boundaries, Compliance |
| Observability | **Observability** (保留) | `observability/`, `observation/`, `obs/` | OpenTelemetry, Audit Bus, Telemetry |
| Infrastructure | **Evolution** | `evolution/`, `redblue/`, `stress/` | Recursive Evolution, Red-Blue, Chaos Eng |

### P0-C: Lyapunov/Sperner TLA+ 错误声明(8 个网站页面)

**需修改的所有文件及具体改动**:

#### 1. `website/src/pages/en/features/governance.astro`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L47 | `Five TLA+ theorems verified. Lyapunov convergence. Sperner completeness. Every claim has a mathematical proof.` | `Five invariants verified via TLA+ model checking: state reachability, transition determinism, halt absorption, safety gate integrity, red line immutability.` |
| L85-88 | Lyapunov 稳定性分析声称是"mathematical proof" | 保留 Lyapunov 描述,去掉"数学证明"措辞,改为"empirically validated via Lyapunov stability analysis in 200-round adversarial evolution" |
| L108-109 | `5 — Lyapunov convergence, Sperner completeness, state reachability, transition determinism, halt absorption` | `5 — state reachability, transition determinism, halt absorption, safety gate integrity, red line immutability` |

#### 2. `website/src/pages/zh/features/governance.astro`(同上,中文版)

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L40 | `五大 TLA+ 定理已验证。Lyapunov 收敛、Sperner 完备性。` | `五大 TLA+ 不变量已验证:状态可达性、转换确定性、HALT 吸收、安全门完整性、红线不可变性。` |
| L66-68 | Lyapunov 数学证明声明 | 改为实证验证描述 |
| L82-83 | `Lyapunov 收敛、Sperner 完备性` | 同上 eng 版规格表 |

#### 3. `website/src/pages/en/features/evolution.astro`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L7 | `Lyapunov-proven convergence. FNR -60%` | `Lyapunov-validated convergence. FNR -60%` |
| L14 | `Lyapunov-proven convergence` | `Lyapunov-validated convergence` |
| L22-24 | `Lyapunov stability analysis proves...` | `Lyapunov stability analysis validates...` |
| L31 | `Provably converging` | `Provably converging (empirically validated)` |
| L47-48 | `Lyapunov stability analysis proves... mathematically guaranteed` | `Lyapunov stability analysis demonstrates monotonic convergence over 200 adversarial rounds` |
| L89 | `Lyapunov stability analysis, public theorem proof` | `Lyapunov stability analysis, empirically validated over 200 rounds` |

#### 4. `website/src/pages/zh/features/evolution.astro`(同上,中文版)

对应英文版所有改动。

#### 5. `website/src/pages/en/about.astro`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L20 | `using TLA+ formal verification, Lyapunov stability analysis` | `using TLA+ formal verification and Lyapunov-validated stability analysis` |
| L40 | `TLA+ formal verification — every governance state transition is mathematically proven` | `TLA+ formal verification — governance state transitions are model-checked` |
| L42 | `FNR -60% over 200 rounds, Lyapunov-proven convergence` | `FNR -60% over 200 rounds, Lyapunov-validated convergence` |

#### 6. `website/src/pages/en/faq.astro`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L25 | `8 layers of defense, formal verification (TLA+)` | `8 layers of defense, formal model checking (TLA+)` |
| L44-46 | `Lyapunov stability analysis mathematically proves...` | `Lyapunov stability analysis empirically demonstrates...` |

#### 7. `website/src/pages/en/learn/recursive-evolution/index.astro`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L9 | `first production-grade recursive evolution engine with Lyapunov-proven convergence` | `first production-grade recursive evolution engine with Lyapunov-validated convergence` |
| L17 | `first with mathematically proven convergence` | `first with empirically validated convergence` |
| L47-56 | Lyapunov 数学保证声明 | 改为"Lyapunov stability analysis empirically validates monotonic convergence" |
| L121 | `Convergence proof` → `Lyapunov stability analysis, 5 TLA+ theorems` | `Convergence proof` → `Lyapunov stability analysis, 5 TLA+ model-checked invariants` |

#### 8. `website/src/components/sections/FeatureCardGrid.astro`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L24 | `Lyapunov-proven convergence` | `Lyapunov-validated convergence` |
| L50 | `Lyapunov 收敛证明` | `Lyapunov 经验验证的收敛` |

### P0-D: 竞争对比表修正

`website/src/components/sections/CompetitiveTable.astro` 中 `Formal Verification` 维度评分 10/10:
- 保持 10 分(Gray Code FSM + 宪法红线 + 拜占庭共识确实有 TLA+ 验证)
- 但需在 tooltip 或脚注说明验证范围,去掉"Lyapunov"和"Sperner"

---

## P0: README 修复(3 文件)

### 9. `README.md`

| 位置 | 原内容 | 改为 |
|------|--------|------|
| L13 | `TLA+ formal verification` | `TLA+ formal model checking` |
| L36 | `TLA+ specs with 5 proven theorems (Lyapunov convergence + Sperner completeness)` | `TLA+ specs with 5 model-checked invariants (RedLineImmutability, SafetyGateIntegrity, AuditTrailCompleteness, GrayCodeTransition, HALTAbsorbing)` |
| L51 | `TLA+ Formal Verification — 5 theorem proofs (Lyapunov convergence + Sperner completeness)` | `TLA+ Formal Verification — 5 model-checked invariants` |
| L282 | 中文版同行修改 | 同上 |

### 10. `README.zh-CN.md`

同行修改,同上。

### 11. `.wiki/Home.md`

| L18 | `TLA+ Formal Verification — 5 theorem proofs (Lyapunov convergence + Sperner completeness)` | `TLA+ Formal Verification — 5 model-checked invariants` |

---

## P1: 代码修复(仓库对齐现实)

### 12. `src/maref/recursive/tla_replay.py`

**问题**: `generate_validation_report()` 硬编码所有 5 个 invariant 为 `passed=True`,包括 `LyapunovConvergence`,但实际 TLC 不检查此项。

**修复**:
- 将 `LyapunovConvergence` 从 `DEFAULT_TLA_SPEC` 的 invariants 列表中移除
- 改为从实际 TLC 输出文件解析结果(如果 CI 生成了 TLC 日志)
- 或者保持为 "empirical check"(计算实际 V(s)),但标记类型为 `empirical` 而非 `tla_invariant`

### 13. `src/maref/crypto/sm2.py`

**问题**: 公钥推导使用 double-and-add 点乘,非恒定时间。
**修复**: 添加恒定时间标量乘法实现(使用 Montgomery ladder)或添加性能告警日志。
**优先级**: 中(安全合规需求,非紧急)。

### 14. `docs/architecture.md`

**问题**: L7 仍声称 "64-state Gray-code finite state machine" — 64 态未实现。
**修复**: L7 改为 "10-state governance Gray-code FSM + 24-state agent FSM"。
L568 同样修改。

---

## P2: 文档修复(非紧急)

### 15-20: 以下 docs/ 文件中的 Lyapunov/Sperner TLA+ 声明

| 文件 | 改动 |
|------|------|
| `docs/github-sponsors-application.md` | Lyapunov/Sperner 不能标为 TLA+ 验证 |
| `docs/MAREF-Security-Whitepaper.md` | LyapunovConvergence 标记改为 empirical |
| `docs/aip-pioneer-application.md` | 修正为 5 个实际 TLA+ 不变量列表 |
| `docs/release-gate.md` | G8 项去掉 LyapunovConvergence |

### 21-22: 白皮书(保留 Lyapunov 分析,仅修正标签)

`docs/convergence-whitepaper.md`、`docs/MAREF-Technical-Whitepaper-arXiv.md` 等文件中的 Lyapunov 数学推导是**真实学术工作**,应保留。只需确保不将其错误标记为 "TLA+ 验证"。

---

## 影响文件总数

| 优先级 | 网站文件 | 仓库文件 | 文档文件 | 合计 |
|--------|---------|---------|---------|------|
| P0 | 11 | 0 | 4 | 15 |
| P1 | 0 | 2 | 1 | 3 |
| P2 | 0 | 0 | 6 | 6 |
| **合计** | **11** | **2** | **11** | **24** |

---

## 执行顺序建议

```
Phase 1: P0 网站(2-3 小时)
├── MarefLiteSection.astro (2 lines)
├── ArchitectureShowcase.astro + SVG
├── governance.astro en/zh (3 spots each)
├── evolution.astro en/zh (8 spots each)
├── about.astro (3 spots)
├── faq.astro (2 spots)
├── learn/recursive-evolution/index.astro (4 spots)
├── FeatureCardGrid.astro (2 spots)
└── CompetitiveTable.astro (tooltip)

Phase 2: P0 README + Wiki(30 分钟)
├── README.md (4 spots)
├── README.zh-CN.md (4 spots)
└── .wiki/Home.md (1 spot)

Phase 3: P1 代码(1-2 小时)
├── tla_replay.py (移除假 LyapunovConvergence invariant)
└── docs/architecture.md (64-state → 10+24 state)

Phase 4: P2 文档(1 小时)
└── 6 个 docs/ 文件修正
```

---

## 审批问题

在开始执行前需要确认:

1. **六层架构改五层**:是否接受取消 Application/Safety/Infrastructure 三层,改为 Orchestration/Governance/Security/Observability/Evolution?
2. **Lyapunov 措辞**:在网站上去掉"数学证明(mathematically proven)"改为"实证验证(empirically validated / Lyapunov-validated)"是否可接受?
3. **Sperner 完备性**:完全删除 vs 保留为 roadmap?
4. **tla_replay.py**:是否将 `LyapunovConvergence` 改为 `empirical_check` 类型?
5. **执行范围**:是否立即执行全部 P0,还是分批次审批后执行?
Loading
Loading