When PORT=0, the backend now writes its actual bound port to data/test/.port. test-env.sh reads that file when TT_TEST_PORT=0 so all targets (test-up, test-reset, test-down) resolve the real URL. test-up waits for .port to appear before the health-check loop.