fix: four board bugs — cockpit config, hardcoded runtime, Spotlight noindex, registry test isolation - #126
Merged
unfoundbox merged 1 commit intoSep 24, 2026
Conversation
1 task
…otlight noindex, registry test isolation) - gpu.py's /api/cockpit/status read "region" but the config dict only ever had "aws_region" (instance_type already matched), so it silently always fell back to the default instead of the real configured value. - inference.py's chat/embeddings responses hardcoded x_spacepilot.runtime to "mlx-lm". _resolve() already computes the real routed runtime via routes.route_for() to check a route exists; thread that value through instead of discarding it, so a second WIRED_RUNTIMES entry reports correctly instead of lying. - make_app.sh's suggested .metadata_never_index no longer works on modern macOS (verified against current sources) and only ever applied at a volume root anyway. The mechanism that still works is a directory name ending in .noindex; the assembled debug SpaceBar.app now lives under .build/app.noindex/ so Spotlight never surfaces it next to the real app. - conftest.py adds an autouse guard plus a fake_system fixture so a test that records a Measurement/System through the default store under a real/shipped system id fails immediately, instead of silently poisoning test_exported_json_matches_the_registry on some unrelated later run. Fixed the one real-looking id already in the suite and added a regression test proving the guard actually catches a collision. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
unfoundbox
force-pushed
the
fix/board-bugs-cockpit-runtime-noindex-registry-test
branch
from
September 24, 2026 16:50
e17e9f9 to
e5b9037
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four small, already-diagnosed bugs from the project board. Each is fixed and verified independently (see NOT CONFIRMED below for the one caveat).
spacepilot/api/routes/gpu.py—/api/cockpit/statusreadcfg.get("region", ...), but the config (spacepilot/cli.py'sDEFAULT_CONFIG) only ever hasaws_region.instance_typealready matched. Fixed the key name (and the staleg6e.xlargefallback, which should beg6e.2xlargeper the repo's actual quota). Verified by callingget_cockpit_status()directly with a fake config: it now reports the real configured region instead of always falling back to the default.spacepilot/api/routes/inference.py—_extensions()hardcoded"runtime": "mlx-lm"in every/v1/chat/completionsand/v1/embeddingssuccess response. The real routed runtime is already computed once per request in_resolve()viaroutes.route_for()(the same lookup/v1/modelsreports asx_spacepilot.runtime) — it was just being thrown away after the "is there a route at all" check. Now_resolve()returns it and every call site threads it through instead of hardcoding. Verified: full test suite green (including the existing assertion that today's single wired runtime still reports as"mlx-lm"), plus a direct unit check that_extensions()reports whatever runtime it's given rather than a fixed string.native/SpaceBar/tools/make_app.sh— the suggested fix (touch .build/.metadata_never_index) turned out to be based on a mechanism that (a) only ever applied at a volume root, not an arbitrary subfolder, and (b) is confirmed broken on current macOS by multiple independent sources. The mechanism that still works, documented since macOS 10.6 and used by Xcode's ownModuleCache.noindex: a directory whose name ends in.noindexis skipped by Spotlight entirely. The assembled debugSpaceBar.appnow lives at.build/app.noindex/SpaceBar.app. Updated the two other places that referenced the old path (SelfTest.swift,docs/LOCAL-TEST.md).Registry export test fragility —
test_exported_json_matches_the_registryregeneratesweb/registry.jsonfrom the real shipped corpus merged with whatever a test session wrote to the default (env-redirected) measurement/system store. A test that writes there under a real/shipped system id (e.g.apple-m1-max-32gb) would silently poison that comparison, possibly on a run far away from the one that caused it.tests/conftest.pynow has an autouse fixture that fails the offending test immediately if this happens, plus afake_system/FAKE_SYSTEM_IDfixture tests can reach for. Fixed the one real-looking hardcoded id already in the suite (test_inference_surface.py, previously harmless only because it happened to also pass an explicitroot=tmp_path). Added a regression test that deliberately records under a shipped id and confirms the guard catches it, then confirms the store is clean again after cleanup.Verification
806 passed, 2 skipped, 11 deselected (packaging), 0 failedvialocal-ml-py311interpreter (python -m pytest tests/ -q).bash -nsyntax-checked, and the nested-directory logic verified by reproducing it standalone. Did not run the actualswift build— Swift toolchain compute is exactly the kind of load the fan rule exists to keep off this laptop, and it isn't necessary to prove the Spotlight mechanism is correct. Did not do a live Spotlight (mdfind) round-trip either — that's timing-dependent and unreliable to assert against in this environment.NOT CONFIRMED
swift build, nocodesign, no live Spotlight query against a real built app). The path/variable logic was verified in isolation; the.noindexmechanism itself is corroborated by several independent current sources but not by a livemdfindtest on this exact machine.Test plan
python -m pytest tests/ -q— 806 passed, 2 skipped, 0 failed_extensions()no longer hardcodes the runtimemake_app.shbuild + Spotlight check (not run — see NOT CONFIRMED)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.