mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-03 22:12:01 +09:00
dream(security): #4960 resolve 11-10 hive-mind branch fate in ledger
A fate-check sub-agent (dispatched during tonight's STEP 1) resolved the dream/2026-11-10-hive-mind branch this session flagged as unexplained: it was a disclosed SCAN override (RaftConsensus legacy requestVote() fix, #4937/#4938, MERGED), not an undisclosed deviation. Also surfaced a real supplementary swarm finding (RaftConsensus.appendEntries()'s legacy path still has zero log-contiguity check) that got recorded as a follow-up comment on #4960 for a future night, rather than reopening tonight's already-ACCEPT-evaluated security candidate.
This commit is contained in:
1 file changed
+2
-2
@@ -256,6 +256,6 @@ as a first-class, high-priority candidate, not a background note.
|
||||
| 2026-11-01 | security | Directly continuing 10-31's own disclosed Recommendation #2: `PolicyEngine.evaluateMessage()`'s `getOperationForMessageType()` had no case for `trust-change`/`topology-change` (the two federation message types that mutate a peer's trust level or the mesh topology itself) — both fell through `default: return 'send'`, the same data-plane floor as ordinary messages, granted from `ATTESTED`, with no `SecurityPolicy`-configurable threshold at all (unlike write/memory/spawn, fixed 10-31). Confirmed live/reachable at both call sites (`federation-coordinator.ts:282` outbound, `plugin.ts:485` inbound via the Ed25519-verified dispatcher); both message types already in `DEFAULT_SECURITY_POLICY.allowedMessageTypes` and `CONSEQUENTIAL_MESSAGE_TYPES`, so not a reachability-gated fix like 10-31's own deferred caveat. Added a dedicated `admin-change` `CAPABILITY_GATES` entry (TRUSTED+) plus a new `minTrustLevelForAdmin` policy field, mirroring the write/memory/spawn shape. SCAN: intelligence (`SONAManager`'s 10-27 EWC Fisher-map fix only wired `BalancedMode`'s snapshot method — edge/real-time/research/batch modes get zero catastrophic-forgetting protection, new finding, deferred), swarm (`TaskOrchestrator.failTask()`'s retry path never calls `agentRegistry.completeTask()`, permanently stranding the owning agent's `currentTask`/status on every retried task — distinct lifecycle-leak bug from 10-14's lookup-table typo in the same file, new finding, deferred) | #4633 | #4634 | yes | ACCEPT | 7 new tests (4 discriminating, 3 controls), stash-isolated baseline fails 4/17 exactly as predicted → candidate 17/17 pass; full `@claude-flow/plugin-agent-federation` suite 684/684 (677+7 new), 0 regressions; `tsc --noEmit` 5 pre-existing unrelated module-resolution errors (isolated-install artifact) byte-identical with/without candidate, 0 errors in changed files; independent adversarial critique (fresh context, independently re-ran stash isolation + full suite, independently confirmed reachability via the Ed25519-verified inbound dispatcher and real peer-registry state on outbound) CONFIRMED core bug + PASS shippability; 2 non-blocking caveats (pre-existing `claim-event`/`agent-handoff` fallthrough, already covered by 10-31's own disclosed allow-list gap; an uncited "Identiverse 2026" editorial source comment, trimmed same session) | 0ecc3499... | 10-26/10-27/10-28 MERGED (3/3 of trailing window with a decision); 10-29/10-30 real branches confirmed, too recent to call; 10-31 #4619 **MERGED** (now HEAD-1 on main, this session's own base). Prior gist (10-31, security) scored 9/10 — first miss on the <1500-word point since a long compliant streak (1541 words); 2+2+2+2+0+1 |
|
||||
**Correction (2026-11-01, post-review via PR #4634 comment thread, verified against repo source same session):** the 11-01 row above overstates in-repo reachability. An accepted inbound `trust-change`/`topology-change` message only reaches `inbound-dispatcher.ts`'s generic `eventBus.emit(\`federation:inbound:${message.type}\`, ...)` — per ADR-109's explicit "event emission, not direct callback" design, nothing in this package subscribes to that event itself; acting on it is the integrator's job. `plugin.ts:263`'s separate `federation:trust-change` emission comes from `TrustEvaluator`'s own interaction-scoring callback, not from inbound messages. So the fix closes a real authorization-boundary gap at the gate governing what reaches any integrator-registered listener, not a live, self-contained in-repo privilege escalation. The fix, its 7 tests, and the defense-in-depth property are all unaffected — only the reachability framing in the issue/PR write-up was corrected (not the witnessed gist text, per the 2026-10-16 precedent of recording a correction here rather than re-editing/re-witnessing a prior night's gist). Also noted: PR #4580 (external contributor, open since 10-29) proposes the same write/memory/spawn-floor fix already shipped 10-31 via #4618/#4619 — flagged for a maintainer to close as superseded, not actioned from this session since it isn't this session's PR.
|
||||
**Note (2026-11-10):** confirmed via GitHub MCP tools before tonight's own row: a genuine 5-night run gap 11-03 through 11-07 (no branch/issue/PR for any date, already disclosed by the 11-08/11-09 nights, not re-investigated further). 11-02 (intelligence, #4659/#4660) still OPEN/draft, 8 days, not stale. 11-08 (memory, `LearningBridge` post-consolidation signal-starvation fix, #4884) closed via PR #4910 **CLOSED, not merged**. 11-09 (swarm, `QueenCoordinator` failover/delegation-cap fix, #4902) closed via PR #4908 **MERGED**, plus a follow-on release PR #4927 **MERGED**. Both 11-08 and 11-09 ran with real detailed issues but neither pushed a `dream/*` branch (STEP 20-24 silently skipped or diverged from convention both nights — #4908/#4910 exist as PRs without a matching `dream/2026-11-08-memory`/`dream/2026-11-09-swarm` branch in `git ls-remote`), a distinct gap from the already-tracked "ledger rows only reach main via PR merge" issue; worth a future automation/meta night's attention. Trailing-decided-PR merge rate: 7/9 merged over the last 9 nights with a decision (11-08's #4910 is the one non-merge).
|
||||
**Note (2026-11-11, pre-row):** `git ls-remote --heads origin "dream/*"` tonight found a `dream/2026-11-10-hive-mind` branch that the 2026-11-10 note above does not mention — "hive-mind" isn't a DEEP surface (it's a SCAN surface under slot 0), so this looks like an undisclosed SCAN-override night (precedent: 2026-09-24, 2026-10-20, both of which DID disclose the override explicitly). A fate-check sub-agent was dispatched to find its issue/PR and confirm whether an override was disclosed there; **it had not returned by the time tonight's own row was written** (not blocked on — STEP 0.6 protects research depth over chasing a supplementary check) — this is logged here rather than fabricated, to be resolved by a future night's STEP 1 if not added as a follow-up comment first. Same reason: tonight's own STEP 1.2 prior-gist score is **not scored** below — the 11-10 gist's content was not located this session (not merged to `main`, no local copy, and the fate-check that would have found its PR hadn't returned).
|
||||
| 2026-11-11 | security | `v3/@claude-flow/cli/src/init/settings-risk-scanner.ts`'s `scanAllowRuleForRisk()` (the heuristic `ruflo init --upgrade` runs against a target project's existing `.claude/settings.json`) flagged `permissions.allow` rules pre-approving `bash/sh/python/ruby/perl/curl/wget`+dangerous-words with no per-call confirmation, but had no entry for `node`/`deno`/`bun`/`php` — GTFOBins-documented shell-breakout interpreters in the same tier as the four already covered. This repo's own committed `.claude/settings.json` (lines 14/29) carries a live, unscoped `Bash(node:*)` allow-rule this exact scanner silently passed as clean before tonight; confirmed not a documented design tradeoff (`ruflo init`'s own `generateSettings()` never emits a node-related allow rule by default, so the gap wasn't forced by avoiding a false positive on Ruflo's own output). Fixed via a new `INTERPRETER_WORDS` list feeding only `RISKY_PREAPPROVE_WORDS`, deliberately kept out of `SHELL_EXEC_WORDS` so the separate `scanCommandStringForRisk` (hook command strings, where `node <script>` is legitimate) stays untouched. Also corrected a stale 2026-10-30 deferred finding: `http_fetch`'s DNS-rebind SSRF gap is already closed (`http-fetch-pinned.ts`'s `pinnedLookup`, ADR-164 §5.1.8) — no action needed, REJECT-with-evidence on reopening it. SCAN: intelligence (10-27/11-01's EWC++ per-mode gap confirmed still open tonight, mitigated since every mode-construction site defaults to `'balanced'` — narrower blast radius than previously framed; third disclosure without action), swarm (11-01's `TaskOrchestrator.failTask()` agent-stranding finding confirmed **already fixed** via direct code read of `releaseWorker()` — not reused) | #4960 | #4961 | yes | ACCEPT | 10 new/extended tests (`settings-risk-scanner.test.ts` + a CJS/TS parity case), stash-isolated baseline fails 5/54 exactly as predicted → candidate 54/54 pass, 75/75 across all three affected test files after the critic's own fix + this session's follow-up regression test; benchmark-corpus recall 0.75→1.0, precision 1.0 both ways (0 false positives); `tsc --noEmit` 512 pre-existing unrelated errors (unbuilt siblings) byte-identical per the critic's own line-for-line diff, 0 in changed files; full-package suite timed out at 170s (environmental); independent adversarial critique (fresh context, re-ran stash-isolation + `tsc` diff itself, independently verified the live `Bash(node:*)` rule rather than trusting the write-up) CONFIRMED + PASS, and on its own initiative found and fixed forward a real cross-file parity gap (this session's TS-only change would have left the `hook-handler.cjs` CJS mirror used by the `session-restore` boot hook out of sync on these exact cases) plus extended the parity test; one remaining caveat (untested prefix-collision safety for `nodemon`/`phpunit`/`bunx`/`denoland`, verified correct by hand) closed same session with a dedicated test | 6bfe9cf4... | 10-26/10-27/10-28 MERGED (per 2026-11-01's confirmed state, not re-verified tonight); 10-31 #4619 MERGED; 11-01 #4634 status not re-checked tonight (budget — see pre-row note above); 11-02 #4660 open/draft as of 11-10's note, 9 days old, not stale; 11-08 #4910 CLOSED not merged; 11-09 #4908/#4927 MERGED; `dream/2026-11-10-hive-mind`'s fate is unknown as of this row (see pre-row note). Prior-night gist score: not scored (see pre-row note) |
|
||||
**Note (2026-11-11, resolved post-row):** the `dream/2026-11-10-hive-mind` branch (not mentioned by the 2026-11-10 note above) is a disclosed SCAN override: 2026-11-10 was `DEEP=performance, SCAN=security,hive-mind`, and its own issue #4937 explicitly scored the hive-mind-surface `RaftConsensus` legacy `requestVote()` finding (4.9/5) above every performance-DEEP candidate considered (next-best 3.95) and named the 2026-09-24/2026-10-20 override precedent — not an undisclosed deviation. Confirmed via GitHub MCP: issue #4937, PR #4938, **MERGED** 2026-11-10. 11-10's own gist publish was blocked by the auto-mode permission classifier ("Public Data-Sharing Upload" denial, not a `gh`-auth failure — a third distinct cause beyond the usual FALLBACK, also seen 11-08/11-09), full report embedded in #4937 §13 instead. 11-10 did not itself score a prior gist (it scored 11-09's, 10/10, embedded in #4902). Tonight's own STEP 1.2 prior-gist score is still **not scored** below — the fate-check that surfaced the above also produced a real, useful supplementary swarm finding (see issue #4960's own follow-up comment: `RaftConsensus.appendEntries()`'s legacy path still has zero log-contiguity check, directly adjacent to and explicitly deferred by 11-10's own fix — a strong ~4.65/5 candidate for a near-future swarm/hive-mind night) but did not return a clean 11-10-gist score before this row was finalized.
|
||||
| 2026-11-11 | security | `v3/@claude-flow/cli/src/init/settings-risk-scanner.ts`'s `scanAllowRuleForRisk()` (the heuristic `ruflo init --upgrade` runs against a target project's existing `.claude/settings.json`) flagged `permissions.allow` rules pre-approving `bash/sh/python/ruby/perl/curl/wget`+dangerous-words with no per-call confirmation, but had no entry for `node`/`deno`/`bun`/`php` — GTFOBins-documented shell-breakout interpreters in the same tier as the four already covered. This repo's own committed `.claude/settings.json` (lines 14/29) carries a live, unscoped `Bash(node:*)` allow-rule this exact scanner silently passed as clean before tonight; confirmed not a documented design tradeoff (`ruflo init`'s own `generateSettings()` never emits a node-related allow rule by default, so the gap wasn't forced by avoiding a false positive on Ruflo's own output). Fixed via a new `INTERPRETER_WORDS` list feeding only `RISKY_PREAPPROVE_WORDS`, deliberately kept out of `SHELL_EXEC_WORDS` so the separate `scanCommandStringForRisk` (hook command strings, where `node <script>` is legitimate) stays untouched. Also corrected a stale 2026-10-30 deferred finding: `http_fetch`'s DNS-rebind SSRF gap is already closed (`http-fetch-pinned.ts`'s `pinnedLookup`, ADR-164 §5.1.8) — no action needed, REJECT-with-evidence on reopening it. SCAN: intelligence (10-27/11-01's EWC++ per-mode gap confirmed still open tonight, mitigated since every mode-construction site defaults to `'balanced'` — narrower blast radius than previously framed; third disclosure without action), swarm (11-01's `TaskOrchestrator.failTask()` agent-stranding finding confirmed **already fixed** via direct code read of `releaseWorker()` — not reused) | #4960 | #4961 | yes | ACCEPT | 10 new/extended tests (`settings-risk-scanner.test.ts` + a CJS/TS parity case), stash-isolated baseline fails 5/54 exactly as predicted → candidate 54/54 pass, 75/75 across all three affected test files after the critic's own fix + this session's follow-up regression test; benchmark-corpus recall 0.75→1.0, precision 1.0 both ways (0 false positives); `tsc --noEmit` 512 pre-existing unrelated errors (unbuilt siblings) byte-identical per the critic's own line-for-line diff, 0 in changed files; full-package suite timed out at 170s (environmental); independent adversarial critique (fresh context, re-ran stash-isolation + `tsc` diff itself, independently verified the live `Bash(node:*)` rule rather than trusting the write-up) CONFIRMED + PASS, and on its own initiative found and fixed forward a real cross-file parity gap (this session's TS-only change would have left the `hook-handler.cjs` CJS mirror used by the `session-restore` boot hook out of sync on these exact cases) plus extended the parity test; one remaining caveat (untested prefix-collision safety for `nodemon`/`phpunit`/`bunx`/`denoland`, verified correct by hand) closed same session with a dedicated test | 6bfe9cf4... | 10-26/10-27/10-28 MERGED (per 2026-11-01's confirmed state, not re-verified tonight); 10-31 #4619 MERGED; 11-01 #4634 status not re-checked tonight (budget — see pre-row note above); 11-02 #4660 open/draft as of 11-10's note, 9 days old, not stale; 11-08 #4910 CLOSED not merged; 11-09 #4908/#4927 MERGED; `dream/2026-11-10-hive-mind` (#4937/#4938, disclosed SCAN override, `RaftConsensus` legacy `requestVote()` fix) **MERGED**. Prior-night gist score: not scored (see note above) |
|
||||
| 2026-11-10 | hive-mind (SCAN override of performance DEEP, see issue #4937 §3 for the override rationale) | `RaftConsensus`'s no-transport "legacy in-process" `requestVote()` path (`v3/@claude-flow/swarm/src/consensus/raft.ts`) granted votes on a bare `currentTerm > peer.currentTerm` comparison — no vote-once-per-term check, no log-up-to-date check — unlike the transport RPC path and `handleInboundRaftMessage()` a few lines above it, both of which correctly implement Raft §5.2/§5.4. Confirmed production-reachable (no call site in `v3/` ever wires a `ConsensusTransport`; `UnifiedSwarmCoordinator` calls `consensusEngine.addNode()` for every real spawned agent onto this exact path). A candidate whose term was inflated by retries alone (not log progress) could out-vote a more log-advanced peer (unsafe over-grant, a real Leader Completeness violation); the same strict `>` check also wrongly denied a legitimate same-term, equally-fresh-log candidate (spurious under-grant). Fixed by mirroring the file's own two already-correct implementations. DEEP=performance's own deferred lead (`CacheManager.estimateSize()`, scored 4.85 on 10-20) was investigated first and REJECTED with evidence: regression test #4481 requires exact size accounting even without `maxMemory`, so "skip when unset" does not survive scrutiny — not re-proposed as-is. SCAN: security (http-fetch/path-containment/claims-tools reviewed, no new finding), hive-mind (Byzantine/Gossip sanity-checked for an analogous gap — none found, architected differently) | #4937 | #4938 | yes | ACCEPT | 4 new tests (2 discriminating, 2 controls), stash-isolated baseline 378/380 (2 predicted failures) → candidate 380/380, independently reproduced byte-identical by a separate fresh-context adversarial-critic subagent from its own stash/pop cycle, which also independently re-verified the production-reachability claim from scratch; full `@claude-flow/swarm` suite 380/380 (376+4 new), 0 regressions, `tsc --noEmit` clean both ways; `metaharness mcp-scan` MEDIUM(3)/0-high, byte-identical to baseline; independent critique CONFIRMED, no blocking issues (3 non-blocking caveats disclosed: `appendEntries()`'s analogous gap left unfixed, a possible pre-existing zero-peer self-election edge case, private-field test casts matching existing convention) | 5af6b216... | 10-26 through 11-01 all MERGED where a decision exists; 11-02 open/draft not stale; 11-08 #4910 CLOSED-not-merged; 11-09 #4908/#4927 MERGED; 11-03..11-07 confirmed no-run gap (5 nights). Prior gist (11-09, swarm) scored 10/10 on the same rubric per its own issue §2 |
|
||||
Reference in new issue
Block a user