Skip to content

app: control vector picker and strength in Engine advanced - #1951

Open
BlivionIaG wants to merge 55 commits into
ashhart:mainfrom
BlivionIaG:feature/glp-steering-app
Open

BlivionIaG wants to merge 55 commits into
ashhart:mainfrom
BlivionIaG:feature/glp-steering-app

Conversation

@BlivionIaG

@BlivionIaG BlivionIaG commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

App controls for the generic add-only steering feature. Desktop-maintainer review and #1835 landing are still prerequisites.

Checks on this head

  • Head commit: c176811e94ab205a695393c42cdb54cc24afb947.
  • Lean checker: no Zig file is touched (42 files under app/ and CHANGELOG.md), so the Zig findings are main's.
  • Tests run, in app/ on this head (Node 22.23.2, npm 10.9.8): npm ci --ignore-scripts, npm --prefix mobile ci --ignore-scripts, npm test (904/904 test files pass), npm run typecheck (0 errors) and git diff --check all pass. New regression: a picker selection overlapping a pending alpha change and a pending enabled change keeps both (red before the fix: alpha 2 !== 5, then enabled true !== false).
  • CI on this head: queued behind the repository's runner backlog when this was written; the previous head's checks passed apart from the inherited desktop typecheck.
  • Not run: a packaged Electron build against a model, and the engine's own gates, which Implement GLP control vectors with a fused Metal kernel for Qwen3.8-27B #1835 owns. Desktop-maintainer review is open.

Receipt

Remaining maintainer requests

Desktop-maintainer review; cannot land before #1835.

Checklist

  • Title/description, head and stack agree; older results remain source-bound.
  • Every new/restored test has a failing-before runtime receipt across all reached platforms. Host evidence is above; missing device gates are not waived.
  • No newly added overlong/multiline source comments, measurements or review history; inherited findings are reported above.
  • Complete publication trees/outgoing histories reviewed for public noreply identity, tool trailers and privacy; synthetic detector fixtures and mandatory third-party public contacts are not live secrets. No package/binary upload proposed.
Historical source-bound notes — not current-head qualification

Earlier commands/measurements retain their original commit/binary scope. Any earlier readiness or provenance claim is superseded by the open gates above.

Add-only operator control vectors

Published head 46eb6b8c858b2f57653413dd35057475a035eb9a on main 6c5cef8941b27d86b06a986834e13deb9b515e1e; follows backend #1835 at ccac1b8337276e3e69118dcae97d1eeafe07d477 (separate PRs, not a claim of ancestry).

Settings → Engine advanced offers an operator-selected vector file and strength, off by default and gated by the engine's advertised --glp support. Copy describes non-refusal style/topic steering, additive vectors only, named project/malformed refusals and the engine's exact-file SHA startup disclosure. No directional-ablation selector, refusal-removal assets or receipt/download links remain. The preview fixture is neutral style-vector.gguf; strength is described as scaling the added direction, not as an unverified derivation multiplier. All12 locale packs and the source phrases are updated.

The contribution check exposed inherited large files touched by integration. Engine service responsibilities and engine/composer IPC groups are now composed into bounded modules: service585lines, preload600; channels, signatures, unsubscribe ownership, shutdown order and cache-cleanup admission are retained. The installed-view admission regression failed during extraction; the original service seam was restored and the unchanged consumer scenario now passes.

Exercised qualification

Execution scope: production bundle, six consumer suites and real native1.2.5 compatibility smoke were executed at initial 0e196a7b32eef3b573f5b8f4b607217869dbc924. The current 46eb6b8c858b2f57653413dd35057475a035eb9a is tests-only: retained input-validation suite, typecheck and contribution preflight pass. Those earlier runtime executions are not relabelled as new runs. The web preview was exercised earlier in this pass, not rerun after the tests-only correction.

  • Node22.23.2/npm10.9.8; typecheck, private-leak scan and856-file runner coverage gates pass. Actual production renderer/main/preload/standalone-agent bundles build successfully; existing Vite chunk/import warnings were retained. Language index regeneration passed (12packs).
  • Existing service, control-vector, immutable-download queue, cache-admission, local-library and benchmark-integration consumer suites pass. No model/device result is inferred from synthetic native-process fixtures.
  • Actual final app service ran against the real previously built native1.2.5 CLI: version/capabilities/models/snapshot queries, unsupported steering refusal, defaultoff, state remained stopped, no model started. This is compatibility/glue proof, not new nativebackend qualification.
  • Actual web-preview Settings surface exercised file selection and enable/disable behavior and rendered the corrected add-only copy. It uses the repository mockbackend, not nativeElectron. Chromium screenshot capture repeatedly timed out; no visual image or nativeUI/device proof is claimed. The owned preview tab/server were closed.
  • Repository preflight versus pinnedMain: 0errors,0warnings,0newleanfindings;43changedfiles. Existing README updated with behavior and ownership.

Open gates

Desktop-maintainer review, and #1835 landing first (its own device runs are the maintainer's). No packaged Electron or model-performance receipt is claimed.

CI correction: the old desktop check asserted IPC literal text remained in preload.ts. Those implementation-text, wiring-count and browser mock-echo assertions are deleted, not repinned to the new modules. Actual production input-validation cases remain and pass; typecheck passes. This is a tests-only descendant, not a new runtime measurement. Current b71 CI: desktop-linux and appimage-linux pass; macOS desktop855/856cases pass, with only the unchanged inherited bot-VM bounded-output EPERM. The failing job did not record its syscall/stack; no isolation weakening, skip or retry was introduced. All other platform checks passed; the inherited desktop failure and device gates remain open.

CI on the current head: 12 successful checks and 2 scheduled-only skips, desktop and desktop-linux included.

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

CI is green on 14595092e (all 11 checks pass).

The first run's desktop job was cancelled by concurrency, not a failure; a fresh run passed in 11m3s. The branch also merges main's 5fe74ebb9, which fixes a linear_time.Fastest compile error on main that was failing the zig and zig-windows checks on both PRs.

@BlivionIaG
BlivionIaG force-pushed the feature/glp-steering-app branch from 1459509 to 0e196a7 Compare November 10, 2026 15:07
@BlivionIaG

BlivionIaG commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Final app head is now b71e73e20c041583aa1162146fb217b7e729127c on pinned Main 8a7838a65a1fa1a44e0136a2cccd8bfcc8c0a8b5. Previous0e196 passed the real renderer/main/preload build, private-leak/856-file coverage gates, typecheck, six consumer suites and actual appservice/native1.2.5 compatibility smoke without model startup. Desktop CI caught an obsolete source-text assertion requiring IPC literals in preload.ts; removed that implementation/wiring/mock-echo block, retained and exercised actual input-validation contracts, typecheck passes. This is tests-only; no runtime proof relabeled. Other CI remains pending; backend Metal/no-GLP/style-topic gates remain unwaived.
Actual b71 desktop follow-up:855/856cases passed; the sole failure is now the unchanged bot-VM bounded-output EPERM, not the removed IPC assertion. Desktop-linux and appimage-linux passed. This is the same inherited genericEPERM as #1835, with no failing syscall/stack recorded; no process-isolation suppression or retry introduced. Independent read-only composition/preload review found no current defects, which is not runtime proof or a waiver. Other checks and existing device gates remain open.

Terminal platform-check snapshot at unchanged b71e73e20c041583aa1162146fb217b7e729127c:11successful checks,1failed,2scheduled-only skips. Linux Zig, Windows Zig, macOS dev-tools, formatting, pytest, release paths, both benchmark-client platforms, Linux desktop/appimage and mobile passed. The sole failed check remains macOS desktop's unchanged bot-VM bounded-output EPERM, not a GLP service assertion. No rerun or gate waiver. This host/build snapshot still does not qualify supported-model steering, no-GLP0/20speed/equality or semantic style/topic evidence.

Maintainer follow-up #1951 (comment) assigns review to the desktop-app maintainers,not the engine maintainers. This app-only PR remains dependent on--glp from#1835 and cannot land before it. No merge/auto-merge/draft-state change;awaiting app-maintainer review. Currentb71e73e2 stays unchanged.

@ashhart

ashhart commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Thanks @BlivionIaG. This PR changes only the desktop app, plus its CHANGELOG line, and the app has its own maintainers, so they'll review it rather than us. On the engine side it needs --glp from #1835, so it can't land before that.

  • Synthena (Ash's Agent)

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Rebased onto main 6c5cef894, now 334b7c2ff, so it no longer conflicts. The conflict was only CHANGELOG.md; the app line now ends "Thanks to @BlivionIaG." I also dropped the empty "re-run the app checks" commit. In app/: npm ci, npm test, npm run typecheck and git diff --check all pass on this head. It still needs --glp from #1835 to land.

@BlivionIaG
BlivionIaG force-pushed the feature/glp-steering-app branch from 334b7c2 to 46eb6b8 Compare November 13, 2026 10:17
The reader implements the GLP format defined by the weightless project
(@msuiche): a GGUF v3 container of one fp32 direction per layer, applied by
adding it to the residual stream. A file with no mode is llama.cpp's additive
vector; a file that names any other mode, project included, is refused rather
than read as an add file. The reader also refuses a spec version, rank or hook
point it does not implement, a layer named twice, a direction that is not
finite, and a digest that does not match. It reports the SHA-256 of the exact
bytes it was handed, so a caller can name the file it loaded.

tf-glp-check shows the reader's view of a file for glp_parity.py to compare
with the reference reader, the file hash included.
…8-27B

A steered layer takes the dispatch an unsteered layer takes: the norm that
adds the block's output to the residual stream also adds alpha times the
layer's direction to the row, and the normalisation reads the result. The
plan holds one device buffer per layer the vector names, and a model without
one runs the plain norm. The steered norm clears the half-operand state the
plain norm leaves for the head, since its output has no such words.

The kernel contract has a float64 reference for the add, a bound for the
kernel's own fp32 product and sum, the launch's threads and threadgroup memory
for gate 5, and the GPU suite with a control that drops a NaN and one that
breaks the normalisation. The GPU half needs a Mac.
Off unless --glp is given: without it the server is as it was. The file is
read once at startup, before the model loads, and the startup line names the
file (escaped), the SHA-256 of its exact bytes and that replies are steered,
beside the strength, the layers and the checkpoint the vector came from. The
file hash is taken over the bytes already read; nothing is read twice.

A file the reader refuses, a width or base model that does not match the
checkpoint, a layer past the checkpoint's depth, a Gemma checkpoint, any other
family, and a CUDA or ROCm backend are all refused by name and the server does
not start. The engine reports the vector in force with the same file hash.

docs/control-vectors.md covers the format, the layer a direction names, the
refusals and how an operator brings a vector; the repository ships none.
@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Commit identity fixed: author and committer on all 6 commits are now BlivionIaG <[email protected]> (the committer line had a malformed noreply address from a local git config). Trees and dates are unchanged; the head is now 46eb6b8c8. CI is green on it: 12 successful checks, 2 scheduled-only skips.

@ashhart

ashhart commented Nov 16, 2026

Copy link
Copy Markdown
Owner

The change does what it describes: an opt-in file-and-strength control in the advanced engine settings, off by default, active only when the engine advertises the steering flags, with just the on/off state and strength written to audit records rather than the chosen file. The new host test of the setting behaviour is thorough, covering strength validation, refusal on an engine without support, picker-only file selection, restarting when the strength or file changes, persistence across a restart, and dropping a file that has since gone away.

What is missing is coverage at the IPC boundary. The change deletes the host assertions that every engine channel is role-gated, that private material such as credentials, lesson text, environment values and folder paths never reaches audit logs or events, that the native picker is the sole admission route for a path, and that the bridge exposes each channel. They are removed rather than re-expressed against the reorganised modules, and nothing behavioural replaces them, so those invariants, including on the new control-vector channels, no longer have a host test. Please restore them as behavioural IPC tests and add an explicit check that the chosen vector path is never audited and that each new channel requires the operator role.

Nothing here changes the engine, server or kernel; the new launch flags only become meaningful once the separate backend work lands. Size, comment-length and environment-access rules all hold. On balance this needs fixes for the deleted IPC security coverage, though the feature itself is sound.

  • Synthena

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Added engine-ipc-contract.test.ts (7f59824690, on top of the head, no force push). It registers the real engine-ipc.ts handlers against a recording service, audit, role check and native picker, so these are behavioural checks and not source matches:

  • Every registered channel, the four control-vector ones included, refuses a caller below its role before it touches the service, the picker or the audit; each asks for operator, engine:delete for owner. The channel list must equal the test's table, so a new channel cannot skip the checks.
  • The control-vector file path, the connection key, lesson text, folder paths and environment values never appear in an audit record. engine.controlVector holds only the state and strength (enabled/alpha, or cleared), engine:connection, chooseControlVector and addLibraryFolder write no audit record.
  • Only the native picker admits a path: a renderer-supplied path is never forwarded, and a cancelled, empty or two-file result reaches no service call.
  • Refused input (non-boolean Cortheon or learning flag, a lesson over 8 KB, a bad folder id or scan option) reaches neither the service nor the audit.
  • Every registered channel is reached through the preload bridge.

Checked on a clean npm ci: the new test passes; three planted faults (no role check on clearControlVector, the path added to the audit record, a renderer path forwarded to addLibraryFolder) each fail it. npm run typecheck exit 0; git diff --check exit 0; pr_check.py --base main 0 errors, lean 345 vs 345. npm test: 857 of 857 pass once mobile/ dependencies are installed (three mobile script tests fail only for missing modules otherwise).

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thanks @BlivionIaG. The new tests exercise the real IPC handlers and restore the role, audit privacy, picker-only path and preload coverage, including the four new channels. That answers our latest code request. What remains is #1835, which this depends on, and fitting it to current main's locale and preload changes.

  • Synthena

Main's SenseNova support turned the qwen27 norm into normShift and filled quant_gpu.zig to its 600-line limit. The steered norm now dispatches from norm_steer_gpu.zig with its pipeline held by the steering plan, unsteered norms call main's normShift, and SenseNova models refuse a control vector.
@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Merged the new #1835 head (178a01a70b, with main 4c79cfe346) into this branch: head d353847607; npm run typecheck 0 errors, npm test 904/904, pr_check 0/0; app/CHANGELOG.md keeps both sides. Still waiting on desktop-maintainer approval and the steering parent landing first.

Metal contracted hv + alpha * d in the steered norm into one fused multiply-add. At strengths whose products round (0.1, 0.3) that differs in the bf16 stream from the separately ordered reference the contract declares; powers of two were exact either way, and the GPU suite ran only at 1.0. The kernel now turns contraction off, and the suite checks the steered row bit for bit against the separately rounded add at 0.1 and 0.3 on rows built to sit on a bf16 tie, with a planted contracted kernel that must differ in every element.
@ashhart

ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Thanks, @BlivionIaG. The picker queue fix, overlapping strength/state regression and IPC coverage remain intact. The app code is unchanged from the previously tested subtree, and the latest app checks are useful.

Desktop-maintainer approval and the steering parent landing first remain prerequisites. Packaged Electron checks and the parent's exact off-path and same-setting serial steering comparisons are still needed. The changelog is the only conflict with current main.

  • Synthena

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Merged #1835's refreshed head (upstream/main plus the open-options merge); no change to this PR's diff. Head 5f271420ce.

@ashhart

ashhart commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you, @BlivionIaG.

The picker now uses the same serialized feature-change queue as set and clear. The overlap regression proves that a pending strength change and a pending enabled-state change both survive a file selection. Controls remain disabled by default, and the IPC coverage is intact.

One small source fix remains: the added comment at app/electron/main/host/ipc/engine-ipc-contract.test.ts:89 is 121 columns. Please shorten it to 120 or fewer.

The only current-main conflict is the changelog, which can be resolved during integration without another author rebase. Desktop approval, the steering parent landing first, packaged desktop validation and the parent's exact engine comparisons remain prerequisites. CHANGES REQUESTED for the comment-width fix; the picker functionality itself is confirmed.

  • Synthena

@ashhart

ashhart commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you, @BlivionIaG.

The role-check comment is now within the width limit. The picker still uses the same serialized change queue as strength and on/off changes, and the overlap regression still checks the returned state and saved preferences. Steering remains off by default, and disabled or unsupported paths omit the engine arguments.

The only conflict with current main is CHANGELOG.md; maintainers can preserve both entries without an author rebase. SAFE TO A/B.

Desktop-maintainer approval and the steering parent landing first remain prerequisites. The smallest remaining check is one packaged Electron smoke using TensorFold/Qwen3.8-27B-MLX-4bit at revision 22d8d538154e0e5b6f8dcb1fcc74a60a0798104c: pick a validated vector, enable it, change strength, replace the file, disable it and restart, checking arguments and saved state throughout. The parent's own exact off-path and same-setting serial comparisons remain separate requirements.

  • Synthena

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Thank you. ccb7adcd59 shortens the comment at app/electron/main/host/ipc/engine-ipc-contract.test.ts:89 to 113 columns; no other added comment line in the app diff exceeds 120. npm run typecheck, that test file and npm test (905/905) pass. The changelog conflict is left for integration, as you suggested.

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Thank you. Here is the packaged Electron smoke you asked for. Steps 2 to 6 pass against TensorFold/Qwen3.8-27B-MLX-4bit @ 22d8d538154e0e5b6f8dcb1fcc74a60a0798104c with the engine serving at every step. Step 1 did not go through the real file picker (the Mac was locked and the native panel could not be driven, so the vector was seeded into the saved preferences instead). I will redo step 1 and the "choose a new file while a vector is in force" case through the real dialog when I can run it on an unlocked session. No defect in this PR was found. One issue outside it blocks any packaged steering of Qwen3.8-27B: see finding 1.

Full smoke report

Result: steps 2 to 6 pass in a packaged app against TensorFold/Qwen3.8-27B-MLX-4bit @ 22d8d538154e0e5b6f8dcb1fcc74a60a0798104c. The engine really started and served the model at every step. Step 1 was not exercised through the real file picker: the Mac's screen was locked, so the native open panel could not be driven (details below). I found no defect in #1951's code. Two findings are outside the PR: one blocks this smoke on main as well, and one is a small UI note.

Setup

  • Machine: Apple M4 Pro, macOS 27.2 (26B123).
  • Branch: feature/glp-steering-app @ ccb7adcd59 (parent feature/glp-steering @ 2370dd9c4f). Tested in a fresh worktree.
  • App and tools: tensorfold-studio 1.0.0-beta.9, Electron 42.11.12, electron-builder 26.17.0, Node 22.23.2, npm 10.9.8, Zig 0.17.0.
  • Engine: tensorfold-native 1.3.5, built from the same commit: zig build native tf-glp-check -j4 -Dcpu=apple_m1. capabilities --json lists --glp and --glp-alpha among its serve flags.
  • Model: already in the HF cache at the requested revision. The app also added --drafter z-lab/Qwen3.8-27B-DFlash2 by itself, because that drafter is installed locally.

Packaging (the repo's own path) and the engine swap

cd app
npm ci && npm run deps:trusted-scripts
npm run pack:mac:dev        # vite build, fetch-engine (pinned 1.1.0), computer helper, package-mac --mode dev --targets dir
                            # -> release/mac-arm64/TensorFold.app, fuses checked, ad-hoc signed
cp ../zig-out/native/bin/tensorfold-native release/mac-arm64/TensorFold.app/Contents/Resources/engine/bin/tensorfold-native
codesign --force --sign - release/mac-arm64/TensorFold.app && codesign --verify --strict release/mac-arm64/TensorFold.app

A packaged app only runs the engine inside its own bundle; the override env var is ignored once packaged. So the branch's engine was copied into the bundle and the bundle re-signed ad hoc. The release engine's lib/libtfgrammar.dylib stayed in place.

Smoke-only patch (not in the PR): I applied a local patch to app/electron/agent/engine/cli.ts parseInfoOutput before packaging; finding 1 below explains why it was needed. Diff:

-  if (!family || !weights || !floor) throw new Error(...)
+  const budget = /^([\d.]+) GiB at --context \d+/.exec(field('startup budget') ?? '')
+  if (!family || !weights || (!floor && !budget)) throw new Error(...)
 ...
-    memoryFloorBytes: weightsBytes + Math.round(Number(floor[2]) * GIB),
+    memoryFloorBytes: floor ? weightsBytes + Math.round(Number(floor[2]) * GIB) : Math.round(Number(budget![1]) * GIB),

How the app was run and driven

  • Launch: the packaged binary itself, with a throwaway profile:
    VONTRA_HOME=<tmp profile> TensorFold.app/Contents/MacOS/TensorFold --use-mock-keychain --remote-debugging-port=9333 --remote-debugging-address=127.0.0.1
    
    • --use-mock-keychain was needed because the first launch blocked on a keychain prompt that could not be answered with the screen locked.
    • The packaged fuses (node inspect off, run-as-node off) were left as built. Chromium's remote-debugging port still opens on the packaged app.
  • UI driving: over CDP with real mouse and keyboard events: click Toggle, click Strength, select all, type, Enter. Loading the model used Models → "Use model" on the row whose details name TensorFold/Qwen3.8-27B-MLX-4bit. The page was not changed by script.
  • Reading state:
    • The engine's own startup line came from the read-only engineSnapshot() status (logTail).
    • The engine argv came from ps -axo pid,args after each step.
    • The saved state came from <VONTRA_HOME>/engine/preferences.json.
    • Paths below are masked: <vectors> is the vector folder and <app> is the packaged TensorFold.app.

The vector

The vector is synthetic. It is not derived from any behaviour, and it is not a refusal vector.

  • Content: a GGUF v3 file holding 17 fp32 directions direction.24…direction.40, each 5120 wide with L2 norm 0.5. The values are random from a fixed seed.
  • Metadata:
    • glp.spec_version=1, glp.mode=add, glp.rank=1
    • glp.hook_point=residual_stream_post_layer, glp.alpha_default=1.0
    • glp.base_model=TensorFold/Qwen3.8-27B-MLX-4bit, glp.base_revision=22d8d53…
    • glp.layer_ids_zero_based=24,…,40
    • glp.content_sha256 over the directions
  • Validation: tf-glp-check read accepted both valid files. The engine accepted them at startup; see its lines below.
File Seed / mode File sha256
A seed 1, add 7089523094e10a0555750876dd9a3c9a9285a2a7d8657a995f59b5e93e1c0a1e
B seed 2, add 6e0aa9918f6929dbf92077d57794e7be3251a935bffba7c097feda9db9a79608
P seed 3, project (must be refused) 7d51f2ca03055aeaa4eb8118e81aaadc1e38ffd3cd2547f9ce6bb7d76273343f

The app always pointed at the same path, <vectors>/steer.gguf. That file started as A.

Step checks

Every argv starts with <app>/Contents/Resources/engine/bin/tensorfold-native serve TensorFold/Qwen3.8-27B-MLX-4bit --host 127.0.0.1 --port N --name TensorFold/Qwen3.8-27B-MLX-4bit --drafter z-lab/Qwen3.8-27B-DFlash2. The column below shows only what follows that prefix.

Step Action Engine argv after the common prefix Saved controlVector Engine / UI Result
0 Model loaded, nothing chosen (nothing) file absent ready baseline
1 Pick a validated vector (nothing) {"enabled":false,"file":"<vectors>/steer.gguf","alpha":1} UI: "File: steer.gguf", toggle off and enabled, Strength 1 not exercised via picker: seeded, see below
2 Toggle on --glp <vectors>/steer.gguf --glp-alpha 1 {"enabled":true,…,"alpha":1} engine restarted, ready: control vector in force, replies are steered: alpha 1.000, 17 layers (24-40), base TensorFold/Qwen3.8-27B-MLX-4bit @ 22d8d538…, file sha256 70895230… (= A). UI: "In force in the loaded model." PASS
3 Strength 1 → 2.5 (type + Enter) --glp <vectors>/steer.gguf --glp-alpha 2.5 {"enabled":true,…,"alpha":2.5} restarted, ready: alpha 2.500 … file sha256 70895230… PASS
3b Strength 20 typed unchanged (--glp-alpha 2.5, same pid) unchanged (2.5) UI: "The strength must be above 0 and at most 16."; no restart PASS
4a File replaced on disk by B; no app action unchanged (same pid, same path) unchanged the running engine keeps the vector it loaded; the app does not watch the file (by design: the engine reads it at its next start) as designed
4b Strength 2.5 → 2 (next start) --glp <vectors>/steer.gguf --glp-alpha 2 {"enabled":true,…,"alpha":2} restarted, ready: alpha 2.000 … file sha256 6e0aa991… (= B); the engine re-validated the new bytes PASS
4c File replaced by P (project mode), then strength 2 → 1.5 no engine process {"enabled":true,…,"alpha":2} (rolled back from 1.5) engine exit 2: argument --glp: the file's mode is project; this reader applies add vectors only. UI shows that error; status failed, active:false PASS (refused, prior choice kept)
4d B put back, model reloaded from Models --glp <vectors>/steer.gguf --glp-alpha 2 unchanged ready: alpha 2.000 … file sha256 6e0aa991… PASS
5 Toggle off (nothing): no --glp, no --glp-alpha {"enabled":false,"file":"<vectors>/steer.gguf","alpha":2} (file and strength kept) restarted, ready; no steering line; UI toggle off, no "In force" PASS
6 Quit (AppleEvent quit) and relaunch after quit: no engine process. After relaunch: none until load; after loading from Models: (nothing), no --glp {"enabled":false,"file":"<vectors>/steer.gguf","alpha":2} before and after relaunch UI after relaunch: "File: steer.gguf", toggle off, Strength 2; status supported:true, enabled:false, active:false PASS

The security audit log has one engine.controlVector record per successful change: {enabled:true, alpha:1}, {enabled:true, alpha:2.5}, {enabled:true, alpha:2} and {enabled:false, alpha:2}. None of these records contains the vector path.

What could not be done, and why

  • Step 1 through the real "Choose…" picker. The screen was locked for the whole session (CGSSessionScreenIsLocked=true). While locked, Accessibility reports no windows for any app, so the native NSOpenPanel could not be driven. "Choose…" did open the panel. The dialog was not stubbed, because the fuses block main-process access and that would no longer be a real check.
    • Instead, I quit the app and wrote <VONTRA_HOME>/engine/preferences.json with exactly what ControlVectorSetting.choose() writes when no vector is in force: {...prior, file} → {"enabled":false,"file":"<vectors>/steer.gguf","alpha":1}.
    • I then relaunched the app. Steps 2 to 6 start from that saved state.
    • What this leaves unchecked: the dialog → engine:chooseControlVector → choose() path with a real picked file, and the case of choosing a new file while a vector is already in force (apply() restarts at once).
  • No steered reply was compared. The maintainer's check is about arguments and saved state. The engine's startup line confirms the file sha256, strength and layers it applied.

Findings

  1. Outside app: control vector picker and strength in Engine advanced #1951, but it blocks this smoke (present on upstream main 3c088d9691 too): the app's parseInfoOutput cannot read what the current engine's info prints for Qwen3.8-27B.
    • The app requires a memory floor: line. For Qwen3.8-27B, zig/src/cli/info.zig (qwen27) prints startup budget: … GiB at --context N … instead.
    • The effect: the unpatched packaged app with an engine that has --glp marks the model "Needs attention" and refuses to load it. The error text shown is the first info line (family: Qwen3.5-2B or Qwen3.8-27B (qwen3_5)).
    • The released 1.1.0 engine the app pins does not hit this case, but it does not have --glp either. So no packaged app can steer Qwen3.8-27B until parseInfoOutput reads the startup budget line or the engine prints memory floor again.
    • I used the smoke-only patch above to get past it. It is not committed.
  2. Minor UI note (not a correctness problem): after the refused change in 4c, the Strength field still showed the typed 1.5 next to the error. The saved and in-force strength was 2, and the field showed 2 again once the section was reopened. ControlVectorSettings.run() does not reload the snapshot when an action fails.

No defect in #1951's own code was found. I committed nothing and pushed nothing.

@ashhart

ashhart commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you @BlivionIaG for the detailed packaged smoke, including the explicit limits on what the
locked session could not exercise. The serialized picker queue, restored IPC checks and argument
and saved-state transitions remain in place.

The smoke exposed one integration issue that blocks the current app and steering engine
combination. app/electron/agent/engine/cli.ts:58-73 requires a memory floor line, but the
Qwen info path emits startup budget at zig/src/cli/info.zig:131. The unmodified packaged app
therefore refuses to load this supported model before control vectors can be used. Please make
the app accept the current startup-budget form and extend the parseInfoOutput regression beside
app/electron/agent/engine/cli.test.ts:21-29; the smoke-only parser patch should become reviewed
code rather than remain a local workaround.

One smaller UI correction belongs with the refusal rollback. At
app/src/components/settings/ControlVectorSettings.tsx:35-40, the error path records the failure
without restoring the displayed strength from the actual snapshot. After a refused 2 to 1.5
change, preferences and engine arguments retain 2 while the field still displays 1.5 until the
section is reopened. Restore the field from current state on failure and cover that transition.

After those fixes, the remaining packaged checks are the two cells the smoke explicitly did not
run: choose the initial validated file through the real native picker, and choose a new file while
a vector is already in force. Check arguments and saved state throughout. The parent's exact
steering and unchanged off-path comparisons remain separate prerequisites.

  • Synthena

@BlivionIaG

Copy link
Copy Markdown
Contributor Author

Both asks are in at c0c7b33efc, on top of ccb7adcd59.

  • Startup budget. parseInfoOutput reads the current startup budget: <total> GiB at --context … line and prices it as the file's memory floor, and keeps reading memory floor: … (weights plus a … GiB runtime margin) where an engine still prints it. The regression beside the existing fixture feeds the same model through the budget form and asserts the same fields, with the floor taken as the printed total.
  • Refused strength. The failure path now restores the field from the live snapshot instead of leaving the attempt on screen. The repo's tests run under jiti with no DOM harness, so the transition is a small pure helper (control-vector-strength.ts) that the section calls in its catch, covered by a test that refuses 2 → 1.5 and expects the field to read 2.

Local: npm run typecheck clean, npm test 906/906 (905 before, plus the new file), and both touched files pass under jiti. No force push; the head is a single commit on your ccb7adcd59.

Still open from your list: the two packaged cells the earlier smoke could not run — step 1 through the real native picker, and choosing a new file while a vector is in force. Both need an unlocked session on this Mac; I will report them on this PR when I have them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants