omnius 1.0.694 → 1.0.696
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/py-embed.js +4215 -2598
- package/dist/index.js +23327 -18826
- package/dist/library.js +4564 -2912
- package/dist/python-cuda-runtime.js +512 -0
- package/dist/update-worker.js +4250 -2633
- package/docs/DISCOVERY.json +809 -1
- package/docs/DISCOVERY.md +22 -1
- package/docs/work-orders/runtime-health-remediation/TELEGRAM-LONGHAUL-2026-09-04.md +92 -0
- package/docs/work-orders/runtime-health-remediation/TOOL-QUALITY-2026-09-05.md +84 -0
- package/docs/work-orders/runtime-health-remediation/TRACKER.md +38 -1
- package/docs/work-orders/runtime-health-remediation/WO-25-memory-compiler-eligibility-and-audit.md +81 -0
- package/docs/work-orders/runtime-health-remediation/WO-26-admin-telegram-media-aliases.md +93 -0
- package/docs/work-orders/runtime-health-remediation/WO-27-task-verification-authority.md +140 -0
- package/docs/work-orders/runtime-health-remediation/WO-28-task-scope-evidence-retirement.md +82 -0
- package/docs/work-orders/runtime-health-remediation/WO-29-retired-failure-projections.md +85 -0
- package/docs/work-orders/runtime-health-remediation/WO-30-structured-tool-invocation.md +65 -0
- package/docs/work-orders/runtime-health-remediation/WO-31-complete-runtime-policy.md +62 -0
- package/docs/work-orders/runtime-health-remediation/WO-32-evidence-dependent-steering.md +55 -0
- package/docs/work-orders/runtime-health-remediation/WO-33-file-mutation-transactions.md +55 -0
- package/docs/work-orders/runtime-health-remediation/WO-34-shell-authority-and-results.md +46 -0
- package/docs/work-orders/runtime-health-remediation/WO-35-search-and-exploration-isolation.md +56 -0
- package/docs/work-orders/runtime-health-remediation/WO-36-media-evidence-integrity.md +44 -0
- package/docs/work-orders/runtime-health-remediation/WO-37-browser-and-process-lifecycle.md +86 -0
- package/docs/work-orders/runtime-health-remediation/WO-37-point-localization-cancellation.md +24 -0
- package/docs/work-orders/runtime-health-remediation/WO-38-tool-contract-preservation.md +83 -0
- package/docs/work-orders/runtime-health-remediation/WO-39-telegram-working-indicator.md +76 -0
- package/docs/work-orders/runtime-health-remediation/WO-40-web-content-and-crawl-receipts.md +44 -0
- package/docs/work-orders/runtime-health-remediation/WO-41-completion-evidence-consistency.md +45 -0
- package/docs/work-orders/runtime-health-remediation/WO-42-media-execution-and-configuration.md +79 -0
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# WO-37: Preserve browser ownership and process outcome truth
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Priority:** P1
|
|
5
|
+
**Date:** 2026-09-05
|
|
6
|
+
|
|
7
|
+
## Reproduced failures
|
|
8
|
+
|
|
9
|
+
- Separate browser tool instances inherit a module-global session; HTTP 500
|
|
10
|
+
responses with positive JSON become successful actions. Session/action HTTP
|
|
11
|
+
calls lack deadlines, and close can terminate another client's service.
|
|
12
|
+
- A video worker timing out can exit zero and be accepted, or ignore TERM and
|
|
13
|
+
leave the operation pending forever. Output buffers are unbounded.
|
|
14
|
+
- A Carbonyl worker exiting nonzero is accepted when its last stdout line says
|
|
15
|
+
`ok: true`; cancellation does not reliably drain child processes.
|
|
16
|
+
|
|
17
|
+
## Repair and acceptance
|
|
18
|
+
|
|
19
|
+
- Own browser session state per tool instance, close only that session, and
|
|
20
|
+
validate bounded HTTP responses across session and action calls.
|
|
21
|
+
- Connect browser cancellation to outstanding HTTP requests.
|
|
22
|
+
- Reuse the shared process runner for deadlines, bounded output, process-group
|
|
23
|
+
termination, and exit status; preserve progress reporting and diagnostics.
|
|
24
|
+
- Test ownership, transport contradictions, timeouts, cancellation, and worker
|
|
25
|
+
exit contradictions using hermetic fixtures without live models or services.
|
|
26
|
+
|
|
27
|
+
## Verification
|
|
28
|
+
|
|
29
|
+
- Browser session state is instance-owned. Every POST carries its session id,
|
|
30
|
+
including close; closing one session no longer kills the shared service.
|
|
31
|
+
Failed closure retains the handle for truthful recovery.
|
|
32
|
+
- Browser HTTP deadlines cover response bodies, not only headers. JSON shape,
|
|
33
|
+
positive action receipts, and HTTP status are checked independently, and
|
|
34
|
+
active requests honor the tool's cancellation hook.
|
|
35
|
+
- Video and Carbonyl workers use `runProcessBuffer` with bounded output and
|
|
36
|
+
process-group termination. Timeout/abort/overflow errors stay failures even
|
|
37
|
+
if a worker's shutdown handler emits exit zero or positive JSON.
|
|
38
|
+
- `pnpm exec vitest run --maxWorkers=4 --minWorkers=1 tests/browser-action-lifecycle.test.ts tests/browser-action-screenshot.test.ts tests/media-worker-lifecycle.test.ts tests/video-generate.test.ts`
|
|
39
|
+
from `packages/execution`: **36 passed**.
|
|
40
|
+
- `pnpm exec tsc --noEmit` from `packages/execution`: passed.
|
|
41
|
+
- Worker tests use in-memory event emitters and mocked process leases; browser
|
|
42
|
+
tests use mock fetch with live subprocess setup forbidden. No model loading,
|
|
43
|
+
external requests, live browser sessions, or service changes occurred.
|
|
44
|
+
- Parent owns integration and push; publication is excluded.
|
|
45
|
+
|
|
46
|
+
## Ownership review follow-up
|
|
47
|
+
|
|
48
|
+
Review found a remaining launch path that killed every listener on the configured browser port after a capability mismatch. Port occupancy is not proof of process ownership. The launcher now returns a clear incompatible-service failure without invoking shell cleanup or spawning a replacement. A focused regression asserts the existing service is untouched; all 10 browser lifecycle tests passed in /tmp/omnius-wo37-ownership.log.
|
|
49
|
+
|
|
50
|
+
## Nested Playwright ownership and Stop follow-up
|
|
51
|
+
|
|
52
|
+
Carbonyl's text fallback constructs `PlaywrightBrowserTool`. Its prior module-global browser/page/context and diagnostic buffers meant a cancellation hook could close another tool instance's flow. These handles now belong to each tool instance; stateful helpers use that instance's asynchronous scope, and event listeners capture their owning session explicitly. Events from an old closed page cannot enter the replacement page's diagnostics. Same-instance overlapping calls are rejected.
|
|
53
|
+
|
|
54
|
+
`cancel()` closes only the owned page/context/browser, waits for asynchronous cleanup, and prevents a late launch or completed request from becoming successful after Stop. Every layer receives cleanup even if another layer fails. Failed closure retains the affected handle for retry and returns failure. Playwright package/browser installation now uses the shared asynchronous argv process runner with the invocation signal and process-group cleanup. The visual-click lookup receives the same signal and checks cancellation before any DOM fallback or subsequent action; its backend cancellation is implemented in the coordinated vision repair.
|
|
55
|
+
|
|
56
|
+
Review also confirmed two synchronous screenshot conversion shell commands, including interpolation of caller-controlled output paths. Both use one bounded asynchronous Python argv/stdin helper now. Image bytes never enter shell or Python program text; cancellation cannot become a successful image fallback, and empty/non-JPEG conversion output preserves the original PNG instead of being labeled JPEG.
|
|
57
|
+
|
|
58
|
+
Focused verification: **40 tests passed across six suites** (`audio-generation-cancellation`, `audio-generate`, `playwright-browser-cancellation`, `playwright-browser-contract`, `playwright-browser-install`, `playwright-image-conversion`). Execution `tsc --noEmit` and scoped `git diff --check` passed. Browser tests use synthetic objects and conversion stubs; no browser, inference, network, or capture operation ran. Parent owns aggregate review/push. Nested Carbonyl signal wiring is a separate coordinated commit.
|
|
59
|
+
|
|
60
|
+
## Invocation and service-startup cancellation follow-up
|
|
61
|
+
|
|
62
|
+
Independent review found that cancelling startup returned without draining the newly spawned server, asynchronous spawn errors had no handler, repeated readiness probes could extend a nominal 60-second wait to roughly seven minutes, and cleanup addressed a mutable global child without establishing a private process group.
|
|
63
|
+
|
|
64
|
+
- A shared owned-service primitive now retains an immutable child handle, creates a private process group, handles asynchronous spawn failures, and enforces one absolute readiness deadline, including stalled probes. TERM escalates to KILL; an undrained process is reported explicitly. Any service-parent close also terminates the remaining owned group, including unexpected exit and synchronous TERM-close. Parent signal handlers are shared and removed after the final owned service closes.
|
|
65
|
+
- Browser startup has one shared launch promise with separate waiting owners. Cancelling one waiter preserves another waiter's startup; cancelling the final waiter drains only the child created by that launch. Ready shared services and incompatible external listeners are not terminated by an individual tool action.
|
|
66
|
+
- Browser and Carbonyl instances reject overlapping execution. Cancelled health probes retain the known browser session. Carbonyl cancellation reaches setup, Python workers, and its nested Playwright fallback. Browser vision-click passes the same owner signal through point discovery and does not dispatch a click after cancellation.
|
|
67
|
+
- Five browser/service suites passed **30 tests** after the visual-point regression; the broader combined follow-up run passed **87 tests across 13 suites**. Tests use mocked services/processes and synthetic inputs; explicit regressions cover both remaining-group cleanup cases requested in independent review. Execution typecheck and scoped diff checks passed.
|
|
68
|
+
|
|
69
|
+
Carbonyl nested cleanup receipt follow-up: a failed Playwright close now makes the fallback fail and retains the browser on the owning Carbonyl instance. Before admitting another action, that instance retries the retained cleanup; it clears the handle only after a successful close receipt. Cancellation preserves any cleanup error in the returned failure. The focused Carbonyl suite passed **3 tests**, including a failed close, blocked new work during retry failure, and successful ownership release.
|
|
70
|
+
|
|
71
|
+
## Repository closure — September 5
|
|
72
|
+
|
|
73
|
+
All confirmed findings and independent review follow-ups in this order are resolved. The [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger) records the final full suites and clean build. Earlier pending integration notes above are historical and superseded by this closure.
|
|
74
|
+
|
|
75
|
+
Scoped repair commits delivered to origin/main: 0d6dcc66, fe3c6487, 52cb2623, 484938c1, 72382afa, 4a072473. Publication and subsequent live acceptance remain with the user.
|
|
76
|
+
|
|
77
|
+
Source and integration locations:
|
|
78
|
+
|
|
79
|
+
- [packages/execution/src/tools/browser-action.ts](../../../packages/execution/src/tools/browser-action.ts)
|
|
80
|
+
- [packages/execution/src/tools/carbonyl-browser.ts](../../../packages/execution/src/tools/carbonyl-browser.ts)
|
|
81
|
+
- [packages/execution/src/tools/playwright-browser.ts](../../../packages/execution/src/tools/playwright-browser.ts)
|
|
82
|
+
- [packages/execution/src/tools/vision.ts](../../../packages/execution/src/tools/vision.ts)
|
|
83
|
+
- [packages/execution/src/owned-service-process.ts](../../../packages/execution/src/owned-service-process.ts)
|
|
84
|
+
- [packages/execution/src/process-async.ts](../../../packages/execution/src/process-async.ts)
|
|
85
|
+
|
|
86
|
+
The [point-localization cancellation follow-up](WO-37-point-localization-cancellation.md) closes the nested vision boundary under this same work order.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# WO-37 follow-up: Cancel the active point-localization client
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Parent:** [WO-37 browser and process lifecycle](WO-37-browser-and-process-lifecycle.md)
|
|
5
|
+
|
|
6
|
+
## Confirmed boundary
|
|
7
|
+
|
|
8
|
+
Browser visual clicks await `locateImagePoints`, which previously accepted no caller signal. Its Ollama requests used independent deadlines, its HF point worker and dependency setup blocked in synchronous subprocesses, and the Moondream 0.2 SDK exposes neither a signal nor the underlying HTTP request handle. Closing a browser could leave this work running and permit model fallback after cancellation.
|
|
9
|
+
|
|
10
|
+
## Repair
|
|
11
|
+
|
|
12
|
+
`LocateImagePointsOptions.signal` propagates through Station probing, Ollama generation and response-body waits, installed-model alias discovery, owned pull clients, and owned HF setup/inference processes. The shared process runner bounds output and terminates only each created process group. Abort bypasses candidate fallback and does not mark a model permanently unavailable. HF admission and worker cleanup release their exact lease, including admission that arrives after the caller has stopped. Cancellation during lease release cannot return stale coordinates.
|
|
13
|
+
|
|
14
|
+
The SDK wait is bounded and reports an `AbortError` explaining that its underlying shared operation may continue. The runtime does not kill the shared model/server or alter the cached client to simulate cancellation. Late SDK settlement is observed but cannot publish a result or trigger another backend. Browser owners separately pass their active signal and check cancellation before local fallback or clicking.
|
|
15
|
+
|
|
16
|
+
## Verification
|
|
17
|
+
|
|
18
|
+
Hermetic coverage includes pre-dispatch abort, SDK abort/deadline, stalled HTTP headers/body/alias lookup, HF setup interruption, termination of a synthetic Node worker and a synthetic pull client, temporary-image cleanup, late broker admission, recovery without unavailable-cache poisoning, and cancellation during lease release. Existing vision, HF, desktop-click, and vision-action-loop tests remain covered. Logs: `/tmp/omnius-vision-cancel-final.log` and `/tmp/omnius-vision-cancel-types.log`.
|
|
19
|
+
|
|
20
|
+
Final verification: **79 tests passed across five suites**, including 11 new cancellation cases. Execution `tsc --noEmit` and scoped `git diff --check` passed. Final review checked fallback catches, late admission/release, shared-client behavior, and owned process cleanup; the lease-release race found during review is covered by the final regression.
|
|
21
|
+
|
|
22
|
+
Only synthetic child JavaScript and mocked HTTP/SDK/broker results are used. No Python model code, live inference, GPU workload, Telegram request, service restart, or publication is performed. Orchestrator source remains frozen and outside this follow-up.
|
|
23
|
+
|
|
24
|
+
Repository closure: delivered in 72382afa to origin/main. The final execution aggregate includes these cases; see the [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger). Source locations are [vision.ts](../../../packages/execution/src/tools/vision.ts), [browser-action.ts](../../../packages/execution/src/tools/browser-action.ts) and [playwright-browser.ts](../../../packages/execution/src/tools/playwright-browser.ts). Publication and live acceptance remain with the user.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# WO-38: Preserve tool contracts across adapters and policy resolution
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Priority:** P1
|
|
5
|
+
**Date:** 2026-09-05 PDT
|
|
6
|
+
|
|
7
|
+
## Observed defects
|
|
8
|
+
|
|
9
|
+
The execution-to-runner adapter discarded `alreadyApplied`,
|
|
10
|
+
`artifactMaterialization`, `documentExtraction`, and `runtimeSession` while
|
|
11
|
+
retaining the success flag. A real already-applied file edit lost its receipt;
|
|
12
|
+
a missing native PDF lost its `not_found` extraction outcome. Partial output
|
|
13
|
+
could consequently pass the runner's canonical-receipt exclusion, and browser
|
|
14
|
+
session changes lost their explicit boundary event.
|
|
15
|
+
|
|
16
|
+
Telegram policy resolution returned shared default allowlist sets. Resolving
|
|
17
|
+
one configuration expanded later policy resolutions without that configuration.
|
|
18
|
+
Blocking an advertised alias also failed to block its canonical tool.
|
|
19
|
+
|
|
20
|
+
The runner separately validated Zod input and discarded the parsed value.
|
|
21
|
+
For `{ count: '3', extra: 'strip' }`, a schema coercing count, defaulting mode,
|
|
22
|
+
and stripping unknown fields still executed the original input.
|
|
23
|
+
|
|
24
|
+
## Scope and implementation
|
|
25
|
+
|
|
26
|
+
- Preserve structured result receipts in both direct and streaming adaptation.
|
|
27
|
+
- Give each policy resolution independent sets; honor blocked advertised aliases.
|
|
28
|
+
- Pass parsed runner input consistently to execution, custom validation,
|
|
29
|
+
fingerprints, concurrency metadata, and path/mutation guards. A transformed
|
|
30
|
+
path must not bypass a guard previously applied to an untransformed path.
|
|
31
|
+
- Keep permissive admin filesystem access and existing public/group restrictions.
|
|
32
|
+
|
|
33
|
+
## Verification
|
|
34
|
+
|
|
35
|
+
Hermetic audit reproduced the first two concrete native-tool losses, policy
|
|
36
|
+
cross-call leakage, and discarded schema defaults/coercion with zero network
|
|
37
|
+
attempts. Fixtures contain synthetic content and live only in temporary dirs.
|
|
38
|
+
|
|
39
|
+
Regression coverage: `packages/cli/tests/tool-contract-preservation.test.ts`
|
|
40
|
+
checks native edit/PDF results, canonical exclusion of partial results through
|
|
41
|
+
both stream and direct adapters, browser-session event generation, policy
|
|
42
|
+
isolation, and advertised alias blocking. Existing adapter-binding and Telegram
|
|
43
|
+
media suites must remain green. Runner evidence is recorded by the parent.
|
|
44
|
+
|
|
45
|
+
- 2026-09-05: **55 tests passed** across tool-contract-preservation (9),
|
|
46
|
+
tool-adapter-binding (2), telegram-admin-media-aliases (33), and
|
|
47
|
+
telegram-public-media (11), with the CLI hermetic network boundary active.
|
|
48
|
+
- CLI `tsc --noEmit` and scoped `git diff --check` passed.
|
|
49
|
+
- Runner preparation now occurs before response deduplication, concurrency
|
|
50
|
+
classification, guards, and dispatch. Each native call retains its parsed
|
|
51
|
+
object so non-idempotent transformations are not repeated at execution.
|
|
52
|
+
Direct API, voice-relay, and model-text calls execute parsed objects too.
|
|
53
|
+
- Runner regression: **206 tests passed** across `tool-schema-execution` (7),
|
|
54
|
+
`agenticRunner` (175), and `agenticRunner-context-behavior` (24). Coverage
|
|
55
|
+
includes custom validation, concurrency metadata, normalized fingerprints,
|
|
56
|
+
rejection of non-object transform output, and a transformed path rejected by
|
|
57
|
+
the existing overwrite guard with the user fixture unchanged.
|
|
58
|
+
- Orchestrator `tsc --noEmit` and scoped `git diff --check` passed.
|
|
59
|
+
|
|
60
|
+
## Delivery boundary
|
|
61
|
+
|
|
62
|
+
Scoped source/test/document commits only. No publication, live inference,
|
|
63
|
+
Telegram requests, service restart, or runtime-state repair in this order.
|
|
64
|
+
|
|
65
|
+
## Streaming wrapper and integration review
|
|
66
|
+
|
|
67
|
+
Native streaming previously bypassed the adapter's execution wrapper, allowing middleware admission or result transformation to be skipped. Streaming now runs inside that same wrapper and relays native chunks through a single pending slot. Backpressure prevents unbounded buffering. Wrapper failure remains authoritative after streamed progress, and wrapper timeout or consumer closure cancels and drains the owned native generator.
|
|
68
|
+
|
|
69
|
+
Independent review reproduced two cleanup defects in the initial relay: asynchronous generator cleanup could outlive consumer close, and wrapper failure could leave the producer running. Both are repaired and covered by tool-adapter-stream-lifecycle.test.ts. All 62 tests across five adapter/Telegram media suites passed in /tmp/omnius-wo38-wrapper.log. Native method binding, live shell chunks, process receipts, partial materialization, admission refusal and post-invocation failure are covered.
|
|
70
|
+
|
|
71
|
+
The native edit fixture now expects a proven no-op only when the exact old anchor is present. Missing anchors remain failures even when replacement text occurs elsewhere. A synthetic idempotent receipt separately verifies alreadyApplied propagation; this preserves WO-33's removal of unsafe inferred edit success.
|
|
72
|
+
|
|
73
|
+
## Repository closure — September 5
|
|
74
|
+
|
|
75
|
+
All confirmed findings and independent review follow-ups in this order are resolved. The [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger) records the final full suites and clean build. Earlier pending integration notes above are historical and superseded by this closure.
|
|
76
|
+
|
|
77
|
+
Scoped repair commits delivered to origin/main: e4598f71, cae592bc, 48fd2410. Publication and subsequent live acceptance remain with the user.
|
|
78
|
+
|
|
79
|
+
Source and integration locations:
|
|
80
|
+
|
|
81
|
+
- [packages/cli/src/tui/tool-adapter.ts](../../../packages/cli/src/tui/tool-adapter.ts)
|
|
82
|
+
- [packages/cli/src/tui/tool-policy.ts](../../../packages/cli/src/tui/tool-policy.ts)
|
|
83
|
+
- [packages/orchestrator/src/agenticRunner.ts](../../../packages/orchestrator/src/agenticRunner.ts)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# WO-39: Keep Telegram's working indicator alive through active work
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Priority:** P1
|
|
5
|
+
**Date:** 2026-09-05 PDT
|
|
6
|
+
|
|
7
|
+
## Requirement and root cause
|
|
8
|
+
|
|
9
|
+
The user requires a visible working indicator throughout background work in
|
|
10
|
+
Telegram DMs and public/private groups. All three private reply paths cleared
|
|
11
|
+
their typing interval when the first native draft was acknowledged. A following
|
|
12
|
+
silent tool call or unchanged draft had no refresh, so Telegram's short-lived
|
|
13
|
+
typing action expired while work continued. Group paths already used recurring
|
|
14
|
+
typing, but shutdown could not directly reach a quick-chat timer once that timer
|
|
15
|
+
had transferred out of the staging map.
|
|
16
|
+
|
|
17
|
+
An initial transient typing failure also returned permission to continue
|
|
18
|
+
without creating a refresh timer, leaving admitted media/context preparation
|
|
19
|
+
without its working heartbeat.
|
|
20
|
+
|
|
21
|
+
## Implementation
|
|
22
|
+
|
|
23
|
+
- Keep one run-owned 3-second heartbeat through media preparation, model/tool
|
|
24
|
+
work, native previews, and final delivery. Native draft success never retires
|
|
25
|
+
that heartbeat; terminal reply cleanup does.
|
|
26
|
+
- Track active timer cleanups after staging transfers, attach the admitted
|
|
27
|
+
work's cancellation signal, and clear every active lease on bridge shutdown.
|
|
28
|
+
Cleanup removes both the timer and its abort listener.
|
|
29
|
+
- Reject late initial acknowledgements from cancelled/replaced work; continue
|
|
30
|
+
refreshing after transient failures. Preserve permanent write refusals and
|
|
31
|
+
reply authorization before visible activity.
|
|
32
|
+
- Coalesce refresh ticks while one transport call remains in flight and reuse
|
|
33
|
+
an active runner's lease when steering arrives.
|
|
34
|
+
- Space native drafts at 1.2 seconds so draft updates and 3-second heartbeats
|
|
35
|
+
fit together within the existing shared 40-per-30-second typing budget.
|
|
36
|
+
- Preserve numeric DM/group/topic routing and guest-query exclusions.
|
|
37
|
+
|
|
38
|
+
Timers express an admitted live process's ownership; they are not persisted or
|
|
39
|
+
revived for stale runs after restart. Visible refresh still depends on Telegram
|
|
40
|
+
accepting the API request and a responsive process/transport.
|
|
41
|
+
|
|
42
|
+
## Verification
|
|
43
|
+
|
|
44
|
+
`packages/cli/tests/telegram-working-indicator.test.ts` exercises the real task,
|
|
45
|
+
admin-chat, and quick-chat reply handlers with mocked inference/tool work and
|
|
46
|
+
mocked Telegram API responses. It verifies successful first drafts followed by
|
|
47
|
+
18 seconds of silence, delayed final delivery, public/private groups and topics,
|
|
48
|
+
media preparation, cancellation/shutdown before completion settles, late
|
|
49
|
+
acknowledgements, transient failures, coalescing, steering, and shared budget.
|
|
50
|
+
|
|
51
|
+
- **220 tests passed** across eight suites: working-indicator, transport-contract,
|
|
52
|
+
attention-evidence, api-governor, write-capability, bridge-lifecycle,
|
|
53
|
+
lifecycle-leak, and bot-api-10.
|
|
54
|
+
- After adding explicit permanent-refusal ownership cleanup and generation
|
|
55
|
+
failure coverage, **76 tests passed** across six affected transport/lifecycle
|
|
56
|
+
suites, including all **17 working-indicator tests**.
|
|
57
|
+
- CLI `tsc --noEmit` and scoped `git diff --check` passed. All tests use the
|
|
58
|
+
CLI hermetic network boundary and synthetic temporary workspaces.
|
|
59
|
+
|
|
60
|
+
## Delivery boundary
|
|
61
|
+
|
|
62
|
+
Scoped source/test/document commit only. No real Telegram requests, inference,
|
|
63
|
+
publication, service restart, or mutation of the running Telegram workspace.
|
|
64
|
+
|
|
65
|
+
Final ownership review also routed queue-retirement cleanup through the shared typing lease cleanup, releasing its abort listener and ownership-map entry as well as the interval. All 56 tests across working-indicator, write-capability, bridge-lifecycle, and lifecycle-leak passed; /tmp/omnius-wo39-cleanup.log. The documented cadence now matches the implemented three seconds.
|
|
66
|
+
|
|
67
|
+
## Repository closure — September 5
|
|
68
|
+
|
|
69
|
+
All confirmed findings and independent review follow-ups in this order are resolved. The [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger) records the final full suites and clean build. Earlier pending integration notes above are historical and superseded by this closure.
|
|
70
|
+
|
|
71
|
+
Scoped repair commits delivered to origin/main: 53216239, c17ae247. Publication and subsequent live acceptance remain with the user.
|
|
72
|
+
|
|
73
|
+
Source and integration locations:
|
|
74
|
+
|
|
75
|
+
- [packages/cli/src/tui/telegram-bridge.ts](../../../packages/cli/src/tui/telegram-bridge.ts)
|
|
76
|
+
- [packages/cli/tests/telegram-working-indicator.test.ts](../../../packages/cli/tests/telegram-working-indicator.test.ts)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# WO-40: Preserve retrieved content and validate crawler responses
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Priority:** P1
|
|
5
|
+
**Date:** 2026-09-05
|
|
6
|
+
|
|
7
|
+
## Reproduced failures
|
|
8
|
+
|
|
9
|
+
- `web_fetch` strips HTML from every MIME type. A plain-text comparison becomes
|
|
10
|
+
different code, and JSON containing `<Widget />` loses that value. Short
|
|
11
|
+
plain text also produces misleading advice that JavaScript rendering is needed.
|
|
12
|
+
- `web_crawl` reports success for exit-zero workers emitting empty or malformed
|
|
13
|
+
output instead of the promised result JSON.
|
|
14
|
+
|
|
15
|
+
## Repair and acceptance
|
|
16
|
+
|
|
17
|
+
- Strip markup only from declared HTML/XHTML; preserve other textual bodies,
|
|
18
|
+
whitespace, and characters in both fresh responses and cached retrievals.
|
|
19
|
+
- Apply the requested output limit before any short-page hint.
|
|
20
|
+
- Require a successful, structurally valid crawler payload and retrieved pages;
|
|
21
|
+
malformed worker output is an execution diagnostic, not source evidence.
|
|
22
|
+
- Bound crawler numeric options and preserve existing network egress policy.
|
|
23
|
+
- Verify with mocked fetch/process boundaries; no live requests or services.
|
|
24
|
+
|
|
25
|
+
## Verification
|
|
26
|
+
|
|
27
|
+
- `pnpm exec vitest run tests/web-fetch.test.ts tests/web-crawl-contract.test.ts tests/web-download.test.ts tests/web-search.test.ts`
|
|
28
|
+
from `packages/execution`: **45 passed**.
|
|
29
|
+
- `pnpm exec tsc --noEmit` from `packages/execution`: passed.
|
|
30
|
+
- Fetch regressions preserve comparisons, JSX, whitespace, and JSON on fresh
|
|
31
|
+
and cached reads. Crawl regressions reject empty, malformed, zero-page and
|
|
32
|
+
contradictory worker outcomes while retaining valid attribution.
|
|
33
|
+
- Parent owns integration and push; publication is excluded.
|
|
34
|
+
|
|
35
|
+
## Repository closure — September 5
|
|
36
|
+
|
|
37
|
+
All confirmed findings and independent review follow-ups in this order are resolved. The [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger) records the final full suites and clean build. Earlier pending integration notes above are historical and superseded by this closure.
|
|
38
|
+
|
|
39
|
+
Scoped repair commits delivered to origin/main: 9f96cfcb. Publication and subsequent live acceptance remain with the user.
|
|
40
|
+
|
|
41
|
+
Source and integration locations:
|
|
42
|
+
|
|
43
|
+
- [packages/execution/src/tools/web-fetch.ts](../../../packages/execution/src/tools/web-fetch.ts)
|
|
44
|
+
- [packages/execution/src/tools/web-crawl.ts](../../../packages/execution/src/tools/web-crawl.ts)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# WO-41: Expose verification coverage and preserve typed completion authority
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Priority:** P1
|
|
5
|
+
**Program:** [September 5 follow-up](TOOL-QUALITY-2026-09-05.md)
|
|
6
|
+
|
|
7
|
+
## Observed failure and architecture boundary
|
|
8
|
+
|
|
9
|
+
The monitored 1.0.695 run ended at 00:58:09 PDT on September 5. Its terminal record has status=completed and completionDisposition=ready, while ledgerStatus=incomplete_verification and the ledger contains verification_missing after two code mutations. Several check commands ended with a reporting echo; their final shell status alone cannot establish the check's success.
|
|
10
|
+
|
|
11
|
+
Completion obligations and observed verification coverage are separate dimensions. A generic mutation does not create a mandatory verifier requirement. Explicit expected-outcome, todo, workboard, or configured verifier requirements govern readiness. Prose claims and critic assertions do not manufacture completion obligations. The repair must make coverage visible without restoring a generic completion veto.
|
|
12
|
+
|
|
13
|
+
## Code repair
|
|
14
|
+
|
|
15
|
+
- packages/orchestrator/src/completionLedger.ts: derive stable observed verification facts from execution evidence, separately from the authority projection. Preserve negative typed receipts even when a wrapper reports success; only later matching successful verification discharges the failure.
|
|
16
|
+
- packages/orchestrator/src/completionFinalization.ts: persist verificationAudit status and gaps independently of terminal disposition; reject a completed record when supplied readiness explicitly denies successful completion.
|
|
17
|
+
- packages/orchestrator/src/agenticRunner.ts: expose audit coverage in terminal receipt text and preserve the existing explicit-obligation authority projection. Reconcile expected-outcome verification assessment with typed readiness facts.
|
|
18
|
+
- packages/orchestrator/tests/completion-observed-authority.test.ts: exercise real runner admission and finalization using mocked mutation/check tools, including masked shell success, explicit verifier obligations, and generic mutation without a mandatory verifier.
|
|
19
|
+
|
|
20
|
+
## Acceptance
|
|
21
|
+
|
|
22
|
+
- [x] Generic mutation without an explicit verifier may complete while retaining an unverified audit.
|
|
23
|
+
- [x] Missing or masked verification cannot satisfy an explicitly required verifier.
|
|
24
|
+
- [x] A fresh successful assertion-bearing check satisfies the corresponding typed expected effect.
|
|
25
|
+
- [x] Speculative prose claims and controller bookkeeping do not manufacture coverage gaps.
|
|
26
|
+
- [x] Later failed/timed-out/negative declared verification remains observable despite a positive wrapper result.
|
|
27
|
+
- [x] Focused and aggregate regression suites, independent review, clean build, scoped commits and delivery recorded.
|
|
28
|
+
|
|
29
|
+
## Verification and delivery
|
|
30
|
+
|
|
31
|
+
All reproductions use temporary state and mocked inference. Live workspace, installed package, and publication are outside this repair's execution boundary. Aggregate results and final delivery references are recorded in the program workorder.
|
|
32
|
+
|
|
33
|
+
Focused verification: 48 tests passed across observed completion authority, completion ledger, finalization, and readiness. The production cases cover explicit requirements versus generic audit coverage. Broader architecture regressions: 234 passed; two remaining context-admission failures belong to WO-31 and are tracked separately. Logs: /tmp/omnius-wo41-revised.log and /tmp/omnius-tool-quality-regressions.log.
|
|
34
|
+
|
|
35
|
+
## Repository closure — September 5
|
|
36
|
+
|
|
37
|
+
All confirmed findings and independent review follow-ups in this order are resolved. The [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger) records the final full suites and clean build. Earlier pending integration notes above are historical and superseded by this closure.
|
|
38
|
+
|
|
39
|
+
Scoped repair commits delivered to origin/main: 6ee251c3. Publication and subsequent live acceptance remain with the user.
|
|
40
|
+
|
|
41
|
+
Source and integration locations:
|
|
42
|
+
|
|
43
|
+
- [packages/orchestrator/src/completionLedger.ts](../../../packages/orchestrator/src/completionLedger.ts)
|
|
44
|
+
- [packages/orchestrator/src/completionFinalization.ts](../../../packages/orchestrator/src/completionFinalization.ts)
|
|
45
|
+
- [packages/orchestrator/src/agenticRunner.ts](../../../packages/orchestrator/src/agenticRunner.ts)
|
package/docs/work-orders/runtime-health-remediation/WO-42-media-execution-and-configuration.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# WO-42: Media execution and configuration boundaries
|
|
2
|
+
|
|
3
|
+
**Status:** complete in repository; verified for user publication
|
|
4
|
+
**Priority:** P1
|
|
5
|
+
|
|
6
|
+
## Confirmed problems
|
|
7
|
+
|
|
8
|
+
- Microphone capture joins device/output arguments into synchronous shell commands. Shell metacharacters are executable, paths with spaces split, and a recording blocks the event loop for its requested duration. Recording is intentionally finite (up to 300 seconds); its deadline must allow that duration rather than impose an unrelated short limit.
|
|
9
|
+
- Transcription temporarily assigns the entire environment around an awaited shared Node bridge, and permanently assigns its Python/PATH selection. A hermetic overlapping-call reproduction observed request A using B's environment, request B using the parent's environment, and the parent left with A's environment.
|
|
10
|
+
- ComfyUI HTTP deadlines end when headers arrive. A hermetic headers-only response left the body pending beyond the configured deadline with its signal un-aborted. Video mux/thumbnail subprocesses have no deadline, output bound, or termination escalation.
|
|
11
|
+
- Web search advertises fully on-device execution while submitting queries to DuckDuckGo.
|
|
12
|
+
|
|
13
|
+
## Accepted repair
|
|
14
|
+
|
|
15
|
+
Use argument-vector asynchronous capture with duration-aware deadlines, cancellation, typed arguments and actual output validation. Keep interpreter/device configuration in a dedicated transcription child process, including bridge shutdown and bounded process lifetime. Keep Comfy response consumption inside its deadline with bounded bodies, and reuse the shared process lifecycle for video postprocessing. Describe search's network destination truthfully.
|
|
16
|
+
|
|
17
|
+
## Verification and scope
|
|
18
|
+
|
|
19
|
+
Use stubbed child processes, fake response bodies and temporary synthetic modules/files only. Do not capture live audio, perform inference, send network traffic, start services, or alter the installed runtime. Record focused test/typecheck results and scoped delivery below.
|
|
20
|
+
|
|
21
|
+
## Implementation and verification ledger
|
|
22
|
+
|
|
23
|
+
- Capture now supplies literal argv to asynchronous processes, including Pulse devices advertised by enumeration. Deadlines include the requested recording duration plus five seconds; cancellation reaches the shared process-group termination/escalation boundary. Numeric inputs are validated before dispatch. Fresh staging output is required before replacing the final recording; failed/empty captures preserve existing output and do not request ingestion. Level sampling removes temporary files and rejects empty/incomplete PCM. Enumeration distinguishes unavailable probes from a successful empty list.
|
|
24
|
+
- Transcribe-cli is resolved without importing its bridge into the parent. A dedicated Node worker receives a copied environment with its selected interpreter and device configuration, writes a typed result payload, shuts its bridge down, and is bounded to five minutes with process-group cleanup. Synthetic concurrent child modules prove both environment selections remain private and the parent's interpreter/PATH stay unchanged.
|
|
25
|
+
- Comfy response deadlines cover headers, success/error body consumption and cancellation. JSON bodies and downloaded video sizes are bounded; missing prompt IDs and empty video downloads fail explicitly. Mux and thumbnail processes have 120-second/30-second deadlines, bounded output and termination escalation; a late zero exit cannot erase a timeout.
|
|
26
|
+
- Search descriptions now disclose that queries are sent to DuckDuckGo over the network.
|
|
27
|
+
|
|
28
|
+
Before-repair hermetic reproductions captured the unquoted synchronous shell command, observed A/B/parent environment cross-contamination, and proved a Comfy headers-only response clears its deadline before body completion. No shell metacharacters were executed and no real capture, inference, network request or service launch occurred.
|
|
29
|
+
|
|
30
|
+
Focused verification: 81 tests passed across audio-capture-lifecycle, transcribe-cli-worker, comfy-response-lifecycle, media-worker-lifecycle, video-generate, transcribe-tool-artifacts, transcribe-python-runtime and web-search. Execution package `tsc --noEmit` and scoped `git diff --check` passed. New worker tests execute only temporary synthetic JavaScript modules, never Python or model code. The parent coordinates aggregate review and pushing the scoped commit.
|
|
31
|
+
|
|
32
|
+
## Nested audio generation Stop follow-up
|
|
33
|
+
|
|
34
|
+
Video's optional audio generation used `AudioGenerateTool`, which had no cancellation hook and a separate worker implementation that returned on timeout before its child had drained. Audio generation now owns an invocation controller and exposes `cancel()`. The signal reaches Python import/runtime compatibility probes, environment creation, package installation, prewarm, and generation. The shared process runner bounds output, terminates the owned process group, escalates resistant workers, and waits for closure. A timeout or output overflow stays a failure even when shutdown exits zero.
|
|
35
|
+
|
|
36
|
+
The same controller remains active through resource admission and lease release. Stop ends both generation/prewarm fallback ladders, releases an admission that completes after cancellation, and prevents another worker from starting. A second call on the same tool instance is rejected while this cleanup is pending. Existing deadline/download-stall fallback behavior is retained for ordinary backend failures; user cancellation ends the invocation.
|
|
37
|
+
|
|
38
|
+
Focused verification: **40 tests passed across six audio/Playwright suites**, including real synthetic Node workers that resist TERM (never Python/model workers), pre-aborted dispatch, zero-exit overflow, both canceled fallback ladders, delayed admission cleanup, browser isolation, and screenshot conversion boundaries. Execution `tsc --noEmit` and scoped `git diff --check` passed. Parent owns aggregate review/push; VideoGenerateTool's nested signal binding is delivered separately by its owner.
|
|
39
|
+
|
|
40
|
+
## Invocation cancellation follow-up
|
|
41
|
+
|
|
42
|
+
Independent review found that several bounded worker helpers accepted an abort signal while their tool entrypoints never supplied one. Stop therefore did not reach an isolated transcription process, a video worker, or Comfy polling.
|
|
43
|
+
|
|
44
|
+
- File and URL transcription now own an invocation controller, reject overlapping use of the same instance, propagate cancellation through interpreter selection, package commands, isolated bridge/CLI/managed workers, URL body consumption and nested transcription, and prevent fallback dispatch after cancellation. Temporary URL inputs use a UUID to keep cleanup scoped to their owner.
|
|
45
|
+
- Video cancellation reaches Diffusers setup/import/install/generation, ffmpeg mux/thumbnail work, Comfy startup/request/body/polling, and nested audio generation. Cancelled candidate attempts release their broker lease and do not start the next model. A completed video remains in the mutation receipt when later audio work is cancelled.
|
|
46
|
+
- The shared process runner refuses already-aborted requests before spawn. Newly created Comfy services reuse the owned-service startup primitive; startup cancellation and failure drain only their owned process group.
|
|
47
|
+
- Cancellation of a client request does **not** establish cancellation of a workflow already accepted by an external/shared Comfy server. No global interrupt or service-wide kill is issued. If submission may have reached that server, the cancellation result states that server work may continue. This preserves other clients' ownership.
|
|
48
|
+
|
|
49
|
+
Verification: **87 tests passed across 13 combined browser/media suites**; the final URL download and nested-worker regressions expanded transcription invocation coverage to **4 passing tests**. Execution typecheck and scoped diff checks passed. Tests use mocked transport/processes and temporary synthetic JavaScript modules; no Python/model execution, live services, network downloads or publication occurred.
|
|
50
|
+
|
|
51
|
+
## Managed Whisper synchronous preparation closure
|
|
52
|
+
|
|
53
|
+
The final review found that managed Whisper still called `ensureCudaPythonVenvSync` on the daemon thread before its readiness check. That unchanged CUDA helper can perform synchronous 60-second probes, 120-second venv creation and 20-minute package installations. An AbortSignal checked around that call cannot be delivered while the event loop is blocked.
|
|
54
|
+
|
|
55
|
+
Managed Whisper now invokes the exact existing preparation module in an owned asynchronous Node child. Its copied environment preserves CUDA selection and preparation policy; options travel through stdin, and the child/descendant process group is bounded and canceled through `runProcessBuffer`. The result receipt contains only the interpreter and protected-Torch pip constraint. The parent reconstructs the environment locally, validates the receipt, preserves bounded setup failure diagnostics, and checks Stop before any subsequent import, package install or inference. No CUDA policy or broker rule was rewritten.
|
|
56
|
+
|
|
57
|
+
Verification: **27 tests passed across five transcription suites**, including a synthetic preparation module blocked in synchronous work while the parent timer delivers Stop, worker drain, pre-aborted dispatch, a preparation deadline, configuration preservation, failure receipts and the real `TranscribeFileTool` cancellation boundary. Execution typecheck and scoped diff checks passed. Temporary bundled-helper fixtures independently verified default sibling-module resolution for both `execution/dist/transcribe-cuda-preparation.js` and published `dist/index.js`.
|
|
58
|
+
|
|
59
|
+
The parent added the standalone `python-cuda-runtime.js` publish entry and both artifact audits. Its actual build configuration produced a 20,494-byte temporary module exporting the preparation function without invoking it or emitting a sourcemap; all 16 publish-policy tests passed (`/tmp/omnius-cuda-worker-package.log`, `/tmp/omnius-cuda-worker-package-tests.log`). Packaging changes are committed separately by the parent. No live Python/CUDA preparation, model loading, network request, installed runtime change or modification of the dirty publish staging directory occurred during this verification.
|
|
60
|
+
|
|
61
|
+
## Repository closure — September 5
|
|
62
|
+
|
|
63
|
+
All confirmed findings and independent review follow-ups in this order are resolved. The [program verification ledger](TOOL-QUALITY-2026-09-05.md#verification-ledger) records the final full suites and clean build. Earlier pending integration notes above are historical and superseded by this closure.
|
|
64
|
+
|
|
65
|
+
Scoped repair commits delivered to origin/main: 7bc9106d, 52cb2623, b82f88a9, ed341587, 793c5302. Publication and subsequent live acceptance remain with the user.
|
|
66
|
+
|
|
67
|
+
Source and integration locations:
|
|
68
|
+
|
|
69
|
+
- [packages/execution/src/tools/audio-capture.ts](../../../packages/execution/src/tools/audio-capture.ts)
|
|
70
|
+
- [packages/execution/src/tools/audio-generate.ts](../../../packages/execution/src/tools/audio-generate.ts)
|
|
71
|
+
- [packages/execution/src/tools/transcribe-tool.ts](../../../packages/execution/src/tools/transcribe-tool.ts)
|
|
72
|
+
- [packages/execution/src/tools/video-generate.ts](../../../packages/execution/src/tools/video-generate.ts)
|
|
73
|
+
- [packages/execution/src/tools/web-search.ts](../../../packages/execution/src/tools/web-search.ts)
|
|
74
|
+
- [packages/execution/src/transcribe-cli-worker.ts](../../../packages/execution/src/transcribe-cli-worker.ts)
|
|
75
|
+
- [packages/execution/src/transcribe-cuda-preparation.ts](../../../packages/execution/src/transcribe-cuda-preparation.ts)
|
|
76
|
+
- [packages/execution/src/transcribe-python-runtime.ts](../../../packages/execution/src/transcribe-python-runtime.ts)
|
|
77
|
+
- [scripts/build-publish.mjs](../../../scripts/build-publish.mjs)
|
|
78
|
+
- [scripts/audit-publish-artifacts.mjs](../../../scripts/audit-publish-artifacts.mjs)
|
|
79
|
+
- [scripts/tarball-audit.mjs](../../../scripts/tarball-audit.mjs)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.696",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.696",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
|
@@ -5161,9 +5161,9 @@
|
|
|
5161
5161
|
}
|
|
5162
5162
|
},
|
|
5163
5163
|
"node_modules/jose": {
|
|
5164
|
-
"version": "6.2.
|
|
5165
|
-
"resolved": "https://registry.npmjs.org/jose/-/jose-6.2.
|
|
5166
|
-
"integrity": "sha512-
|
|
5164
|
+
"version": "6.2.12",
|
|
5165
|
+
"resolved": "https://registry.npmjs.org/jose/-/jose-6.2.12.tgz",
|
|
5166
|
+
"integrity": "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw==",
|
|
5167
5167
|
"license": "MIT",
|
|
5168
5168
|
"funding": {
|
|
5169
5169
|
"url": "https://github.com/sponsors/panva"
|
package/package.json
CHANGED