OpenProgram Docs

Self-update verification plans

self_update(action="prepare") takes an optional verification_plan, included in the owner approval and stored with the immutable request. Omitting it keeps the HTTP-only verifier and grants nothing new.

{"schema":1,"checks":[{"id":"diagnostics","assertion_id":"acceptance-1","entry":"/api/diagnostics","timeout_seconds":10,"max_output_bytes":65536}]}
FieldRule
schemaInteger 1
checks1–32, exactly one per assertion (acceptance-1, acceptance-2, …)
idUnique, letters, digits, underscore, hyphen; starts alphanumeric; at most 64 characters
timeout_secondsInteger 1–60
max_output_bytesInteger 1–262144; 1–1572864 for ui:main
entry/api/commands, /api/diagnostics, /api/doctor, /healthz, /chat, an installed docs page such as /docs/install/upgrade.html, cli:version, cli:help, test:python, ui:main

Every field is required. Arbitrary URLs, query strings and unknown fields are rejected before the update is created.

How checks run

AspectRule
Verifier callself_update_observe(check_id="diagnostics"), with no entry or execution arguments. The execution layer applies the approved limits and the original overall deadline. Signed evidence must match the check and assertion.
ModelsAny conversational model. Without native structured output the answer is still checked against the stage's schema; a failed check makes the verdict inconclusive and the update rolls back. A request ending with no outcome stops the stage at once.
JobsVerification, diagnosis and repair get the same plan, iteration policy and attempt timeout. A repaired child keeps goal, assertions, check IDs, limits, model and authority, and cannot refresh the deadline. Diagnosis and repair keep only their read tools.

cli:version, cli:help

AspectRule
RunsThe installed App's Python with -I -B -m openprogram and --version or --help; never a model-supplied command or PATH lookup.
NeedsThe native sandbox, a compatible runtime manifest and matching package and App build-revision markers.
AccessPrivate temporary directories; no network, no App or source writes, no owner-home reads outside required runtime and scratch paths.
ProcessesSingle process: the sandbox denies process creation, including detached subprocesses, fork and posix_spawn. Also for test:python; not for source-repair tests or builds.
EvidenceBinds runtime identity, invocation and exit status. Nonzero exit, timeout, cancellation, changed identity, excess output or failed cleanup cannot pass. Proves startup and help only.

test:python

{"id":"source-test","assertion_id":"acceptance-1","entry":"test:python","argv":["tests/verify_feature.py","expected"],"timeout_seconds":30,"max_output_bytes":65536}
AspectRule
argv1–32 strings, at most 4096 characters, no NUL. Required only for this entry
First itemCommitted regular .py file relative to the candidate root; no symlink, absolute path, parent traversal or interpreter option. Starts with an ASCII letter, digit or underscore, then letters, digits, underscore, slash, dot or hyphen, at most 511 characters
Other itemsLiteral arguments approved up front
Runs asInstalled candidate Python, -I -B SCRIPT ARGS, from the registered worktree root. Isolated mode does not add that root to the import path; a test importing candidate code must do so itself
AccessRegistered candidate path readable even under HOME, read-only; other owner-home data not. Temporary data in the private TMPDIR or HOME. No dependencies installed. The CLI limits above apply
EvidenceMissing, dirty or unregistered source or a changed script blocks verification. Records source revision, script digest and invocation. A candidate_test result proves source-test execution, not installed-App behavior

ui:main

{"id":"main-capture","assertion_id":"acceptance-1","entry":"ui:main","timeout_seconds":30,"max_output_bytes":1048576}
{"id":"scroll-history","assertion_id":"acceptance-1","entry":"ui:main","timeout_seconds":30,"max_output_bytes":1048576,"interaction":{"kind":"scroll","delta_y":-400}}
{"id":"context-view","assertion_id":"acceptance-1","entry":"ui:main","timeout_seconds":30,"max_output_bytes":1048576,"interaction":{"kind":"view","target":"dag"}}
UI protocolCapabilityRule
1CaptureRead-only PNG and accessibility tree of the original session's main window
2Capture after scrolldelta_y: nonzero integer, −1200 to 1200 CSS pixels; always the original conversation; no selector or script
3Perspectivetarget: exactly session or dag
4Readable for rollback onlytest_object plans and requests are rejected; new packages advertise only the three above

Both candidate and rollback packages need the protocol, with matching capture, backend and frontend bindings, before installation.

AspectRule
NeedsA packaged UI-verification descriptor, runtime identity and exactly one connected main Desktop window. Older packages cannot use this plan.
OutputThe verifier gets the image and tree, not a path. The limit covers the whole capture JSON with base64 data. PNGs are non-interlaced 8-bit RGB or RGBA, at most 16384 per side and 32 million pixels.
ModelMust declare image input. Preparation rejects text-only models; restart recovery and queued Jobs check again; lost support records an error rather than running text-only.
Bound toThe active Job, candidate revision, worker, session route and main-window connection.
Fails onExpired, cancelled, replayed or mismatched requests, user input, navigation, window changes, conflicting capture resources, excess output or incomplete cleanup.
Not allowedArbitrary URL, JavaScript, target window, click, navigation, data change or other side effects.
During captureThat window's new network requests, native IPC and external navigation are rejected. Marked HTTP requests are refused by the backend, including authentication bootstrap and stale markers. Its WebSocket accepts only observation replies and cancelling the exact verifier Job.
ReleasedBefore evidence upload, even on failure. Other windows and running requests are unaffected.
ScrollThe capture shows the after-scroll state; evidence records before, after and restored metrics. Position is restored before success and never persisted. Failed attempts restore their own scroll while target and deadline hold; user interruption cancels without restoring. Target change or failed restoration cannot pass. Unmoved at a boundary proves nothing alone.
PerspectiveStarts on the visible original conversation, uses the real control, captures, restores conversation and scroll before success. Already selected DAG, missing or replaced control, interruption or failed restoration cannot pass. session does not switch and cannot prove a switch.
Perspective stateNothing is persisted, including through background tab updates. On interruption the user's selection is kept. Failed restoration may leave the requested view showing and reports failure.
ProvesOnly claims about the captured state; unobserved interactions stay inconclusive. HTTP responses, including /chat HTML, do not prove rendered behavior.

Update from chat · Self-update rollback

Last updated · 2026-11-25