Skip to content

box.sh: local mode (BLOOMERY_BOX_LOCAL=1): the box command runs in this tree on a contributor's machine with a card of its own - #38

Merged
midagedev merged 10 commits into
midagedev:mainfrom
juliankang4:dgx-spark-local
Oct 11, 2026
Merged

midagedev merged 10 commits into
midagedev:mainfrom
juliankang4:dgx-spark-local

Conversation

@juliankang4

@juliankang4 juliankang4 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Part of #13. This builds rows 1, 3, 4, 5 and 7 of the table in docs/contrib/local-check.md, in tools/box.sh as
BLOOMERY_BOX_LOCAL=1, as answer 10 in docs/contrib/dgx-spark.md asks: the box command runs in this tree on a
contributor's Linux machine with a card of its own, with no ssh and no rsync. The command line is the one box.sh
composes for the box (guard, profile, tier, BLOOMERY_ARCH, exports), run by bash -c, so every just gate-* recipe
runs unchanged; the locks move under BLOOMERY_LOCK_DIR, and tools/gpu-gate.sh takes one lock for the machine's card.

Details

  • Environment file (row 1). BLOOMERY_ENV_FILE, default ~/bloomery-env.sh. A missing file exits 69.
  • Locks (rows 3 and 4). BLOOMERY_LOCK_DIR holds the timing lease, the holds, the gate locks, the V4.1 load lock
    and its queue, and the batch hold. It is tools/ref/lease-probe.sh's LOCK_DIR, /root when unset, so the box
    keeps its paths. Row 4 asks for a lock directory variable, and the same variable moves row 3's lease and holds.
    Local mode defaults it to ~/.cache/bloomery/locks, makes it, and exports it to the command. lease-probe.sh's
    holds glob and its give-way check, and gpu-gate.sh's lock descriptors, take the path whole, so a path with a space
    or a ; works.
  • The box's mark. lease-probe.sh now owns it: BOX_LEASE (/root/bloomery-cpu.lock), on_box (that file
    exists) and box_lock_dir <dir> (the directory is /root, as spelled, or as it resolves when the shell can enter
    it, for /root/. or a symlink). box.sh, gpu-gate.sh and lease_take in tools/ref/lease.sh call them. The box
    runs as root, and on_box reads /root: on the box, an account that cannot read /root would not see the mark, and
    its local mode would not be refused.
  • Card (rows 4 and 5). The box side sees BLOOMERY_BOX_CARD=local. gpu-gate.sh then takes one lock,
    bloomery-gate-local.lock, for whatever card the machine shows, when BLOOMERY_GATE_CARD is unset, 3090, a6000
    or any. It leaves CUDA_VISIBLE_DEVICES as it finds it: the caller's, or the environment file's when that file
    sets one. While the timing lease is held the run lets the lock go and polls on, as any passes a timing card by.
    BLOOMERY_CARD=both and BLOOMERY_GATE_CARD=both are refused (64), and BLOOMERY_GATE_CARD=local is refused as
    before.
  • Backend (row 7). CUDA_OXIDE_BACKEND is unset after the environment file is sourced, so cargo oxide builds
    and keeps its own backend (no rc 70 check). A backend pinned in the environment file does not reach the build.
  • Environment of the command. ssh carries no environment to the box, so the command runs without the variables
    box.sh reads on this side (BLOOMERY_MODEL above all, which the model crate's tests read as a model path, and the
    queue selectors), without box.sh's own outputs (BLOOMERY_REF_MODEL_PROFILE, and the fixture tier's
    BLOOMERY_CARD_BUDGET and BLOOMERY_FIXTURE_MODEL) unless box.sh exports them, and without
    BLOOMERY_LEASE_LOCK and BLOOMERY_LEASE_HOLDS, which BLOOMERY_LOCK_DIR sets. The ones box.sh forwards are
    exported as on the box. BLOOMERY_REMOTE names no directory here and adds no CARGO_BUILD_JOBS=12 (that value is
    sized for the box).
  • After the environment file. The guard probes the lock directory, and the recipe expands its arch, before the
    environment file and BLOOMERY_BOX_ENV run. If either of them sets another BLOOMERY_LOCK_DIR, or the environment
    file sets a BLOOMERY_ARCH other than the one the recipe expanded (this side's BLOOMERY_ARCH, sm_86 when
    unset), the command stops with 64 before it runs.
  • Refused in local mode (64). A host that is not Linux (a Mac runs just mac-static); BLOOMERY_BOX_QUEUE=1 (the
    queue is the box's); a relative BLOOMERY_LOCK_DIR (two trees would take their locks in two places); a
    BLOOMERY_LOCK_DIR that box_lock_dir calls /root (the guard's probe would create /root/bloomery-cpu.lock, the
    file that marks the box, and every later call in local mode would then be refused); the lock directory or the arch
    moved by the environment file, as above; BLOOMERY_CARD=both; and a machine where on_box holds (on the box, locks
    under another directory would not keep local runs off the box's sittings and gates). That last message also says
    that on a machine that is not the box, a lock script run as root without BLOOMERY_LOCK_DIR made that file, and to
    remove it. A lock directory that cannot be made exits 69. The /root refusal is tested for /root as spelled. The
    resolved spellings (/root/., a symlink) are untested: resolving them needs a shell that can enter /root, and my
    one root setup was the box stand-in below, where on_box refuses first.
  • The box keeps its locks. Where on_box holds, gpu-gate.sh refuses (64) BLOOMERY_BOX_CARD=local and a
    BLOOMERY_LOCK_DIR other than /root, as lease_take refuses another lease file there. Without this,
    BLOOMERY_BOX_ENV on the box could pass a lock directory, with or without BLOOMERY_BOX_CARD=local, and move the
    gate locks, the batch hold and the lease probe away from the ones the box's gates and sittings take; the gate would
    then run on a box card under a lock no other gate holds. The self-test's runs are not affected.
  • just box-gc. tools/box-gc.sh refuses local mode (64). There its root is the contributor's own tree, and
    --kill would end their own processes under target/ (a bloomery-serve in another terminal, say). Its self-test
    still runs from a shell in local mode. just box-tracks is unchanged: it reaches the box with its own ssh, not
    through box.sh.

Not moved to LOCK_DIR:

  • tools/ref/dump-draft.sh:79 and tools/ref/vision/dump-vision.sh:50 open /root/bloomery-gate.lock by path. They
    are reference dump tools, so I left them (question 4).
  • tools/ref/lease.sh:298 gives a lease a trace file (/root/bloomery-sittings.log) only when its file is
    /root/bloomery-cpu.lock, and :402-403 print "is not the machine lease: nothing measured under it is admissible"
    for any other file. So a timing sitting in local mode takes its lease under BLOOMERY_LOCK_DIR, writes no trace and
    is marked not admissible. The single-card timing pull request that follows this one handles both lines.

Four choices differ from the table or from section 3.4 of dgx-spark.md, and I can change any of them:

  • Row 4 proposes a lock keyed by card UUID. I kept one named lock, as section 3.4 sketches (BLOOMERY_GATE_CARD=local:
    one lock under the lock dir). With one card the result is the same. On a machine with several cards, runs serialize
    on the one lock: safe, but slower. A lock per UUID would need gpu-gate.sh to pick a card and set
    CUDA_VISIBLE_DEVICES itself.
  • Row 5 says local mode accepts only the default pick. I also accept BLOOMERY_CARD=a6000, which then runs on the
    machine's card: gate-gpu-ds41-residency-a, in the contributor list, asks for the A6000 to run placement a, and a
    machine whose card has the room (a DGX Spark has 128 GB of unified memory) can run it. A refusal in box.sh would
    hide that gate. both stays refused.
  • Row 7 says local mode leaves CUDA_OXIDE_BACKEND unset. box.sh goes one step further and unsets it after the
    environment file is sourced, so a backend that file still exports (a copy of the box's file, say) does not reach the
    build. The box's rc 70 check of source-rev.txt goes with the export: cargo oxide then builds its backend from the
    pinned fork rev itself (docs/BUILD.md:32), so there is no prebuilt backend to check.
  • The names. BLOOMERY_BOX_LOCAL=1 is the name row 1 gives, because BLOOMERY_BOX already names the ssh host;
    section 3.4's BLOOMERY_BOX=local would give a host name a special value. For the card, section 3.4 has
    BLOOMERY_GATE_CARD=local; I used BLOOMERY_BOX_CARD=local, which box.sh sets. BLOOMERY_BOX_CARD is the card
    box.sh put in view, and in local mode that is whatever the machine shows. BLOOMERY_GATE_CARD is the lock a gate
    asks for among the cards in view, and tools/gate-batch.sh sets it per lane through BLOOMERY_BOX_ENV
    (BLOOMERY_GATE_CARD=3090 in lane A, a6000 in lane B), which would replace a local the caller exported. Under
    BLOOMERY_BOX_CARD=local, gpu-gate.sh takes the local lock whichever of 3090, a6000 or any the gate asks
    for.

Code shape

  • No second copy. Local mode reuses the composed command line. The lock directory is lease-probe.sh's one
    variable, which gpu-gate.sh already sources, and the box's mark is lease-probe.sh's too.
  • Model code holds only architecture facts. No model code changes.
  • Dead code is gone.
  • No silent failure. Every refusal names its reason and exits 64 or 69.
  • Comments state what is true now.
  • No relaxed gate.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up.

Duplication found or removed: tools/ref/lease.sh:397 and :1079 tested [ -e /root/bloomery-cpu.lock ] inline on
main, and this change needed the same test in box.sh and gpu-gate.sh. All four now call on_box in
tools/ref/lease-probe.sh, and the two /root checks call its box_lock_dir. tools/ref/lease.sh:298, :397 and
:402 still compare LEASE_LOCK with the literal /root/bloomery-cpu.lock (above, "Not moved").

Questions

  1. The caller's environment. Local mode drops what box.sh reads on this side, its own outputs and the lease's
    file names, but any other variable in the caller's shell still reaches the command, a lever such as
    BLOOMERY_FLASH_SIMD=0 included. On the box the environment file is the only source. A wider rule would unset every
    BLOOMERY_* but BLOOMERY_LOCK_DIR, so levers reach the command only through BLOOMERY_BOX_ENV as on the box;
    another option prints the inherited BLOOMERY_* names in one line. Do you want either?
  2. The code for both. It is 64, a usage error. On a one-card machine a two-card gate is "cannot run here" rather
    than a caller's mistake, and T2 in local-check.md counts a named refusal with rc 66 as DEFER, so a runner that
    follows T2 would count these as red. 66 already means a real-only deferral, and box.sh also uses it when
    BLOOMERY_BOX_READONLY=1 finds no remote directory; contrib-check.sh uses 69 for a missing prerequisite. I kept
    64. Should it be 66, 69 or another code?
  3. The wait line under the lease. While the timing lease is held, the local run reports it as a wait for the gate
    lock: waits for the gate lock (local), holding no lock, and at the bound no gate lock (local) was free. This is
    what any prints when it passes a timing card by. Should the line name the lease instead?
  4. The dump tools. Should dump-draft.sh and dump-vision.sh take their gate lock under LOCK_DIR too, or stay
    box-only?

What I ran

Unless a paragraph says otherwise, everything below ran on this commit, upstream main 7e4fb051 plus the change. The
runs on the box stand-in, the runs that break one mechanism at a time and the comparison with main's box.sh ran
before the rename of BLOOMERY_ENV to BLOOMERY_ENV_FILE. The rename does not touch gpu-gate.sh or the ssh path,
and on the box local mode is refused before the environment file is read. I could not run the gates just affected
selects on the box; that run is yours.

Tests. tools/ref/card-tests/run.sh gains the local cases: the command line and its environment (run in the tree,
the card local, the locks and the data passed, no backend and no build jobs, none of what box.sh read on this
side), the lock directory (its default, made when missing, /root refused, a relative path refused, a path with a
space and a ;, the give-way of two holds under a path with a space, BLOOMERY_LOCK_DIR moving the lease and the
holds), an environment file that moves the lock directory or sets another arch, the backend unset, the refusals of
both, the queue, a host that is not Linux and a missing environment file, just box-gc refused,
BLOOMERY_BOX_LOCAL=0 against unset, and gpu-gate.sh's local refusals and its lock path. Where
/root/bloomery-cpu.lock exists they check the box refusals of box.sh and gpu-gate.sh instead. The helpers that
drive the box path drop the new variables, so the suite passes when it runs from a shell in local mode.
gpu-gate.sh --self-test gains six cases: the local lock for any (with the caller's CUDA_VISIBLE_DEVICES passed
through) and for a6000, the V4.1 load lock, the box's two locks held, the local lock held, the lease held.

On a Mac with the pinned nightly (each mac-static step's line cut after its time; the lint step counts 41
warnings, the ratchet's 41):

just mac-static upstream/main
mac-static: fmt-check rc 0 in 5 s
mac-static: lint rc 0 in 13 s
mac-static: combos rc 0 in 30 s
mac-static: check-arch rc 0 in 8 s
mac-static: check-comments rc 0 in 8 s
mac-static: check-defaults rc 0 in 1 s
mac-static: check-levers rc 0 in 6 s
mac-static: check-loads rc 0 in 60 s
mac-static: check-recipes rc 0 in 476 s
mac-static: check-rustflags rc 0 in 1 s
mac-static: check-unsafe rc 0 in 2 s
mac-static: check-waits rc 0 in 1 s
mac-static: ok
just contrib-check
contrib-check tier=t0 commit=46fcf216
toolchain: rustc 1.100.0-nightly (e457a7b0d 2026-08-27) (nightly-2026-08-28); RUSTFLAGS: not set (the repo's .cargo/config.toml applies); no GNU timeout on this host: units run unbounded
…
DONE tier=t0 total=63 red=0 wall=917s
bash tools/ref/card-tests/run.sh
card-tests: 572 tests, 0 failed
bash tools/gpu-gate.sh --self-test
skip   … its wait line names the first run as the holder: no /proc here (lease_holders reads it)
gpu-gate self-test: 98 of 98 ok

On the DGX Spark host (Ubuntu 24.04.5, aarch64, GNU flock and timeout, no /root/bloomery-cpu.lock):

bash tools/ref/card-tests/run.sh
skip walker tests: no just on PATH (check-recipes runs them on the Mac)
card-tests: 563 tests, 0 failed
bash tools/gpu-gate.sh --self-test
gpu-gate self-test: 99 of 99 ok

tools/box-gc.sh --self-test prints box-gc self-test: 6 of 6 ok there both with BLOOMERY_BOX_CARD unset and with
BLOOMERY_BOX_CARD=local. tools/ref/lease.sh --self-test passes under LC_ALL=C; under the host's Korean locale one
case fails, on main as well (below, "What I ran into").

I have no box, so for the box-side tests I used a stand-in: a root container on the DGX Spark, with no card, where
/root/bloomery-cpu.lock exists. There the local cases turn into the box refusal cases:

bash tools/ref/card-tests/run.sh
card-tests: 496 tests, 0 failed
bash tools/gpu-gate.sh --self-test
gpu-gate self-test: 99 of 99 ok
bash tools/ref/lease.sh --self-test
self-test: ok (0 failures)

FAIL-first. With main's box.sh, gpu-gate.sh, lease-probe.sh, box-gc.sh and lease.sh put back under this
branch's tests, the card tests print card-tests: 572 tests, 27 failed on the Mac and card-tests: 563 tests, 27 failed on the DGX Spark host. On the Mac, with the local arm of gpu-gate.sh's card pick removed, the self-test's
six local cases fail (gpu-gate self-test: 92 of 98 ok), and with take_local not reading the lease, its lease case
fails (gpu-gate self-test: 97 of 98 ok). On the box stand-in, with gpu-gate.sh's box refusal removed, both box
cases fail (card-tests: 496 tests, 2 failed): a lock directory other than /root reaches the lock open in that
directory (rc 69, where on the box the gate would have run under it), and BLOOMERY_BOX_CARD=local is stopped only by
the local arm's /root check, whose message does not name the box.

With BLOOMERY_BOX_LOCAL unset or 0, box.sh builds the same ssh, rsync and queue client arguments as main's. I ran
main's box.sh and this one in one tree of main through stub ssh, rsync and queue client: 20 configurations, each
with a build command, a read and true, so 60 invocations a side. The configurations are direct, a6000, both, an
invalid card, wait and owner, BLOOMERY_BOX_ENV with tier and model, BLOOMERY_BOX_ENV with CARGO_BUILD_JOBS,
BLOOMERY_REMOTE= (the main tree), the fixture tier with BLOOMERY_FIXTURE_VARIANT=iq4xs, readonly, readonly with
a6000, six queue forms (plain; BLOOMERY_Q_CLASS=lead with card a6000 and a prediction; a6000 with the fixture
tier; lane none; lane any; readonly), BLOOMERY_ARCH=sm_121, BLOOMERY_ARCH through BLOOMERY_BOX_ENV, and
BLOOMERY_MODEL. On every side 54 of the 60 run and 6 are refused as they should be (the invalid card, and a build
under BLOOMERY_BOX_READONLY=1). Main's log, and this branch's with the variable unset and with 0, are equal once the
random sync id, the backend rev, the temporary sync directory and the job name's random suffix are normalized.

On the DGX Spark, in the dev container, I ran the contributor list of answer 4 (tools/gate-batch.sh --tier fixture --dry-run, 80 items) in the fixture tier, each item through its recipe's tools/box.sh line with
BLOOMERY_BOX_LOCAL=1. The tree was main at the time with #15 and #16 (both now on main) and an earlier version of
this change, before the lock path quoting, the box refusals, the backend unset and the environment file checks; I
have not re-run the 80 items on this version. In short:

  • 28 green: 16 crate test gates and 12 card gates on cc 12.1.

  • 4 two-card gates refused by local mode (64).

  • 1 red on a card name: gate-gpu-qwen38-serve, where --place gate opens the 3090 by name.

  • 47 stopped on an input this machine did not have, each naming it: the reference sets, the V4.1 DSpark draft
    fixture, the real model files at their box paths. In four of them, other tests are red for a reason that is not an
    input:

    • gate-attn: 7 of its 8 red tests have no oracle under $BLOOMERY_DATA/ref; the eighth calls the x86 kernel,
      kq_dot_simd called off x86_64: no AVX2+FMA+F16C kernel in this build.
    • gate-union: 4 of 5 miss a model file; the fifth is Q6_K has no row lanes on this CPU.
    • gate-qdot: 22 of 33 miss a reference dump or a model file; 10 are clauses named for this CPU ("has no tile
      kernel on this CPU", "has no row lanes on this CPU", "no AVX2+F16C"), and hw_lanes_refuse_bad_shapes fails on a
      bare assert_eq with no name.
    • gate-engram: 5 of 7 miss the V4.1 engram table; hw_engram_open_direct_reads_the_files_bytes fails its
      O_DIRECT flag check on aarch64 with no name, and hw_engram_expert_stack_evicts_and_reads_back finds 2 of 7
      pages still in the page cache after an eviction. I have not found the cause of the last one.

    I have a separate small change that names the two unnamed Arm failures, and the per-item table (each item's exit
    code, counts and first missing input), which I can post on dgx-spark: P0 builds and runs on a DGX Spark, with readings for the port map #13 if you want it.

Every run that reached gpu-gate.sh took the local lock:

gpu-gate.sh: gate_cand on this machine's card(s), the local gate lock (asked any)

gate-gpu-lib, one of the green crate test gates, runs bloomery-gpu's lib tests through tools/gate.sh --oxide
with no gate lock, as its recipe does on the box.

What I ran into

This does not block the pull request. I'm writing it down because it cost me time, and you may want to change it.

  • tools/ref/lease.sh --self-test depends on the locale. On a host whose locale is Korean (LANG=ko_KR.utf8, with
    the Korean libc messages installed), strerror is translated, and one case fails because its pattern expects the
    English text:

    LANG=ko_KR.utf8 bash tools/ref/lease.sh --self-test
    FAIL trace-write-fail-line: no line matches /^\[lease\] trace not written: .*No such file or directory \(.*/no-such-dir/trace.log\); the lease goes on$/ in [[lease] trace not written: 그런 파일이나 디렉터리가 없습니다 (/tmp/lease-self-test.gpHnkh/no-such-dir/trace.log); the lease goes on]
    self-test: FAIL (1 failures)
    

    main's lease.sh fails the same way, and under LC_ALL=C the self-test passes. Two ways out: the self-test could
    set LC_ALL=C itself, or the case could match the path and the tail of the line without the strerror text.

Hardware

DGX Spark: NVIDIA GB10 (compute capability 12.1), driver 595.84, CPU Cortex-X925 and Cortex-A725 (20 cores), 128 GB
unified memory, Ubuntu 24.04.5 LTS (DGX OS 7.6.0), kernel 6.17.0-1032-nvidia. The script tests ran on the host. The
dev container has the CUDA 13.3.1 toolkit, LLVM 21.1.8 and the pinned nightly; the 80 items ran there, the kernels as
sm_86 PTX through the driver's JIT (answer 7).

Docs

I did not change the docs. Spots this makes stale (line numbers at 7e4fb051):

  • docs/contrib/local-check.md:72, :74 to :76 and :78, the table's rows 1, 3, 4, 5 and 7: built, in
    tools/box.sh (BLOOMERY_BOX_LOCAL), tools/ref/lease-probe.sh (BLOOMERY_LOCK_DIR) and tools/gpu-gate.sh
    (BLOOMERY_BOX_CARD=local). Row 3 is one directory variable rather than BLOOMERY_LEASE_LOCK and
    BLOOMERY_LEASE_HOLDS; row 4 is one lock, not a UUID-keyed one; row 5 accepts a6000 too. Row 1 names the
    environment file $BLOOMERY_ENV; it is BLOOMERY_ENV_FILE. Their "Who" column still says maintainers, which answer
    10 changed.
  • docs/contrib/local-check.md:126, "Order and sizes", item 2: rows 1, 3 and 7 built, row 2 (the example environment
    file) not.
  • docs/contrib/dgx-spark.md:240, section 3.4: the first row names the mode BLOOMERY_BOX=local and the
    environment file $BLOOMERY_ENV; they are BLOOMERY_BOX_LOCAL=1 and BLOOMERY_ENV_FILE. :242, the card row,
    names BLOOMERY_GATE_CARD=local; the selector is BLOOMERY_BOX_CARD=local, which box.sh sets.
  • docs/BUILD.md:5: the recipes' commands "do not run on your host as written"; with BLOOMERY_BOX_LOCAL=1 they run
    on a Linux machine with a card, given the environment file and the inputs each gate reads.
  • CONTRIBUTING.md:37-38: the just gate-* recipes reach the workstation through tools/box.sh, "so they do not run
    on yours"; with BLOOMERY_BOX_LOCAL=1 they run on a contributor's Linux machine with a card.

@midagedev

Copy link
Copy Markdown
Owner

Thank you. I am reviewing this now and will reply with findings or put it in the next landing train.

@midagedev

Copy link
Copy Markdown
Owner

Review done: the remote path is unchanged when the variable is unset (we compared 20 cases through a fake ssh/rsync against main: same argv, output and rc). One request before it lands: BLOOMERY_ENV (box.sh:196, registry row) is one word away from BLOOMERY_BOX_ENV, which means NAME=value pairs for the same script. Could you rename it to BLOOMERY_ENV_FILE? It is new in this PR, so no retired-name entry is needed. Then #38 and #39 (rebased on it) go into the next train.

@juliankang4

Copy link
Copy Markdown
Collaborator Author

Done. It is BLOOMERY_ENV_FILE now, folded into the one commit, which is now 46fcf216. The rename covers box.sh
(the header comment, the default, the missing-file message and the list of variables local mode drops before the
command), the registry row, the card tests and the commit message. No other name changed. Two docs lines already say
$BLOOMERY_ENV (docs/contrib/local-check.md:72 and docs/contrib/dgx-spark.md:240), so I added them to the Docs
list in the description.

On 46fcf216:

  • Mac: just mac-static upstream/main ok, just contrib-check 63/0, card tests 572/0, gpu-gate.sh --self-test
    98/98.
  • DGX Spark host, LC_ALL=C: card tests 563/0, gpu-gate.sh --self-test 99/99, lease.sh --self-test ok,
    box-gc.sh --self-test 6/6 with BLOOMERY_BOX_CARD unset and with local.
  • FAIL-first with main's five files: 27 of 572 card tests fail on the Mac and 27 of 563 on Linux, as before.
  • FAIL-first for the rename: with the previous commit's box.sh, which still reads BLOOMERY_ENV, the new tests fail
    15 of 572 on the Mac and the same 15 of 563 on Linux. All 15 are local mode cases: that box.sh does not see the
    test's environment file and stops with 69. With the registry row put back to the old name, check-levers reports
    the 12 uses of BLOOMERY_ENV_FILE as names no row has.

#39 is rebased on it and is now 7c8862b4. Its own commit did not change (git range-diff shows it as equal). I
re-ran its checks there with the same counts as before: mac-static ok, card tests 592/0 and the four self-tests on
the Mac, and on the DGX Spark host card tests 583/0, the self-tests and the three stub suites (69/0, 84/0, 43/0).
FAIL-first is 18 of 592 card tests on the Mac, 18 of 583 on Linux, 3 of 69 stub checks, and 1 of 69 for the earlier
pool line.

I did not re-run the root container runs on either branch. On the box, local mode stops before it reads the
environment file, so those runs check nothing the rename changed. Both branches still sit on 7e4fb051. Of the files
main has changed since, both branches touch only crates/levers/src/registry.rs, in other rows, and each merges with
2ce989d7 without a conflict. I updated both descriptions to match.

@midagedev

Copy link
Copy Markdown
Owner

Thank you. I am checking 46fcf21 now. #38 and #39 go into the next landing together.

midagedev and others added 9 commits October 11, 2026 21:39
… and decision share one expansion

serve::media::expand_spans (each placeholder run of the prompt ids expanded to its image's
token count, a placeholder carried in text refused by name) moves with Expanded and ExpandError
to crates/vision/src/media.rs, the model-generic owner beside MediaModel, so the decision crate
can call it without a serve dependency. serve calls it and maps ExpandError into MediaError.
A move: serve's gates unchanged and green.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… as the release does (vision R4c-b)

- request: images in llama.cpp's order (the request's `images`, then the state's image_url
  parts), each a data URL, at most 8; the state comes back without those parts. videos stays
  501, a non-data URL and a ninth image stay 400. The request is valid with images; encode and
  the label model refuse them by name (NotSupported, llama.cpp's hint), so today's seats answer
  as before.
- encode_media(tok, req, &dyn MediaModel, counts, max): the media piece is the placeholders and
  a "\n" tokenized in one call, each pad run expanded to its image's count through
  vision::media::expand_spans; Encoded.image_spans names them; fixed counts the media ids; a
  placeholder in text and media ids past the context are refused by name.
- gate-decision-clef: hw_clef_image_ids_equal_the_release — every set D request's input_ids equal
  the release's, list for list (6 of 6). Set D (images.jsonl) states no identity, so this clause
  reads it raw beside the same run's reference.jsonl (its revision equals clefvis.sh's, its ids
  equal) — a substitute for a family check until the writer states one.
FAIL-first: D3 (no "\n" after the last image) red on the box at c1 234, c2 1108, c3 234, i640
338, i1024 806; D1 and D2 red in host tests (set D has no state image part to catch them).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ile, from the listing or the verified cache

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eat flags and projector, the encoder reserve in the whole-fit verdict (qwen35_open::open_seated), Body35's media hidden call, the image refusals by name

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s with the encoder, 501 with llama.cpp's hint without it, the image 400s, the --hf projector pick

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… open_tower open a seat's projector and tower for any serve seat, merged_cells and Flags::wanted beside them (span_rows loses its rows_of parameter); image_plan holds the plan's side of an image input free of the encoder crates (the tower's reserve on the stage card, the refusal that names it, the rotation table's bytes per position) so every build's placement can take it; ds41's seat opens through them

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd prefill_media in serve_seats/qwen3, the tower's reserve and the rotation tables in qwen3moe's placed plan and whole fit (each named in the ctx and whole-fit lines), the &VISION record; gate_qwen3_serve's --images clauses: set E prompt ids, set F chat inside the CUDA/CPU agreeing prefix with a first divergence only at a near tie (PIN F_NEAR_TIE 0.1), an image slot beside a text slot, the refusals and the plan's reserve, each FAIL-first by its own mutant

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ion_seat::open_seat takes the file the seat resolved (the decide seat's --hf pick), open_tower, merged_cells; the whole-fit line's encoder note has one owner, image_plan::note

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the gates that reach it, the Qwen3.6 image clause's plan budget has its defaults twin, rustfmt

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…is tree on a contributor's machine with a card of its own

- docs/contrib/local-check.md rows 1, 3, 4, 5 and 7. No ssh and no rsync: bash runs the same command line in this tree,
  guard and profile and exports included. The environment file is BLOOMERY_ENV_FILE (default ~/bloomery-env.sh; missing: 69).
  Refused (64) on a host that is not Linux, with BLOOMERY_BOX_QUEUE=1, and where /root/bloomery-cpu.lock exists.
- BLOOMERY_LOCK_DIR (tools/ref/lease-probe.sh's LOCK_DIR, /root when unset) holds the timing lease, the holds, the gate
  locks, the V4.1 load lock and queue and the batch hold. Local mode defaults it to ~/.cache/bloomery/locks and makes it.
  It refuses (64) a relative path, which two trees would read apart, and /root however it is spelled, where its guard
  would make the box's lease file; an environment file or BLOOMERY_BOX_ENV that moves it after the guard is refused (64),
  and so is an environment file's BLOOMERY_ARCH other than the one the recipe expanded. lease-probe.sh's holds glob and
  give-way check and gpu-gate.sh's lock descriptors take the path whole, so a path with a space or a ; works.
- lease-probe.sh owns the box's mark: on_box (/root/bloomery-cpu.lock exists) and box_lock_dir (a directory that is
  /root). box.sh, gpu-gate.sh and lease_take read them.
- gpu-gate.sh: BLOOMERY_BOX_CARD=local takes one lock, bloomery-gate-local.lock, for what the machine shows, and leaves
  CUDA_VISIBLE_DEVICES as it finds it; its lock directory is never /root (64). `both` in BLOOMERY_CARD or
  BLOOMERY_GATE_CARD is refused (64); a held lease is waited for as the lock is. On the box, BLOOMERY_BOX_CARD=local and
  a BLOOMERY_LOCK_DIR other than /root are refused (64), as lease_take refuses another lease file there.
- CUDA_OXIDE_BACKEND is unset after the environment file (row 7), so cargo oxide builds and keeps its own backend (no
  rc 70 check). BLOOMERY_REMOTE adds no CARGO_BUILD_JOBS.
- The command runs without the variables box.sh reads on this side (BLOOMERY_MODEL above all: the model crate's tests read
  it as a model path), without box.sh's own outputs (BLOOMERY_REF_MODEL_PROFILE, the fixture tier's BLOOMERY_CARD_BUDGET
  and BLOOMERY_FIXTURE_MODEL) and without the lease's file names, as over ssh.
- box-gc.sh refuses (64) local mode: its root is then the contributor's tree, whose binaries are their own runs.
- Unset or 0 leaves the ssh, rsync and queue arguments box.sh builds byte-identical, direct and queued.
- card-tests: the local mode cases, the lock directory (two holds' give-way under a path with a space among them), the
  refusals, LOCAL=0 against unset, and on the box gpu-gate.sh's box refusals; the helpers drop the new variables a caller
  in local mode would pass. gpu-gate.sh --self-test: the local lock, the V4.1 load lock, a held lease.
FAIL-first: against main's box.sh, gpu-gate.sh, lease-probe.sh, lease.sh and box-gc.sh, 27 card tests are red. With
gpu-gate.sh's local arm removed the self-test's six local cases are red, and with take_local not reading the lease its
lease case is red. On a stand-in for the box (a root container where /root/bloomery-cpu.lock exists), removing
gpu-gate.sh's box refusal turns its two card tests red.
@midagedev

Copy link
Copy Markdown
Owner

I moved this branch to its commit in our 0.3.0 release train (the same change, rebased onto main). It lands with the release tonight and will show as merged.

juliankang4 added a commit to juliankang4/bloomery that referenced this pull request Oct 13, 2026
…e on their own machine, with local mode (midagedev#38), single-card timing (midagedev#39) and aarch64 T1 (midagedev#83) as built

The page says what to run on a Mac, on Linux with no card and on Linux with an NVIDIA card, and
what each result shows. The box assumptions table moves to a reference section with a state
column; its two counts do not reproduce at the commit that wrote them, so each is struck through
beside the count at 3bc2a17 and its command. The open questions keep their numbers, 2 and 3
marked answered and midagedev#38's question 2 added as 4.
juliankang4 added a commit to juliankang4/bloomery that referenced this pull request Oct 13, 2026
…e on their own machine, with local mode (midagedev#38), single-card timing (midagedev#39) and aarch64 T1 (midagedev#83) as built

The page says what to run on a Mac, on Linux with no card and on Linux with an NVIDIA card, and
what each result shows. The box assumptions table moves to a reference section with a state
column; its two counts do not reproduce at the commit that wrote them, so each is struck through
beside the count at 3bc2a17 and its command. The open questions keep their numbers, 2 and 3
marked answered and midagedev#38's question 2 added as 4.
juliankang4 added a commit to juliankang4/bloomery that referenced this pull request Oct 13, 2026
…e on their own machine, with local mode (midagedev#38), single-card timing (midagedev#39) and aarch64 T1 (midagedev#83) as built

The page says what to run on a Mac, on Linux with no card and on Linux with an NVIDIA card, and
what each result shows. The box assumptions table moves to a reference section with a state
column; its two counts do not reproduce at the commit that wrote them, so each is struck through
beside the count at 3bc2a17 and its command. The open questions keep their numbers, 2 and 3
marked answered and midagedev#38's question 2 added as 4.
midagedev pushed a commit that referenced this pull request Oct 13, 2026
…e on their own machine, with local mode (#38), single-card timing (#39) and aarch64 T1 (#83) as built

The page says what to run on a Mac, on Linux with no card and on Linux with an NVIDIA card, and
what each result shows. The box assumptions table moves to a reference section with a state
column; its two counts do not reproduce at the commit that wrote them, so each is struck through
beside the count at 3bc2a17 and its command. The open questions keep their numbers, 2 and 3
marked answered and #38's question 2 added as 4.
juliankang4 added a commit that referenced this pull request Oct 13, 2026
…s what its earlier commits earned

A merged pull request is labelled from its merge commit against that commit's first parent. A rebase merge, the only
kind this repository's merge button allows, has no merge commit: merge_commit_sha is the pull request's last commit,
so the diff covers that commit alone, and the labels its open runs put on for the earlier commits came off at the
merge. A merge now adds labels and removes none. Walking back the pull request's commits does not fix the diff: a
stack pushed at once (#27, #36, #38, #39) lists every commit below it, so each would take the whole stack's labels.
@juliankang4 juliankang4 added host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants