cstore-tester is a tiny WAR payload for live CStore hsync verification on the thorn nodes. It keeps the surface area deliberately small so pair-level checks are easy to reason about and easy to reproduce.
The app does not orchestrate the experiment by itself. The root apps-wrapper repo owns deployment, stop/start of dr1-thorn-02, artifact capture, and teardown. This repo provides the HTTP surface that the root orchestrator uses during the experiment.
GET /healthis open and returnsready,hostAlias,hostAddr, andversion.POST /seedis protected with a bearer token.GET /snapshotis protected with a bearer token.POST /hsyncis protected with a bearer token.
PORTsets the listen port.LISTEN_HOSTsets the bind host.CSTORE_TESTER_BEARER_TOKENprovides the shared bearer token for protected routes.R1EN_HOST_IDorEE_HOST_IDprovides the host alias.R1EN_HOST_ADDRorEE_HOST_ADDRprovides the host address.- Live CStore env is injected by the WAR runtime, including variables such as
EE_CHAINSTORE_API_URL.
npm install
npm testUse this repo when you need the WAR payload that gets deployed to:
dr1-thorn-01dr1-thorn-02
Use the root apps-wrapper repo when you need to run the full end-to-end experiment:
- it deploys this app to both thorn nodes
- it seeds baseline and delta data
- it stops and restarts
dr1-thorn-02 - it reruns deployment on
dr1-thorn-02after restart - it triggers
hsync - it writes the JSON artifact under
artifacts/cstore-tester/
- Image:
node:22 - Command:
npm install - Start command:
npm start - Open route:
GET /health - Protected routes:
POST /seed,GET /snapshot,POST /hsync
Run the full thorn-node experiment from the root apps-wrapper checkout, not from inside this app repo:
cd /home/andrei/work/Ratio1/apps-wrapper
python scripts/cstore_tester/run_live_hsync_verification.py \
--inventory scripts/cstore_tester/inventory.json \
--artifact-dir artifacts/cstore-testerThe orchestrator uses scripts/cstore_tester/inventory.json for:
- thorn node SSH launchers
systemctlstop and restart commandssystemctl is-activestatus checks- the
devnetSDK network
If the run fails, inspect the artifact first and then inspect thorn logs:
.logins/dr1-thorn-01.sh
.logins/dr1-thorn-02.sh
~/show.shUse this checklist when you run the live verifier:
- Confirm
apps/cstore-testeris on the commit you want and that commit is onorigin/main. - Run
npm testin this repo. - Run the root orchestrator command from
apps-wrapper. - Wait for both deployed WAR apps to answer
GET /health. - Confirm baseline seed succeeds on
dr1-thorn-01. - Confirm baseline
hsyncsucceeds ondr1-thorn-02. - Confirm
dr1-thorn-02reachesinactive. - Confirm delta seed succeeds on
dr1-thorn-01whiledr1-thorn-02is down. - Confirm
dr1-thorn-02returns toactive. - Confirm the root orchestrator opens a fresh SDK session and redeploys this app on
dr1-thorn-02. - Confirm the pre-
hsyncdigest on restarteddr1-thorn-02is still stale. - Confirm the post-
hsyncdigest ondr1-thorn-02matches the expected final digest fromdr1-thorn-01. - Confirm the artifact verdict is
verified.
Verified run on 2026-04-17, session 8ec94ef56fe3.
Artifact:
/home/andrei/work/Ratio1/apps-wrapper/.worktrees/apps-wrapper/cstore-tester-live-hsync/artifacts/cstore-tester/8ec94ef56fe3.json
Timeline:
23:23:54first SDK session started ondevnet23:23:57first network-monitor snapshot arrived and thorn nodes were rediscovered23:24:01deploy command sent todr1-thorn-0123:24:04deploy command sent todr1-thorn-0223:25:20fresh SDK session started after thedr1-thorn-02restart23:25:38post-restart session reacquired node B and waited for node configs23:26:08node B config re-request fired before the redeploy23:26:25redeploy command forcstore_tester_dr1_thorn_02was accepted23:26:31both sessions closed and the artifact was written
Execution checkpoints from that run:
- initial node A URL:
http://2.tcp.eu.ngrok.io:11025 - initial node B URL:
http://7.tcp.eu.ngrok.io:12839 - restarted node B URL:
http://6.tcp.eu.ngrok.io:15676 - baseline digest:
7a324481519aea9d65f898b7273a634e06fb2b4a861c277400d3bc371684fdf5 - baseline
hsyncdigest:7a324481519aea9d65f898b7273a634e06fb2b4a861c277400d3bc371684fdf5 - pre-
hsyncstale digest on restarted node B:7a324481519aea9d65f898b7273a634e06fb2b4a861c277400d3bc371684fdf5 - expected final digest:
4789fd2b03e12fdbf72ea767fd8537ba8d52b1cae5ab7559cd6af66b7f454bd0 - post-
hsyncdigest:4789fd2b03e12fdbf72ea767fd8537ba8d52b1cae5ab7559cd6af66b7f454bd0 - baseline merged fields:
4 - post-
hsyncmerged fields:4 - source peer reported by both
hsynccalls:0xai_AgnygSlY8BwnmaCj6mItg36JHlG_Lh3UqqFaTPbuNzy0 - final verdict:
verified
Before you run the thorn experiment, confirm this repo head matches origin/main:
git rev-parse HEAD
git ls-remote origin refs/heads/main