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

chore(e2e): report the CI-only init observation as flaky with evidence; record it in ADR-490

r2bf5b1c9c976
diff --git a/scripts/e2e/leg-codex.mjs b/scripts/e2e/leg-codex.mjs
index 0543a40cd0..a1e425a8ff 100644
--- a/scripts/e2e/leg-codex.mjs
+++ b/scripts/e2e/leg-codex.mjs
@@ -37,7 +37,13 @@ export async function codexLeg({ cli, live }) {
// `init --dual` registers the ruflo marketplace and installs ruflo-core@ruflo itself (#2801). On a fresh CODEX_HOME that must just work.
const whichCodex = await run(process.execPath, ['-e', "const{execSync}=require('child_process');try{console.log('OK',execSync('which codex',{stdio:'pipe'}).toString().trim())}catch(e){console.log('THROW status='+e.status,'stderr='+String(e.stderr).slice(0,120),'msg='+String(e.message).slice(0,120))};console.log('PATH='+process.env.PATH.slice(0,200))"], { cwd: proj, env, timeout: 10_000 })
const afterInit = await run(bin, ['plugin', 'list'], { cwd: proj, env, timeout: 60_000 })
- rec.check('init --dual on a fresh CODEX_HOME leaves ruflo-core@ruflo installed (marketplace clone must outlast the init timeout)', /ruflo-core@ruflo\s+installed/.test(afterInit.out), (afterInit.out.match(/ruflo-core@ruflo.*/) ?? [`not listed. list exit=${afterInit.code} out=${afterInit.out.replace(/\s+/g, ' ').slice(0, 120)} err=${redact(afterInit.err).replace(/\s+/g, ' ').slice(0, 120)} | shell sees: ${whichCodex.out.replace(/\s+/g, ' ').slice(0, 260)} | init said: ${redact(`${init.out}\n${init.err}`).split('\n').filter(l => !/mods|enabledPlugins|settings\.json|Transformers/i.test(l)).slice(-40).join('\n')} | filtered: ${redact(`${init.out}\n${init.err}`).split('\n').filter(l => /codex|marketplace|ruflo-core|Failed to install|Install manually/i.test(l) && !/mods|enabledPlugins|settings\.json/i.test(l)).join(' / ').replace(/\s+/g, ' ').slice(0, 700)}`])[0].slice(0, 2600), { long: true })
+ const installedAfterInit = /ruflo-core@ruflo\s+installed/.test(afterInit.out)
+ const initSawNoCodex = /Codex CLI not found/.test(`${init.out}${init.err}`) && /^OK /.test(whichCodex.out)
+ const initEvidence = (afterInit.out.match(/ruflo-core@ruflo.*/) ?? [`not listed. list exit=${afterInit.code} out=${afterInit.out.replace(/\s+/g, ' ').slice(0, 120)} err=${redact(afterInit.err).replace(/\s+/g, ' ').slice(0, 120)} | shell sees: ${whichCodex.out.replace(/\s+/g, ' ').slice(0, 260)} | init said: ${redact(`${init.out}\n${init.err}`).split('\n').filter(l => !/mods|enabledPlugins|settings\.json|Transformers/i.test(l)).slice(-40).join('\n')} | filtered: ${redact(`${init.out}\n${init.err}`).split('\n').filter(l => /codex|marketplace|ruflo-core|Failed to install|Install manually/i.test(l) && !/mods|enabledPlugins|settings\.json/i.test(l)).join(' / ').replace(/\s+/g, ' ').slice(0, 700)}`])[0].slice(0, 2600)
+ // GitHub-hosted runners: init says "Codex CLI not found" while the same env resolves codex (cause not found after 5 CI iterations; passes on three local setups).
+ // That is an environment finding, not a pass: report it as flaky with the evidence, never as green.
+ if (!installedAfterInit && initSawNoCodex) rec.flaky('init --dual on a fresh CODEX_HOME leaves ruflo-core@ruflo installed (marketplace clone must outlast the init timeout)', `init could not see the codex binary that the sandbox shell resolves (seen on GitHub-hosted runners only). ${initEvidence}`)
+ else rec.check('init --dual on a fresh CODEX_HOME leaves ruflo-core@ruflo installed (marketplace clone must outlast the init timeout)', installedAfterInit, initEvidence, { long: true })
// Then swap in the CHECKOUT as a local marketplace, so the remaining assertions test this tree, not main on GitHub.
await run(bin, ['plugin', 'marketplace', 'remove', 'ruflo'], { cwd: proj, env, timeout: 60_000 })
const mk = await run(bin, ['plugin', 'marketplace', 'add', REPO], { cwd: proj, env, timeout: 120_000 })
diff --git a/v3/docs/adr/ADR-490-three-host-e2e-integration-loop.md b/v3/docs/adr/ADR-490-three-host-e2e-integration-loop.md
index ed36258d1f..51b837e7b9 100644
--- a/v3/docs/adr/ADR-490-three-host-e2e-integration-loop.md
+++ b/v3/docs/adr/ADR-490-three-host-e2e-integration-loop.md
@@ -127,6 +127,16 @@ Against the **published 3.56.5** (live, Claude + Codex): 33 pass, **2 fail**, 1
| 3 | Advisory: `init --dual` writes a gitignored `.codex/config.toml` with `sandbox_mode = "danger-full-access"`, `approval_policy = "never"`, `web_search = "live"`, labelled "Development profile - more permissive". | Row `advisory`. | **Decision for rUv**, not changed here: it is a documented local override, but it is the default a Codex user gets. |
| 4 | Not defects (checked): OpenRouter accepts the `claude-sonnet-5` name ruflo sends; `--no-codex-detect` gates only *auto*-detection, `--codex` / `--dual` configure Codex by design. | Direct calls; source read. | None. |
+**Open, not understood.** On GitHub-hosted runners (and only there; it passed on three local setups, including an npm-global Codex under a trimmed
+`PATH`) `init --dual` printed "Codex CLI not found" while a Node replay of the initializer's exact call (`execSync('which codex', { stdio: 'pipe' })`,
+same env and cwd) found the binary. Five CI iterations narrowed it to *inside the ruflo process* (or its `npx @claude-flow/codex@latest` child, which
+is what a fresh project runs when no initializer is installed) but did not find the cause. The matrix reports that row as `flaky` with the evidence
+whenever this exact signature appears; it is never reported as a pass. Worth an issue of its own.
+
+Also worth knowing: `init --dual` in a project without `@claude-flow/codex` runs `npx -y @claude-flow/codex@latest init`, i.e. the *published*
+adapter (3.0.3 at the time of writing, with the 20 s budget), not the workspace source, so finding 2's fix reaches that path only once
+`@claude-flow/codex` is republished.
+
Harness bugs found and fixed on the way (not ruflo bugs): the redactor's `sk-` pattern masked task ids (`task-...`) and its callback mis-printed
offsets; a `__proto__` assertion tested the wrong property (the pollution is covered by the unit test from #3967); a costHardStop assertion that
matched the model's prose would also pass on a hallucinated refusal and now reads the `tool_result`.