install.sh: a 64 GB box's opencode limits are fitted to the pool its 27B boots to

install.sh fitted opencode's limits to the live pool on the 1M window only. On a 64 GB box the
27B serves its native window, whose static pair (173,000 + 64,000) was sized on a 128 GB box's
pool: its worst case would run past a 64 GB box's, and a long session be refused mid-way, the
case oc-fit-limits.py exists for (found in review, 2026-10-23; the pool itself is measured in the
64 GB phase 2). Both places it runs, after the engine's boot and after the proxy's restart, run it
on a 64 GB box too. The cockpit already fitted them after a Load in any mode, and claude-local
reads them. The new test fails on the old code. The CHANGELOG and the README say so, with the
other refusals the review added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hasan BasbunarandClaude Opus 5.5 committed 2026-10-23 22:09:09 +02:00
1 parent f89a3ed3e3
commit 710550cb76
4 files changed
+28 -6

No files matched your search

+7 -3
View File
@@ -23,9 +23,13 @@ On a 64 GB box a run installs:
- Nemotron 3.5 Bolt with a memory share of its own ([share]), [Z] tok/s on one stream
- the speech lane, which runs on the CPU, as on every box
It refuses what a 64 GB box cannot hold before anything moves: the flash lane, `CONTEXT_MODE=1m`
and the FP8 targets in `install.sh`, every other lane's installer as soon as it has its library,
`switch-model.sh` for such a target, and so the cockpit's Load. The lanes left out are named once,
It refuses what a 64 GB box cannot hold before anything moves: the flash lane, `CONTEXT_MODE=1m`,
the FP8 targets and `--no-service` (whose `run.sh` serves a 128 GB box's settings) in `install.sh`,
every other lane's installer as soon as it has its library (its `--uninstall` still runs),
`prepare-lane.sh` and `switch-model.sh` for such a lane or target, and so the cockpit's Load, whose
page shows them and does not offer them. opencode's limits are fitted to the pool the 27B boots to,
by the installer as on the 1M window and by the cockpit at each Load, since the native pair was
sized on a 128 GB box's pool. The lanes left out are named once,
and `--with-<lane>` for one of them is refused. `conformity.py` recommends the native window
there.
+2 -1
View File
@@ -224,7 +224,8 @@ a 64 GB box it installs what fits it, and nothing else:
Each refusal comes before a byte is fetched or pulled: in `install.sh`, in each lane's installer, in
`switch-model.sh`, and so in the cockpit's Load, where a lane a 64 GB box cannot hold says it needs
a 128 GB DGX Spark. `--no-service` is refused there too, as `./run.sh` serves a 128 GB box's
settings: the service's unit is the one sized for 64 GB. The cockpit names the box over its pool,
settings: the service's unit is the one sized for 64 GB. opencode's limits are fitted to the pool
the 27B boots to, by the installer and at each Load, as on the 1M window. The cockpit names the box over its pool,
from its DMI ("ASUS Ascent GX10, 64 GB"). Measured [how: on the reference box with 64 GiB held aside, N runs, the median].
### Your choices, and how they combine
+4 -2
View File
@@ -3457,7 +3457,9 @@ except Exception as e:
# oc-fit-limits.py in the first place (2026-08-30). That was a documented
# manual step while 1m was opt-in. It cannot stay one now that 1m is what a
# plain install serves.
if [ "$CONTEXT_MODE" = "1m" ] && [ "$OPENCODE" -eq 1 ]; then
# A 64 GB box too, on its native window: its pool is far smaller than the one the native pair
# was sized on, and the pair's worst case ran past it (found in review, 2026-10-23).
if { [ "$CONTEXT_MODE" = "1m" ] || [ "$MEM_CLASS" = 64 ]; } && [ "$OPENCODE" -eq 1 ]; then
echo "fitting the opencode limits to the KV pool this boot actually got:"
# --restart-agent: opencode-web was restarted above, before this fit rewrote its
# config, and it reads that config only at startup.
@@ -3668,7 +3670,7 @@ except Exception as e:
sleep 2
done
[ "$PROXY_OK" = 1 ] || die "the keepalive proxy did not come back on :$PROXY_PORT. Check: journalctl -u $KEEPALIVE_UNIT -n 30"
if [ "$CONTEXT_MODE" = "1m" ] && [ "$OPENCODE" -eq 1 ]; then
if { [ "$CONTEXT_MODE" = "1m" ] || [ "$MEM_CLASS" = 64 ]; } && [ "$OPENCODE" -eq 1 ]; then
python3 "$REPO_DIR/oc-fit-limits.py" --engine "http://127.0.0.1:$PORT" --restart-agent \
|| echo " NOTE: could not fit them; run python3 oc-fit-limits.py yourself, or the cockpit's button"
fi
+15
View File
@@ -194,6 +194,21 @@ class TheRunSaysIt(unittest.TestCase):
self.assertEqual(r.returncode, 1, r.stderr[-400:])
self.assertIn(said, r.stderr)
def test_opencode_s_limits_are_fitted_to_the_pool_on_a_64_gb_box(self):
# the native pair was sized on a 128 GB box's pool: a 64 GB box gets the fit 1m gets
# (found in review, 2026-10-23)
cond = '{ [ "$CONTEXT_MODE" = "1m" ] || [ "$MEM_CLASS" = 64 ]; } && [ "$OPENCODE" -eq 1 ]'
self.assertEqual(INSTALL.count(f"if {cond}; then"), 2)
self.assertNotIn('if [ "$CONTEXT_MODE" = "1m" ] && [ "$OPENCODE" -eq 1 ]; then', INSTALL)
block = between(INSTALL, f" if {cond}; then\n echo", "\n fi\n")
for mode, cls, opencode, fits in (("native", "64", 1, True), ("1m", "128", 1, True),
("native", "128", 1, False), ("native", "64", 0, False)):
with self.subTest(mode=mode, cls=cls, opencode=opencode):
rc, out, err = bash(f"CONTEXT_MODE={mode}\nMEM_CLASS={cls}\nOPENCODE={opencode}\nREPO_DIR=R\nPORT=30000\n"
f"python3(){{ echo FIT; }}\n{block}", cls)
self.assertEqual(rc, 0, err)
self.assertEqual("FIT" in out, fits, out)
def test_the_lanes_that_fit_come_from_boxmem(self):
r = subprocess.run([sys.executable, "-I", str(REPO / "boxmem.py"), "fitting", "--class", "64"],
capture_output=True, text=True)