Skip to content

feat(test-suite): rewrite fhevm-cli as Bun/TypeScript CLI#1985

Closed
Eikix wants to merge 1 commit intomainfrom
refactor/fhevm-cli-typescript
Closed

feat(test-suite): rewrite fhevm-cli as Bun/TypeScript CLI#1985
Eikix wants to merge 1 commit intomainfrom
refactor/fhevm-cli-typescript

Conversation

@Eikix
Copy link
Copy Markdown
Contributor

@Eikix Eikix commented Feb 13, 2026

Summary

  • Rewrites the 340-line bash fhevm-cli as a typed Bun/TypeScript CLI using Commander.js
  • Same Docker Compose orchestration, same arguments — now with typed modules for env management, deploy DAG, test dispatch, and docker operations
  • Original fhevm-cli becomes a 3-line bash passthrough (exec bun run src/index.ts "$@")

New modules

Module Purpose
dag.ts 13-step deploy DAG with explicit dependency edges
env.ts Version defaults + env file preparation (replaces cp+sed)
docker.ts composeUp/Down, waitForService, getContainerIp
executor.ts Bun.spawn wrapper with dry-run recording for testing
cache.ts BuildKit local cache env var computation
test-suites.ts Suite name → grep pattern mapping
10 commands up, test, clean, logs, restart, upgrade, pause, unpause, status, doctor

Test coverage (100 tests, 856 assertions)

  • Unit tests: DAG invariants, env patching, cache vars, test-suite mappings
  • Migration tests: structural diff against bash deploy script + argument parity against original bash CLI (pinned to a4a9aa47)
  • Live e2e runner: compares both CLIs against a Docker stack (requires running services)

Test plan

  • bun test passes all 100 tests (no Docker required)
  • bunx tsc --noEmit type-checks cleanly
  • bun run src/index.ts --help lists all 10 commands
  • bun run src/index.ts up --dry-run traces the full 13-step deploy sequence
  • Live: ./fhevm-cli up --build deploys the full stack identically to the old bash script
  • Live: ./fhevm-cli test input-proof runs tests identically
  • Live: bun run src/e2e-runner.ts test --all compares both CLIs

Replace the 340-line bash fhevm-cli with a typed Bun/TypeScript CLI
using Commander.js. The new CLI orchestrates the same Docker Compose
services with the same arguments, but with typed modules for env
management, deploy DAG, test dispatch, and docker operations.

New modules:
- dag.ts: 13-step deploy DAG with explicit dependency edges
- env.ts: version defaults + env file preparation (replaces cp+sed)
- docker.ts: compose up/down, waitForService, getContainerIp
- executor.ts: Bun.spawn wrapper with dry-run recording for testing
- cache.ts: BuildKit local cache env var computation
- test-suites.ts: suite name → grep pattern mapping
- 10 command files: up, test, clean, logs, restart, upgrade,
  pause, unpause, status, doctor

Test coverage (100 tests, 856 assertions):
- Unit tests: dag, env, cache, test-suites
- Migration tests: structural diff against bash deploy script,
  argument parity against original bash CLI (pinned to a4a9aa4)
- Live e2e runner for comparing both CLIs against a Docker stack

The original fhevm-cli becomes a 3-line bash passthrough.
@cla-bot cla-bot Bot added the cla-signed label Feb 13, 2026
@Eikix
Copy link
Copy Markdown
Contributor Author

Eikix commented Feb 13, 2026

Fear that this is major Opus 4.6 slop, closing for now.

@Eikix Eikix closed this Feb 13, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented Feb 13, 2026

🧪 CI Insights

Here's what we observed from your CI run for 4b5235c.

🟢 All jobs passed!

But CI Insights is watching 👀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant