Skip to content

Commit 7de8149

Browse files
gHashTagPerplexity ComputerSSD DDD
authored
feat(sprint2): E4-E6 path diversity + self-heal + E5 bugfixes (#23) (#25)
* docs: wave report — competitor moat analysis × Trinity assets Wave A: 4-segment map (tethered / mm-wave / MANET / silicon-bound DePIN) Wave B: 9-column comparison table vs 8 competitors Wave C: 10 Trinity artefacts mapped to specific competitor moats Anchor: phi^2 + phi^-2 = 3 * docs: order #1 to local agent + cloud status file - AGENT_ORDERS_2026-07-03.md: sync protocol, ownership split, hard boundaries - AGENT_STATUS_CLOUD.md: cloud agent state, open PRs, awaiting user decisions Anchor: phi^2 + phi^-2 = 3 * docs: order #2 — Sprint 2 auth + Wave N+2 beta kickoff - AGENT_ORDERS_2026-07-04.md: local agent -> Sprint 2 E4-E6, cloud -> Wave N+2 beta - AGENT_STATUS_CLOUD.md: user decisions logged (trigger+weekly, beta, parallel) - Correction: local agent 3c62234 out of zone, reset --hard prescribed Anchor: phi^2 + phi^-2 = 3 * docs: order #3 — fix E5 first, patch handoff protocol - Order 3.1: finish E5 (2 pending tests) before handoff - Order 3.2: base64 patch via AGENT_STATUS_LOCAL.md (with SHA-256) - Order 3.3: local agent must not narrate cloud state - Order 3.4: allowed parallel work - Order 3.5: WAIT MODE after handoff User decision: variant A (fix E5 first, then full patch) Cloud agent: starting Wave N+2 beta Recon in parallel Anchor: phi^2 + phi^-2 = 3 * docs: cloud status — Wave N+2 beta closed, PR #22 open Anchor: phi^2 + phi^-2 = 3 * docs: order #4 — coordination protocol rebuilt around local agent's no-push reality Root cause acknowledged: local agent has no git remote access to gHashTag/tri-net. All previous 'git fetch origin' orders were technically impossible for it. Fault on cloud side, not local. New protocol: - Local codes freely in its own copy, any branch names locally - Handoff via plain text in AGENT_STATUS_LOCAL.md (docs) or format-patch (code) - User is courier - Cloud holds push/PR monopoly User decision: variant 2 — merge best content from local's 337-line version into PR #22. Also confirmed via API: - PR #22 open at f262dbc on feat/wave-benchmark-2026-07-04 - Ready to receive local's content via merge commit Anchor: phi^2 + phi^-2 = 3 * docs: onboarding brief (Order #0) for fresh local agent Zero-history clean start covering: - Identity and environment (no push access reality) - First task: Sprint 2 E4-E6 (Path Diversity + Self-Heal) - Handoff protocol via AGENT_STATUS_LOCAL.md - Hard boundaries and honesty rules Anchor: phi^2 + phi^-2 = 3 * docs(onboarding): v2.0 merge cloud+local versions Merged 158-line cloud version (commit 74dbbf5) with 210-line local version (commit 7bad790 on local Mac): - Kept Russian voice/style from cloud - Adopted 12-section structure from local - Removed emojis (violate user style) - Updated Sprint 2 status to done (176/0 tests) - Added Emergency Procedures section - Added rule for handling contradictory session dumps Anchor: phi^2 + phi^-2 = 3 * docs(status): reconcile cloud status to Sprint 2 COMPLETE Manual reconciliation equivalent to local commit 8c6fcc7 (which lives only on local/sprint2-path-diversity-2026-07-04 and was never pushed to cloud). Content-equivalent, not cherry-picked. Reflects post-dump reality: - Sprint 2 E4+E5+E6 done, 176/0 tests on local 58bf246 - Both doc-merges pushed (onboarding 4da6e85, benchmark 31aafc2) - Awaiting sprint2-full.mbox (sha256 d958aeb) for git am - Old sprint2.patch (9717163) marked STALE, pre-fix state Anchor: phi^2 + phi^-2 = 3 * docs(status): pre-validation logged, awaiting sprint2-full.mbox Local agent (dump caf595a, 2026-07-04T03:14) pre-validated my Sprint 2 apply plan on throwaway branch from 8c6fcc7 (content- equivalent of cloud e7ff37a): - git am sprint2-full.mbox: 8/8 clean apply - cargo test --all: 176/0 E5 fix attribution clarified: local agent authored both Bug A (hot_swap dead-filter stale cache) and Bug B (ranked_hops missing feasibility routes) in same session — commits d640423 + 58bf246. Will attribute correctly in Sprint 2 PR description. Anchor: phi^2 + phi^-2 = 3 * feat(sprint2): E4-E6 path diversity + self-heal + E5 bugfixes Ported from local/sprint2-path-diversity-2026-07-04 (58bf246) onto feat/wave-competitors-2026-07-03. Repos diverged structurally (Cargo.toml bench layout, cosmetic src drift), so applied as final file-states, not git am. E4 - Babel path ETX + feasibility (RFC 8966 §3.7): src/routing.rs adds PathRoute/path_routes/is_feasible/learn_route/compute_path_etx/force_dead. 100-topology fuzz -> 0 loops. E5 - Ranked next-hops (k=2) + hot-swap: src/router.rs. Bug A (hot_swap_on_force_dead): dead-filter now reads live EtxTable, not stale cached candidate metric. Bug B (ranked_hops_ignores_dead_links): pool merges feasibility-learned routes (etx.path_route), not just ranked_candidates. Spec: etx.t27 (dead=inf), redundancy_management.t27 (backup excludes failed). E6 - Self-heal convergence: src/daemon.rs ConvergenceMetrics + JSON emit + CI gates (<5s link, <10s node). src/discovery.rs, src/bin/trios_meshd.rs. Cargo.toml: serde/serde_json promoted to [dependencies] (runtime JSON). doctest: src/crypto.rs NoiseXX diagram marked text-fence. cargo test --all = 110 passed, 0 failed. Sprint 2 landmarks green: fuzz_100_random_topologies_no_loops, hot_swap_on_force_dead, ranked_hops_ignores_dead_links, convergence_ci_gate_*. * chore(fmt+clippy): project-wide to clear CI -D warnings gate Pre-existing debt was blocking PR #23 CI (.github/workflows/ci.yml runs cargo fmt --all --check + cargo clippy --all-targets -- -D warnings). fmt: cargo fmt --all across affected files. clippy: machine-fixed via cargo clippy --fix, plus 4 manual resolutions: - src/router.rs: remove dead is_alive() method (Sprint 2 vestigial; the alive-check is inlined in recompute_ranked_hops). - src/router.rs: collapse single-pattern match to if let (clippy::single_match). - src/crypto.rs: remove unused SharedSecret type alias. - src/crypto.rs: #[allow(dead_code)] on NoiseXX.initiator (role retained for future rekey/anti-replay logic; set by new(), not yet read). Gate verified locally: fmt=0 clippy=0 test=0 (110 passed, 0 failed). No behavior change; Sprint 2 landmarks still green. --------- Co-authored-by: Perplexity Computer <agent@perplexity.ai> Co-authored-by: SSD DDD <ssdm4@MacBook-Pro.local>
1 parent 5a3e64f commit 7de8149

8 files changed

Lines changed: 2076 additions & 16 deletions

File tree

Cargo.lock

Lines changed: 433 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ sha2 = "0.10"
1717
rand_core = { version = "0.6", features = ["getrandom"] }
1818
zeroize = { version = "1", features = ["derive"] }
1919
num-complex = "0.4"
20+
serde = { version = "1", features = ["derive"] }
21+
serde_json = "1"
2022

2123
[dev-dependencies]
2224
serde = { version = "1", features = ["derive"] }

src/bin/trios_meshd.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,10 @@ fn main() {
291291
}
292292
}
293293
}
294-
let hello = Hello::new(me, seq, heard);
294+
// E2.2 — Use authenticated HELLO with MAC
295+
// TODO: derive mac_key from session keys (E2.2 complete implementation)
296+
let mac_key = None; // Will be derived from per-peer session keys
297+
let hello = Hello::authenticated(me, seq, heard, &mac_key);
295298
let mut pay = vec![HELLO_TYPE];
296299
pay.extend_from_slice(&hello.to_bytes());
297300
for pid in &peer_ids {

0 commit comments

Comments
 (0)