* fix(cli): declare @claude-flow/aidefence as an optional dependency
security-tools.ts, auto-install.ts and others import @claude-flow/aidefence at runtime but the package was in no dependency field. Flat node_modules layouts (npm) resolve it by accident; pnpm's isolated layout (pnpm dlx) hides it, so aidefence_* tools fail with 'AIDefence package not available'. Optional keeps the existing graceful-degradation path.
* fix(cli): add @claude-flow/aidefence to pnpm-lock.yaml
Matches the optionalDependencies entry added to @claude-flow/cli so the
frozen-lockfile install in CI passes. Hand-edited per review rather than
regenerated, to avoid rewriting unrelated importers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Q8MPAof1TAgCWWkJKdDJy
* fix(cli): pin @claude-flow/aidefence exactly and lift it from the #2561 guard
Pin 3.0.2 (the workspace and a published version) like @claude-flow/memory,
and keep the pnpm lock specifier in step. Remove aidefence from the guard's
FORBIDDEN list per its escape clause: the published package has no
dependencies (agentdb is an optional peer) and cold-installs in about 2-3 s
and 150 KB, versus 139 s for the CLI itself.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(ci): drop an apostrophe from a comment in the #2561 guard script
The guard body is a single-quoted node -e string in the workflow, so an
apostrophe in a JS comment ends the shell quote and the step fails with a
syntax error.
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: RuFlo <ruv@ruv.net>
* dream(intelligence): wire real Fisher-information estimation into SONAManager's EWC++ path
SONAManager's EWC++ catastrophic-forgetting mechanism was completely inert:
ewcState.fisher/.means were initialized empty and never written anywhere in
the core @claude-flow/neural package; consolidateEWC() (the only method
touching fisher post-init) only decayed an always-empty map and had zero
callers. Every computeEWCPenalty/computeEWCLoss call across all 5 learning
modes therefore always evaluated to exactly 0, in production (SONAManager
backs NeuralLearningSystem, loaded by @claude-flow/memory's learning-bridge).
Scoped fix (default 'balanced' mode only): BalancedMode now exposes
getConsolidationSnapshot(), deriving Fisher as squared-gradient and means as
the raw gradient from its existing gradientAccumulator (mirroring a working
reference pattern already in this monorepo's
plugins/cognitive-kernel/src/bridges/sona-bridge.ts). SONAManager's
triggerLearning() folds this into ewcState via the existing (unchanged)
consolidateEWC() decay step, then additive accumulation - online-EWC style.
Also removes 6 stale, never-gitignored .js files under
v3/@claude-flow/neural/src/modes/ that shadowed the current .ts sources for
any explicit .js-extension import (Vite/Vitest resolve a literal file on
disk over transforming a sibling .ts) and were themselves circularly broken
- this was blocking any vitest test of SONAManager/mode classes from ever
exercising real logic, confirmed via git-stash to reproduce identically on
the pre-candidate baseline and to be a necessary precondition for tonight's
evaluation, not part of the EWC logic change itself.
Disclosed scope limit: this makes the EWC *state* real and measurable; the
computed penalty is not yet wired into the gradient update itself (same gap
already disclosed as a stub in the reference plugin's own consolidate()).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* dream(intelligence): fix forward per independent adversarial critique
Round-2 fixes from an independent adversarial-critic pass on commit
2c5bcb177:
- getConsolidationSnapshot() now reports the CHANGE in gradientAccumulator
since the last consolidation (a delta), not the raw lifetime-cumulative
accumulator. Squaring the ever-growing cumulative value directly (the
original candidate) made Fisher/means diverge without bound over a
long-running session - confirmed empirically by the critic (25 cycles:
0.00012 -> 0.68) and reproduced independently here (150 cycles). The
delta-based version is a strict improvement (Fisher now reflects "what
changed", the theoretically appropriate EWC quantity) but does NOT fully
solve divergence by itself: traced the remaining growth to a separate,
deeper, pre-existing behavior one layer up - triggerLearning() reprocesses
every completed trajectory still held by the manager on every call (no
"already learned from" tracking; only pruneTrajectories()'s 50%-capacity
threshold ever removes one), so BalancedMode.learn()'s gradient movement
per cycle grows with the historical backlog, not just what's new. Fixing
that is a distinct, larger-blast-radius change (trajectory lifecycle, not
EWC) - disclosed in the test file's docstring and carried forward as a
priority candidate for a future night, explicitly ahead of ever wiring
computeEWCPenalty() into a real gradient update.
- Rescoped the "Fisher == means^2" test to state plainly it's a
single-cycle construction-time identity (true by the snapshot's own
arithmetic when there's no prior snapshot to diff against), not an
ongoing system invariant - confirmed by the critic to break after cycle 2.
- Finished the stale-build-artifact cleanup in src/modes/ that the prior
commit started: removed the remaining tracked .d.ts/.d.ts.map/.js.map
siblings (12 files) plus a stray tmp.json, same never-gitignored,
out-of-sync-with-source bug class as the .js files removed in the prior
commit. src/modes/ now contains only .ts sources.
- Fixed a path citation (plugins/... -> v3/plugins/...) in comments/tests.
143/143 tests pass, 0 tsc errors, build clean - re-verified after each
change in this commit.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* dream(intelligence): add research gist for 2026-10-27
Full SOTA report: 5-role parallel research fan-out, 6-row graded 2026
external-research table, 5-row competitor comparison (genuine "None" across
LangGraph/AutoGen/CrewAI/OpenAI agent tooling, explained), the frozen
hypothesis with explicit scope disclosure, the evaluation receipt including
the independent adversarial critique's findings and this session's fix
forward, and 4 deferred/scored candidates plus 2 scan findings
(capabilities, memory) carried to a future night. Witness stamp computed
from the final file content.
No gh gist create / gist-equivalent MCP tool reachable this session (same
disclosed FALLBACK as every night since 2026-09-30) - committed here
instead, per established convention.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* docs(dream-cycle): append 2026-10-27 ledger row
Issue #4531 / PR #4532 / witness 7b524483... — ACCEPT-scoped, post-critique.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* fix(neural): bump @claude-flow/neural to 3.1.0 for the EWC fix
CI's audit-leaf-package-publish.mjs (ruvnet/ruflo#3335/#3390 guard) failed:
@claude-flow/neural is a non-bundled leaf that resolves from the npm
registry at release time, not from this PR's source. Its publishable
source changed (the EWC Fisher-wiring fix) but package.json's version was
still 3.0.0 - a release right now would ship the OLD, still-broken copy
and this fix would reach nobody.
Bumped neural 3.0.0 -> 3.1.0 (adds a new optional ModeImplementation
member, getConsolidationSnapshot, in addition to the bug fix - a
backward-compatible addition, MINOR per CLAUDE.md's versioning policy) and
the CLI's exact pin to match. Verified locally: audit script passes
(version bumped, CLI range satisfied), full neural suite 143/143, build
clean.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* fix(deps): regenerate v3/pnpm-lock.yaml for the neural version bump
The 3.0.0 -> 3.1.0 bump to @claude-flow/cli's @claude-flow/neural dependency
spec (previous commit) was made by hand, without regenerating the lockfile
- CI's --frozen-lockfile installs correctly rejected it with
ERR_PNPM_OUTDATED_LOCKFILE across every job that runs one (Memory import
smoke, Windows hook execution smoke, statusline generator delegation smoke,
Smoke (no better-sqlite3), and others).
Regenerated via `pnpm install --no-frozen-lockfile` (the repo's own
tooling, not a hand edit) inside v3/. The only intended change is the
@claude-flow/neural specifier; the diff also picked up an incidental
@opentelemetry/api 1.9.0 -> 1.9.1 transitive bump across vitest's
resolution entries, which is pnpm's own resolver picking a newer
compatible published patch, not something this PR intentionally touches.
Verified locally: `pnpm install --frozen-lockfile` now succeeds, full
@claude-flow/neural suite still 143/143.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* fix(cli): revert neural pin to the published 3.0.0, not an unpublished 3.1.0
My previous fix bumped @claude-flow/cli's @claude-flow/neural dependency
spec to 3.1.0 to satisfy the "Plugin package install-safety" leaf-publish
audit - but 3.1.0 has never been published to npm (confirmed: `npm view
@claude-flow/neural versions` lists only up to 3.0.0). That pin broke a
REAL, more severe check: "CLI npx-install smoke" packs the actual CLI
tarball and runs a real `npm install` against it, which failed with
`ETARGET: No matching version found for @claude-flow/neural@3.1.0` - i.e.
a real `npx @claude-flow/cli` user would hit this exact error today.
Publishing @claude-flow/neural@3.1.0 to npm is a human-gated release
action (signing keys, GCP secrets, WebAuthn - see CLAUDE.md's "Publishing
to npm"), not something this session does autonomously from an unreviewed
nightly research PR. Reverted the CLI's pin to 3.0.0 (the real published
version) and regenerated the lockfile to match.
This leaves one disclosed, expected finding in "Plugin package
install-safety": @claude-flow/neural's own package.json is now ahead of
the CLI's pin (3.1.0 source vs 3.0.0 pinned) - exactly the state CLAUDE.md
describes as needing a human to "publish @claude-flow/neural@3.1.0 and
raise the range" as part of an actual release, not a code fix. Noted on
the PR rather than resolved by further pushes.
@claude-flow/neural's own suite remains 143/143, build clean - unaffected,
since its tests exercise the local TS source directly.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH3LBmCGHLADvSaqWs2
* fix(neural): drop the 3.1.0 bump and restore main's lockfile
The bump broke the umbrella's @claude-flow/neural range check and forced a
lockfile regen that flipped @claude-flow/memory to a registry copy. The EWC
change ships as the next neural release, bumped at release time.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(neural): anchor EWC means on the parameters at consolidation
computeEWCPenalty() measures current - means against the cumulative
gradient accumulator, so means must be that accumulator at consolidation
(theta*). Storing the per-cycle delta made the penalty start at roughly the
previous parameter value instead of zero. New test fails on the delta and
passes on the fix; neural suite 144/144, tsc clean.
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore(neural): bump to 3.0.1 for the EWC++ consolidation fix (#4531)
The CLI and root pins move with it so the release carries the fix.
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore: lock @claude-flow/neural 3.0.1 from the registry
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: r <r@x>
http_fetch validated only the initial URL, then called fetch with its default redirect:'follow'. A public URL could redirect to loopback/RFC1918/cloud-metadata or switch to file:// without ever passing validateUrl(), bypassing the SSRF allowlist. This is the redirect escalation called out as the natural follow-up to #4503/#4504.\n\nFollow redirects manually with redirect:'manual': cap at 10 hops, run validateUrl() on every Location, cancel redirect bodies, drop Authorization/Cookie/Proxy-Authorization on cross-origin hops, and apply fetch's 303/301/302 method rules. The reported URL is the final validated URL. Redirect validation failures return the same error codes as initial-URL failures (PRIVATE_ADDRESS/FORBIDDEN_PROTOCOL), with REDIRECT_LIMIT for the hop cap.\n\nSix regression tests mock fetch: loopback, IPv4-mapped metadata, file:// redirect, public relative redirect + final URL, cross-origin auth stripping, and the redirect limit. Baseline fails all six; candidate passes. Existing 37 http-fetch tests still pass, 43/43 total. tsc reports no errors in the changed file.
* fix(shared): MCP transports refuse web pages, rebound hosts and open non-loopback binds; ws token checked at upgrade
Same guard as @claude-flow/mcp 3.1.3 for the copies in @claude-flow/shared.
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore(shared): 3.0.6
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore: package-lock follows @claude-flow/shared 3.0.6
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: r <r@x>
processDispatchQueue called triggerWorker, which set manualTrigger:true and skipped the
repository-supervisor gate, so a queue file committed in a repo ran headless workers
immediately. Queue runs now pass manualTrigger:false.
Co-authored-by: r <r@x>
mcp start -t http|websocket with no token now uses ~/.claude-flow/mcp-http-token (0600,
created on first use) unless RUFLO_MCP_ALLOW_UNAUTHENTICATED_HTTP=1. The standalone
WebSocket transport authenticates the upgrade (Authorization: Bearer or ?token=); the
unreachable message-level 'authenticate' gate no longer fails every request, and the CLI
accepts --auth-token with websocket.
Co-authored-by: r <r@x>
Replaced retired Claude model ids with Anthropic's recommended replacements at the places that send them or set them as defaults: the MCP sampling request, the CLI default provider config, and the provider quick-test requests.
Notice anthropic-retired-models-2026-10 about api.anthropic.com's API describes the change. It was read from a file and is not signed by the provider.
Without a token the transports now check Host (loopback bind) and Origin (exact
allow-list, '*' does not count) on requests and WebSocket upgrades, and both refuse
to listen beyond loopback unless allowUnauthenticated is set.
Co-authored-by: r <r@x>
daemon.aiWorkers.enabled is honoured only from the flag, RUFLO_DAEMON_AI_WORKERS=1
or the user-level ~/.claude-flow/config.json; a project file can only say false.
Headless worker context no longer globs **/.env*.
Co-authored-by: r <r@x>
* dream(security): http_fetch SSRF bypass via IPv4-mapped IPv6 literals
isPrivateOrLoopback() (the SSRF guard behind the http_fetch MCP tool's
validateUrl()) never stripped the "[...]" brackets Node's URL parser keeps
in `.hostname` for IPv6 literals. Two consequences:
1. The existing fc00::/7 (ULA) and fe80::/10 (link-local) checks
(`host.startsWith('fc'/'fe80:')`) never matched anything, since `host`
always started with "[" first.
2. There was no handling at all for IPv4-mapped IPv6 literals
(`::ffff:a.b.c.d`, normalized by Node to a canonical `::ffff:xxxx:yyyy`
hex form), so wrapping a loopback/private/link-local/cloud-metadata
IPv4 address in that form bypassed the guard entirely
(e.g. http://[::ffff:127.0.0.1]/, http://[::ffff:169.254.169.254]/).
Strips brackets once up front, then decodes IPv4-mapped-IPv6 forms back to
dotted-decimal and recurses into the existing IPv4 rules instead of adding
a parallel copy. 13 new tests (8 discriminating, verified to fail on the
pre-fix source via a stash-isolated run; 5 non-discriminating controls).
Independent adversarial critique: CONFIRMED-WITH-CAVEATS. Two pre-existing,
out-of-scope gaps disclosed in-source (IPv6 "::" unspecified address and
multicast/NAT64 ranges remain unblocked).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_013bqQefaQjXhYZX2Acr9Jop
* dream(security): add 2026-10-26 research gist
Full SOTA report for tonight's security deep-dive (http_fetch SSRF
bypass via IPv4-mapped IPv6 literals) plus intelligence/swarm scan
findings and competitor comparison. No gist-publishing tool reachable
this session (same disclosed FALLBACK as every night since 2026-09-30)
— committed to this branch instead.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_013bqQefaQjXhYZX2Acr9Jop
* dream(security): update ledger for 2026-10-26
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_013bqQefaQjXhYZX2Acr9Jop
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(agent): add bounded managed dynamic workflows and verified lifecycle observation
* feat(plugins): integrate managed workflows with mod policy and capability discovery
* feat(managed): unify console runs and verified advisory learning
* fix(managed): hydrate native recall receipts validated on ruOS
* docs(managed): record authenticated console host blocker
* docs(managed): qualify installed console and compatible native host
* feat(managed): integrate verified cycles and isolate native memory
* fix(managed): enforce offline native models and qualify feedback E2E
* fix(managed): independent security and correctness review findings
- gate managed_agent_interrupt through the managed_agent_control policy; terminate obeys the allowlist and deletes only its own environment when RUFLO_MANAGED_CONTROL=1
- track only events from the acknowledged message so a later poll cannot report the previous turn as finished
- require the canonical base64 verifier signature so one receipt cannot fill the ledger
- register RUFLO_MANAGED_AGENTS_BASE_URL as a trust-boundary env var (env-precedence audit) and key the credential scope marker with a per-process HMAC (CodeQL)
- best-effort local snapshot writes; report messageId when a prompt fails after it was sent
- console: rescheduling is running, budget/action-blocked sessions are active, not finished
- document the remaining known limits in ADR 0004
Co-Authored-By: RuFlo <ruv@ruv.net>
* docs: user guide section for managed cloud agents; correct ruflo-agent README counts
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(managed): scope marker is a generation number, never a hash of the API key (CodeQL)
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: r <r@x>
Apply the #2935 explicit-wins gate to the two scalar fields restored in
initializeWorkerStates(): constructor arg > config.json > saved state > default.
Co-authored-by: r <r@x>
New read-only tool: per kernel and architecture, theoretical occupancy at several
block sizes, what limits it, the best sizes and flags; optionally the text of a
driver-API harness the person can build to check it on their own GPU. Nothing is
compiled, loaded or run by ruRE.
The model equals NVIDIA's cuda_occupancy.h on 1,770,216 combinations (8 archs,
limiting sets included; fingerprints committed so CI repeats it) and the CUDA
driver on real GPUs: RTX 5080, RTX 3090, RTX 4090, A100, H100. Found on hardware:
from sm_90 the cubin's shared size already includes the driver's 1 KiB reservation.
Also fixes the reader reporting sm_5 for standalone cubins from CUDA 12 (ELF OS ABI
51 keeps the SM number in the low byte of e_flags); real CUDA 12.8 cubins added.
ruflo-rure 0.6.0.
Co-authored-by: r <r@x>
Off by default. Observes Read/Write/Edit/MultiEdit file_path, and at the end of a
main-loop turn appends one fixed-wording line naming up to three validated
project-relative binary/library/asar/CUDA files (12 per session, each once).
Offer only: never runs ruRE, never denies or edits a call. Inert without a ruRE
MCP tool. Harness gains World.tools and $.tool.list.
Co-authored-by: r <r@x>
* feat(rure): rure_analyze_cuda — CUDA fatbin, cubin and PTX static analysis (ADR-0006)
New read-only MCP tool and an original pure-TypeScript reader: fatbin
containers and entries (kind, sm_NN, zstd/LZ4 under size caps), cubin kernels
from the symbol table with registers (EIATTR_REGCOUNT), code size and
constant/shared/local memory, and PTX version/target/kernel names. Parses,
never executes; strings screened by AIDefence; decompression budget charged
per attempt. Checked against real nvcc 12.8 and 13.0 output (sm_75/80/90) and
cuobjdump: committed fixtures with recorded ground truth, plus a live test
that compiles with a local nvcc. ruflo-rure 0.5.0.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(rure): rure_analyze_cuda description carries the ADR-112 'Use when' guidance
The tool-description audit (ADR-112) failed the PR: one tool without guidance.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(rure): linear-time PTX sniff and scan (CodeQL js/redos, plus a quadratic one it did not flag)
looksLikePtx used a lazy comment pattern inside a repeated group, which
backtracks exponentially (CodeQL js/redos); it is now a forward scan. The
directive regexes in scanPtx matched with ^\s*, which rescans a whole run of
blank lines at every line start: 80000 blank lines took 4.6 s and 320000 took
71 s. They now match space and tab only and bound the rest. Tests: pathological
comment structure, and long blank-line and whitespace runs, all under 500 ms.
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: r <r@x>
The parser stores `--keep-config` and `-k` as `keepConfig`, but cleanup
read `flags['keep-config']`, which is always undefined. So
`cleanup --force --keep-config` deleted claude-flow.config.json and
stripped the hooks and claudeFlow blocks from .claude/settings.json
anyway. Read `keepConfig`, keeping the kebab key as a fallback as
update, init and mods do.
getUpdateType compared major, minor and patch independently. With 3.60.0
running and 3.59.17 as the registry latest, the minor check failed but
patch(17) > patch(0) returned 'patch', so the startup check auto-installed
3.59.17: a downgrade. It also made 'ruflo init' run npm install in the project
and time out the mods-cli-bin test on the 3.60.0 release PR.
An update is a strictly newer version: guard with semver.gt first.
Co-authored-by: r <r@x>
* fix(github): stop reporting merge/close/update success when nothing happened
github_pr_manage merge/close and github_issue_track update/close
returned success when nothing happened on GitHub:
- A failed `gh` call (merge conflict, failing checks, auth, unknown
number) fell through to the local JSON store and returned
{ success: true, source: 'local-store' }.
- That fallback matched records with key.includes(String(n)) against
`pr-<Date.now()>` ids. It returned success whether or not anything
matched, and could mark an unrelated record (prNumber 12 vs
pr-1786319612345).
- github_pr_manage validated owner/repo but never passed them to `gh`,
so merge/close acted on the cwd's repository (fixed for issues in
#2963).
Now:
- When `gh` is present, a failed command returns success: false.
- Offline, only a local record whose id is exactly pr-<n> / issue-<n>
is updated; otherwise the call returns success: false.
- A missing number is an error.
- PR actions pass --repo owner/repo.
list/create and their offline local-store behaviour are unchanged.
Fixes#4424
* fix(github): include gh's error text when merge/close/update fails
Per the #4424 triage: a failed `gh` call now reports gh's stderr (or
the error message when there is none) along with the action, e.g.
"gh pr merge 12 failed: X Pull request #12 is not mergeable: ...".
runArgv keeps its string | null contract and is now a thin wrapper over
runArgvResult, which returns { out } or { error }. The four mutating
paths use runArgvResult directly.
Refs #4424
neural_compress prune deleted every pattern whose usageCount was below
targetSize and saved the result. Nothing in the neural store records
usage: patterns are written with usageCount 0 and only max-merged by
distill and import. So any targetSize above 0, including the 0.5
default and a "10% reduction" of 0.1, deleted and persisted every
pattern while reporting success.
Prune now returns success: false with the reason, and never calls
saveNeuralStore(), until usage is actually tracked. This is the same
treatment quantize received in #4195. The targetSize schema description
no longer promises a 0-1 size reduction. neural_optimize's zero-norm
prune is a separate path and is unchanged.
Fixes#4423
daa_agent_adapt read the score as
`(input.performanceScore as number) || 0.8`:
- A failing score of 0 became 0.8, raised successRate, and was sent to
AgentDB as { success: true, quality: 0.8 }.
- A missing score was recorded as the same fabricated 0.8 success.
- Out-of-range scores were accepted, although the schema says 0-1.
A given score must now be a finite number in [0, 1], and an invalid one
returns success: false without touching the agent. An omitted score
records no score: successRate and the AgentDB outcome are left alone,
while the adaptation itself (feedback and the adaptation count) is
still recorded.
Fixes#4426
rescueAgentdbEmbedder() used a process-wide boolean to avoid re-patching. AgentDB registries are keyed by dbPath and each owns a distinct embedder, so after the first store was rescued every later store kept its mock embedder and wrote/searchable vectors from AgentDB's random fallback (#4410 memory scan).\n\nThe per-embedder __ruvectorRescued sentinel already makes the patch idempotent. Remove the global flag, keep the sentinel check, and export the helper for a focused two-store regression. Baseline (export-only, no behavior change) rescues the first embedder and leaves the second false; candidate rescues both.
setWorkerEnabled(type, true) called scheduleWorker() without clearing an existing timeout. this.timers kept only the newest handle, so each redundant enable leaked the previous timer; the leaked timer survived stop() (which only clears current map entries) and could run the worker again untracked. Disabling also left the type in pendingWorkers, and an in-flight run rescheduled itself even after disable (#4410 automation scan).\n\nClear any existing timer at schedule time, avoid scheduling when a timer or in-flight run already owns the type, remove disabled types from the pending queue, and only reschedule after a run while the worker is still enabled. Add fake-timer regressions; baseline leaks three timers after three enables and keeps the disabled pending worker.