Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

test(mods): fleet guard probe covers structured credentials and walker budgets

ruv1ff11ce4e88f
diff --git a/scripts/__tests__/probe-mod-guards.test.mjs b/scripts/__tests__/probe-mod-guards.test.mjs
index 01b9cdac5b..95b3a9a44d 100644
--- a/scripts/__tests__/probe-mod-guards.test.mjs
+++ b/scripts/__tests__/probe-mod-guards.test.mjs
@@ -87,8 +87,12 @@ test('corpus ids are unique and cover every required class', () => {
const ids = [...evasionProbes(1000), ...stressProbes(1000)].map(p => p.id)
assert.equal(new Set(ids).size, ids.length)
const classes = new Set(evasionProbes(1000).map(p => p.cls))
- for (const c of ['invisible', 'nesting', 'keys', 'json', 'encoding', 'confusable', 'huge', 'wide']) assert.ok(classes.has(c), c)
+ for (const c of ['invisible', 'nesting', 'keys', 'json', 'encoding', 'confusable', 'huge', 'wide', 'structured', 'budget']) assert.ok(classes.has(c), c)
assert.ok(ids.includes('nest-obj-5000') && ids.includes('s-a') && ids.includes('s-pem-spaces'))
+ assert.ok(ids.includes('pair-name-value') && ids.includes('over-node-cap-25000') && ids.includes('over-char-cap-3m'))
+ const over = evasionProbes(1000).find(p => p.id === 'over-node-cap-25000').build('x')
+ assert.ok(over.list.length > 20_000 && over.list.at(-1) === 'x', 'the secret sits past the walker node budget')
+ assert.deepEqual(evasionProbes(1000).find(p => p.id === 'pair-name-value').build('x'), { key: 'api_key', value: 'x' })
const deep = evasionProbes(1000).find(p => p.id === 'nest-obj-5000').build('x')
let depth = 0
for (let v = deep; typeof v === 'object'; v = v.k) depth++
diff --git a/scripts/lib/guard-probe-corpus.mjs b/scripts/lib/guard-probe-corpus.mjs
index d4a52ab6b7..c7eb09f9fb 100644
--- a/scripts/lib/guard-probe-corpus.mjs
+++ b/scripts/lib/guard-probe-corpus.mjs
@@ -85,6 +85,13 @@ export function evasionProbes(big) {
add('url-encoded', 'encoding', 'advisory', s => '%' + s.charCodeAt(0).toString(16) + s.slice(1))
add('fullwidth-confusable', 'confusable', 'advisory', s => fullwidth(s))
add('cyrillic-confusable', 'confusable', 'advisory', s => homoglyph(s))
+ // Structured credentials: the name and the value sit in two strings, so a rule that needs them together never sees them.
+ add('pair-name-value', 'structured', 'must', s => ({ key: 'api_key', value: s }))
+ add('pair-name-content-nested', 'structured', 'must', s => ({ entries: [{ field: 'secret', content: s }] }))
+ add('pair-array', 'structured', 'must', s => ({ rows: [['token', s]] }))
+ // Budgets: past a walker's node or character cap the guard must refuse (fail closed) or still find the secret; it may not pass it.
+ add('over-node-cap-25000', 'budget', 'must', s => ({ list: [...Array.from({ length: 25_000 }, () => 1), s] }))
+ add('over-char-cap-3m', 'budget', 'must', s => ({ a: 'p'.repeat(1_400_000), b: 'p'.repeat(1_400_000), c: s }))
add('huge-start', 'huge', 'must', s => pad(big, s, 'start'))
add('huge-middle', 'huge', 'must', s => pad(big, s, 'middle'))
add('huge-end', 'huge', 'must', s => pad(big, s, 'end'))
diff --git a/scripts/probe-mod-guards.known-holes.json b/scripts/probe-mod-guards.known-holes.json
index 0967ef424b..084e30ff80 100644
--- a/scripts/probe-mod-guards.known-holes.json
+++ b/scripts/probe-mod-guards.known-holes.json
@@ -1 +1,98 @@
-{}
+{
+ "ruflo-adr": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-agent": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-ai-team": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-aidefence": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-autopilot": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-bbs-federation": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-browser": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-daa": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-ddd": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-docs": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-federation": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-goals": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-graph-intelligence": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-intelligence": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-iot-cognitum": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-jujutsu": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-knowledge-graph": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-loop-workers": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-market-data": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-metaharness": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-migrations": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-music": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-neural-trader": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-observability": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-rag-memory": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-ruvector": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-ruvllm": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-rvf": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-security-audit": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-sparc": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-workflows": [
+ "over-node-cap-25000"
+ ],
+ "ruflo-x-gateway": [
+ "over-node-cap-25000"
+ ]
+}
diff --git a/v3/docs/validation/mod-guard-probe-2026-10.md b/v3/docs/validation/mod-guard-probe-2026-10.md
index 9d3cb6e3f0..a01e2acbee 100644
--- a/v3/docs/validation/mod-guard-probe-2026-10.md
+++ b/v3/docs/validation/mod-guard-probe-2026-10.md
@@ -92,9 +92,19 @@ digest, a UUID, "api key rotation ticket", prose about JWTs).
- `ruflo-iot-cognitum`'s Bash-command path (it needs a `cognitum-iot` prefix the generic carriers do not produce); only its
`memory_store` path is probed.
+### Budget probes (loop cap-r3, ranked improvement #3)
+
+Three probe classes were added to the corpus: `structured` (`{key:'api_key', value}`, a nested `{field, content}`, a `['token', value]` pair), and `budget`
+(a secret after 25 000 list nodes, and after 2.8 M characters). Result: **32 guards let a secret through past the
+25 000-node walker budget** (`over-node-cap-25000`); the shared `textsOf` drops the rest silently. Only `ruflo-agentdb` refuses oversize input
+(PR #3728). The structured and character-budget probes pass everywhere (a bare credential value is caught on its own; `bare()` keeps head and tail).
+Not fixed here: the root cause is the vendored shared region, which `scripts/sync-mod-screen.mjs` (reworked by PR #3731) regenerates in every plugin.
+The holes are recorded in the baseline so a new one still fails the smoke. Fix: make the shared `textsOf` report truncation and have each guard
+refuse on it, once, in the generator, then shrink the baseline.
+
## Gate
-`scripts/probe-mod-guards.known-holes.json` records the 820 current holes. `smoke-all-plugins.mjs` runs `--fast --known-holes` last, so a
+`scripts/probe-mod-guards.known-holes.json` records the current holes (32 `over-node-cap-25000` entries as of cap-r3). `smoke-all-plugins.mjs` runs `--fast --known-holes` last, so a
**new** hole (a regression, or a new guard copied from the capped template) fails the smoke while this backlog does not. Fixed holes
print as "known holes that now pass"; remove them from the baseline. Fix a root cause, rerun `--write-known-holes`, commit the shrink.