Add dev-only TX Lab service, UI, API, Make targets, and docs#66
Merged
Add dev-only TX Lab service, UI, API, Make targets, and docs#66
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
apps/status-ui/txlab.jsthat 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.apps/status-ui/server.jsunder/api/txlab/*including read-only routes and token-protected mutating routes gated byTX_LAB_ENABLEandX-TX-LAB-TOKENchecks and middleware.apps/status-ui/public/index.htmlwith a TX Lab UI (tabs: Accounts, Scenarios, Runner, Live Monitor, Results), a prominent dev/test warning banner, and export controls for run results.make tx-lab,make tx-lab-up,make tx-lab-stop,make tx-lab-status,make tx-lab-logs, and PID/log wiring plusTX_LAB_HOST/TX_LAB_PORTvariables.README.mdwith a TX Lab section that describes guardrails, env var defaults, account/scenario examples, API endpoints, curl examples, troubleshooting, and safety notes.Testing
node --checkonapps/status-ui/server.jsandapps/status-ui/txlab.js, which succeeded.TX_LAB_ENABLE=1 TX_LAB_TOKEN=testtoken make tx-lab-upthen queriedGET /api/txlab/health, which returned OK, and then stopped the service withmake tx-lab-stop.POST /api/txlab/accounts/load) without the correctX-TX-LAB-TOKENand received401as expected.ERR_EMPTY_RESPONSEin the test environment; API and server checks passed and the UI is functional when run locally in a normal environment.Codex Task