Files
ARCADIA-Studio/harness/release-linux-build-plan-ytr83r-20260911.md
T

12 KiB

Linux build and acceptance preparation — 2026-09-11

Owner: Codex-ytr83r /root/linux_build_plan. Inspected source cb611a71df53704abc5ebe4290b916e17ee96bf1, AGENTS, issues 1/2 through comment285 and current LinuxHost Wiki; open PR inventory empty. Root owns installer33480 and Windows Cargo55371. No WSL, package installation, Rust tool, server, GUI or build executed by this worker. These are prepared commands, not acceptance. Earlier QEMU evidence is historical and irrelevant to this supported WSL installation.

Distro dependencies and compiler choice

Root currency note: supported installation and one actual guest shell later succeeded, followed by startup timeouts; see the current WSL outcome. The existing REST restart probe now omits the Windows-only launch parameter on Linux, and full Linux packaging now includes all three executables and their strict notices/modes. Those source corrections supersede the corresponding pending implementation notes below; their actual Linux execution remains pending. The original frozen-source preparation and its unexecuted command sequence remain useful history.

After root establishes a working Ubuntu26.04 shell and frees the sole compiler lease, inspect cat /etc/os-release, uname -m, df -h /, free -h, command -v rustc cargo rustup, and existing rustc -Vv/cargo -V. Do not infer this host's resources or registration from another agent's report.

The repository README's supported development baseline is the following; it is not a experimentally minimized Ubuntu26.04 package closure:

sudo apt-get update
sudo apt-get install --no-install-recommends build-essential pkg-config \
  libxkbcommon-dev libxkbcommon-x11-0 libwayland-dev libvulkan-dev \
  libx11-dev libxrandr-dev libxi-dev git ca-certificates curl \
  python3 python3-jsonschema file

The first two packages plus Rust suffice for the headless build's normal C/linker tooling; GUI native dependencies are preserved from the documented baseline, not guessed from a different application. python3-jsonschema runs the existing OpenAPI/HTTP oracle without pip/global-Python changes. Mesa software rendering (mesa-vulkan-drivers) is a runtime option after inspecting WSLg/GPU availability, not a compiler prerequisite. No Java, Node, GTK development suite or portal installation is required by this plan. Root must verify apt candidates on the actual distro; none were queried here.

Workspace MSRV is1.90; current recorded Windows compiler is1.98.1. Prefer an already installed Linux compiler >=1.90, recording its exact version; use matched1.98.1 when practically available to remove compiler-version differences. Do not install default apt Rust blindly or label apt's unknown candidate sufficient. A distro compiler satisfying MSRV is valid for a scoped build, but packaging currently requires sysroot share/doc/rust/COPYRIGHT.html and COPYRIGHT-library.html plus exact target libraries (scripts/windows-notices.ps1:160); verify those before choosing it for release. An MSRV build is a separate gate, not provided by a1.98.1 build.

If no suitable compiler exists, ordinary rustup supports task-local CARGO_HOME/RUSTUP_HOME; do not change HOME, CODEX_HOME, shell profiles or global defaults. Rustup installation documents those paths. In the isolated layout below, fetch https://sh.rustup.rs to an evidence file, inspect it, then run sh <file> -y --no-modify-path --profile minimal --default-toolchain 1.98.1; add rustfmt/clippy only for their gates. Fetch/install remains root's action. Preserve existing Linux Rust if suitable instead of duplicating it.

Frozen ext4 source and one-job sequence

Run the following in a fresh Linux shell after readiness/capacity admission. It creates a new private checkout with its own Git objects (no shared worktree/index), not a Windows source/build copy. Microsoft recommends Linux filesystem storage for Linux builds: WSL filesystems. Confirm findmnt -T "$arcadia_run" reports the expected Linux filesystem. WSL's underlying disk still consumes Windows host capacity.

set -eu
arcadia_commit=cb611a71df53704abc5ebe4290b916e17ee96bf1
arcadia_run="$HOME/arcadia-linux-$arcadia_commit"
test ! -e "$arcadia_run"
mkdir -p "$arcadia_run/evidence" "$arcadia_run/cache"
git clone --no-hardlinks --no-checkout \
  /mnt/c/Users/User/Documents/Git/ARCADIA-Studio "$arcadia_run/src"
git -C "$arcadia_run/src" -c core.autocrlf=false checkout --detach "$arcadia_commit"
test "$(git -C "$arcadia_run/src" rev-parse HEAD)" = "$arcadia_commit"
cd "$arcadia_run/src"
export CARGO_HOME="$arcadia_run/cache/cargo"
export CARGO_TARGET_DIR="$arcadia_run/target"
export CARGO_BUILD_JOBS=1 CARGO_INCREMENTAL=0
# Only for a new isolated rustup installation; retain an existing Linux RUSTUP_HOME otherwise.
# export RUSTUP_HOME="$arcadia_run/cache/rustup"
# export PATH="$CARGO_HOME/bin:$PATH"
unset CARGO_BUILD_TARGET RUSTFLAGS CARGO_ENCODED_RUSTFLAGS RUSTC RUSTC_WRAPPER
unset RUSTC_WORKSPACE_WRAPPER CC CXX AR RANLIB RC
rustc -Vv > "$arcadia_run/evidence/rustc.txt"
cargo -V > "$arcadia_run/evidence/cargo.txt"
git status --porcelain
cargo fetch --locked --target x86_64-unknown-linux-gnu
cargo test --locked -j 1 -p oa-core -p oa-server -p oa-cli -- --test-threads=1
cargo build --locked -j 1 -p oa-server -p oa-cli
timeout 180s python3 crates/oa-server/tests/semantic_http_contract.py \
  "$CARGO_TARGET_DIR/debug/arcadia-server"
cargo test --locked -j 1 -p oa-desktop -- --test-threads=1
cargo build --locked -j 1 -p oa-desktop
cp -R examples "$CARGO_TARGET_DIR/debug/"

Root should tee each command's stdout/stderr to distinct evidence files with Bash set -o pipefail, preserving terminal exit codes. Avoid Windows PATH/linker inputs and check the chosen cargo/rustc resolve to Linux executables. Do not copy .local, target, registry build outputs or Windows .cargo/config from the Windows workspace. Cargo downloads a fresh locked Linux source/archive cache; retain it for notice collection. The explicit commit excludes later production edits until a new freeze is chosen. Current uncommitted packaging-doc correction is not part of that frozen source.

Run cargo fmt --all -- --check, cargo clippy --locked -j1 --workspace --all-targets -- -D warnings, then cargo build --locked -j1 --release --workspace only after the earlier gates/resources pass. Keep incremental disabled to avoid another large incremental cache. This does not eliminate release build disk demand. Copy examples beside release binaries too. Do not parallelize with root's Windows Cargo or launch tests concurrently.

Reuse existing executable/transport acceptance

The headless test command above includes crates/oa-cli/tests/source_cli.rs: it launches actual CARGO_BIN_EXE_arcadia, checks preview/write/fixed-point behavior against the40-identity alarm fixture, cross-file alias rename, Unicode diagnostics, CRLF, conflict and no-op preservation. No duplicate CLI smoke program is needed. For an isolated rerun use cargo test --locked -j1 -p oa-cli --test source_cli -- --test-threads=1.

crates/oa-server/tests/http.rs binds real 127.0.0.1:0 sockets with reqwest clients (TestServer::start, line48), including persistence reopen rather than router-only mocks. Useful exact reruns, all already covered by the full headless suite:

cargo test --locked -j1 -p oa-server --test http conditional_writes_are_atomic_and_survive_restart -- --exact --test-threads=1
cargo test --locked -j1 -p oa-server --test http batches_dry_run_noop_and_source_share_the_core -- --exact --test-threads=1
cargo test --locked -j1 -p oa-server --test http auth_origins_media_and_body_limits_are_enforced_over_http -- --exact --test-threads=1
cargo test --locked -j1 -p oa-server --test http current_migration_reports_and_invalid_typed_transaction_preserve_http_state -- --exact --test-threads=1

These cover conditional writes, stale/missing tags, no-op, invalid atomic rejection and persisted revision/ETag on reopen. They restart the in-process server/store, not the standalone executable. The separate semantic_http_contract.py command above launches the actual supplied executable with a fresh store and cross-platform subprocess flags; checks served-vs-local OpenAPI, typed import/semantic preview/apply and stale412. It does not test process restart. It has a blocking banner read, hence the outer timeout; on timeout root must check/stop only the test-owned process because forced Python termination may bypass its finally block.

For standalone executable restart acceptance, reuse harness/fixtures/rest-coverage/run-coverage-probe.ps1 (parameter -ServerExe): it already has exact source/model/validation comparisons and ETag persistence after process stop/start. Its Start-Process -WindowStyle Hidden is Windows-specific. A Linux copy/adaptation must remove only that parameter, preserve PSScriptRoot fixture/root resolution, retain generated evidence and synthetic token handling, and use PowerShell7. Do not run the current script verbatim in Linux or point it at a Windows binary. This adaptation/install is not performed here. run-timed-bundle-oracle.ps1 has the same platform issue and additional saved-fixture inputs. Historical run_experiment.py hardcodes Windows executable, creationflags and another host's archive; it is not a portable current gate. No new duplicate acceptance tests were added.

Remaining root-owned acceptance and narrow documentation correction

Actual Ubuntu26.04 registration/shell, compiler/dependency availability, capacity, native WSLg rendering/backend and all commands above remain unverified. Ubuntu26.04 results cannot establish the older Ubuntu24.04 package baseline. Native UI still needs Home/help, normal/minimum layout, B4 Unicode/lifetime clipping, Linux path-entry Open/Save, save/reopen, source/diagram Undo/Redo and full independent model/source comparison. Rendering should record actual display variables and stderr; use lavapipe only after finding the installed ICD, without assuming the historical filename exists.

Root authorized a narrow correction to docs/linux-packaging.md: remove obsolete portal-dialog prerequisite and replace native Open/Save acceptance with Linux path entry, existing-file handling and SVG-export overwrite confirmation. Exact source: app.rs:3410 chooses FilePrompt for Linux before the rfd branch; app.rs:3108 gates the explicit overwrite prompt on Export; app.rs:3480 routes Save to normal snapshot writing. Thus README140's generic overwrite wording is broader than this direct prompt evidence. The corrected packaging text does not claim general Save-as confirmation or a native pass. No dependency/runtime/license promises elsewhere changed.

Release/notices/package acceptance remains root-owned: scripts/package-linux.ps1 currently packages only arcadia-studio and arcadia-server, not the new arcadia CLI. Its strict collector needs matching compiler sysroot notices, Linux target libraries and Cargo archives, plus Python3.11+/PowerShell7/Git; absence of notice files stops packaging. Build evidence must record exact source/profile/compiler and hashes. Current CLI inclusion is an explicit outstanding release-scope decision, not silently repaired here. Extract a fresh bundle, verify checksums/modes/ELF dependencies, and exercise its actual binaries from another working directory before publishing a prerelease. This report and docs correction were source-reviewed only.