Generated: 2026-04-19
Review Cadence: Weekly (Friday EOD)
- Owner: Lean expert
- Status: NOT STARTED
- Effort: 1 day
- Description: Add high-level strategy docstrings to each theorem Lean file
- Files to Update:
proofs/LeanFormalization/Theorem1BFT.leanproofs/LeanFormalization/Theorem2RDP.leanproofs/LeanFormalization/Theorem3Communication.leanproofs/LeanFormalization/Theorem4Liveness.leanproofs/LeanFormalization/Theorem5Cryptography.leanproofs/LeanFormalization/Theorem6Convergence.lean
- PR Template: Add comment block with "Strategy:", "Tactics used:", "Future work:" sections
- Done Criteria: All 6 files have docstrings, PR approved
- Owner: Backend engineer
- Status: NOT STARTED
- Effort: 1 day
- Description: Add Prometheus exports for formal claim validation
- Metrics to Add:
mohawk_bft_resilience_estimate(gauge)mohawk_rdp_composition_current(gauge)mohawk_communication_cost_observed(histogram)mohawk_liveness_success_prob(gauge)mohawk_proof_verification_p99(histogram)
- Files to Modify:
internal/aggregator.go(add resilience calculation)internal/rdp_accountant.go(expose composition)cmd/orchestrator/main.go(register metrics)
- Testing: Curl
http://localhost:9090/metrics | grep mohawk_*afterdocker compose up - Done Criteria: All 5 metrics exported, visible in Prometheus
- Owner: Documentation
- Status: NOT STARTED
- Effort: 1 day
- Description: Write step-by-step guide for contributors to add a theorem
- Output File:
docs/CONTRIBUTING_LEAN_PROOFS.md - Sections:
- Theorem statement → Lean signature (template)
- Common tactic patterns (omega, linarith, norm_num)
- Local testing workflow (
lake build) - Integration with traceability matrix
- Runtime test setup
- Full example: Add a simple convergence lemma
- Review: Pair with external contributor for feedback
- Done Criteria: Document published, tested on 1 external contributor
- Owner: Lean expert (high complexity)
- Status: NOT STARTED
- Timeline: Start week 1, complete week 2
- Description: Extend Theorem 4 with probabilistic Chernoff bounds
- Deliverables:
- Define
chernoff_bound : ℚ → ℚ → ℚ(lambda, k, result) - Prove
chernoff_monotone: tighter as k increases - Instance:
k=12, α=0.9 → P[failure] < 10^-12 - Integration:
lake buildpasses + no placeholders
- Define
- File:
proofs/LeanFormalization/Theorem4ChernoffBounds.lean(new) - Tests:
test/straggler_test.go::TestChernoffBound_*(new) - Matrix Update: Add theorem to
proofs/FORMAL_TRACEABILITY_MATRIX.md - Done Criteria:
- Proof compiles with
lake build - 2+ test functions exercise bounds
- Matrix updated with new theorem-test mapping
- CI passes with new proof integrated
- Proof compiles with
- Owner: Lean expert
- Status: NOT STARTED
- Timeline: Start week 3 (after P1.1 complete)
- Effort: 5-7 days (can parallelize with others)
- Description: Extend Theorem 6 with ℝ-valued convergence rate
- Deliverables:
- Define envelope over ℝ (not ℕ)
- Prove O(1/√KT) + O(ζ²) rate
- Validate with concrete SSGD parameters
- Integration:
lake buildpasses
- File:
proofs/LeanFormalization/Theorem6ConvergenceReals.lean(or extend existing) - Dependencies: Mathlib.Analysis.SpecialFunctions.Sqrt (verify availability)
- Stretch Goal: Integrate with Mathlib.Probability (defer to Phase 3c)
- Done Criteria: Proof compiles, passes CI, matrix updated
- Owner: QA + Lean expert
- Status: BLOCKED on P1.1, P1.2
- Timeline: Week 2 (after P1.1) + Week 4 (after P1.2)
- Description: Integrate new theorems into traceability matrix
- Changes:
- Add rows to
proofs/FORMAL_TRACEABILITY_MATRIX.mdfor new theorems - Create test functions for each new theorem
- Validate regex extraction still works
- Run
proofs/validate_formalization.pyto confirm
- Add rows to
- Matrix Template:
| # | Claim | Source | Module | Theorems | Tests | Status | Notes | | 7 | Chernoff tail bounds for 12-redundancy | internal/straggler_resilience.md | LeanFormalization/Theorem4ChernoffBounds.lean | chernoff_bound, chernoff_monotone | test/straggler_test.go::TestChernoffBound_* | Verified | Probabilistic phase 3b | - Done Criteria: Matrix valid + validate script passes + CI integration OK
- Owner: DevOps
- Status: COMPLETE
- Timeline: Start week 1, complete week 2
- Description: Parse Lean AST and extract proof complexity metrics
- Deliverables:
- Script:
scripts/extract_lean_proof_metrics.py(new) - Metrics: proof depth, tactic frequency, module imports, theorem DAG
- Output: JSON artifact with per-theorem metrics
- Validation: Run on current proofs/, generate baseline
- Script:
- Metrics Definition:
{ "theorem_name": "theorem1_half_bound_of_forall", "proof_depth": 3, "tactic_count": 2, "tactics": ["omega"], "module_imports": ["Mathlib.Tactic.Omega"], "file": "proofs/LeanFormalization/Theorem1BFT.lean" } - Testing: Run on 54 current theorems, validate JSON schema
- Done Criteria: Script runs without error, generates valid JSON for all theorems
- Owner: DevOps
- Status: COMPLETE
- Timeline: Start week 2 (after P2.1 complete)
- Description: Add CI workflow to detect proof complexity regressions
- Deliverables:
- Workflow:
.github/workflows/proof-regression-check.yml(new) - Logic:
- Extract metrics from base branch (cached)
- Extract metrics from PR branch
- Compare: flag if proof depth +20% OR tactic count +50%
- Output: PR comment with recommendations
- Workflow:
- Workflow Steps:
- Checkout base branch, run P2.1 script, cache result
- Checkout PR branch, run P2.1 script
- Compare JSONs, generate diff markdown
- Post comment on PR if regressions detected (non-blocking)
- Example Comment:
⚠️ Proof regression detected: - theorem1_half_bound_of_forall: depth 3→5 (+67%) Suggestion: Consider using `decide` for arithmetic bounds. - Done Criteria: Workflow runs on PR, detects +20% depth increase, comments posted
- Owner: DevOps
- Status: COMPLETE
- Timeline: Week 2 (can run in parallel with P2.2)
- Description: Detect circular imports and orphaned proofs
- Deliverables:
- Script:
scripts/audit_theorem_dependencies.py(new) - Checks: no circular imports, no dead code, all public theorems used
- CI integration: fail if cycles found
- Script:
- Script Output:
Circular imports: PASS Orphaned theorems: PASS (all 54 theorems used) Module graph: proofs/theorem_dependency_graph.json (generated) - Visualization (optional stretch): Mermaid diagram in CI artifact
- Done Criteria: Script runs, no cycles found in current proofs, CI check integrated
- Owner: QA
- Status: NOT STARTED
- Timeline: Start week 2, complete week 3
- Description: Add property-based tests for formal claims
- Deliverables:
- New file:
test/property_based_test.go - Properties (using
gopterortesting/quick):- Multi-Krum always selects f < n/2 honest
- RDP composition monotonic (ε_sum ≥ max(ε_i))
- Communication ≤ O(d * log n) bound
- Convergence envelope decreases with rounds
- Test generation: 1000+ random inputs per property
- CI integration: run on every PR
- New file:
- Learning curve: 1-2 days for Go property-based testing (new framework)
- Done Criteria:
- All 4 properties pass 1000+ random inputs
- CI integration complete
- Passes on current main branch
- Owner: QA
- Status: BLOCKED on P3.1 completion
- Timeline: Start week 3 (after P3.1)
- Description: Fuzz aggregation with Byzantine injections
- Deliverables:
- Fuzz targets in
test/fuzz_aggregation_test.go - Scenarios:
- Byzantine rate 45%, 55%, 70%
- Gradient overflow/underflow edge cases
- Repeated compression cycles (artifact accumulation)
- Fuzz time: 1 hour per PR (or opt-in for speed)
- Corpus: GitHub-stored seeds for reproducibility
- Fuzz targets in
- CI Option: Run on
mainpushes only (long execution) - Done Criteria: Fuzzer runs without panic, finds no new crashes in current code
- Owner: QA
- Status: NOT STARTED
- Timeline: Week 4 (after P3.1, P3.2 stabilize)
- Description: Synthetic 10M-node aggregation with Byzantine behavior
- Deliverables:
- New test:
TestIntegration10MNodeSimulation(long-running) - Validation:
- Resilience holds at 55.5% Byzantine
- Latency distribution captured
- Forensics of rejected gradients
- Artifact:
results/integration/10m-node-simulation.json - CI: run on
main+ tags only (expensive)
- New test:
- Reuse: Existing aggregator, random Byzantine injection
- Performance: Target <30 min execution (profile + optimize)
- Done Criteria: Test completes, resilience verified, artifact generated
- Owner: Backend
- Status: BLOCKED on QW2 (quick win)
- Timeline: Start week 3 (after QW2 done)
- Description: Instrument all formal claims in live runtime
- Deliverables:
- Expand QW2 metrics + add comprehensive set
- Dashboard: "Formal Properties Live" in Grafana
- Alerting: breach rules for each claim
- Metrics Details:
Metric Type Update Freq Threshold mohawk_bft_resilience_estimateGauge 1/round 0.555 ±0.05 mohawk_rdp_composition_currentGauge 1/tier ≤2.0 mohawk_communication_cost_observedHistogram 1/round ≤O(d*log n) mohawk_liveness_success_probGauge 1/epoch ≥0.9999 mohawk_proof_verification_p99Histogram 1/10s ≤100ms mohawk_convergence_trendGauge 1/epoch trend ↓ - Done Criteria: All metrics exported, Grafana dashboard created, thresholds defined
- Owner: Backend
- Status: BLOCKED on P4.1
- Timeline: Week 3 (can run parallel with P4.1)
- Description: Runtime endpoint to validate formal claims
- Deliverables:
- Endpoint:
GET /proofs/validate?theorem=1&claim=0.555 - Response: status (passing/warning/breach), observed vs claimed
- Operator dashboard polls every 60s
- Endpoint:
- Example Response:
{ "theorem": 1, "claim": 0.555, "observed": 0.552, "status": "passing", "confidence": 0.98, "last_update": "2026-04-19T14:32:00Z" } - Done Criteria: Endpoint responds, passes validation checks, integrated with dashboards
- Owner: Operations
- Status: NOT STARTED
- Timeline: Week 4
- Description: Runbooks for theorem claim breaches
- Deliverables:
- File:
docs/operations/playbooks/theorem-bft-breach.md - File:
docs/operations/playbooks/theorem-rdp-breach.md - File:
docs/operations/playbooks/theorem-liveness-breach.md - File:
docs/operations/playbooks/theorem-convergence-breach.md - Runbook content: symptoms, diagnostics, remediation steps
- AlertManager integration: breach alerts link to playbook URL
- File:
- Example Playbook Structure:
# BFT Resilience Breach Playbook ## Trigger `mohawk_bft_resilience_estimate > 0.60` (above 55.5% + margin) ## Diagnostics 1. Check rejected gradient forensics: `grep "rejected_reason" logs/*` 2. Verify Byzantine detector: `curl /metrics | grep byzantine_count` 3. Review network health: `docker logs orchestrator | grep "connection"` ## Remediation - If Byzantine rate legitimate: increase resilience bounds (requires proof update) - If false alarm: recalibrate detector threshold - If network issue: check p2p connectivity
- Done Criteria: All 4 playbooks written, AlertManager links tested
| Item | Owner | Status | Start | End | Effort |
|---|---|---|---|---|---|
| QUICK WINS | |||||
| QW1 Docstrings | Lean | ⏳ | This week | EOW | 1d |
| QW2 Health Metrics | Backend | ⏳ | This week | EOW | 1d |
| QW3 Playbook | Docs | ⏳ | This week | EOW | 1d |
| PRIORITY 1 | |||||
| P1.1 Chernoff Bounds | Lean | ⏳ | W1 | W2 | 3-4d |
| P1.2 Real Convergence | Lean | ⏳ | W3 | W4 | 5-7d |
| P1.3 Matrix Update | QA+Lean | 🔒 | W2,W4 | W2,W4 | 2d |
| PRIORITY 2 | |||||
| P2.1 Metrics Extraction | DevOps | ✅ | W1 | W2 | 2d |
| P2.2 Regression Detection | DevOps | ✅ | W2 | W3 | 2d |
| P2.3 Dependency Audit | DevOps | ✅ | W2 | W3 | 1d |
| PRIORITY 3 | |||||
| P3.1 Property Tests | QA | ⏳ | W2 | W3 | 3d |
| P3.2 Fuzz Aggregation | QA | 🔒 | W3 | W4 | 2d |
| P3.3 10M Simulation | QA | 🔒 | W4 | W5 | 3d |
| PRIORITY 4 | |||||
| P4.1 Live Metrics | Backend | 🔒 | W3 | W4 | 2d |
| P4.2 Validation Endpoint | Backend | 🔒 | W3 | W4 | 2d |
| P4.3 Playbooks | Ops | 🔒 | W4 | W5 | 1d |
Legend: ⏳ = Ready to start | 🔒 = Blocked | ✅ = Complete
Next Review: Friday EOD (weekly standup)
Escalation: Issues blocking start → discuss immediately
Success: All quick wins complete by EOW → momentum for P1-P2