Skip to content

ci(bridge): {Node, Deno, Bun} matrix — unit suite + MCP boot smoke#212

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/nifty-hypatia-wu31kw
Jun 11, 2026
Merged

ci(bridge): {Node, Deno, Bun} matrix — unit suite + MCP boot smoke#212
hyperpolymath merged 2 commits into
mainfrom
claude/nifty-hypatia-wu31kw

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What this is

Lands plan §7 E5 (from #211's critical-chain doc) with the matrix widened per the follow-up discussion: the bridge is now tested in CI under Node, Deno, and Bun — the three runtimes the README blesses.

Why

The bridge's own unit tests were not run by any CI workflow (only the path-claims bench script), which is how a bare Deno.* reference shipped and broke the npx/Node install path at import time (fixed in #211). Follow-up investigation corrected one detail: Bun was broken too — Bun implements Node's process.* APIs and has no Deno global, so only the dogfooded Deno runtime was ever clean. The fix in #211 repairs both, but nothing prevented recurrence.

What's in it

  • bridge-tests job in e2e.yml — 3-leg matrix (node / deno / bun), fail-fast: false, timeout-minutes: 10. Each leg runs the full unit suite under its own runtime — all three natively execute the node:test files (node --test, deno test, bun test) — plus a boot smoke of main.js.
  • mcp-bridge/tests/boot_smoke.js — spawns the bridge under a given runtime command, performs a real initializenotifications/initializedtools/list handshake over stdio, asserts serverInfo, a non-empty tool list, and exit 0. This exists because the unit suite imports lib/ but never boots main.js, whose stdin/exit paths are runtime-gated (Deno.stdin vs process.stdin) — exactly where a leak would hide from units. No REST backend needed (initialize and tools/list are bridge-local).
  • e2e.yml pull_request paths now include the workflow file itself (push paths already did — a workflow-only PR previously didn't trigger the workflow).
  • Plan doc §7 E5 updated to record the landed state and the corrected Bun finding.

Verification (local, all six legs)

Leg Unit suite Boot smoke
Node 22 52/52 OK — 68 tools, exit 0
Deno 2.8.3 52/52 (×3 runs) OK — 68 tools, exit 0
Bun 1.3.11 52/52 OK — 68 tools, exit 0

YAML validated by parse (6 jobs, matrix legs confirmed). setup-bun pinned to 0c5077e51419868618aeaa5fe8019c62421857d6 (v2.2.0), SHA verified via git ls-remote against oven-sh/setup-bun; other actions reuse the file's existing pins.

Out of scope

The two broken gates catalogued in #199 (Zig download URL in lsp-dap-bsp.yml, ABI-grep false positive) stay tracked there.

https://claude.ai/code/session_01PRi6uSn6qucCMCCy7mqUr4


Generated by Claude Code

…ot smoke

Lands plan §7 E5 with the matrix widened to include Bun. The bridge's
unit tests were not run by any workflow (only the path-claims bench),
which is how a bare Deno.* reference shipped and broke both the npx/
Node and Bun install paths at import time (fixed in PR #211; Bun has
no Deno global — only the dogfooded Deno runtime was clean).

- New bridge-tests job in e2e.yml: 3-leg matrix, each running the full
  unit suite under its runtime (node --test / deno test / bun test —
  all three natively execute the node:test files; verified 52/52 each)
  plus an MCP boot smoke of main.js.
- New mcp-bridge/tests/boot_smoke.js: spawns the bridge under a given
  runtime command, performs a real initialize → notifications/
  initialized → tools/list handshake over stdio, asserts serverInfo +
  non-empty tools + exit 0. Needed because the unit suite imports lib/
  but never boots main.js, whose stdio/exit paths are runtime-gated.
  Verified locally under all three runtimes (68 tools, exit 0).
- e2e.yml pull_request paths now include the workflow file itself
  (push paths already did; workflow-only PRs previously didn't run it).
- Plan doc §7 E5 updated to record the landed state and the corrected
  Bun finding.

setup-bun pinned to 0c5077e51419868618aeaa5fe8019c62421857d6 (v2.2.0,
SHA verified via git ls-remote against oven-sh/setup-bun).

https://claude.ai/code/session_01PRi6uSn6qucCMCCy7mqUr4
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 273 issues detected

Severity Count
🔴 Critical 15
🟠 High 137
🟡 Medium 121

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Stale AI session file -- delete",
    "type": "stale",
    "file": "GEMINI.md",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "medium"
  },
  {
    "reason": "Action ses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886 needs attention",
    "type": "unpinned_action",
    "file": "e2e.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in abi-drift.yml",
    "type": "missing_timeout_minutes",
    "file": "abi-drift.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in container-publish.yml",
    "type": "missing_timeout_minutes",
    "file": "container-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

🏁 path-claims bench

Commit df7731e

Numbers
path-claims bench  (node v22.22.3)

  scenario                                              iters       ms        ns/op          ops/s
  --------------------------------------------------------------------------------------------------------------
  register: 10 active claims, 3 new paths               50000 iters    185 ms      3.70 µs/op    269.9k ops/s
  register: 100 active claims, 3 new paths              20000 iters    320 ms     16.04 µs/op     62.4k ops/s
  register: 1000 active claims, 3 new paths              5000 iters    952 ms    190.49 µs/op      5.2k ops/s
  register: 100 active claims, 20 new paths              5000 iters    383 ms     76.69 µs/op     13.0k ops/s

  pathsOverlap: deep diverge at segment 4             1000000 iters    153 ms     153.4 ns/op     6.52M ops/s
  pathsOverlap: short prefix match                    1000000 iters    132 ms     132.8 ns/op     7.53M ops/s

  refresh (existing claim)                             100000 iters     10 ms     108.6 ns/op     9.21M ops/s
  list (100 active claims)                              50000 iters    281 ms      5.62 µs/op    177.8k ops/s

  (Bench numbers depend on host; use deltas across commits, not absolute values.)

Host-dependent — compare deltas across commits, not absolute values.

@hyperpolymath hyperpolymath marked this pull request as ready for review June 11, 2026 22:05
@hyperpolymath hyperpolymath enabled auto-merge (rebase) June 11, 2026 22:06
A panic-attack assail scan of the bridge flagged the deno boot leg's
`-A` (all-permissions) grant. Tightened to main.js's own shebang set
(--allow-net --allow-env --allow-read). This is a real improvement, not
cosmetic: booting under -A could mask a missing-permission bug that a
scoped real install would hit, so the smoke now exercises the exact
grant a user gets. Re-verified: all three legs boot (68 tools, exit 0)
and the assail finding on boot_smoke.js clears.

https://claude.ai/code/session_01PRi6uSn6qucCMCCy7mqUr4
@hyperpolymath hyperpolymath disabled auto-merge June 11, 2026 22:12
@hyperpolymath hyperpolymath merged commit a289907 into main Jun 11, 2026
29 checks passed
@hyperpolymath hyperpolymath deleted the claude/nifty-hypatia-wu31kw branch June 11, 2026 22:13
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 273 issues detected

Severity Count
🔴 Critical 15
🟠 High 137
🟡 Medium 121

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Stale AI session file -- delete",
    "type": "stale",
    "file": "GEMINI.md",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "medium"
  },
  {
    "reason": "Action ses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886 needs attention",
    "type": "unpinned_action",
    "file": "e2e.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in abi-drift.yml",
    "type": "missing_timeout_minutes",
    "file": "abi-drift.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in container-publish.yml",
    "type": "missing_timeout_minutes",
    "file": "container-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants