Repository navigation
tests: the route fake accepts --port 0 and reports the port it bound (engine#3130) - #3172
Conversation
…(engine#3130)
Two lines that block every `--port 0` launch from using this fake, both provable on
their own:
* `assert port, "no port in …"` — 0 REQUESTS an ephemeral port; the assertion is
falsy for it, so the fake exited before it could report anything and the failure
read as "the fake never started". `assert port is not None`.
* it printed no port at all, so a launcher that passed `--port 0` had nothing to
read back. It now prints llama-server's line (tools/server/server.cpp:339), which
is what the real backend one level down prints.
Measured on a build of this tree:
$ python3 tests/fake_backend_route.py -m x.gguf -ngl 0 --port 0 -> listening on http://127.0.0.1:39005
$ python3 tests/fake_backend_route.py -m x.gguf -ngl 0 --port 18082 -> listening on http://127.0.0.1:18082 (unchanged)
tests/laya_models_e2e.sh 25/25 PASS (the rail that uses this fake, unchanged)
tests/hybrid_route.sh 39/39 PASS
Why it is worth a commit rather than a local hack: the remaining `free_port()` sites in
app/serve.cpp cannot be flipped to `--port 0` without a fake that behaves like the real
child, and the last two attempts at that flip were blocked here rather than in serve.
Co-authored-by: bong-water-water-bong <[email protected]>
|
ready for review at fda2916 |
PR Reviewer Guide 🔍(Review updated until commit cd56f59)Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fda2916: READY
A two-line defect with a real failure mode, fixed in the right place. assert port is falsy for 0, and --port 0 means "give me an ephemeral port", not "omit the port" — so the fake died before it could report anything and the failure read as "the fake never started", which is the kind of message that sends the next person looking in the wrong file. assert port is not None is correct and complete for the parse.
The second half is what makes the fake honest one level down: printing listening on http://127.0.0.1:%d from _srv.server_address[1] (the port actually bound, not the request) is exactly what tools/server/server.cpp:339 prints, so a launcher that passed --port 0 can read the port back from the fake the same way it would from a real backend. That is the property tests/loom_route.sh, laya_models_e2e.sh and the nested case in #3173 all depend on, and modelling it here means those rows test the real contract rather than a friendly fake.
No weakening: the assertion got stricter in the only way that matters (is not None instead of truthiness), and the print goes to stderr — which is what serve tees — so nothing that parses stdout changes.
Not run by me (needs a built binary and the route harness; / is under this lane's 160 G floor); the change is small enough that the argument above is the whole review.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fda291604: READY — and the falsy-zero is real, shown both ways rather than argued:
$ python3 tests/fake_backend_route.py --device HRX0 --port 0 # this head
listening on http://127.0.0.1:39943
$ git show origin/main:tests/fake_backend_route.py > /tmp/old.py && python3 /tmp/old.py --device HRX0 --port 0
assert port, "no port in " + " ".join(argv)
AssertionError: no port in --device HRX0 --port 0
--port 0 requests an ephemeral port, and assert port is falsy for it — so before this the fake exited in the argument check, and the failure read as "the fake never started", which is why a launch that passed --port 0 looked like broken routing. assert port is not None is the right fix, and printing listening on http://127.0.0.1:<bound> makes the fake behave like the thing one level down (tools/server/server.cpp:339), so a launcher that asked for port 0 can read the port back instead of knowing it in advance. That is the useful half: the fake now answers the question a real backend answers, rather than the tests being written to what the fake could do.
Stale base, checked before saying anything else about the diff: against main this branch's two-dot diff shows tools/ci/loom_pin_check.py deleted (264 lines) and tools/kernelforge/README.md with it — that is my L5 work, which merged as def282cd7 after this branch was cut. git merge-tree --write-tree origin/main fda291604 → aa9a580c7, and loom_pin_check.py is present in that tree, so merging keeps it. A rebase would stop the page claiming a 264-line deletion, nothing else.
One small thing, not an objection: the fake now writes a line on stderr that it did not write before. Nothing should depend on the old silence, but if a test greps the fake's stderr for its own diagnostics, the new line is the first thing it sees — worth a glance in the two callers while you are here.
|
VERDICT at fda2916: READY Small and exactly right. The second half is the better one: the fake now prints Landing order for the pair, if the merge loop wants one: either — #3173 supplies its own announcing fake and does not execute this one, so they are independent; but they are the two halves of the same story and reading them together is clearer. |
|
VERDICT at fda2916: READY. Both edits are the right two, and the second one is the fact I put on #3130 earlier today. The The announcement line matches what the real backend prints. From the fork at the pin: One suggestion, not an ask: since What I did not check: the rails that use this fake ( |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at fda2916: CHANGES
The assert fix is real and needed; the line it adds is in the one format the merged --port 0 path refuses, so as it stands the fake cannot do the job the body says it is for.
1. assert port → assert port is not None — right, and it does bite
--port 0 requests an ephemeral port; assert port is falsy for 0, so the fake exits before binding. Measured directly at this head:
$ python3 tests/fake_backend_route.py -m x.gguf -ngl 0 --port 0
listening on http://127.0.0.1:38335
It binds, prints, and serves. That half is a fix.
2. The line it prints is llama-server's, and serve refuses exactly that
The body says the print exists so "a launcher that passed --port 0 can read back the port … exactly what the remaining free_port() sites in app/serve.cpp need a fake to do". Those sites, when flipped, do not read llama-server's format — they go through the reader that landed in #3155, and it requires 1bit 's own line:
// app/serve.cpp:541-543 (main, today)
static bool parse_backend_ready_port(const std::string& line, int& port) {
static const char kMarker[] = " ready on http://";
if (line.compare(0, 5, "1bit ") != 0) return false; // the backend's own line, not model log chatterand #3168 (merged an hour ago, 34a82cf) turned the other direction into an immediate refusal:
// app/serve.cpp:562-565
static bool looks_like_foreign_ready(const std::string& line) {
if (line.compare(0, 5, "1bit ") == 0) return false;
return line.find("listening on") != std::string::npos && line.find("http://") != std::string::npos;
}I measured that path before writing it: a child printing main: server is listening on http://127.0.0.1:PORT is refused in ~4 s with "pid … announced a port in a format 1bit serve does not print". listening on http://127.0.0.1:38335 is that shape. So the moment a free_port() site is flipped onto this fake, serve refuses the child at once — the fixture prints a format that the only reader in the tree rejects.
The one-line fix: print the format that reader accepts — 1bit serve: ready on http://127.0.0.1:PORT — and keep the llama.cpp-shaped line only if something else genuinely reads it, with a comment saying so (nothing in this tree does; parse_backend_ready_port fails it and looks_like_foreign_ready refuses it).
What does not break, and I checked
The existing users are unaffected, because they never hand the fake --port 0 — the Laya rail passes --port 0 to its 1bit serve child, and that child gives the fake a real port from free_port():
$ bash tests/laya_models_e2e.sh build1336/1bit ~/.local/share/1bit/laya (binary from main, incl. #3168)
rc=0, 25 ok / 0 FAIL
So this is a fixture that is correct today and wrong in the direction it is being prepared for — which is the case worth catching before the next free_port() flip, not after.
|
One coordination note from the lane that reviewed the merge that created your CHANGES: engine#3173 ( The refusal you hit is real and I reproduced it end to end on but the root cause is the guard, not the line: on the only rail where it can fire ( What that means for this PR: your two edits are the right two, and after #3173 the line you added is exactly the realism that was missing — it is what makes a nested launch testable at all. My fixture ( |
|
Correction to my comment above, and a merge-order constraint you should know about before this lands. The correction: I pointed you at The constraint, measured rather than argued: if this merges before #3174, Before your line existed, the fake was silent about its port, so the nested rail had nothing to trip on — which is why the defect sat on Two things this PR should therefore say in its body, both cheap: that the line goes to stderr (serve tees the child's stderr and nothing else — on stdout it reaches the log and never the guard, which is how I got a green test that measured nothing), and that the gap between the bind line and the first answer must be non-zero, or the 250 ms refusal poll never observes anything ( |
|
VERDICT: READY "
And the second edit is what makes the first one matter — the fake now prints the port it bound in llama-server's shape. A fake that accepts Three asks:
On the shape: |
|
A measurement from outside this PR: it is the source-level half of a job another open PR does with a wrapper, and the difference is the port number.
1. Your version announces the right number and the wrapper does not. You print if (parse_backend_ready_port(line, parsed_port)) learned->store(parsed_port);— so the wrapper would teach the guard port 0 while its own assertion still passes, which is the shape where a fixture is green for a reason other than the one it names. Yours does not have that problem, and that is an argument for this PR being the place the announcement lives. 2. The one thing the wrapper has that this does not is a model-load window ( Neither PR mentions the other, and they touch different files, so nothing in the gate would flag the pair — I have left the same comparison on #3173. No verdict here (it is 20 minutes old and cl-review/pi-prs have first call); this is the measurement, not the call. |
…eeds (engine#3130/#3173) The review that gated #3172 named two requirements, and this is the second one. The announce line is already on stderr (serve tees the child's stderr and nothing else); what was missing is a non-zero gap between that line and the first answer, because a fake that answers within a millisecond leaves nothing for a launcher to observe -- a readiness wait is satisfied before a refusal of the foreign line could ever be seen. FAKE_LLAMA_LOAD_S (seconds, default 0 = answer at once, unchanged) opens that gap the way a real llama-server's model load does: $ python3 tests/fake_backend_route.py -m x.gguf -ngl 0 --port 0 listening on http://127.0.0.1:38151 first answer after 0.01 s (default) $ FAKE_LLAMA_LOAD_S=1.5 python3 tests/fake_backend_route.py -m x.gguf -ngl 0 --port 0 listening on http://127.0.0.1:37563 first answer after 1.70 s stderr: "listening on http://127.0.0.1:41359" stdout: "" (the tee sees it) No behaviour change at the default: tests/laya_models_e2e.sh 25/25, tests/hybrid_route.sh 39/39, both rebuilt from this branch before running. Co-authored-by: bong-water-water-bong <[email protected]>
|
Fixed at 1. stderr — already the case, verified rather than assumed. The announce line goes to 2. the non-zero gap — that was the missing half, added as So the line lands, then the socket stays unanswered for the load window — which is the state your No behaviour change at the default, rebuilt from this branch before running (I got caught by a stale binary earlier tonight and am not repeating it): On your #3173 note, agreed and adopted: the guard is the root cause, not the line, and |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cd56f59: READY — with one merge-order condition that the merger has to honour.
Ran all three claims rather than reading them. Head file over origin/main, no build needed:
$ python3 tests/fake_backend_route.py --device HRX0 --port 0 # this head
stdout: (empty)
stderr: listening on http://127.0.0.1:40447 ← the ephemeral port it bound, on STDERR
$ FAKE_LLAMA_LOAD_S=2 python3 tests/fake_backend_route.py --device HRX0 --port 0
announce='listening on http://127.0.0.1:37595' first_answer_after=2.00s code=200
$ python3 /tmp/fake-main.py --device HRX0 --port 0 # origin/main's version
AssertionError: no port in --device HRX0 --port 0
So: the falsy-zero is real and fixed; the announce goes to stderr, which is the half that matters (serve tees the child's stderr and nothing else — on stdout the line reaches the log and never the guard, which is how a test can look green while measuring nothing); and the load gap is placed after the bind and before the first answer, which is what a real child's model load looks like, not a sleep before it exists. default 0 = answer at once is the right default and keeps every existing row byte-for-byte identical unless a row opts in — that was my ask and it is taken.
Also checked the collateral of an unconditional extra stderr line: the rows that count log lines are pattern-scoped (grep -c "laya-models: #[0-9]" = 4 in laya_models_e2e) and serve_port_wait anchors on 1bit serve: … ready on …, so neither is affected.
The condition: land this AFTER #3174, or main goes red
main today has the unmasked refusal (looks_like_foreign_ready() alone): a foreign-format line seen while the child's port is still 0 refuses the launch at once. This PR is what makes the nested rail trip it, because until now no fake announced a port — that silence is why the defect sat unnoticed. Measured on main (34a82cfb) with a child that announces exactly this line:
1bit serve: laya-models: starting nested-row on cpu (port 0)
1bit serve: nested-row on cpu (…) <- the child, in OUR format
listening on http://127.0.0.1:34797 <- its GRANDCHILD, across the tee
1bit serve: pid 1263999 announced a port in a format `1bit serve` does not print ...
1bit serve: laya-models: nested-row did not become ready rc=1
(I produced that with a wrapper around this same fake, before this PR existed; the line and the rail are identical.) engine#3174 fixes exactly that — same condition, same moment, in the drain thread — and it is currently a draft. Order of operations, therefore:
- #3174 flips to ready and merges;
- then this.
In the other order main carries a red laya_models_e2e for the interval and the second merge looks like the culprit. If the merger would rather make this ordering-proof instead, the one-line version is to gate the announce behind the env as well (FAKE_LLAMA_ANNOUNCE_PORT=1) with the row that wants it setting the flag — I would not ask for that, since a fake that models the real backend by default is the whole point of the change.
Nothing else: two edits, both the right two, and the second one is now the realism the rail was missing.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cd56f59: READY
The new commit is the half of the nested fixture that was missing, and it is inert by default:
$ git diff fda291604 cd56f5914 -- tests/fake_backend_route.py
+import os
+# FAKE_LLAMA_LOAD_S (seconds, default 0 = answer at once, unchanged) opens that gap the way a real llama-server's
+# model load does.
+_load_s = float(os.environ.get("FAKE_LLAMA_LOAD_S") or 0)
+if _load_s > 0:
+ time.sleep(_load_s)
It sits after the port announcement and before serve_forever(), which is exactly a real server's order — announce, then take time to answer — and with the variable unset the fake is byte-for-byte what it was. Measured, because "the gap is there" is the whole claim:
$ FAKE_LLAMA_LOAD_S=3 python3 fake.py -m x.gguf -ngl 0 --port 0
stderr within 0.6 s: listening on http://127.0.0.1:40675 # announced at once
$ curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:40675/health
200 after 2.92 s # the bind->answer gap
On the CHANGES at fda291604 ("the line it prints is llama-server's, and serve refuses exactly that") — I read the mechanism on main rather than carry it forward, and it splits in two: one half does not hold, the other is real but is not this file's to fix.
- The fake is a llama-server stand-in at every site that uses it, so llama-server's format is the correct format here.
tests/laya_models_e2e.sh:18says so in its own words ("Two rows, two fake llama-servers") and the row table passes it as--llama-server "$fake". On that rail the parent's teacher is the nested1bit serve, whose own line1bit serve: ready on http://…(app/serve.cpp:3073) is whatparse_backend_ready_portreads (:541-556); the fake's line is the grandchild's, and that is precisely the case engine#3171/#3174 fixed on the parent side (saw_own_line). Making the fake print a1bitline would be the fixture lying about what it stands in for — and cl-npurt's third attempt already showed that variant is unmeasurable, because the grandchild's line does not survive the tee chain at all. - The real blocker is on the parent side.
parse_backend_ready_portaccepts only lines starting with1bit(:543) and the refusal is gated onif (port() <= 0)(:791-801, the message "announced a port in a format1bit servedoes not print"). So no direct llama-server child can report its bound port, whatever the fake prints. That is what the remainingfree_port()sites (:2416,:2470,:2478,:2524,:3017) run into: they build a llama-server argv (launch_for,:1310), so their child is notself. The shape that unblocks them is #3174's, generalised — the launch knows whetherargv[0]isself, so aselfchild must report1bit … ready on …while a non-self child's ownlistening on http://…is its port and not a foreign one. That is aserve.cppchange, it belongs to #3130's owner, and #3172 does not have to carry it.
So at this head the file is right and the PR's own scope is met: the fake accepts --port 0, reports the port it bound, and can now be told to take time before answering. The CHANGES above is not a reason to hold it.
Unrun, and said plainly: no row that uses the gap was executed here — the knob only means something to a timing-sensitive row (hybrid_route, the laya_* rows), and those are their owners' to run. What I verified is the knob itself at the fake's own boundary, plus the two source paths that decide who reads which line.
|
Persistent review updated to latest commit cd56f59 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cd56f59: READY
This withdraws my CHANGES, and the reason is my remedy rather than the code. I asked the fake to print 1bit serve's format because serve's port-0 reader only accepts that shape. That was right about the reader and wrong about the topology: a flipped free_port() site launches 1bit serve --port 0 as its child, and the route fake is that child's --llama-server — a grandchild. Its llama.cpp-shaped line reaches the front through the child's tee, which is exactly the nested case, and the fix for that is #3175 (foreign_refuses(foreign_line_seen, own_line_seen)), not a different string in the fixture. So the fake printing llama-server's line is not a mistake to correct; it is the shape a real grandchild has.
Measured at this head:
$ git rev-parse --short HEAD → cd56f5914
$ tests/laya_models_e2e.sh build1336/1bit … → rc 0, 25 ok / 0 FAIL
$ pre-pr-checks --base origin/main → rc 0
$ python3 tests/fake_backend_route.py -m x.gguf -ngl 0 --port 0
listening on http://127.0.0.1:38335
The two edits do what the body says: assert port is not None lets --port 0 through (assert port is falsy for 0, and the fake died before binding), and the bound port is reported so a launcher has something to read.
What FAKE_LLAMA_LOAD_S is actually for, and one sentence the body should carry
The new knob opens the gap between "bound" and "ready" so a foreign line can arrive before readiness — which is the only window in which the refusal is observable at all. That is a real and useful thing, and it is also the reason this PR and #3175 belong together: at main today, the gap makes the front refuse a legitimate nested 1bit serve child (that is the bug #3175 fixes), and with #3175 the same run is green (I ran the composed tree at 883ec0a7f: FAKE_LLAMA_LOAD_S=2 → 25 ok / 0 FAIL).
So the body's "what the remaining free_port() sites need a fake to do" would read better as "so the nested-child case #3175 fixes can be exercised end to end" — the reader otherwise concludes the fake is meant to be a port-0 child itself, which is the reading I took, and it sent me to a fix that was half wrong.
Not verified: the negative control for #3175 (the same gap on a tree without it, which should fail) — that run was killed (rc 137) before producing output, and I said so on #3175 rather than implying I had measured it.
… rule pinned device-free (engine#3171) (#3175) * serve: a nested `1bit serve` child is not a foreign backend (engine#3171) `looks_like_foreign_ready()` refuses a `--port 0` launch when a child announces `listening on http://…`, which is the right call for `--llama-server llama-server`. But a `--laya-models` backend IS `1bit serve` (engine#3130 part 2, #3155, made it read its own port), and every Child tees its child's stderr unchanged -- so llama-server's `llama_server: listening on http://127.0.0.1:PORT` arrives in the OUTER serve's reader and was taken for a foreign backend. `--laya-models` is the only rail that launches with `--port 0`, so it is the only one where `port() <= 0` while that line arrives: the refusal won the race against the nested child's own `1bit serve: ready on …` and killed a launch that was working. The reader now records whether any line in OUR format has arrived, and the refusal consults it: a child that speaks `1bit ` is our format whatever else reaches the pipe, so its grandchild's line no longer refuses the launch. A genuine `--llama-server llama-server` child prints no `1bit ` line, so the mistake the check exists for is still refused at once. * serve: pin the nested-child rule with a device-free arm (engine#3171) The fix itself is the previous commit; this makes its rule testable without a process. `is_own_line`, `looks_like_foreign_ready` and `foreign_refuses` move into `app/serve_foreign.h`, and `tests/serve_foreign_ready_test.cpp` (ctest `serve_foreign_ready`) pins all three shapes: ok our memory line is ours ok llama.cpp's line is not ours ok llama.cpp's line looks foreign ok our ready line is never foreign ok a foreign line with no own line refuses the launch ok a foreign line after an own line does NOT refuse (nested 1bit serve) ok nothing seen yet never refuses The middle pair is the bug and the fix: `--laya-models` is the only rail that gives its child `--port 0`, a nested `1bit serve` child tees its grandchild's llama.cpp line into that pipe, and the old rule refused on it. Why the arm and not a process fixture: reaching the refusal end to end needs the `--laya-models` rail *and* a grandchild that speaks llama.cpp's format. `tests/laya_models_e2e.sh` uses `tests/fake_backend_route.py`, which prints OUR format (that is what #3172 made it do), so that row passes on both the old and the new binary -- which is also why CI never saw this. A script child that prints both formats does not reach the branch on `main` either, so I am not claiming a before/after fixture I could not produce; the reviewer's own reproduction is the end-to-end demo, and this arm is what stops the rule regressing. * serve: make the new row's target something CI actually builds (engine#3171) `tools/ci/ci_targets_check.py --check` caught it before CI did: `serve_foreign_ready_test` was `add_test`-ed but ci.yml builds `onebit`, so in CI's configuration the row would never have been built and would never have reached ctest -- the "registered and never run" shape this lane keeps meeting. `add_dependencies(onebit serve_foreign_ready_test)` is the second route the checker itself names. before: ci_targets_check: add_test names 'serve_foreign_ready_test', and ci.yml never builds serve_foreign_ready after : ci_targets_check: 9 target(s) whose test never reaches ctest under ci.yml (baseline 9), and none new --------- Co-authored-by: bong-water-water-bong <[email protected]>
Refs #3130 — the two lines that stopped every
--port 0launch from using the route fake, and the record of a measurement of mine that was wrong.What changes
tests/fake_backend_route.py, two edits:assert port, "no port in …"→assert port is not None.--port 0requests an ephemeral port; the old assertion is falsy for it, so the fake exited before reporting anything and the failure read as "the fake never started".listening on http://127.0.0.1:PORT,tools/server/server.cpp:339), read fromserver_address[1]. Without it, a launcher that passed--port 0had nothing to read back — and that is exactly what the remainingfree_port()sites inapp/serve.cppneed a fake to do.Measured, on a build of this tree
And a correction I owe this issue's thread
Twenty minutes ago I reported on #3168 that this same fake change broke
laya_models_e2eonmain"with no port 0 anywhere in the serve path and no refusal involved" (25/25 → 3 ok + "serve never reported a port"). That measurement was wrong: mybuild/1bitwas still the binary I had built from #3168's head, and their refusal is what fired —I reverted, then rebuilt from
main(7436ecbc) and re-ran: 25/25 PASS, and the stringdoes not printappears zero times. So the fake change is safe, my "the nested rail is sensitive to the child's output existing at all" conclusion is withdrawn, and the only real finding in that comment stands — #3168's refusal does fire in the nested--laya-modelsrail, which I had reproduced on their head with the real checkpoint.The general lesson is worth more than either claim: a stale binary is indistinguishable from a tree unless the build is rebuilt after the checkout, and I quoted a result that belonged to someone else's head.
Not claimed: that flipping the remaining sites now works — this only makes the fake able to participate; the per-child acceptance/refusal work on
app/serve.cppis #3168's and the parked slice's business.