Repository navigation
feat(preview): app-start proof for the offline preview image (CHE-9898) [merge] - #356
Open
congvc-bot-x99[bot] wants to merge 2 commits into
Open
congvc-bot-x99[bot] wants to merge 2 commits into
congvc-bot-x99[bot] wants to merge 2 commits into
Conversation
added 2 commits
November 27, 2026 12:50
Swap opencv-python for opencv-python-headless (no libxcb/libGL/libglib needed), copy device_lease into the preview wheel builder, and document the proof.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Draft. Stage 2b of CHE-1434. The offline
--target previewimage starts on X99.docs/preview-build.mdnow marks the target usable.Conditions
test_live_target_unchanged_from_basepasses.uv.lock:opencv-python5.0.0.93 becomesopencv-python-headless5.1.0.95. No other package changed.vps-langfuse.Change
mainat5ee318c0:import cv2failed withlibxcb.so.1: cannot open shared object file(alsolibGL.so.1,libglib-2.0.so.0andlibgthread-2.0.so.0missing). The issue forbidsapt-getin a networked preview stage, so the dependency changed instead.pyproject.toml,uv.lock:opencv-pythonbecomesopencv-python-headless. The code usescv2.VideoCaptureand image functions only. Noimshow,namedWindoworwaitKeycall exists outside tests.Dockerfile: thepreview-wheel-builderstage copiesdevice_lease/.setup.pyships it and the admin console imports it at startup. Without it the app failed withModuleNotFoundError: No module named 'device_lease'.tests/unit/preview_host/test_build.py: asserts thedevice_leasecopy.test_opencv_is_the_headless_build_in_pyproject_and_lockfails ifpyproject.tomloruv.lockgoes back toopencv-pythonoropencv-contrib-python.docs/preview-build.md: "App-start proof" section with the run command and result.Blast Radius
The preview target,
docs/preview-build.mdand the dependency set.uv.lockis shared, so the live console also gets the headless OpenCV wheel. A break shows as anImportErroror missing video or image function in the console. CI keeps installinglibgl1,libglib2.0-0andlibxcb1; that is harmless and untouched. Separate finding: the livewheel-builderstage also lacksCOPY device_lease/. This PR does not change it.Proof level: 4 (X99 build and run below).
Evidence
python3 -m pytest --confcutdir=tests/unit/preview_host tests/unit/preview_host -q 1 failed, 654 passed, 2 skipped in 63.45sThe one failure is
test_egress.py::test_denied_ipv6_covers_everything_outside_global_unicast_or_is_not_accepted. It also fails onorigin/main(1 failed, 90 passed, 1 skipped in that file), so it is not caused by this PR.tests/unit/test_workflow_runner_policy.py: 13 passed.ruff checkandruff format --checkpass on the changed test file.X99 build, with acquisition from the real
uv.lock(175 wheels) andnpm ci --ignore-scripts:docker buildx build --network=none --target preview \ --build-context preview-node-inputs=./node-inputs \ --build-context preview-python-inputs=./py/python-inputs --load .Exit 0. Image digest
sha256:ee11b581262fda4bcdf11bd8922deab0af6de8537aabbedd49768cbd86bb3641.Config.Useris10001:10001.Run with
--network none,ARTEMIS_PREVIEW_PROFILE=1(set in the image), tmpfs/tmpand/scratch, and a throwaway public key bundle (command in the docs). The server logsApplication startup complete. Inside the container as UID 10001:GET /without a token: 401.GET /with a validCf-Access-Jwt-Assertion: 200.GET /api/system/readinesswith the token: 200.Acquisition ran with direct egress on X99. No egress proxy was in the path, so the proxy-only rule from
preview-egress.mdis not proven here.Negative proof:
notinwheelhouse==1.0 --hash=sha256:00...00added to a copy ofrequirements.txt. The build fails atpip install --no-cache-dir --no-index --require-hashes --find-links /inputs/wheelhouse -r /inputs/requirements.txtwithERROR: No matching distribution found for notinwheelhouse==1.0(exit code 1).df -B1, used bytes,/: 433144053760 before, 435392229376 after cleanup./mnt/ssd2: 405997998080 before, 406743220224 after. Removed: both test images, the container, the staging directory, the key bundle. Residual: BuildKit cache, shared with other work, not pruned. Owner: X99 runtime owner.Part of CHE-1434
Closes CHE-9898