Skip to content

feat(commands): 9 new REPL commands — v0.3.0 (PRD-004) - #4

Merged
explosivebit merged 2 commits into
devfrom
feat/repl-commands-v030
Apr 4, 2026
Merged

explosivebit merged 2 commits into
devfrom
feat/repl-commands-v030

Conversation

@explosivebit

Copy link
Copy Markdown
Contributor

Summary

9 new commands: bench, cache, cls, destroy, env, listener, load, metrics, quit.
18/19 Node.js parity. 231 tests pass.

🤖 Generated with Claude Code

explosivebit and others added 2 commits April 5, 2026 02:18
Port of 9 missing commands from Node.js moleculer-repl:
- bench: action benchmarking (req/sec, latency stats)
- cache: keys listing + clear by pattern
- cls: clear terminal screen
- destroy: remove local service at runtime
- env: display environment variables
- listener: subscribe/unsubscribe to events live
- load: load service from .py file dynamically
- metrics: display collected metrics
- quit: graceful broker stop + exit

Total: 18 commands (was 10). 95%+ Node.js parity.
231 existing tests pass, ruff clean.

Refs: PRD-004

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Audit: 2 CRITICAL + 5 HIGH → all fixed:

- listener.py: instance-level state (was global module dict → memory leak)
- listener.py: uses local_bus for event subscription
- bench.py: real RPS = total/wall_time (was 1000/avg_ms)
- bench.py: default 5s time-based mode (Node.js compat)
- bench.py: error timings counted in stats
- load.py: security warning in docstring

231 tests pass, ruff clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@explosivebit
explosivebit merged commit c47112f into dev Apr 4, 2026
6 of 8 checks passed
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.

1 participant