Repository navigation
Conversation
…s, even after pending #3622 lands The still-unmerged dream/2026-10-02-intelligence commit (9be1926, PR #3622) wires SONAManager.consolidateEWC() into triggerLearning() and populates ewcState.fisher/means under `${domain}:${module}` keys sized to the LoRA rank. Independently verified that commit is NOT an ancestor of main (git merge-base --is-ancestor fails) -- ewcState.fisher/means have zero .set() writers anywhere in src/ today. More importantly: even once #3622 lands exactly as written, EWC regularization would still never activate in any of the 3 modes that reference ewcState.fisher/means, because each mode looks up a different, incompatibly-keyed, incompatibly-dimensioned private accumulator: - balanced.ts computeEWCPenalty(): gradientAccumulator keyed only 'positive'/'negative', dimensioned to the state-embedding space. Never matches a `domain:module` key. The computed ewcPenalty also feeds a local totalGradientNorm that is never read again -- dead regardless. - research.ts computeEWCLoss(): adamM keyed 'step_0', 'step_1', ..., same dimensionality issue. Never matches. - batch.ts applyAccumulatedGradients(): accumulatedGradients keyed by plain trajectory.domain (no module suffix). Never matches, and even a coincidental match would read out-of-bounds (no Math.min guard here unlike the other two modes) and inject NaN -- flagged inline, not fixed (no observable effect today; gradient is discarded via fill(0) right after regardless). #3622's own "143/143 passing" claim is true but only asserts fisher/means populate -- it never asserts the penalty becomes non-zero in a real learn() path, so this gap passed review undetected. Adds ewcPenaltyLookupHits/ewcPenaltyLookupMisses counters at each mode's lookup site (exposed via each mode's existing getStats() pattern) so this condition is observable instead of a silent always-zero no-op, plus 4 discriminating tests: 3 reproduce the always-0-hits condition under #3622's exact key scheme, 1 control proves a hand-aligned key DOES register a hit (counters are live, not dead code). Stash-isolated: reverting the 3 source files (keeping the test file) makes all 4 new tests fail (counters don't exist); restoring passes. 143/143 full @claude-flow/neural suite (139 pre-existing + 4 new), 0 regressions. tsc --noEmit clean. Independent adversarial critique: CONFIRMED-WITH-CAVEATS (no corrections needed; caveats are about scope being diagnostic-only by design, not a flaw). Recommendation: do not merge #3622 as currently written without addressing this, or merge only with the gap disclosed. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
docs/dream-cycle/dream-gist-2026-10-07.md -- full SOTA report (ReasoningBank failure-signal gap vs ICLR-2026 source, competitor comparison, the EWC dead-path finding, capabilities/memory scan findings, witness). No `gh gist create` available this session (GH_TOKEN invalid for gh CLI) -- same disclosed FALLBACK as every dream-cycle night since 2026-09-30. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
…-24..10-06 note Appends tonight's row and a backfill note for 09-24 through 10-06 (ledger rows only reach main via PR merge, so these weren't individually transcribed live). Confirms the 09-26 merge of #3395/#3412 and the 09-23/09-25/09-26/10-04 no-run gaps via git ls-remote + pull_request_read, not inferred. Also flags a process-risk finding: reading PR titles alone made the EWC/Fisher subsystem look sequentially "fixed" across 09-22/09-27/10-02 -- git merge-base --is-ancestor shows only 09-22's fix (#3395) actually reached main. Future entries should verify main-ancestry, not just PR existence/title. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
audit-leaf-package-publish.mjs (CI "Plugin package install-safety" check) correctly failed: @claude-flow/neural is a non-bundled leaf that resolves from the registry, not the release train, so a source change in it (balanced.ts/batch.ts/research.ts, this PR) must come with a version bump or the fix ships to nobody. Bumped neural 3.0.0 -> 3.0.1 (patch: additive observability counters, no API/schema change) and widened the CLI's exact pin on @claude-flow/neural to match in both the root umbrella and v3/@claude-flow/cli, per this repo's exact-pin convention (#3414). Regenerated v3/pnpm-lock.yaml via `pnpm install --lockfile-only` (repo tooling, not by hand) -- one line changed, matching the version bump. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
The prior commit's exact pin "@claude-flow/neural": "3.0.1" doesn't exist on the real npm registry yet (only 3.0.0 is published), and unlike v3/@claude-flow/cli/package.json's pin (resolved via pnpm workspace linking, always points at local source regardless of specifier), the root package.json's @claude-flow/neural dependency resolves through a plain `npm install` against the real registry -- so the exact unpublished pin broke "Audit root (critical-blocking)"'s `npm install --package-lock-only --ignore-scripts` step outright (ETARGET: No matching version found for @claude-flow/neural@3.0.1). Widened to "^3.0.0": resolves to the real published 3.0.0 today (install succeeds), while still satisfying audit-wrapper-dep-ranges.mjs's semver.satisfies(workspaceVersion, range) check against the local workspace's 3.0.1 (that check requires coverage, not exact equality -- confirmed by reading the script, same as audit-leaf-package-publish.mjs's own check on v3/@claude-flow/cli/package.json's pin). Re-ran all three related audit scripts (wrapper-dep-ranges, leaf-package-publish, umbrella-version-lockstep) locally: all green. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
"Test Suite (ubuntu-latest)" failed on the current head with
"Cannot find module '../dist/modes/balanced.js' imported from
v3/@claude-flow/neural/__tests__/ewc-penalty-dead-path.test.ts" --
scripts/ci-test-ratchet.mjs runs vitest from repo root without ever
building @claude-flow/neural first (only @claude-flow/security and
@claude-flow/cli-core get that treatment, for their own documented
reasons), and dist/ is gitignored, so a fresh CI checkout never has it.
This test imports mode classes via a relative path to its own package's
dist/ (not through node_modules, so no overlay/copy step like
cli-core's is needed) -- a workaround for a pre-existing vitest/vite-node
SSR-transform crash ("Class extends value undefined") when importing
modes/*.ts directly, independently reproduced and documented in the test
file's own header comment.
Added a build step mirroring the existing security/cli-core precedent.
Verified by simulating the exact CI scenario locally: removed dist/ AND
the gitignored tsconfig.tsbuildinfo (a stale local tsbuildinfo silently
no-ops tsc's emit even with dist/ deleted -- CI never has this file, so
this was purely a local-repro gotcha, not a second real bug), ran the
new build step fresh, confirmed dist/modes/ is produced and the full
@claude-flow/neural suite passes (143/143).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
…ll smoke) "CLI npx-install smoke (#1147 / (22)/(24))" failed: the prior commit's exact pin "@claude-flow/neural": "3.0.1" doesn't exist on the real npm registry (only 3.0.0 is published), so a real `npm install` of the packed CLI tarball -- exactly what an actual consumer does -- failed outright with the same ETARGET as the earlier root-package.json and Audit-root failures. `pnpm pack` rewrites `workspace:*` deps to resolved versions but leaves a literal version string untouched, so this exact pin shipped straight into the tarball unlike the (also-fixed) root package.json case. Same fix as the root package.json commit: widen to "^3.0.0" so a real `npm install` of the standalone tarball resolves to the actually- published 3.0.0, while still satisfying audit-leaf-package-publish.mjs's and audit-wrapper-dep-ranges.mjs's semver.satisfies(workspaceVersion, range) checks against the local workspace's 3.0.1 (coverage, not exact equality -- confirmed by reading both scripts). Regenerated v3/pnpm-lock.yaml via `pnpm install --lockfile-only`. Verified by running the actual scripts/smoke-cli-npx-install.mjs locally end-to-end (pack -> npm install -> cli --version): passes clean. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
|
Status for 3.56.0: not included. This is a draft with merge conflicts, and it depends on #3622 (also unmerged); it only adds counters and a test that demonstrate the EWC penalty is not reached, it does not fix it. Leaving it open for the EWC decision. |
…lligence # Conflicts: # package-lock.json # package.json # v3/@claude-flow/cli/package.json
|
CI: "Audit v3 (critical-blocking)" failure is not this PR's — root-caused, not a flake.
Confirmed the diff isn't the cause: No fix exists within this PR's scope: 🤖 Generated with RuFlo https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi Generated by Claude Code |
|
Backlog sweep 2026-10-09: one consolidated plan for the EWC cluster (#3621/#3622, #3878/#3879), checked against current main (5f709e3). Nothing here is implemented; this is the plan to review before either PR moves. Verified on main
Plan (one PR, supersedes #3622 and #3879; neither should merge alone)
Separate: #3475/#3476 ( |
1. Hypothesis
Frozen before evaluation; not modified after.
2. Candidate
v3/@claude-flow/neural/src/modes/{balanced,research,batch}.ts(+~60 lines across 3 files, purely additive): addsewcPenaltyLookupHits/ewcPenaltyLookupMissesprivate counters at each mode's existingewcState.fisher/meanslookup site, exposed via each mode's existinggetStats(): Record<string, number>pattern.batch.tsalso gets a disclosed-not-fixed inline comment: its EWC loop lacks theMath.min(...)bound the other two modes have, a latent NaN-injection landmine for whoever aligns the key spaces later (no observable effect today — the gradient is discarded viafill(0)immediately after regardless).v3/@claude-flow/neural/__tests__/ewc-penalty-dead-path.test.ts(new, 4 tests, imported from builtdist/modes/*.js— documented pre-existing circular-import quirk importingmodes/*.tsdirectly under vitest/vite-node, independently reproduced, not introduced here).Root cause (independently discovered, corrects this session's own architecture-review subagent, which had recommended simply cherry-picking #3622): that commit populates
fisher/meansunder${domain}:${module}keys sized to the LoRA rank, butbalanced.tslooks upgradientAccumulator(keyed'positive'/'negative', state-embedding-dimensioned — and itsewcPenaltyresult feeds atotalGradientNormthat's never read again, dead regardless),research.tslooks upadamM(keyed'step_N', same dimensionality class), andbatch.tslooks upaccumulatedGradients(keyed by plaintrajectory.domain, no module suffix). None of these three key spaces ever intersects the LoRA-weight-space keys #3622 would write.3. Evaluation Receipt
evaluated: accepted. Real evaluator: Vitest 4.1.8, deterministic, $0, zero LLM calls.
Stash-isolated: reverting the 3 instrumented source files (keeping the new test file) → all 4 new tests fail (
expected undefined to be +0/TypeError: ... received "undefined"). Restoring the source → 4/4 pass. Full@claude-flow/neuralsuite: 143/143 (139 pre-existing + 4 new), 0 regressions.tsc --noEmit: clean.4. Baseline Comparison
balanced.tsEWC penalty lookup, realistic#3622-keyedfisher/meanshits=0,misses>0research.tsEWC loss lookup, samehits=0,misses>0batch.tsEWC penalty lookup, samehits=0,misses>0'positive', matchingbalanced.ts's own accumulator)hits>0(proves the counter is live, not hardcoded)@claude-flow/neuralsuitetsc --noEmit5. Darwin Lineage
Skipped — diagnostic/observability addition, no continuous tunable parameter, no fitness gradient for Darwin's real interface (
npx ruvector harness darwin <config> --execute, confirmed available) to search over. Same skip class as nearly every correctness/observability-fix night (#3110/#3160/#3184/#3221/#3243/#3266/#3302/#3330/#3378/#3385/#3395/#3754).6. Flywheel Evidence
npx ruvector harness flywheel --help's real interface targets a signed-evidence-bundle schema not applicable to this change class (same disclosed gap as 10-01/10-02/10-05/10-06). Recorded as structured text in issue #3878 §7 (OBSERVATION/MEASUREMENT/INFERENCE/DECISION/REJECTION).7. Reward Hack Check
No test weakened (diff is purely additive + 1 new test file, confirmed via full-repo
git diff --stat); no gold data touched; no cherry-picking; no evaluator exploitation; no hardcoded outputs; no metric substitution; no seed manipulation; no cost hiding; no undocumented caching. Independently re-verified by an adversarial critic subagent with no authoring context, who re-derived the key-mismatch claim from source independently and re-ran the full stash-isolated comparison itself. Verdict: CONFIRMED-WITH-CAVEATS (caveats: scope is intentionally diagnostic-only, and thedist/import workaround — both addressed, no corrections needed to any claim).8. Security Review
Not security-sensitive. Adds only two
privatenumeric counters per mode at already-existing lookup sites, exposed through each mode's already-existinggetStats()pattern. No new imports/I/O/serialization/MCP surface. Blast radius confirmed via grep (not assumed) by the independent critic:BalancedMode/ResearchMode/BatchModeare constructed only insidesona-manager.ts, which never calls theirgetStats()—SONAManager.getStats()returns its own independently-computed shape. Zero external consumers of the two new keys.9. Regression Analysis
Zero regressions: full
@claude-flow/neuralsuite's passing count only grows (139→143, the 4 new tests),tsc --noEmitidentical (clean both ways). No other package references these mode classes (grep-confirmed).10. ADR
None — diagnostic/observability addition to an already-decided mechanism (EWC's existence), not a new architectural decision. Matches repo convention for this fix class.
11. Research Gist
docs/dream-cycle/dream-gist-2026-10-07.md(this branch) — full SOTA report: 5-role parallel research fan-out, competitor comparison (LangGraph/AutoGen/CrewAI/OpenAI Agents SDK/vector DBs, sourced A/B/C grades), the EWC dead-path finding, andcapabilities/memoryscan findings. Nogh gist createavailable this session (GH_TOKENinvalid) — same disclosed FALLBACK as every night since 2026-09-30.12. Issue
Closes #3878 (full 15-section report: ledger check with GitHub-verified fates for the trailing nights, research, evaluation receipt, adversarial critique, reward-hack check, security review, capabilities+memory scan findings, competitor comparison, witness).
13. Witness
Verifier: fetch
docs/dream-cycle/dream-gist-2026-10-07.mdfrom this branch, strip the witness table's filled values back toPENDING, SHA-256 the file, concatenate with the session commit above, SHA-256 again — must equal the witness stamp.14. Merge Policy
Human review required. Do not self-merge. Do not autonomously promote Flywheel state. This PR is opened as draft per standing Dream Cycle policy — evaluation, even a confirmed one, is not autonomous promotion.
Separately, not part of this PR's diff: do not merge PR #3622 (
dream/2026-10-02-intelligence) as currently written without addressing this finding, or merge only with the gap explicitly disclosed — its "wires EWC back up" framing does not hold for the actual runtime penalty/loss value in any mode.🤖 Generated with RuFlo
https://claude.ai/code/session_014egWR5nqV6Vs6dvFvNb4gi
Generated by Claude Code