Commit Graph
24 Commits
Author SHA1 Message Date
rUvandr 3c2ae91170 fix(release): absolute README URLs on npm pages + release 3.79.1 (#5053)
* fix(release): absolute README URLs on the ruflo and @claude-flow/cli npm pages

npmjs.com resolves relative README URLs against repository.directory, so on
the ruflo page docs/assets/x.svg became raw.githubusercontent.com/.../HEAD/
ruflo/docs/assets/x.svg: 41 of 51 images and every relative link 404ed. The
@claude-flow/cli page had the same problem. claude-flow publishes from the
root and was unaffected.

The release workflow now stages both subdirectory READMEs through
scripts/readme-absolute-urls.mjs, which rewrites relative images to
raw.githubusercontent.com and relative links to github.com/blob, pinned to
the commit being published. Both prepare-publish scripts use it too. Also
fixes the README's Verification link (verification.md moved to
verification/README.md in May).

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(release): 3.79.1

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-11-20 08:34:42 -05:00
rUvandr ad343eb14d feat(release): SLSA provenance publishing + pinned init output (ADR-545) (#5048)
* feat(release): publish the train with SLSA provenance (ADR-545)

stable-npm-release publishes with --provenance (id-token: write), checks
repository.url before publishing, defaults to a dry run, publishes only
from main, and promotes to latest only after the registry holds a SLSA v1
attestation for exactly the verified archive built in ruvnet/ruflo.
Only latest moves (ADR-513). ADR-545 records the client review items.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(release): drop the dead root npm ci step that runs security's tsc prepare

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(release): clear x-gateway audit gate; allow HEAD dry runs (ADR-545)

npm audit fix clears the 2 high advisories; a scoped override lifts
rimraf's glob to ^14.0.2 for the remaining glob/minimatch moderates
(0 vulnerabilities, 142/142 gateway tests). tag=HEAD (dry run only)
builds the dispatched commit so a release can be rehearsed before it
is tagged.

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr-545): record RuVector#1516 and the laptop-only package gap

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(release): commit the signed helper manifest for 3.78.1 (ADR-545)

CI verifies the committed manifest; the signing key stays off CI.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(release): npm ls --all warns instead of gating (#5047)

The published 3.78.1 tree already has invalid nested ranges; the
functional smoke checks stay the gate until #5047 aligns the pins.

Co-Authored-By: RuFlo <ruv@ruv.net>

* feat(cli): pin init output to the CLI's exact version, add repin and provenance check (ADR-545)

- init writes @claude-flow/cli, claude-flow and ruflo pinned to the running
  CLI's version (one specifier helper, src/init/pinning.ts); third-party MCP
  refs (ruv-swarm, flow-nexus, agentic-jujutsu) pinned to known versions.
  `--channel latest` keeps the previous floating output byte-for-byte.
- `ruflo init repin` / `init --repin`: idempotent rewrite of settings.json,
  .mcp.json, CLAUDE.md and .claude/helpers with --dry-run and a per-line
  report. Leaves signed helpers, JSON keys and #2448 runaway hook commands
  alone and says why.
- Helper refresh never rewrites signed helpers, so pins survive it.
- Provenance check (registry attestations, SLSA v1 predicate, subject digest
  == dist.integrity, repo == github.com/ruvnet/ruflo) via
  `doctor -c provenance`, after repin, and as a non-fatal warning at init.
  Fetch is injectable; tests use recorded registry fixtures.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(release): test the federation WebSocket fallback by removing agentic-flow

The CLI now depends on stable agentic-flow ^3.0.0, so pinning the
alpha no longer forces the fallback; the smoke step was stale.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(cli): pin untagged npx runs in helper scripts; update #2206 CI guard (ADR-545)

`npx @claude-flow/cli hooks …` with no tag floats exactly like @latest.
The generated pre-commit hook and copied unsigned helpers (post-commit,
pre-commit) ran it untagged. Init now pins those runs on copy and in the
generator, and `init repin` pins them in .claude/helpers. Docs copied from
the package and the user's CLAUDE.md are left as is. The --prefix form used
by the signed helpers is not matched.

The wizard-init guard required the literal `ruflo@latest` in
mcp-generator.ts; it now requires the args to run the ruflo wrapper via
ourSpec('ruflo', …).

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr-545): CI-only train publishing in CLAUDE.md; record dry-run findings

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(x-gateway): bump plugin to 0.10.6 for the dependency audit fix

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(adr-545): unambiguous flag regex (CodeQL ReDoS), anchored scope replace, keep doctor help ending in metaharness)

Co-Authored-By: RuFlo <ruv@ruv.net>

* ci: exclude the node:test provenance gate test from the vitest ratchet (runs via node --test in v3-ci)

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-11-19 16:21:20 -05:00
randRuFlo 5490095e7e test(release): the npx-install smoke packs the staged CLI, as a release does
The smoke ran a bare pnpm pack, which bundles workspace links and never
runs the staging step, so it tested a tarball nobody installs. It now
stages the bundled runtime packages and packs with npm. The vendored
range check no longer needs the semver package, which that job does not
install.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-10 09:02:17 -05:00
randRuFlo 7cb8603b7f fix(release): ship zod 4 inside the bundled security package; release 3.75.1 (#4940)
@claude-flow/cli 3.74.1 and 3.75.0 (and the claude-flow umbrella) bundle
@claude-flow/security 3.0.7, which needs zod >=4.6.7, while the wrappers
keep zod 3. The staging script stripped the nested dependencies, so
security's `import 'zod'` resolved to zod 3 and the root export threw
`z.config is not a function`.

Declaring the dependency is not enough: npm never installs the
dependencies of a bundled package (checked against the 3.75.0 tarball).
The stager now vendors declared leaf dependencies into the bundled
package's own node_modules, checks the workspace copy satisfies the
declared range, and refuses a dependency that has dependencies itself.

The npx-install smoke now imports every bundled runtime package from the
installed CLI, so this fails CI instead of users.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-10 08:40:27 -05:00
Muhammad Zubair 44675e8fd5 test(skills): check that every CLI command a shipped skill runs exists (#4552) (#4553) 2026-10-28 03:50:50 -04:00
rUvandr 663c58a091 fix(ci): add live-registry audit for unpublished leaf pins (#4303) (#4304)
* fix(ci): add live-registry audit for unpublished leaf pins (#4303)

audit-wrapper-dep-ranges.mjs and audit-leaf-package-publish.mjs only check
that a non-bundled @claude-flow/* leaf's CLI pin agrees with the workspace's
own version. Neither asks npm whether that version was ever published.

#4279 bumped @claude-flow/memory to 3.0.6 in the workspace and pinned the CLI
to match; both existing audits were green since workspace and pin agreed with
each other, but the standalone `npm publish` for memory was never run. 3.57.2
shipped depending on a version of memory that did not exist, breaking every
fresh install with ETARGET.

Add audit-leaf-versions-published.mjs, which queries the live npm registry
for each non-bundled leaf and fails if the version the CLI's pin resolves to
was never published. Wired into the plugin-package-audit CI job (same gate as
the two existing leaf audits) and documented as a required pre-tag step in
CLAUDE.md's publishing rules.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix: use encodeURIComponent instead of a first-occurrence .replace for the registry URL

CodeQL flagged name.replace('@', '%40') as incomplete string escaping —
String.replace with a string pattern only touches the first match. It
happened to be harmless for npm scope names (exactly one leading @), but
it's the wrong tool for escaping a URL path segment. encodeURIComponent
also correctly escapes the scope separator (%2F), verified against the
live registry (200 OK for @claude-flow/memory).

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ci): baseline the new audit test file like its plain-script sibling

scripts/__tests__/audit-leaf-versions-published.test.mjs is a bare Node
script (console.log + node:assert/strict), the same shape as the
already-baselined scripts/__tests__/audit-supply-chain.test.mjs — it has
no vitest-discoverable describe/it block, so the root vitest ratchet
reports "No test suite found in file" and fails CI's Test Suite job.

This is not a real regression: the file was never runnable by vitest in
the first place (same category as its sibling, which IS correctly listed
here already). The test itself passes fine when run directly via
`node scripts/__tests__/audit-leaf-versions-published.test.mjs` (6/6, see
the PR description).

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-19 22:55:54 -04:00
Muhammad Zubair 20b9451f8d test(skills): check that every MCP tool a shipped skill names exists in the registry (#4141) 2026-10-13 13:38:45 +05:00
ruv 668ee8d1e9 fix(ci): the test ratchet no longer runs files vitest cannot run (71 plugin kit tests and node:test files)
`Test Suite (ubuntu-latest)` failed with "71 unexpected failing file(s)": 66 plugin kit tests that import `claude-code/testing` (only
resolvable inside Claude Code) and 5 node:test files vitest finds no suite in. None is a regression; each has its own gate
(`claude plugin test` in every plugin smoke, `node --test` in all-plugins-smoke). They are now listed in scripts/ci-test-excluded.txt and
passed to vitest as excludes. A listed file that no longer exists fails the ratchet, and the baseline stays untouched and shrink-only.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 13:21:43 -04:00
ruv 0bae1e47e7 fix(mods): a domain plugin's refusal of another plugin's memory_store no longer claims the write (variant B, review #8)
Every guard still refuses exactly the same inputs (4752-case A/B against origin/main: 0 decision diffs, 744 message-only diffs).
When music, neural-trader, migrations, observability, rvf or ruvector refuse a memory_store whose namespace they do not own, the
message now says a secret-shaped value was found in a memory write and which namespace was targeted (short plain text, stripped and cut,
dropped if secret-shaped), never an owner and never content. Patch bumps: music 0.2.3, neural-trader 0.3.4, migrations 0.3.3,
observability 0.3.3, rvf 0.3.5, ruvector 0.3.4.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 04:07:46 -04:00
ruv d855f75264 Merge remote-tracking branch 'origin/main' into loop/cap-r3 2026-10-05 00:14:43 -04:00
ruv 1ff11ce4e8 test(mods): fleet guard probe covers structured credentials and walker budgets
Adds structured (name/value pair) and budget (past the node and character
caps) probe classes. Finds 32 guards that pass a secret past the 25000-node
walker budget; recorded in the known-holes baseline, not fixed here (the
root cause is the vendored shared region owned by the sync generator).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 00:11:15 -04:00
ruv 21adb5ce28 feat(mods): vendor the flag option parser from one origin with the screen sync and drift check (review #2)
Extend scripts/sync-mod-screen.mjs to a second kit: the flag() helper in hooks/options.ts of 38 mods now sits between SHARED FLAG markers and is
rewritten/checked from ruflo-agentdb. Drift, a lost marker or zero copies fails --check. Bump the 39 touched plugin versions and their version pins.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 23:46:06 -04:00
ruv ed6af7710e Merge remote-tracking branch 'origin/main' into loop/cap-audit 2026-10-04 22:22:39 -04:00
ruv 41358126ab Merge remote-tracking branch 'origin/main' into loop/guard-probe 2026-10-04 21:29:59 -04:00
ruv a98f66344f docs(mods): capability review 2026-10 and matrix generator
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 21:19:34 -04:00
ruv 5d8ab06dc4 test(mods): guard probe timing is a hang gate (median of 3 > 1000 ms), 50 ms/50x advisory; bare --known-holes; wider watchdog
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 20:34:20 -04:00
ruv bf84712833 test(mods): probe gate fails on lost calibration; --report splices below the marker
A baselined guard that stops refusing anything is now a failure, not 26 fixes;
fixed holes need an actual pass. --report preserves hand-written text above the
generated marker. Two tests added; report regenerated.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 19:40:23 -04:00
ruv 7de1657db8 test(mods): fleet adversarial probe for every plugin guard (W6)
scripts/probe-mod-guards.mjs bundles each hooks/guard.ts with esbuild and runs a
97-probe corpus through its verdict: invisible/bidi splits, nesting to 5000,
wide/huge inputs, secrets in object keys, encodings, regex-DoS stress timed per
call (50 ms gate), benign look-alikes. Calibrates each guard's real secret
surface first so a miss is a real bypass. A fast subset runs last in
smoke-all-plugins against a known-holes baseline. Findings (4 root causes across
32 guards, no ReDoS/crash/hang) are in v3/docs/validation/mod-guard-probe-2026-10.md.
No plugin code changed.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 19:35:38 -04:00
ruv 71bf281bf0 refactor(mods): one source for the secret screen — sync-mod-screen.mjs regenerates the shared region of 37 screen.ts copies, --check in all-plugins-smoke (ADR-445)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 19:03:37 -04:00
Mr. MakandClaude Opus 5 b02d936935 fix(ci): print the failing assertion, not just the filename, on a ratchet failure (#3208)
The ratchet runs vitest with `--reporter=json --outputFile=…`, so nothing
vitest prints reaches the job log and the only record of an unexpected
failure is the file name. Recovering the assertion means downloading the
`test-results-ubuntu-latest` artifact — and a rerun replaces it, so after a
rerun attempt 1's assertion is gone for good.

The failure messages are already in the report this process parsed. Printing
them costs nothing, needs no new artifact, and survives a rerun, because job
logs are per-attempt.

`formatUnexpectedFailures()` is exported and pure so it unit-tests alongside
`evaluateTestReport()`. Every field it reads is optional by design: a
file-level abort ("No test suite found in file") carries `message` and no
assertions, and a report from another reporter version may carry neither. In
both cases the filename still prints, exactly as before, and the PASS path is
untouched.

Verified against a real failing run rather than a fixture: replaying run
35521170139's `vitest.json` through this script turns

      + v3/@claude-flow/cli/__tests__/memory-search-scores-3327.test.ts

into that same line plus

      ✗ memory_search score contract (#3327 Finding B) preserves standard fallback on import failure
        AssertionError: expected [ { key: 'a', …(5) } ] to deeply equal [ { key: 'a', …(4) } ]

which is the line that would have identified the failure in #3208 without a
second run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KTedGmPKpEdArVBMMn3JaP
2026-09-20 13:49:32 -04:00
ruv 13cbd697db fix(release): enforce CI and idle assignment safety 2026-08-15 11:14:06 -04:00
ruv 21f7c0adb8 fix(release): align bundled runtime metadata 2026-08-14 19:21:33 -04:00
rUv ddd27576cb fix(release): ship Capability Brain as a self-contained 3.32.30 train (#2829)
* fix(release): bundle policy and Codex runtimes

* fix(release): verify self-contained three-package archives
2026-07-29 01:30:53 -04:00
ruv 0181fb85c2 ci: #2046 supply-chain hardening — five-layer audit + dependency review + CODEOWNERS
After ADR-122 + ADR-123 expanded ruflo's published-package surface
(@claude-flow/browser, ruflo-graph-intelligence) the supply-chain attack
surface grew alongside it. This commit puts five layers of defence on
every PR + push that touches package.json, lockfiles, or the audit
itself.

New files:

  .github/supply-chain/allowed-deps.json
    Whitelist of direct deps per audited package (ruflo-graph-intelligence,
    @claude-flow/browser). New top-level deps require an explicit edit here.
    Also lists policies.rejectInRegistry (typosquat block-list — ruflo-graph-
    intellligence, sublinear-time-solvor, agent-browse, etc.) and
    publisherTrust.criticalUpstreamPackages (upstream identities snapshotted
    in CI logs so maintainer takeovers are visible).

  .github/supply-chain/accepted-findings.json
    Triaged findings the audit currently tolerates. Each entry cites a
    tracking issue or ADR and carries an expiresAt date so the audit
    re-fails after triage window closes. CODEOWNER review required to
    edit.

  .github/supply-chain/README.md
    Operator guide: how to run the audit locally, how to triage new
    findings, how to add a new package to coverage.

  .github/CODEOWNERS
    Workflows / lockfiles / plugin manifests / supply-chain config now
    require explicit maintainer review. Pairs with the automated audit.

  scripts/audit-supply-chain.mjs
    Five-layer audit:
      [1/5] CVE — npm audit --audit-level=high, fail on HIGH/CRITICAL in
            DIRECT deps unless accepted
      [2/5] Lockfile integrity — every downloaded entry must carry
            SHA-512 in `integrity` (skip pnpm-shadow + workspace-link
            entries by construction)
      [3/5] Top-level allowlist — package.json deps must match
            allowed-deps.json
      [4/5] Typosquat reject — names matching policies.rejectInRegistry
            fail regardless of upstream status
      [5/5] Publisher trust — npm view maintainers, log-only (informational)

  scripts/__tests__/audit-supply-chain.test.mjs
    Smoke test for the audit itself (full-run / --json / each --scope).

Workflow additions in .github/workflows/v3-ci.yml:

  supply-chain-audit job — runs the audit + the smoke test on every PR
    and push that touches package.json, lockfile, allowed-deps,
    accepted-findings, or the audit script.

  dependency-review job — actions/dependency-review-action@v4 (PR-only)
    flags any new vulnerable dep added by the PR vs base, fails on
    `high` severity, denies known-bad licenses (AGPL/GPL/SSPL) and
    blocks specific compromised versions (event-stream, flatmap-stream,
    ua-parser-js@0.7.29 / 0.8.0 / 1.0.0, colors@1.4.1, faker@6.6.6).

  Path filter expanded to include **/package.json, **/package-lock.json,
    **/pnpm-lock.yaml, .github/supply-chain/**, scripts/audit-supply-chain.mjs

Dependabot additions in .github/dependabot.yml:

  Per-plugin npm stanzas for ruflo-graph-intelligence and
  @claude-flow/browser. Major-version bumps are blocked from auto-PR
  (they require allowlist re-approval); patch + minor auto-PR'd.

One real-world finding the audit caught on first run + how it was
triaged (recorded in accepted-findings.json):

  - HIGH CVE on @claude-flow/browser → agentic-flow (via @xenova/
    transformers, agentdb). Already tracked in ADR-121 Phase 4
    (Xenova retirement migration). Marked accepted with expiresAt
    2026-08-19 so the audit re-fails if the migration hasn't
    landed by then.

Audit run on this branch: PASS (0 unaccepted CVE / 0 lockfile issue
/ 0 allowlist violation / 0 typosquat / 5 publisher-trust entries
logged). Audit smoke test: 5/5 passing.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-19 08:23:30 -04:00