Commit Graph

92 Commits

Author SHA1 Message Date
kashorin 68f1693645 refactor: publish video-domain packages independently for 0.3.1 2026-10-09 18:13:50 +08:00
kashorin 8bac90166a fix(release): identify package provenance 2026-10-09 04:05:46 +08:00
kashorin 4bcda61494 fix: preserve cross-platform release diagnostics 2026-10-09 01:44:00 +08:00
kashorin f946760a3f docs: finish the 0.3 public documentation audit 2026-10-09 01:07:26 +08:00
kashorin 52942f9c1a refactor: collapse execution onto a single local runtime 2026-10-07 20:45:22 +08:00
kashorin 205bfeb98d refactor: establish the adaptive composition model 2026-10-07 20:44:28 +08:00
kashorin 089c39a012 perf: localize build and render working sets
Preserve forwarded Result values without eager materialization, advance live Builds from disposable indexes, and bound HyperFrames resource, source-frame, and output work.
2026-09-26 06:38:25 +08:00
kashorin b37bdc1992 fix: scan compiled HTML and Windows arguments linearly 2026-09-19 07:02:04 +08:00
kashorin 203964bd50 Merge pull request #305 from alexqem/fix/reliability-and-platform-fixes
fix(cli,runtime): UTF-8 secret input and recoverable worker startup
2026-09-19 06:03:16 +08:00
Qunlin Jin c9c5118098 retain credential permissions and verify startup recovery 2026-09-19 06:01:18 +08:00
Qunlin Jin ccbc7a1f0c refine Studio mutation origin and process cleanup 2026-09-19 06:01:09 +08:00
alexqem 60e79efd65 fix(cli,platform): support WSL credential mounts, utf8 secret input, and resilient worker startup 2026-09-18 12:55:16 +03:00
alexqem 55141ed8fa fix(security,runtime): prevent CSRF in studio, make video download async and sanitize process signals 2026-09-18 12:52:07 +03:00
kashorin 2bed7774e5 fix: preserve request fields and repair local preparation and file I/O (#278)
* fix(generation): refuse supplied media fields a provider cannot carry

* fix(media): probe selected tools in their execution environment

* fix(credentials): use native file replacement across processes

* fix(runtime): distinguish tool preparation from process startup

* fix(cli): bootstrap from the physical distribution directory
2026-09-17 20:53:18 +08:00
Flandern bc1d80dbde fix(runtime): stop probe-only Programs without claiming a process 2026-09-17 15:45:39 +08:00
kashorin 216287361d fix(local): prepare resources explicitly and pass authored languages 2026-09-17 06:25:43 +08:00
kashorin 8690e795c5 fix(credentials): separate management from reads and add explicit file storage 2026-09-17 03:30:36 +08:00
kashorin 2aa8dde48c fix(renderer): own browser preparation, source selection and capture lifecycle 2026-09-17 02:50:42 +08:00
kashorin 963d7b6c90 fix: resolve project directory aliases at Node entry points 2026-09-16 22:27:43 +08:00
fetw a56576a49e fix: admit in-root paths whose basename starts with ..
path.relative of a workspace file named ..keep.svml is the string
..keep.svml. Treating any relative result that starts with .. as an
escape rejected that file as SOURCE_OUTSIDE_ROOT, and the same
predicate was copied into source discovery, Build Result project
paths, Studio writes and CLI short paths.

Use the repository's existing check: only `..` and `..${sep}` are
parent traversal. A Source still cannot import ../outside.svs.
2026-09-16 17:45:33 +08:00
kashorin e6aa3a23ef fix(runtime): expose preparation progress and preserve CLI context 2026-09-15 22:20:29 +08:00
kashorin eaf6549fb3 test(runtime): allow Windows to release temporary service logs 2026-09-14 23:35:44 +08:00
kashorin 4af8ae1b1e release: prepare 0.1.6 and align production guidance 2026-09-14 23:29:54 +08:00
kashorin ce22da565d test(runtime): separate scale workloads from routine regressions 2026-09-14 19:48:20 +08:00
kashorin 870fc33bc4 refactor: isolate build execution and complete production workflow 2026-09-14 18:48:45 +08:00
kashorin 2fc3f134f0 fix(build-result): terminate Windows rename paths correctly
Reserve the trailing UTF-16 NUL required by the Win32 rename API while keeping FileNameLength exclusive of the terminator. Verify exact destination names and open-reader behavior, and close test runtimes on failure before removing their SQLite files.
2026-09-11 05:15:36 +08:00
kashorin df129a3c65 feat: preserve Result references and refine Studio workflows
Keep reused media as explicit references, publish Result changes only when needed, and replace Windows files without timed retries. Clarify environment selection and CLI output.

Refine Studio task and media browsing, editable display names, inline media previews, single-row track overlap, semantic ruler pinning, and Companion-owned Ranking selection.
2026-09-11 04:32:05 +08:00
kashorin c6cea518c9 merge: integrate origin main and keep Result replacement writes alive 2026-09-10 21:31:55 +08:00
kashorin 2924ace5a7 fix(environment): expose preparation evidence and guide practical service choices 2026-09-10 21:28:02 +08:00
rpone 0493794143 test(runtime): show the execution state behind a Build that stopped
A Windows stress run failed three times in ten, each the same shape: one Build
complete and the other with no Result written at all. A Build with no Result has
not failed, it has stopped being scheduled, and the message said nothing about
why. Dump the execution snapshots and Operations at the deadline: `wakeAt`
absent means waiting on a resource release, which separates a lost wake-up from
ordinary waiting.
2026-09-10 21:04:26 +08:00
rpone a94b5c7530 test(runtime): print why a Build did not complete, not just that it did not
The Result manifest carries `failure` beside `outcome`, and the wait read only
the outcome. A Build that reached `failed` therefore reported the state and not
the reason, which is the one thing the Windows runs needed to say.
2026-09-10 20:51:37 +08:00
rpone 90f81045af test(runtime): wait for the overlap this test is about instead of timing it
Under load the test failed `1 !== 2` on "a later Build must join work already in
progress": the first handler held for a fixed 80 ms and the assertion required
the Worker to admit the second Build, plan its graph and reach the same producer
inside that span. Forty runs against a loaded machine reproduced it eight times.

The first handler now holds until the second one actually starts, bounded at
10 s, so the overlap no longer depends on machine speed. A Worker that serialized
the Builds waits out that bound and the assertion reports it. The same forty runs
now pass forty times.

The poll for terminal outcomes also stops on any outcome other than `complete`
and names it. Only `complete` ended that wait, so a Build reaching `failed` was
waited on until the deadline and then reported as a stall, which is how the
Windows failure read.
2026-09-10 20:48:32 +08:00
rpone 9f7e6fc0f4 test(runtime): stop the work loop before closing the state it uses
Closing the SQLite state in `finally` while `runtime.work` was still running
turned the Worker's next `claim` into an unhandled rejection, which node reports
in place of the assertion that failed the test. The abort and the wait for the
loop now happen first, bounded so a loop that will not stop cannot hold up the
cleanup, and the removal retries rather than failing on a handle Windows has not
released yet.

The run this came from is the answer the earlier masking hid: the test failed at
30.5 s, so the deadline fired and the two Builds did not reach a terminal
outcome. That stall is the same one that hung the job for 97 minutes and is
still unexplained.
2026-09-10 20:12:14 +08:00
rpone fc687df85a test(runtime): report what failed instead of what failed next
A Windows run failed two tests whose messages named neither cause.

"one local Worker admits later Builds" reported `EBUSY ... unlink
runtime.sqlite`. That is the cleanup: a throw above skips `runtime.close()`,
SQLite keeps the file open, and the removal in `finally` fails on Windows and
replaces the error that failed the test. Closing the state in `finally` lets
that error through.

"one live detached Runtime Worker" reported `another Runtime Worker launch did
not finish in time`, which is the sibling call giving up on the launch lock
rather than the launch it was waiting for. Carrying the Worker log into the
failure gives the next one something to read.

Re-running the same commit passed, so both remain intermittent. This changes
what they print, not how often they fail.
2026-09-10 20:06:29 +08:00
rpone a7a7e8fe95 ci: fail a stalled test instead of holding the runner
A Windows job on f80a562 sat for 97 minutes after its last output. The suite had
reached "one local Worker admits later Builds while preserving shared Endpoint
capacity", whose poll for two terminal Build outcomes carried no deadline; one
Build did not complete on that run, so the loop polled every 5 ms until the job
was cancelled. Re-running the same commit passed, so the stall is intermittent
and its cause in the Worker launch path is not yet identified.

Three bounds now apply. The poll fails after 30 s and prints each Build's last
outcome. `node --test` receives `--test-timeout=120000`, well above the 5.75 s
slowest test measured on that run. The job takes `timeout-minutes: 20`.
2026-09-10 07:36:49 +08:00
kashorin 10b216c57b test(runtime): allow console startup time on shared runners 2026-09-10 05:25:47 +08:00
kashorin b116caa63d fix(runtime): include worker stderr in logs and startup failures 2026-09-09 23:36:40 +08:00
rponeawa 66f0947cb8 fix(runtime): pass the hidden-console script as one encoded command
`-Command -` parses stdin a statement at a time, so an argument holding a
newline ended the statement early: PowerShell exited having run nothing, with
no process id and nothing on stderr. Any launch whose arguments carry a real
newline hit it — `node -e` with an actual script is the ordinary shape, and it
is what `ensureRuntimeProcess` is handed in its own test.

Send the script as one `-EncodedCommand` blob instead. It keeps the property
that made stdin attractive — no quoting of ours crosses a shell boundary — and
base64 has no line structure to end a statement early.

Regression from 3063fa6, which routed the Worker through this helper; Managed
Programs were only ever given single-line arguments and so never showed it.
2026-09-09 21:05:01 +08:00
rponeawa d62903d4ae fix(runtime): give the Windows Worker its own console
Windows ties a process's lifetime to the console it is attached to, and the
Worker inherited the launching CLI's. When that command exited its console was
destroyed and the Worker went with it, so a submitted Build sat at `0/n steps`
with an empty Worker log and nothing to read anywhere.

`programs.ts` already solved this for Managed Programs: `detached` on Windows
means DETACHED_PROCESS and no console at all, while `Start-Process
-WindowStyle Hidden` creates a hidden console of its own. Export that helper
and use it for the Worker too. POSIX keeps `detached`, which is what grants it
its own session there.
2026-09-09 19:52:26 +08:00
kashorin 599b2d05d2 fix(pricing): show complete provider-owned rate material
Group requests by endpoint and rate material, summarize explicit no-charge work, and preserve every priced request in JSON. Providers may supply a concise summary alongside their original rate documents; the CLI does not infer prices or walk upstream media dependencies.
2026-09-09 17:26:57 +08:00
kashorin 14b6146bf9 test: keep checks tied to behavior 2026-09-08 17:20:20 +08:00
kashorin 59b17e777b feat(runtime): expose provider pricing and request support 2026-09-08 17:20:20 +08:00
kashorin 6c2fae51b0 fix(credentials): rotate OAuth through declared endpoint slots 2026-09-07 04:25:49 +08:00
kashorin 1ed40edd6f refactor(runtime): separate endpoint actions from durable operations 2026-09-07 04:25:49 +08:00
kashorin bd39ef50ca fix(runtime): keep durable builds progressing under load 2026-09-07 04:25:49 +08:00
kashorin efc8bd56e7 feat(runtime): render selected ranges with weighted capacity
Let HyperFrames render explicit frame intervals with independent browser workers, and make Runtime account for request-dependent resource units across Builds. Preserve external Operations while stopped executions settle so capacity is released only after real work ends.
2026-09-07 04:25:49 +08:00
kashorin f15b1d46f8 refactor(studio): make authoring execution runtime-owned 2026-09-07 04:25:49 +08:00
kashorin 82f5ce795b feat(studio): the display closure is everything the Run makes computable for free
Studio can only show media that has been normalized, and normalization is a
Need served by the Profile's local FFmpeg Endpoint. A Studio that installs no
Endpoint therefore rejects every file Candidate: satisfying the generated
output leaves inspect-media and normalize-media unresolved, and a file cannot
satisfy the normalized output's type. The deleted path-based preview bypass
answered this question with the wrong mechanism; this is the right one.

The Runtime Host gains localEndpoints(): every Endpoint the Profile selects
whose Provider declares local pricing, immediate capabilities only, with the
Profile's bindings applied. A capability bound to a priced Endpoint stays
unresolved rather than falling to a local one. Studio preflight and execution
resolve Needs through that registry, exactly as plan and a Build do minus every
priced Endpoint, and name the capability when a Need reaches nothing free.

Verified on the media-track preview with three file Candidates and an
estimated semantic take: normalized through media.local and displayed in
306 ms. Duplicate studio.svrun files that were byte-identical to a sibling Run
are removed; a Run's path carries no semantics.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-07 04:25:49 +08:00
kashorin 507cd5685e refactor(runtime): keep program lifecycle separate from capacity 2026-09-04 23:01:02 +08:00
kashorin 1d4124aac7 refactor: make planning and observation boundaries explicit 2026-09-04 21:36:38 +08:00