Repository navigation
dream(swarm): #3122 fix TopologyManager.rebalanceHybrid() one-directional adjacency (evaluated, ACCEPT) - #3123
Conversation
|
CI investigation for the initial batch of failures ( Not this PR's failure. Confirmed identical on Ported #3104's 1-line change into this branch (
Generated by Claude Code |
|
Follow-up: after the lockfile port (
Not portable the way #3104 was: the only real fix is publishing the missing version (or repinning to a published one), and per this repo's own publishing rules that's a separately-authorized action requiring signing keys/credentials this session doesn't hold — not something to do from a scoped swarm-topology candidate. Flagging here rather than widening this PR. This PR's own Generated by Claude Code |
ruvnet
left a comment
There was a problem hiding this comment.
Dream evidence review — exact head 79df9913b829d2605aef765ac427c462e10191fd
Frozen hypothesis: hybrid topology rebalancing is symmetric, preserves topology invariants, and passes the repository's required validation gates.
The focused evidence is useful: the V3 type-check and package-test jobs pass, and the new deterministic test exercises both promotion and demotion. CodeQL also passes.
Portfolio acceptance is blocked because Verification, Cross-Agent, CI/CD, CVE, and V3 CI are red on this exact head. Several failures occur during root installation before signing/security/integration smoke tests execute, so those gates have no result. Existing dependency/reproducibility blockers should be reused rather than duplicated.
Acceptance remains: reproduce the committed dependency graph, run the signing, witness, graph-schema, security, and cross-agent gates on this exact head, and preserve the focused topology tests.
INCONCLUSIVE
|
Re: the INCONCLUSIVE review — confirms the same two blockers already diagnosed and reported above on this thread, not a finding against the topology candidate itself:
Not duplicating either blocker — just confirming they're the same ones, reused rather than re-diagnosed. Once #3095 resolves, the blocked gates should run cleanly against this head without any further change here; the topology fix and its regression test are unaffected either way. Keeping this PR watched. Generated by Claude Code |
…onal adjacency (evaluated, ACCEPT) rebalanceHybrid()'s worker-mesh loop added edges only on the initiating worker's side (connections array + adjacencyList), never reciprocating on the target. Every sibling rebalance*() method, and this same function's own coordinator loop 8 lines below, update both sides. Flagged by 2026-08-24's dream-cycle night and deferred; fixed here with a 6-line mirrored-edge patch plus a deterministic (Math.random mocked) regression test. Independently adversarially reviewed (CONFIRMED). Full package suite 221/221, 0 regressions. Backfills docs/dream-cycle/LEDGER.md for 2026-08-20 through 2026-08-28 (merge-cadence backlog, not lost work) and adds tonight's row. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019nSbi8hkZdmwK2kaBXRj5J
79df991 to
570726e
Compare
|
Picking this back up after the rebase onto current
Generated by Claude Code |
|
Not this PR's failure — confirmed by main's own tip commit. Not attempting a fix: Between this and the earlier Generated by Claude Code |
Ships the swarm fixes merged since alpha.8 (#3357 hierarchical leader edges, #3378 event-driven UnifiedSwarmCoordinator wait, #3123, #3086, #3243, #3062). The CLI does not depend on @claude-flow/swarm, so they reach users only through this standalone publish. Publishability fixes found while preparing the tarball: - coordination/{agent-registry,task-orchestrator,swarm-hub}.ts used extensionless relative imports, so a plain `tsc` build of main throws ERR_MODULE_NOT_FOUND on `import('@claude-flow/swarm')`. Add the `.js` suffixes (the package is "type": "module"). - Restore the ADR-095 G2.2 transport re-exports on the root entry. alpha.8 was published from main@f8ab5a325 plus uncommitted work (later dacbe0e, never merged) that exported LocalTransport, FederationTransport, signMessage, etc. from the root. Without this, alpha.9 would silently drop 9 runtime exports alpha.8 users have. - Add a `files` allowlist (dist, README.md, MIGRATION.md). alpha.8 shipped src/, __tests__/, tmp.json, tsconfig.tsbuildinfo, a 1.5 MB ruvector.db and .claude-flow/ runtime state from a contributor's machine. - Record the repo version as alpha.9 (repo was stuck at alpha.7 while npm had alpha.8).
1. Hypothesis
Frozen before evaluation; not modified after seeing results.
2. Candidate
v3/@claude-flow/swarm/src/topology-manager.ts(+10 lines):rebalanceHybrid()'s worker-mesh loop now mirrors each edge onto the target (target.connections.push(worker.agentId)guarded against duplicates, plus the reciprocaladjacencyListupdate) — exactly matching the pattern already used 8 lines below (the coordinator loop) and inrebalanceMesh()/rebalanceHierarchical()/rebalanceCentralized().v3/@claude-flow/swarm/__tests__/topology.test.ts(+52 lines): 1 new deterministic regression test.Math.random()is mocked to always return0, making candidate selection fully deterministic; 5 workers reset to empty connections via the publicupdateNode()API isolaterebalanceHybrid()'s loop fromaddNode()'s own, separate, out-of-scope initial-connection wiring. Hand-traced and verified by execution (not a probabilistic sample) to reliably reproduce the asymmetric edgeagent-6 → agent-2pre-fix, symmetric post-fix.Not bundled (deliberately, to keep this patch one conceptual change):
createEdgesForNode()'s parallel one-directional initial-connection wiring for hybrid topology (bidirectional: this.config.type === 'mesh') — same bug class, different code path, confirmed still live, flagged as a follow-up.3. Evaluation Receipt
evaluated: accepted. Real evaluator: Vitest, deterministic, zero LLM calls, $0 cost. Baseline via
git stashontopology-manager.tsonly (test kept): new test fails exactly as predicted (agent2.connectionsmissing'agent-6',isConnected('agent-2','agent-6')false). Candidate: passes, both directions symmetric.4. Baseline Comparison
Full
@claude-flow/swarmsuite: 221/221 passing (220 pre-existing + 1 new), identically 0 failures with the candidate applied.tsc --noEmitfrom the package directory: 0 errors.5. Darwin Lineage
Skipped — scope mismatch, confirmed via
npx ruvector harness darwin --help: real interface evolves routing/topology/prompt/memory/tool/tier/context/coordination genome parameters against an LLM-scored bench corpus. No analog for a 6-line graph-symmetry fix. Same skip class as 6 of the last 7 dream-cycle nights.6. Flywheel Evidence
No signed
@metaharness/flywheelbundle — deterministic Vitest evidence, same class as every accepted night since 08-18. OBSERVATION/MEASUREMENT/INFERENCE/DECISION/REJECTION breakdown in the linked issue §7.7. Reward Hack Check
No reward-hack CLI reachable this session. Manual checklist clear, independently re-verified by the adversarial critic: no test weakened, no threshold tuned, no cherry-picking, $0 cost, discriminating test independently reproduced by reverting only the source fix. Full checklist in the issue §8.
8. Security Review
Pure in-memory graph bookkeeping (arrays/Sets). No new I/O, network, credential, or MCP-authority surface. No concerns — confirmed explicitly by the adversarial critic.
9. Regression Analysis
Grepped all consumers of
TopologyManagerconnection/adjacency state (unified-coordinator.ts, rest oftopology.test.ts) — nothing assumes an exact connection-count cap; existing hybrid tests already usetoBeGreaterThanOrEqual. A node ending up with more than its owntargetConnections=3via other workers' reciprocal picks (observed) is pre-existing soft-cap behavior identical torebalanceMesh(), not a new regression.10. ADR
None — scoped correctness/wiring fix, matches repo convention (08-18/19/24/25/26/27/28 all shipped without an ADR).
11. Research Gist
docs/dream-cycle/dream-gist-2026-08-29.md(committed on this branch) — fresh 2026 literature search (explicit negative result on the narrow bug class, real adjacent-area papers, primary-source competitor check across LangGraph/AutoGen/CrewAI/OpenAI Agents SDK/kyegomez-swarms), plus a light re-verification of the ruview/ruvector integration scans from 5 nights ago (nothing material changed, one npm version bump noted).12. Issue
Closes evaluation tracking in #3122 (full 15-section report: ledger check incl. 08-20..28 backfill, research, adversarial critique, scan findings, competitor table, witness).
13. Witness
d33ef4bf8ab27a8f9ef08352c9c293b53312a861ba1ddf4029655f99d700c54c12401be167cd1a5e1784f47c8208b73e9e970f5f9c1e9cd46b0eaab7a9ec3d9c93d747f46a53c1a2f532303ccc81d1af7fd76f5e14. Merge Policy
Human review required. Do not self-merge. Do not autonomously promote Flywheel state.
Generated by Claude Code