Commit Graph
1531 Commits
Author SHA1 Message Date
velixio 642513d205 fix(system): report reserved VRAM alongside allocated in flush-memory
memory_allocated counts live tensors only, so after an unload it reads
near zero while nvidia-smi still shows gigabytes. That gap is the whole
substance of every "flush says it worked, the GPU says it didn't" report,
and the endpoint was reporting only the half that looks good.

memory_reserved is what the caching allocator holds from the driver; the
remainder between that and the driver's own figure is the CUDA context and
kernel workspaces, which nothing in-process can hand back.
2026-08-12 02:58:42 +05:30
velixio 090cc37144 fix(memory): release the model before emptying the cache, not after
The shared voice model's unload emptied the allocator caches and *then*
dropped the reference. That frees nothing: the weights are still reachable
when gc.collect() runs, empty_cache() only returns blocks the allocator
already considered free, and the reference drops a moment later into a cache
nothing will flush again. The unload logs success, the engine leaves the
registry, and nvidia-smi does not move.

Six modules open-coded the same two lines. Exactly one had them inverted --
OmniVoiceBackend.unload, which is the path the engine-registry idle sweep
reaches, which is the sweep a headless worker node runs. So every unload a
user could trigger from the UI worked, and the one that runs unattended on a
machine lending its GPU held 3.6 GB indefinitely. Found on hardware: the
sweep fired on schedule, logged "Released 1 idle engine(s)", and VRAM stayed
flat at 3656 MiB for the next two minutes.

Replace all six with model_manager.unload_shared_model(), which clears the
reference, drops the clone-prompt side cache, then frees -- in that order,
in one place. Two callers gain the side-cache drop they were missing
(/system/flush-memory and the shutdown path), which is the same defect one
step down: an unload that kept the encoded reference tensors belonging to the
model it had just released.

A source guard asserts nothing outside model_manager assigns the shared
reference, so the next caller cannot reintroduce the ordering. It caught the
sixth site while being written.

Also give the AudioSeal watermark models the bargain every other model in the
app already makes: they loaded on the first embed and stayed resident for the
life of the process. CPU-resident, so this is system RAM rather than VRAM,
and the machines that notice are the ones running batches.

The error text on a failing unload changes with the ordering. "Could not be
unloaded, retry after the current generation finishes" was accurate when the
cache flush ran first and aborted before the release; now the release has
already happened and only the flush can fail, so it says that instead of
sending the user to repeat work that is done.
2026-08-12 02:33:04 +05:30
velixio 6a6f3fbc29 fix(models): do not preload a model on a machine with no local user
The startup preload exists so the first generate feels instant for the person
sitting in front of the app. A machine lending its GPU has nobody sitting
there, so it was several GB of VRAM held from boot against a request that may
never arrive — and the idle sweep could not reclaim it, because the sweep owns
the worker executor's engines while this is the default local model.

Measured on gpu2: a node that had run nothing still sat at 2.4 GB, and an idle
unload after a real job returned it to exactly that floor rather than below it.

Worker-mode processes now load on first request and release when idle, which is
what a node should do. A machine that is both a desktop app and a worker keeps
the warm-up — there is a real user there and the point stands.
2026-08-12 01:40:22 +05:30
velixio 5ebf21166d Merge branch 'main' of github.com:velixio/VoiceStudio 2026-08-12 01:31:18 +05:30
velixio b8fb5a14c2 feat(workers): let the idle-unload timings be shortened for testing
Watching a ten-minute rule take effect means waiting ten minutes, so it tends
not to get watched. Both numbers are now env-tunable:
OMNIVOICE_ENGINE_IDLE_UNLOAD_SECONDS and OMNIVOICE_IDLE_SWEEP_SECONDS.

They are documented as a pair, because shortening only the threshold still
means waiting a full sweep interval to see it fire — which reads as a broken
sweep and sends you looking for a bug that is not there.

Unparseable values and anything below the floor are ignored with a warning
rather than honoured. A zero threshold would hand back a model the instant it
went idle and reload it for the very next request, which is worse than the
behaviour being tuned.
2026-08-12 01:30:53 +05:30
velixio 17a364c476 Merge branch 'debpalash:main' into main 2026-08-12 01:25:10 +05:30
velixio 1ac3dcf3fe fix(workers): unload idle models on an inbound-only node
The ten-minute idle sweep lived inside the dial-out agent. A node that only
accepts inbound connections never starts that agent — on gpu2 it fails outright
with 'Set OMNIVOICE_WORKER_ENDPOINT' — so a machine lending its GPU to panels
that dial IN held several GB of weights forever. That is precisely the cost the
sweep exists to avoid, and it was silently missing in the mode most likely to
be a shared box.

The loop moves to module scope and both transports use it. Inbound starts it
when the listener starts and cancels it when the listener stops, and passes a
callback that re-advertises capabilities to every attached panel, so a control
plane's view of what is resident does not go stale the moment it becomes
useful. Local behaviour is unchanged: nothing sweeps unless a worker role runs.
2026-08-12 01:14:16 +05:30
Palash Debnath 99e865600b Merge pull request #1501 from debpalash/fix/remote-backend-recovery-1496
fix: recover from unreachable remote backends
2026-08-11 19:22:57 +00:00
velixio 40569d0657 Merge remote-tracking branch 'upstream/main'
# Conflicts:
#	CHANGELOG.md
2026-08-12 00:34:31 +05:30
debpalash cf316b18bc test(remote): exercise streamed health responses 2026-08-11 19:04:05 +00:00
velixio 9ef0f4a61b Merge pull request #2 from velixio/feat/inbound-node-mode
Share one GPU machine between several people
2026-08-12 00:31:34 +05:30
debpalash 8e5a023058 fix(remote): bound startup health responses 2026-08-11 18:52:17 +00:00
velixio b718b2be46 fix(workers): accept the nested input ids that staging actually produces
Found by clicking Synthesize in the desktop UI — the one path nothing had
exercised.

task_store.stage_input mints inputs/<digest><ext>, a path rather than a bare
name. The node ran safe_filename over it, which rejects anything nested, so
every real clone input was refused, the dispatch failed, and the scheduler
retried about eighteen times a second while the 4090 sat idle and the user
watched a spinner.

The wire id is now hashed into a directory name rather than used as one. That
accepts any id the protocol allows while leaving placement entirely ours to
decide, which is the property the check was really buying. The declared
filename is still required to be a bare name, and a hostile one is still
refused outright — covered by its own test so the containment cannot be traded
away later to fix some future rejection.

Every earlier test used a flat id like 'ref-1' and so never met the shape
production emits.
2026-08-12 00:14:08 +05:30
debpalash 8d8765315f docs: link remote recovery changelog 2026-08-11 18:04:36 +00:00
debpalash dc5c9cf43e fix(remote): recover from unreachable backends
Closes #1496
2026-08-11 18:03:51 +00:00
velixio fd7f06d62e fix(workers): give each attach a fresh outbox
Found on hardware. The queue was built once per connection and reused across
reconnects, so a frame a dying session left behind became the FIRST frame of
the next attach. The node requires a registration there, aborted the call, and
the two span at full speed — session epoch 2445 inside one second, the node
logging 'Locally aborted' on repeat, and the panel reporting the machine
offline while the connection list showed it connected.
2026-08-11 23:28:27 +05:30
velixio 33714b2fe0 fix(workers): make Disconnect hold, and stop a bad paste from replacing a good key
Two more found on hardware.

Disconnect ended the session and the panel redialled two seconds later, so the
log read disconnected and connected in the same breath and the button appeared
to do nothing. A kicked key now sits out for a minute — long enough that the
disconnect is real and the person notices, short enough that it is plainly not
a revocation, which stays a separate and permanent action. The docs now say
which of the two buttons does which.

Re-pasting a connection string for an already-connected machine saved the new
string and then short-circuited on the existing session, so a wrong key
reported success, kept running on the old connection, and only failed after a
restart — by which point nothing pointed back at the paste that caused it. The
live session is now torn down before the new one is dialled.
2026-08-11 23:22:47 +05:30
Palash Debnath 008c8a70a6 Merge pull request #1500 from debpalash/fix/wavesurfer-abort-report-1498
fix(ui): ignore expected aborted audio streams
2026-08-11 17:47:10 +00:00
velixio 4f2dea97b8 fix(workers): read a result ref's size as a size, not an offset
Found on hardware. FetchResult seeked to request.size_bytes as though it were
a resume point, but that field is the artifact's total size — so every fetch
started at end-of-file, yielded no chunks, and failed with 'the result ended
before its final chunk' while the finished render sat on the node's disk.

ArtifactRef carries no resume field, so resumption is a protocol addition
rather than a reinterpreted one, and the fetch now always starts at zero.

Every earlier test drove publish and stage directly and never called
FetchResult with a populated ref, which is exactly why this survived them.
2026-08-11 23:13:29 +05:30
velixio 3dbae35feb fix(workers): actually move artifacts on an inbound session
Found on hardware. The job ran on the GPU machine and the audio never arrived:
'gpu2 finished the job but its audio did not arrive.'

Both artifact directions were built and neither was wired. A result reported by
a dialled node is only staged on that node's disk — nothing pushes it, because
the node cannot call us — so the commit recorded an artifact path that had
never been written. Inputs had the mirror problem: nothing sent them, so a
clone would have failed on a reference file that was never delivered.

Results are now pulled when the frame naming them arrives, and inputs are
pushed before the assignment rather than alongside it, because the executor
asks for them as soon as it starts and an assignment that overtakes its own
reference audio fails on a file that is merely late.

A fetch that fails is not a silent loss: no artifact is recorded, the task
fails naming the machine, and the node keeps its copy because nothing
acknowledges a result we could not fetch.
2026-08-11 23:11:08 +05:30
velixio 569517e5d8 fix(workers): send heartbeats on an inbound session
Found on hardware. The Attach handler started the read pump and the outbound
loop but never the heartbeat loop that the outbound path starts inside
_connect_once. So a node registered, went silent, was declared dead about
ninety seconds later, reconnected, and flapped forever — and in between, work
aimed at it fell back to the local machine with 'gpu2 is offline', while the
panel had shown it ready at 3.4 ms moments earlier.

Every end-to-end test in this file finished inside three seconds, comfortably
within the grace window that hid it. The regression test therefore asserts on
the emitted heartbeat frames themselves rather than on liveness, and shortens
the advertised interval so it does that in two seconds instead of twenty.
2026-08-11 23:05:20 +05:30
debpalash eaad1017df Merge commit '9930a0b41ab4a97560ddc30afdadc9728293d796' into fix/wavesurfer-abort-report-1498 2026-08-11 17:28:14 +00:00
velixio e121e69d0f fix(workers): put a dialable address in the connection string
Found on hardware. With the listener bound to 0.0.0.0 — which is what sharing
a GPU across a network requires — the issued string came out as
ovnode://...@0.0.0.0:7444. That is a legal bind and a meaningless destination,
so it would have failed on the far end with a connection error naming nothing,
and the person who pasted it had no way to tell a bad string from a firewall.

The string is now built from an advertised address rather than the bind: for a
wildcard bind, the source address the routing table would use to leave this
machine, found with a connected UDP socket that sends no packets and needs no
DNS. An explicitly typed bind is advertised verbatim, because someone who
entered a specific address meant it.
2026-08-11 22:57:44 +05:30
velixio 0988a48caa feat(workers): Settings UI for sharing a GPU, in all 21 languages
Adds the panel that makes inbound mode usable: a toggle to accept connections,
a bind field that says which side of "only this machine" you are on, per-person
connection strings with a copy button, the live list of who is connected with a
disconnect button, and a paste box for joining someone else's GPU.

Placed behind the existing Remote workers toggle rather than beside it. "Off
means off" is this feature's stated contract, and a second switch that stayed
live underneath would be exactly the surprise that promise exists to prevent.
Headless machines that only lend a GPU set OMNIVOICE_INBOUND_NODE and never see
this panel.

The unencrypted warning appears where it becomes true, not buried in a doc:
next to the bind field once it points beyond this machine, naming the address,
and again under every freshly issued connection string. The remove-access
confirm says the others stay connected, since that is the only place a user
learns keys are per person rather than one switch for everybody.

All 36 strings are translated into all 20 non-English locales in this change,
with the {{address}}, {{label}}, {{count}} and {{when}} placeholders verified
programmatically against en.json before writing — a dropped token is the exact
bug the parity test was built for, and en-only keys would have passed CI
silently while every other language read English.

Two existing WorkersPanel rename tests queried the only textbox on the page.
That was incidental, not intentional; they now name the field they mean.
2026-08-11 22:46:06 +05:30
Palash Debnath 9930a0b41a Merge pull request #1499 from Marc-oss-hub/feat/orcarouter-provider
feat(llm-providers): add OrcaRouter as a named LLM provider
2026-08-11 17:11:12 +00:00
velixio 2b6f49c596 feat(workers): make inbound mode reachable — settings, endpoints, docs
Wires the two transport halves into something a user can actually turn on.

Two independent switches, deliberately not one. "Accept connections" makes this
machine a node others dial; "saved connections" are the nodes this panel dials
out to. A workstation with a GPU that also drives jobs on a second box does
both, so neither implies the other.

Binding stays on 127.0.0.1 until someone explicitly widens it, and widening is
its own field rather than a flag riding along with the enable toggle. With no
encryption that boundary is the difference between a credential on one machine
and a credential on a network, so it is never crossed as a side effect. The
API reports `exposed` so the UI can say which side of it the user is on.

Saved nodes are redialled only after the control plane is up, since the
connector hands frames to its servicer. Failing to listen records the reason
rather than leaving the feature looking enabled while it quietly accepts
nothing.

Docs say plainly that this mode is unencrypted, that the connection string is a
password crossing the network in the clear, and that dial-out remains the
better choice when one machine is enough. The Security section no longer
implies its TLS guarantees cover both modes.
2026-08-11 22:28:06 +05:30
debpalash 29ccf8ee52 docs: normalize OrcaRouter changelog credit 2026-08-11 16:53:58 +00:00
velixio 53cb316854 feat(workers): dial a node from the panel and run work on it
Completes the inbound path. The panel opens NodeService.Attach with its key in
call metadata, answers the node's register frame, and then runs the ordinary
control-plane loops against the dialled stream — the same _read_loop and
_ping_loop the outbound path uses, so assignments, cancels, results and
reconciliation all behave identically. Only who opened the socket changed.

Registration is shared rather than copied: the body of Register is now
establish_session, reached from both roads. A second copy of session issue,
capability application and in-flight reconciliation is a second thing to keep
in step forever, and the half that gets forgotten is always reconciliation.
The version and feature gates run on the inbound road too — skipping them would
let an out-of-date node register cleanly and then ignore task inputs, which is
how a clone with no reference audio once came back reported as success.

Artifacts invert with the transport: the panel pushes inputs before it assigns,
and pulls results after. Both directions verify the declared sha256 and refuse
a stream that ends without its final chunk, because a truncated file renamed
into place and called done is the failure the upload path was already hardened
against.

Two things the end-to-end tests found, neither visible from unit tests:

  * Every Attach built a fresh client with an empty worker id, so the challenge
    signature could never match after first enrollment — inbound could connect
    once and never reconnect. The id is now kept per panel key, because each
    panel keeps its own registry and the same machine is a different worker id
    to each of them.
  * A node that has lost the id a panel gave it could prove possession of its
    key and still be refused forever, with no way back except deleting it from
    both sides. It is now re-adopted on proof of key possession, narrowly: the
    public key must already be the one enrolled, so this can never admit a new
    key. Covered by a test that forges a valid self-signature from a different
    keypair and asserts it is refused.
2026-08-11 22:18:26 +05:30
debpalash e6096a4eab test(llm): complete OrcaRouter provider contract 2026-08-11 16:47:43 +00:00
debpalash eb97a54105 Merge commit '1fc0b89778d056ca664723e4959621dc5fed9153' into audit/pr1499-fixes 2026-08-11 16:47:22 +00:00
debpalash 9687611e6f fix(ui): ignore cancelled waveform reports 2026-08-11 16:36:19 +00:00
velixio ef671de36e feat(workers): let a panel dial the GPU machine, so more than one person can use it
Remote workers connect outbound: the node dials the control plane, spends an
enrollment token, pins a certificate. That stays the default and is unchanged.

It is also structurally 1:1 — a worker process holds one endpoint, one pinned
certificate and one worker id — so a second person wanting the same GPU box has
to get shell access to it, repoint the start script at their own address and
restart, which disconnects whoever was using it. Sharing a GPU requires root on
it and evicts the incumbent, and no amount of UI work fixes that, because the
constraint is the shape of the connection.

This adds the other arrangement: the node listens, and any panel holding a key
connects to it, concurrently, with no shell access to the machine.

  * NodeService mirrors WorkerService. Transport roles invert; message roles do
    not — the node still sends WorkerMessage and the panel still sends
    ServerMessage, so every state machine on both sides is untouched. Register
    folds into the stream as the first exchange and reuses the existing
    request/response messages rather than growing parallel ones.
  * Keys are per panel, not per node. Revoking one person leaves everyone else
    connected; a shared key would be revoked by nobody and leave no record of
    who used it. Stored hashed, compared in constant time against every key so
    the reply time is not an oracle, and the plaintext exists exactly once.
  * Failed authentication is throttled per source address, so one stale
    bookmark cannot lock out a different panel.
  * A connection log records every attach, refusal and disconnect, and any
    session can be kicked. That is what replaces per-job approval, which would
    make a shared GPU unusable and train people to click yes.
  * Artifacts invert too: the panel pushes inputs before assigning, and fetches
    results after. The node stages both under one contained directory and
    trusts no id or filename off the wire.

Runs in plaintext by deliberate decision, recorded with its accepted risk in
docs/adr/inbound-node-mode.md, and scoped there to LAN and self-hosted use —
never a fleet transport, which goal_v2 B2/B5.2 still require to dial out.

Off by default, and bound to 127.0.0.1 until someone explicitly widens it.
2026-08-11 22:06:12 +05:30
Palash Debnath 1fc0b89778 Merge pull request #1490 from debpalash/fix/wayland-capture-shortcut
fix(dictation): support global shortcuts on Wayland
2026-08-11 16:23:16 +00:00
debpalash a95afc28ea Merge commit '19e352560e41feaf37b65d5007a57d93b9c0e1d4' into fix/wayland-capture-shortcut 2026-08-11 15:55:32 +00:00
Marc-oss-hubandClaude 13c342c238 feat(llm-providers): add OrcaRouter as a named LLM provider
Add OrcaRouter to the Settings → LLM Providers registry (OpenAI-compatible
gateway, base_url https://api.orcarouter.ai/v1, default openai/gpt-5.5).
Env surface follows the existing provider pattern: ORCAROUTER_API_KEY /
ORCAROUTER_BASE_URL / ORCAROUTER_MODEL.

- registry: Provider entry after OpenRouter
- llm_backend: include OrcaRouter in the not-configured hint
- settings search: 'orcarouter' keyword on the LLM Providers category
- docs: list OrcaRouter in the supported-provider docs (docs-sync)
- test: registry test covers the new id

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 23:44:44 +08:00
Palash Debnath 19e352560e Merge pull request #1493 from debpalash/feat/dub-footer-action-polish
Polish dubbing workflow actions
2026-08-11 15:34:15 +00:00
debpalash 606d02a3ea Merge remote-tracking branch 'origin/main' into feat/dub-footer-action-polish
# Conflicts:
#	CHANGELOG.md
#	frontend/src/components/dub/DubHeader.jsx
2026-08-11 15:18:04 +00:00
Palash Debnath b28d0f5f08 Merge pull request #1489 from debpalash/feat/dub-workspace-polish
Polish Dub workspace controls and media history
2026-08-11 14:56:33 +00:00
debpalash 539a8bb571 fix(i18n): cover Arabic dub history plurals 2026-08-11 14:32:05 +00:00
debpalash e369179efb Merge commit '283642340b60054dfd67c3390831a94f45f34063' into fix/wayland-capture-shortcut 2026-08-11 13:59:55 +00:00
debpalash 918fca3ead Merge commit '283642340b60054dfd67c3390831a94f45f34063' into feat/dub-workspace-polish 2026-08-11 13:58:48 +00:00
debpalash 465b08cb9c fix(dub): pluralize history metadata 2026-08-11 13:58:34 +00:00
debpalash b52165d2a7 fix(dub): dismiss stale QC progress 2026-08-11 13:58:29 +00:00
debpalash 441099bf68 fix(dictation): close capture startup edge cases 2026-08-11 13:58:29 +00:00
debpalash c960dcb7e2 Merge remote-tracking branch 'origin/main' into feat/dub-footer-action-polish 2026-08-11 13:56:02 +00:00
Palash Debnath 283642340b Merge pull request #1494 from debpalash/fix/desktop-prod-appimage-stop
fix: stop extracted AppImage before prod reset
2026-08-11 13:38:40 +00:00
debpalash 8b6b9383f7 test: gate AppImage execution contract to Linux 2026-08-11 13:22:10 +00:00
velixio ed48861008 Merge pull request #1 from velixio/feat/worker-protocol-v1
Remote GPU workers: run every GPU operation on the machine you pick
2026-08-11 18:50:49 +05:30
debpalash 50e9b9795e test: execute AppImage stop before wipe 2026-08-11 13:18:45 +00:00
velixio 673e544812 Merge origin/main into feat/worker-protocol-v1
Three conflicts, all additive on both sides — resolved by keeping both
rather than choosing, since either side's entries were real shipped work:

  * CHANGELOG.md — remote-GPU entries against branding, IndexTTS 2.5 and
    the recording-input work
  * setup/download.py — the per-target progress reset against main's
    active-install tracking; both belong in the same finally block
  * docs/features.yaml — the remote-worker and model docs against
    docs/branding.md

Backend 5349 passed, frontend 1871 passed. `bun install --frozen-lockfile`
reports no changes, so the Docker build sees the same tree CI does.
2026-08-11 18:36:51 +05:30