Repository navigation
app: read the engine's startup budget and hide drafter-only checkpoints (#4407) - #4939
devopsfortunato wants to merge 1 commit into
Conversation
d95263c to
cf32544
Compare
…shhart#4407) From engine 1.3.0 on macOS, `tensorfold-native info` prints a `startup budget:` line instead of `memory floor:`, so a model downloaded through the app was dropped from the installed list when its info no longer parsed. Accept either line: a printed memory floor keeps the weights plus margin math, a printed budget is taken as printed. Since 1.2.10 `tensorfold-native models` also lists drafter-only checkpoints (config.json carries dflash_config). Those are companions, not chat models: leave them out of the installed list in all three sources it draws from, reading the cached config with the same cache containment rules the library scanner uses and failing open. Tests pin both real startup-budget shapes, the old memory floor, the unpriced fallback, and a seeded drafter (including a config.json symlinked into blobs/) across the engine list, the revisions map and the library scan.
cf32544 to
8ce13d8
Compare
|
Pushed a fix for the one CI failure the first run found: on macOS the test hub lives under |
|
Heads-up: the workflows for the re-pushed head are waiting on "Approve and run" (first-time contributor on this repo). Once approved, the macOS |
|
I checked the landing order against main The two parsers cover different output forms. Current Igor Lessio - AIFLOW LABS |
|
Thank you, @devopsfortunato. Both startup-budget forms parse correctly, the legacy fallback is kept, and the tests cover the normal model/drafter list. The current head merges cleanly. Two lookup cases need fixing before landing:
Please add both cases to the service fixture while keeping the symlinked-prefix checks.
|
Fixes #4407.
Two app-side fixes, the two the issue thread settles on:
tensorfold-native infoprintsstartup budget:instead ofmemory floor:(zig/src/cli/info.zig), soparseInfoOutputthrew andEngineService.installed()dropped a model that was downloaded through the app. The parser now accepts either line: a printed memory floor keeps the weights-plus-margin math, a printed startup budget is used as printed (it already covers the runtime reserve), andstartup budget: not priced (...)still resolves through the memory floor when the engine prints one, or fails the parse as before.tensorfold-native modelslists checkpoints whoseconfig.jsoncarriesdflash_config; they are companions, not chat models.EngineService.installed()now skips them for every source it draws rows from (the enginemodelslist, the selected-revisions map and the library scan), reading the cached config with the same containment rules as the library scanner (real paths canonicalised and kept inside the hub cache,O_NOFOLLOW, bounded reads, a snapshotconfig.jsonmay only link inside its ownblobs/) and failing open: an unreadable config keeps the row exactly as before. Paths are canonicalised before the containment check, so a hub behind a symlinked prefix (macOS/var→/private/var, or anHF_HOMEthat is itself a link) still resolves.Tests (
app/electron/agent/engine/):cli.test.tspins both real 1.3.0 startup-budget shapes, the old memory floor, the unpriced failure and the unpriced-plus-floor fallback.service.test.tsseeds a downloaded model whoseinfoprints a startup budget next to a drafter checkpoint (config.jsonsymlinked intoblobs/), asserts one row with no drafter, and repeats that through the selected-revisions map, a prunedrefs/main(newest-snapshot rule), a hub reached through a symlinked prefix, and an escaping config symlink that must not be followed.Local checks (Linux, node 22.21.1 / npm 10.9.8):
npm run typecheckclean,git diff --checkclean,cli.test.tsandservice.test.tspass (the service test also passes withTMPDIRpointed at a symlinked directory, which reproduces the macOS/varcondition this branch's first CI run caught). The fullnpm testrun here reached 900/902, the two failures being load-sensitive tests on this 4-core box (electron/agent/sandbox.test.tsSIGKILL timing,scripts/settings-main-transaction.test.mjsspawnSync timeout) that both pass when re-run alone; CI runs the same suite on macOS.Opening as a draft so @popsy-blue can try it, as asked in the thread.