Point the site and the harnesses at the four repositories

The relay and the Kotlin engine are published on their own now, so the
self-hosting guide told people to clone a directory that no longer exists
and the source page said everything was in one repository.

Both pages list all four now, with what each is for. The self-hosting guide
still only needs the first one -- the rest are there so that self-hostable
is something a reader can check rather than something they are told.

The Android vector loader hardcoded ../../engine/test/vectors, which is only
right inside this repository. It resolves from a candidate list now, honours
FLAMENET_VECTORS, and still FAILS rather than skips when it finds nothing:
the entire value of a third engine is that it is checked against something
other than a reading of our own code. Nine tests pass against the JDK in
Homebrew, which is not on the default java_home path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Paul Hitt
2026-08-21 18:23:49 -04:00
co-authored by Claude Opus 5
parent 06b97ca69b
commit e7862c0d95
@@ -24,10 +24,30 @@ import kotlin.test.assertTrue
class PublishedVectorsTest {
private val vectors: JSONObject by lazy {
// From android/engine/ up to the repository root.
val file = File("../../engine/test/vectors/protocol-v1.json")
assertTrue(file.exists(), "published vectors not found at ${file.absolutePath}")
JSONObject(file.readText())
// Where the vectors are depends on which checkout this is: android/ as a
// subtree of the app repo, or the extracted Android repo with
// flamenet-e2e cloned beside it. Resolved rather than assumed, because a
// hardcoded depth is how the harness stops testing anything.
//
// This FAILS rather than skips when it finds nothing, deliberately: the
// whole reason a third engine is worth writing is that it is checked
// against the published vectors, and one that quietly stops checking is
// worth less than no third engine at all.
val candidates = listOfNotNull(
System.getenv("FLAMENET_VECTORS"),
"../../engine/test/vectors/protocol-v1.json", // app repo subtree
"../../../flamenet-e2e/test/vectors/protocol-v1.json", // beside the engine repo
"../../flamenet-e2e/test/vectors/protocol-v1.json",
).map { File(it) }
val file = candidates.firstOrNull { it.exists() }
assertTrue(
file != null,
"published vectors not found. Looked in: " +
candidates.joinToString(", ") { it.absolutePath } +
". Clone https://gitlab.com/paulhitt/flamenet-e2e beside this repo, " +
"or set FLAMENET_VECTORS to protocol-v1.json.",
)
JSONObject(file!!.readText())
}
private fun JSONArray.bytesAt(i: Int) = Bytes.unb64(getString(i))