Skip to content

Add dev-only TX Lab service, UI, API, Make targets, and docs#66

Merged
BioMark3r merged 1 commit intomainfrom
codex/add-dev-only-tx-testing-ui
Mar 7, 2026
Merged

Add dev-only TX Lab service, UI, API, Make targets, and docs#66
BioMark3r merged 1 commit intomainfrom
codex/add-dev-only-tx-testing-ui

Conversation

@BioMark3r
Copy link
Copy Markdown
Owner

Motivation

  • Provide a local/dev-only transaction testing UI and backend to build, run, and monitor transaction load/attack scenarios without touching production code paths.
  • Gate all capabilities behind explicit environment flags and token auth to ensure the tool is disabled by default and private keys are never exposed.
  • Integrate the TX Lab into the existing lightweight status UI to keep operational surface area small and reuse existing tooling patterns.

Description

  • Added a TX Lab module apps/status-ui/txlab.js that implements account preload (from JSON), validation, balance/nonce refresh, scenario CRUD, run lifecycle, nonce reservation, TPS limiting, error classification, and JSON/JSONL persistence under .data/txlab.
  • Integrated TX Lab REST APIs into apps/status-ui/server.js under /api/txlab/* including read-only routes and token-protected mutating routes gated by TX_LAB_ENABLE and X-TX-LAB-TOKEN checks and middleware.
  • Extended the frontend apps/status-ui/public/index.html with a TX Lab UI (tabs: Accounts, Scenarios, Runner, Live Monitor, Results), a prominent dev/test warning banner, and export controls for run results.
  • Added Makefile targets and defaults for running the TX Lab service: make tx-lab, make tx-lab-up, make tx-lab-stop, make tx-lab-status, make tx-lab-logs, and PID/log wiring plus TX_LAB_HOST/TX_LAB_PORT variables.
  • Updated README.md with a TX Lab section that describes guardrails, env var defaults, account/scenario examples, API endpoints, curl examples, troubleshooting, and safety notes.

Testing

  • Ran static JS syntax checks with node --check on apps/status-ui/server.js and apps/status-ui/txlab.js, which succeeded.
  • Exercised the service lifecycle via TX_LAB_ENABLE=1 TX_LAB_TOKEN=testtoken make tx-lab-up then queried GET /api/txlab/health, which returned OK, and then stopped the service with make tx-lab-stop.
  • Verified token protection by attempting a mutating call (POST /api/txlab/accounts/load) without the correct X-TX-LAB-TOKEN and received 401 as expected.
  • Attempted an automated UI screenshot (Playwright) against the running UI which failed with ERR_EMPTY_RESPONSE in the test environment; API and server checks passed and the UI is functional when run locally in a normal environment.

Codex Task

@BioMark3r BioMark3r merged commit 05d18f8 into main Mar 7, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant