From d9ed28f7e5e1f35bfa73de92292c833b9153a123 Mon Sep 17 00:00:00 2001 From: James Chapman Date: Tue, 17 Nov 2026 15:27:45 +0000 Subject: [PATCH 1/4] ci: test, package, and publish rolling testing builds from main Add a Testing build workflow that runs on every push to main. It calls the Rust and Frontend workflows, builds release binaries of omgcode and omgcode-desktop, and archives them without an installer for Windows x86_64, Ubuntu x86_64 (ubuntu-latest), and Fedora 44 x86_64 (a digest-pinned container). After every job passes, a publish job, the only one with contents: write, replaces the rolling `testing` prerelease and tag with the archives and SHA256SUMS. The Rust and Frontend workflows become reusable, stop triggering on a push to main, and use caller-scoped concurrency groups. The Rust workflow takes a linux-runner input. The workspace tests do not run on Fedora. Records ADR-0052 and updates the owning guides. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/frontend.yml | 9 +- .github/workflows/rust.yml | 16 +- .github/workflows/testing-build.yml | 294 ++++++++++++++++++ AGENTS.md | 7 +- CHANGELOG.md | 14 + README.md | 4 +- docs/README.md | 4 +- ...ublish-rolling-testing-builds-from-main.md | 94 ++++++ docs/adr/index.md | 1 + docs/coding-rules.md | 6 +- docs/desktop-interface.md | 9 +- docs/development.md | 2 +- docs/platform-support.md | 11 +- docs/repository-checks.md | 73 ++++- 14 files changed, 518 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/testing-build.yml create mode 100644 docs/adr/0052-publish-rolling-testing-builds-from-main.md diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 6e96253..2203111 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -1,17 +1,20 @@ name: Frontend +# Pushes to main run these checks through testing-build.yml, which calls this +# workflow before it publishes packages. on: pull_request: branches: [main] - push: - branches: [main] workflow_dispatch: + workflow_call: permissions: contents: read +# In a called workflow github.workflow names the caller, so a direct run and a +# Testing build run on the same ref never cancel each other. concurrency: - group: frontend-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-frontend-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9092db6..9f010c3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,17 +1,25 @@ name: Rust +# Pushes to main run these checks through testing-build.yml, which calls this +# workflow before it publishes packages. on: pull_request: branches: [main] - push: - branches: [main] workflow_dispatch: + workflow_call: + inputs: + linux-runner: + description: Runner label for the Linux leg + type: string + default: ubuntu-24.04 permissions: contents: read +# In a called workflow github.workflow names the caller, so a direct run and a +# Testing build run on the same ref never cancel each other. concurrency: - group: rust-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-rust-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: @@ -20,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, windows-2025] + os: ["${{ inputs.linux-runner || 'ubuntu-24.04' }}", windows-2025] runs-on: ${{ matrix.os }} timeout-minutes: 40 steps: diff --git a/.github/workflows/testing-build.yml b/.github/workflows/testing-build.yml new file mode 100644 index 0000000..ea5d8af --- /dev/null +++ b/.github/workflows/testing-build.yml @@ -0,0 +1,294 @@ +name: Testing build + +# Every push to main (a merged pull request) tests, builds, and packages the +# CLI and desktop binaries, then replaces the rolling `testing` prerelease. +# See docs/repository-checks.md#testing-build-workflow and ADR-0052. + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +# One run at a time and never cancelled, so a publish cannot stop halfway +# through replacing the release. A newer push waits; GitHub keeps only the +# newest waiting run, so the release ends at the newest main commit. +concurrency: + group: testing-build + cancel-in-progress: false + +jobs: + rust: + name: Rust tests + uses: ./.github/workflows/rust.yml + with: + # Test on the same Ubuntu image that builds the Ubuntu package. + linux-runner: ubuntu-latest + + frontend: + name: Frontend tests + uses: ./.github/workflows/frontend.yml + + package-windows: + name: Package (windows-x86_64) + runs-on: windows-2025 + timeout-minutes: 40 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Install the pinned toolchain + run: rustup toolchain install 1.99.1 --profile minimal + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24 + - name: Build the desktop frontend + working-directory: crates/omgcode-desktop/ui + run: | + npm ci --ignore-scripts + npm run build + - name: Build the release binaries + run: cargo build --release --locked -p omgcode-cli -p omgcode-desktop + - name: Check that the binaries start + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + & .\target\release\omgcode.exe --version + if ($LASTEXITCODE -ne 0) { throw "omgcode --version exited with $LASTEXITCODE" } + # An unknown option exits with the usage code (2) before any window + # opens. The release build uses the GUI subsystem, so wait explicitly. + $p = Start-Process -FilePath .\target\release\omgcode-desktop.exe ` + -ArgumentList '--unknown-option' -Wait -PassThru -NoNewWindow + if ($p.ExitCode -ne 2) { throw "omgcode-desktop exited with $($p.ExitCode), expected 2" } + - name: Package + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $name = 'omgcode-testing-windows-x86_64' + New-Item -ItemType Directory -Path "dist/$name" | Out-Null + Copy-Item target/release/omgcode.exe, target/release/omgcode-desktop.exe, LICENSE, README.md "dist/$name/" + $version = (& .\target\release\omgcode.exe --version) + $rustc = (& rustc --version) + $os = (Get-CimInstance Win32_OperatingSystem) + @( + 'OMGCode testing build (prototype; not release-qualified)' + "Version: $version" + "Commit: $env:GITHUB_SHA" + "Workflow run: $env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID" + "Built on: $($os.Caption) $($os.Version) (runner image $env:ImageOS $env:ImageVersion)" + "Toolchain: $rustc" + 'Runtime prerequisite: the Microsoft Edge WebView2 runtime for omgcode-desktop.exe.' + ) | Set-Content -Encoding utf8 "dist/$name/BUILD-INFO.txt" + Compress-Archive -Path "dist/$name" -DestinationPath "dist/$name.zip" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: omgcode-testing-windows-x86_64 + path: dist/omgcode-testing-windows-x86_64.zip + if-no-files-found: error + retention-days: 7 + + package-ubuntu: + name: Package (ubuntu-x86_64) + runs-on: ubuntu-latest + timeout-minutes: 40 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Install the pinned toolchain + run: rustup toolchain install 1.99.1 --profile minimal + - name: Install the desktop shell's Linux build packages + run: | + # The Tauri prerequisites for Debian and Ubuntu, as in rust.yml. + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev \ + libssl-dev libayatana-appindicator3-dev librsvg2-dev + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24 + - name: Build the desktop frontend + working-directory: crates/omgcode-desktop/ui + run: | + npm ci --ignore-scripts + npm run build + - name: Build the release binaries + run: cargo build --release --locked -p omgcode-cli -p omgcode-desktop + - name: Check that the binaries start + run: | + target/release/omgcode --version + # An unknown option exits with the usage code (2) before any window + # opens, after the dynamic loader has resolved WebKitGTK. + status=0 + target/release/omgcode-desktop --unknown-option || status=$? + if [ "$status" -ne 2 ]; then + echo "omgcode-desktop exited with $status, expected 2" >&2 + exit 1 + fi + - name: Package + env: + PACKAGE_NAME: omgcode-testing-ubuntu-x86_64 + RUNTIME_NOTE: >- + Runtime prerequisites for omgcode-desktop: libwebkit2gtk-4.1-0 and its + GTK dependencies. The binaries link against this Ubuntu release's glibc. + run: | + set -euo pipefail + mkdir -p "dist/$PACKAGE_NAME" + cp target/release/omgcode target/release/omgcode-desktop LICENSE README.md "dist/$PACKAGE_NAME/" + . /etc/os-release + { + echo 'OMGCode testing build (prototype; not release-qualified)' + echo "Version: $(target/release/omgcode --version)" + echo "Commit: $GITHUB_SHA" + echo "Workflow run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" + echo "Built on: $PRETTY_NAME (runner image ${ImageOS:-unknown} ${ImageVersion:-unknown})" + echo "Toolchain: $(rustc --version)" + echo "$RUNTIME_NOTE" + } > "dist/$PACKAGE_NAME/BUILD-INFO.txt" + tar -C dist -czf "dist/$PACKAGE_NAME.tar.gz" "$PACKAGE_NAME" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: omgcode-testing-ubuntu-x86_64 + path: dist/omgcode-testing-ubuntu-x86_64.tar.gz + if-no-files-found: error + retention-days: 7 + + package-fedora: + name: Package (fedora44-x86_64) + runs-on: ubuntu-24.04 + timeout-minutes: 40 + container: + # Fedora 44 image index, pinned by digest on 2026-11-17. Update the + # digest deliberately to pick up newer Fedora 44 packages. + image: registry.fedoraproject.org/fedora:44@sha256:98b558564d3510363f0f706a44b1ee9de461b030373d741c5729ae3f24d8cb26 + steps: + - name: Install the build packages + run: | + # Git and the archive tools for checkout and setup-node; a C compiler + # for bundled SQLite; rustup from Fedora; the Tauri prerequisites for + # Fedora. + dnf -y install --setopt=install_weak_deps=False \ + git tar gzip xz findutils gcc gcc-c++ make pkgconf-pkg-config rustup \ + webkit2gtk4.1-devel openssl-devel curl wget file \ + libappindicator-gtk3-devel librsvg2-devel libxdo-devel + - name: Install the pinned toolchain + run: | + rustup-init -y --profile minimal --default-toolchain none --no-modify-path + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + "$HOME/.cargo/bin/rustup" toolchain install 1.99.1 --profile minimal + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24 + - name: Build the desktop frontend + working-directory: crates/omgcode-desktop/ui + run: | + npm ci --ignore-scripts + npm run build + - name: Build the release binaries + run: cargo build --release --locked -p omgcode-cli -p omgcode-desktop + - name: Check that the binaries start + run: | + target/release/omgcode --version + status=0 + target/release/omgcode-desktop --unknown-option || status=$? + if [ "$status" -ne 2 ]; then + echo "omgcode-desktop exited with $status, expected 2" >&2 + exit 1 + fi + - name: Package + env: + PACKAGE_NAME: omgcode-testing-fedora44-x86_64 + RUNTIME_NOTE: >- + Runtime prerequisites for omgcode-desktop: webkit2gtk4.1 and its GTK + dependencies. Built in a Fedora 44 container; the workspace tests did + not run on Fedora. + run: | + set -euo pipefail + mkdir -p "dist/$PACKAGE_NAME" + cp target/release/omgcode target/release/omgcode-desktop LICENSE README.md "dist/$PACKAGE_NAME/" + . /etc/os-release + { + echo 'OMGCode testing build (prototype; not release-qualified)' + echo "Version: $(target/release/omgcode --version)" + echo "Commit: $GITHUB_SHA" + echo "Workflow run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" + echo "Built on: $PRETTY_NAME (container; image digest in testing-build.yml at this commit)" + echo "Toolchain: $(rustc --version)" + echo "$RUNTIME_NOTE" + } > "dist/$PACKAGE_NAME/BUILD-INFO.txt" + tar -C dist -czf "dist/$PACKAGE_NAME.tar.gz" "$PACKAGE_NAME" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: omgcode-testing-fedora44-x86_64 + path: dist/omgcode-testing-fedora44-x86_64.tar.gz + if-no-files-found: error + retention-days: 7 + + publish: + name: Publish the testing release + # Publish only after every test and package job succeeds, and only from + # main; a manual run on another branch builds but does not publish. + needs: [rust, frontend, package-windows, package-ubuntu, package-fedora] + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 + timeout-minutes: 15 + # The only job with a write token. It never checks out or runs repository + # or dependency code; it handles the finished archives only. + permissions: + contents: write + steps: + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + pattern: omgcode-testing-* + path: assets + merge-multiple: true + - name: Write checksums + working-directory: assets + run: | + set -euo pipefail + sha256sum -- omgcode-testing-* > SHA256SUMS + cat SHA256SUMS + - name: Replace the testing release + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: | + set -euo pipefail + short_sha="${GITHUB_SHA::12}" + cat > notes.md </dev/null 2>&1; then + gh release delete testing --yes --cleanup-tag + fi + if gh api "repos/${GH_REPO}/git/ref/tags/testing" >/dev/null 2>&1; then + gh api -X DELETE "repos/${GH_REPO}/git/refs/tags/testing" + fi + gh release create testing \ + --target "$GITHUB_SHA" \ + --prerelease \ + --latest=false \ + --title "Testing build (${short_sha})" \ + --notes-file notes.md \ + assets/omgcode-testing-* assets/SHA256SUMS diff --git a/AGENTS.md b/AGENTS.md index ec445f1..9bcfd22 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,7 +9,7 @@ and native identity checks. Follow [workspace settings](docs/workspace-permissio and [workspace file access](docs/file-access.md) for their contracts. Enabled preferences never authorize execution. A prototype Tauri desktop shell adds a session tree, full-text search, chat, and an isolated approvals window. It is -unpackaged, has run only on Windows, and gives the webview no authority: the +without an installer, has run only on Windows, and gives the webview no authority: the Rust side authorizes every command and the trusted CLI remains. Follow the [desktop interface](docs/desktop-interface.md) contract. Chat offers the local LM Studio model read and list tools; when the workspace @@ -64,8 +64,9 @@ edit tool call in progress is not interruptible [ADR-0051](docs/adr/0051-cancel-every-model-request-and-interrupt-cli-turns.md)). On the CLI, Ctrl-C during `chat` or `session compact` cancels instead of ending the process. -The desktop shell has no settings interface, development panels, packaging, or -recovery interface. Most other planned features are not +The desktop shell has no settings interface, development panels, installer, or +recovery interface. CI publishes unsigned `testing` archives from each merge to +`main` ([ADR-0052](docs/adr/0052-publish-rolling-testing-builds-from-main.md)). Most other planned features are not implemented. The core validates replacement records and can prepare protected checkpoints on Linux and Windows through a live authorized binding. The CLI provides diff --git a/CHANGELOG.md b/CHANGELOG.md index d48dfee..5f31578 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ Changes are recorded here before a release version is assigned. ### Added +- A Testing build workflow (`.github/workflows/testing-build.yml`) runs on every + push to `main`. It calls the Rust and Frontend workflows, builds release + binaries of `omgcode` and `omgcode-desktop`, and packages them without an + installer for Windows x86_64 (`.zip`), Ubuntu x86_64 on `ubuntu-latest` + (`.tar.gz`), and Fedora 44 x86_64 in a digest-pinned container (`.tar.gz`). + Each package job checks that both binaries start. After every job passes, a + publish job, the only one with `contents: write`, replaces the rolling + `testing` prerelease and tag with the archives and a `SHA256SUMS` file. The + workspace tests do not run on Fedora. The Rust and Frontend workflows no + longer trigger on a push to `main`, gain `workflow_call`, and use + caller-scoped concurrency groups; the Rust workflow takes a `linux-runner` + input. There is no application change, so the version stays 0.34.0. This + workflow has not run on GitHub. See ADR-0052 and + [the testing build](docs/repository-checks.md#testing-build-workflow). - Version 0.34.0 lets a cancel request stop every model request, streamed or not, and the compaction requests, and lets an interrupt cancel a CLI turn (Phase D6). See ADR-0051 and diff --git a/README.md b/README.md index d40e80b..75685f1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ only for a workspace that enables `model_tools` and each tool's own preferences. Model file creation, deletion, and renaming, and Git workflows remain planned. A prototype desktop shell (Tauri, with a strict TypeScript frontend) browses and searches sessions, runs chat, and decides model-tool -approvals in a separate window; it is unpackaged and has run only on Windows. +approvals in a separate window; it has no installer and has run only on Windows. The trusted CLI `run` command starts one program for a workspace whose `execute` preference is enabled. It uses an operator-declared toolchain profile, records each run in a run journal, and confines the process tree with @@ -138,7 +138,7 @@ chat that runs the same turn as `omgcode chat`, and an approvals window that shows an exact reviewed request before it lets the operator decide. The webview gets no authority: the Rust side authorizes every command, and no command accepts a host path. The webview is still not a trusted computing base. It has -no packaging, settings interface, development panels, or recovery +no installer, settings interface, development panels, or recovery interface, and it has not been run on Linux. Chat streams the local model's reply into the window by default (`--stream off` at launch disables it). The text is provisional, and the journal records only the validated reply. The diff --git a/docs/README.md b/docs/README.md index 65f877a..c8c13b1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,7 +3,7 @@ OMGCode has a Rust CLI prototype for local chat, JSONL sessions, and a bounded native workspace file broker, and a prototype Tauri desktop shell with a session tree, search, chat, and an isolated approvals window. The shell is -unpackaged and has run only on Windows. The broker is available only through +without an installer and has run only on Windows. The broker is available only through trusted operator commands and, when a workspace enables `model_tools`, to the local model's read, list, approval-gated exact-edit, and approval-gated command tools. The edit tool changes one existing file only through checkpointed apply @@ -48,7 +48,7 @@ remaining product contracts. | [MCP support](mcp.md) | Server connections, transports, credentials, capabilities, and tool authorization | | [Session storage](session-storage.md) | JSONL layout/schema, tool events, durable journals, lock-free inspection, the derived session index, archive/restore, and safe resume | | [Memories](memories.md) | User-selected project/global scope, management, retrieval, and lifecycle | -| [Repository checks](repository-checks.md) | CodeRabbit, CodeQL, Sonar, the Rust and Frontend workflows, credentials, and main protection | +| [Repository checks](repository-checks.md) | CodeRabbit, CodeQL, Sonar, the Rust, Frontend, and Testing build workflows, credentials, and main protection | | [ADR register](adr/index.md) | Lasting decisions, alternatives, and consequences | | [Changelog](../CHANGELOG.md) | Changes awaiting release | diff --git a/docs/adr/0052-publish-rolling-testing-builds-from-main.md b/docs/adr/0052-publish-rolling-testing-builds-from-main.md new file mode 100644 index 0000000..d9ef31c --- /dev/null +++ b/docs/adr/0052-publish-rolling-testing-builds-from-main.md @@ -0,0 +1,94 @@ +# 0052: Publish rolling testing builds from main + +- Status: Accepted +- Date: 2026-11-17 + +## Context + +Every merge to `main` should produce downloadable builds of the prototype for +Windows, Ubuntu, and Fedora 44 without an installer. The builds must come only +from tested commits. The jobs that compile the workspace run third-party code: +Cargo build scripts, procedural macros, and the frontend's npm build. The +desktop shell has no packaging (`bundle.active` is `false`), and the +repository's [coding rules](../coding-rules.md) require pinned actions and no +elevated permissions for build jobs. + +GitHub-hosted runners provide Windows and Ubuntu, but not Fedora. The Linux run +and tree-limit tests need a user service manager with delegated cgroups, and +the credential tests need an unlocked Secret Service. A job container provides +neither. + +## Decision + +`.github/workflows/testing-build.yml` runs on every push to `main` and on +manual dispatch. The [repository-checks guide](../repository-checks.md#testing-build-workflow) +owns the details. + +- **Tests.** It calls `rust.yml` and `frontend.yml` as reusable workflows. The + Rust leg runs on `ubuntu-latest` and Windows Server 2025, the same images + that build those packages. Both workflows no longer trigger on a push to + `main` directly, so each merge runs the suite once. +- **Packages.** Three jobs build `omgcode` and `omgcode-desktop` in release + mode with the locked dependencies and the pinned toolchain: Windows Server + 2025, `ubuntu-latest`, and a Fedora 44 container pinned by image digest on an + Ubuntu runner. Each job checks that both binaries start (`omgcode --version`; + `omgcode-desktop` with an unknown option must exit with the usage code 2 + before a window opens) and archives them with the licence, the README, and + a `BUILD-INFO.txt`. Windows produces a `.zip` and Linux a `.tar.gz`. +- **Publication.** A final job runs only from `main` after every test and + package job succeeds. It is the only job with `contents: write`. It downloads + the archives, writes `SHA256SUMS`, deletes the previous `testing` release and + tag, and recreates them at the built commit as a prerelease that is never + marked latest. It does not check out or run repository code. +- **Ordering.** Runs share one concurrency group and are never cancelled, so a + publish cannot stop halfway. GitHub keeps only the newest waiting run, so the + tag ends at the newest tested commit. + +Fedora's archive is built and start-checked only. The workspace tests do not +run on Fedora, and the release notes and `BUILD-INFO.txt` say so. + +## Alternatives considered + +- **A third-party release action.** Rejected. The preinstalled `gh` CLI does + the same with the job token, and avoids another pinned dependency with write + access. +- **Editing the release in place with `--clobber` uploads.** Rejected. Readers + could download a mix of old and new archives during the upload. Delete and + recreate leaves a short window with no release instead, and `gh release + create` uploads to a draft before publishing. +- **Running the Fedora tests in the container.** Rejected for now. The + container has no user service manager or Secret Service, so the run, + tree-limit, and credential tests would fail for environmental reasons. + Excluding them would hide which checks ran. A Fedora virtual machine or a + self-hosted runner can add them later. +- **Building packages after the tests finish.** Rejected. Building in parallel + is faster, and publication still waits for both. +- **Tauri bundles (MSI, NSIS, deb, rpm, AppImage).** Out of scope. The request + was for archives without an installer, and the shell has no signing or + packaging design. + +## Consequences + +- Stable download URLs: + `releases/download/testing/omgcode-testing-.`. +- The archives are unsigned prototype builds. They carry no claim of release + qualification, sandbox containment, or platform support beyond the + [platform support guide](../platform-support.md). +- Main's check names change from `Rust (...)` to the nested + `Testing build / Rust tests / Rust (...)` form. +- `ubuntu-latest` moves when GitHub changes its default image. The Ubuntu + archive's glibc and WebKitGTK requirements move with it. +- The Fedora image digest freezes the base packages until someone updates it. +- If the repository enables immutable releases, deleting and recreating the + `testing` tag will fail. Revisit this decision before enabling that setting. +- None of this has run on GitHub. Check the first run on `main`, the release + assets, and the tag target before relying on it. + +## References + +- [Repository checks](../repository-checks.md#testing-build-workflow) +- [Reusable workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows) +- [GitHub CLI `release create`](https://cli.github.com/manual/gh_release_create) +- [Tauri Linux prerequisites](https://v2.tauri.app/start/prerequisites/) +- [ADR-0004: Require pull requests and repository analysis](0004-require-pull-requests-and-repository-analysis.md) +- [ADR-0045: Build the desktop shell on Tauri](0045-build-the-desktop-shell-on-tauri-with-a-narrow-command-surface.md) diff --git a/docs/adr/index.md b/docs/adr/index.md index 6a8549b..f5b1fde 100644 --- a/docs/adr/index.md +++ b/docs/adr/index.md @@ -66,3 +66,4 @@ meaningful alternative does not need an ADR. | [0049: Stream local model replies and push chat events to the main window](0049-stream-local-model-replies-and-push-chat-events.md) | Accepted | 2026-11-16 | | [0050: Interrupt a streamed model request when a turn is cancelled](0050-interrupt-a-streamed-model-request-on-cancellation.md) | Accepted; amended by ADR-0051 | 2026-11-16 | | [0051: Cancel every model request and let an interrupt cancel a CLI turn](0051-cancel-every-model-request-and-interrupt-cli-turns.md) | Accepted | 2026-11-17 | +| [0052: Publish rolling testing builds from main](0052-publish-rolling-testing-builds-from-main.md) | Accepted | 2026-11-17 | diff --git a/docs/coding-rules.md b/docs/coding-rules.md index 18a4559..572c03b 100644 --- a/docs/coding-rules.md +++ b/docs/coding-rules.md @@ -237,8 +237,10 @@ The Cargo workspace contains `omgcode-core`, `omgcode-cli`, `.github/workflows/rust.yml` builds the desktop frontend, then runs formatting, Clippy, tests, and doc tests on Ubuntu 24.04 and Windows Server 2025. `.github/workflows/frontend.yml` runs the type check, Biome, Vitest, and the -bundle checks on the same two systems. Neither workflow change has run on -GitHub yet. The desktop shell is a prototype, and native confinement exists +bundle checks on the same two systems. On a push to main, +`.github/workflows/testing-build.yml` calls both, builds and packages release +binaries for Windows, Ubuntu, and Fedora 44, and replaces the `testing` +prerelease. None of these workflow changes has run on GitHub yet. The desktop shell is a prototype, and native confinement exists only for the trusted `run` command and the approval-gated command tool; it is not release-qualified. Rustfmt checks formatting; Clippy and the compiler check selected properties; tests check exercised cases. None diff --git a/docs/desktop-interface.md b/docs/desktop-interface.md index e9ebbcb..956730c 100644 --- a/docs/desktop-interface.md +++ b/docs/desktop-interface.md @@ -3,7 +3,9 @@ This guide owns the desktop shell: what it is, how to start it, what each window may call, how the session tree, search, chat, and approvals behave, and what the design does and does not defend. It is a prototype. It is not -release-ready, and it is not packaged. +release-ready, and it has no installer. CI publishes unsigned archives of +the binaries as a rolling `testing` prerelease +([ADR-0052](adr/0052-publish-rolling-testing-builds-from-main.md)). The decisions behind it are recorded in [ADR-0044](adr/0044-observe-journals-without-the-writer-lock-and-index-them-in-sqlite.md), @@ -50,7 +52,8 @@ merged to `main` at the time of writing): Not implemented: -- Installers, signing, and any other packaging. `bundle.active` is `false`. +- Installers, signing, and Tauri bundles. `bundle.active` is `false`. The + `testing` archives hold the bare binaries only. - Interrupting a read, list, or edit tool call in progress. Cancelling such a turn waits for the call to end. - A settings interface. Workspace settings change only through the trusted @@ -699,4 +702,4 @@ private store refuses, see the notes in the turn settles. - Opening a very large first index can take seconds, because each journal commits once. -- No packaging, auto-update, or crash reporting exists. +- No installer, signing, auto-update, or crash reporting exists. diff --git a/docs/development.md b/docs/development.md index f919314..ab648d3 100644 --- a/docs/development.md +++ b/docs/development.md @@ -28,7 +28,7 @@ grants; see [command execution](execution.md). Version 0.29.0 also adds a prototype Tauri desktop shell, `omgcode-desktop`, with a session tree, search, chat, and an approvals window. -It is unpackaged and has run only on Windows. See [Desktop shell](#desktop-shell) +It has no installer and has run only on Windows. See [Desktop shell](#desktop-shell) below and the [desktop interface guide](desktop-interface.md). The core's byte-input replacement inspectors remain read-only. Its file broker diff --git a/docs/platform-support.md b/docs/platform-support.md index c1277f1..b7adbca 100644 --- a/docs/platform-support.md +++ b/docs/platform-support.md @@ -11,12 +11,13 @@ containment. | Item | Current position | | --- | --- | -| Windows versions and architectures | CI uses Windows Server 2025; supported client versions and architectures are not selected | -| Linux distributions, kernels, and architectures | CI uses Ubuntu 24.04; supported distributions, kernels, and architectures are not selected | +| Windows versions and architectures | CI tests and packages on Windows Server 2025 x86_64; supported client versions and architectures are not selected | +| Linux distributions, kernels, and architectures | CI tests on Ubuntu 24.04 and `ubuntu-latest`, packages on `ubuntu-latest`, and builds a Fedora 44 archive in a container without running the tests there. All x86_64. Supported distributions, kernels, and architectures are not selected | +| Testing archives | Unsigned `.zip`/`.tar.gz` archives of `omgcode` and `omgcode-desktop` for each merge to main, published as the rolling `testing` prerelease ([testing build](repository-checks.md#testing-build-workflow)). No installer. Not a release or a support claim | | Rust edition and minimum version | Edition 2024; workspace `rust-version` is 1.99.1 | | Pinned development toolchain | Rust 1.99.1 in `rust-toolchain.toml`, with rustfmt and Clippy | | Webview and frontend prerequisites | Windows needs the WebView2 runtime. Linux needs the WebKitGTK 4.1 development packages to build ([Desktop shell](#desktop-shell)). The frontend build needs Node 24. No other version is qualified | -| Desktop shell | Prototype `omgcode-desktop`. Built, tested, and driven end to end on Windows 11 build 26300 with WebView2 on 2026-11-16. On WSL 6.6 (Ubuntu 24.04) it compiled against WebKitGTK and its tests passed, but no window has been opened on Linux. The CI change that compiles it there has not run. No packaging | +| Desktop shell | Prototype `omgcode-desktop`. Built, tested, and driven end to end on Windows 11 build 26300 with WebView2 on 2026-11-16. On WSL 6.6 (Ubuntu 24.04) it compiled against WebKitGTK and its tests passed, but no window has been opened on Linux. The CI change that compiles it there has not run. No installer; CI publishes testing archives | | Session index | `rusqlite` with bundled SQLite 3.54.1, so a C compiler is required on every build host. Tested on Windows 11 build 26300 and WSL 6.6 only; the Linux run covered the Unix-only inspection branch and the link-refusal tests | | User-project toolchains | Required; native installed/managed profile matrix not yet qualified | | Workspace directory identity | Configuration-only metadata check; required native ID and creation time must be available | @@ -130,7 +131,9 @@ is not a supported-distribution matrix. interrupted-write recovery, and archive/restore across restart. The workflow matrix in `.github/workflows/rust.yml` runs Rust checks on Ubuntu -24.04 and Windows Server 2025. These CI hosts are not the release support matrix. +24.04 and Windows Server 2025, and on `ubuntu-latest` instead of Ubuntu 24.04 +when the testing build calls it. These CI hosts and the testing archives are not +the release support matrix. Native filesystem, sandbox, process-tree, networking, and toolchain behavior remain unqualified for release. Windows workspaces inherit directory ACLs, and directory entry power-loss durability is not qualified there. Linux broker behavior diff --git a/docs/repository-checks.md b/docs/repository-checks.md index a7d189c..9756c36 100644 --- a/docs/repository-checks.md +++ b/docs/repository-checks.md @@ -84,8 +84,14 @@ commit (v7.1.0), and runs `npm ci` and `npm run build` in `crates/omgcode-desktop/ui`. The desktop crate embeds `ui/dist` at compile time, so every workspace-wide Cargo step needs that build first. -`.github/workflows/frontend.yml` is new. It runs on pull requests to main, -pushes to main, and manual dispatch, on Ubuntu 24.04 and Windows Server 2025. It +Both workflows run on pull requests to main and manual dispatch. They no longer +trigger on a push to main; the [Testing build workflow](#testing-build-workflow) +calls them as reusable workflows instead, so each merge runs them once. The Rust +workflow takes a `linux-runner` input (default `ubuntu-24.04`) for its Linux +leg. Their concurrency groups start with `github.workflow`, which names the +caller in a called workflow, so a direct run cannot cancel a Testing build run. + +`.github/workflows/frontend.yml` runs on Ubuntu 24.04 and Windows Server 2025. It runs `npm ci`, `npm run check`, `npm run lint`, `npm test`, and `npm run test:dist`. `.npmrc` sets `ignore-scripts=true`, so no dependency install script runs. @@ -102,6 +108,69 @@ On Ubuntu, the Rust workflow enables lingering for the runner user and waits for its user service manager before the tests. The run and tree-limit tests start delegated `systemd-run --user` scopes and fail without one. +## Testing build workflow + +`.github/workflows/testing-build.yml` runs on every push to main and on manual +dispatch. It replaces the rolling `testing` prerelease with archives of the +newest tested commit ([ADR-0052](adr/0052-publish-rolling-testing-builds-from-main.md)). + +| Job | Runner | Work | +| --- | --- | --- | +| Rust tests | `ubuntu-latest`, Windows Server 2025 | `rust.yml`, called with `linux-runner: ubuntu-latest` | +| Frontend tests | Ubuntu 24.04, Windows Server 2025 | `frontend.yml` | +| Package (windows-x86_64) | Windows Server 2025 | Release build, start-up check, `.zip` | +| Package (ubuntu-x86_64) | `ubuntu-latest` | Release build, start-up check, `.tar.gz` | +| Package (fedora44-x86_64) | Fedora 44 container on Ubuntu 24.04 | Release build, start-up check, `.tar.gz` | +| Publish the testing release | Ubuntu 24.04 | Checksums and release replacement | + +Each package job builds the frontend, then runs +`cargo build --release --locked -p omgcode-cli -p omgcode-desktop` with the +pinned toolchain. The start-up check runs `omgcode --version` and requires +`omgcode-desktop --unknown-option` to exit with the usage code 2, which happens +before any window opens. On Linux this also shows that the dynamic loader found +WebKitGTK. Each archive holds both binaries, `LICENSE`, `README.md`, and a +`BUILD-INFO.txt` with the version, commit, run URL, build OS, and toolchain. +There is no installer and nothing is signed. The workflow artifacts are kept +for seven days; the release holds the lasting copies. + +The Fedora job uses `registry.fedoraproject.org/fedora:44` pinned by its image +index digest, recorded on 2026-11-17. It installs Git, the archive tools, GCC, +Fedora's `rustup` package, and the Tauri prerequisites for Fedora with `dnf`, +then installs the pinned toolchain through `rustup-init`. Update the digest +deliberately to take newer Fedora packages. The workspace tests do not run on +Fedora: the container has no user service manager for delegated cgroups and no +Secret Service. The release notes and `BUILD-INFO.txt` state this. + +The publish job needs every test and package job and runs only for +`refs/heads/main`, so a manual run on another branch builds but publishes +nothing. It is the only job with `contents: write`. It never checks out or runs +repository or dependency code. It downloads the archives, writes `SHA256SUMS`, +deletes the previous `testing` release and tag, and runs `gh release create +testing --target --prerelease --latest=false` with the assets. With +assets, `gh` creates a draft, uploads, and then publishes, so nobody sees a mix +of old and new archives. Downloads fail for a few seconds between the delete +and the publish. + +Runs share the `testing-build` concurrency group with `cancel-in-progress: +false`. A publish is never cancelled part way. GitHub keeps only the newest +waiting run, so the tag ends at the newest main commit whose tests passed. + +The assets have stable names, so links do not change between builds: +`https://github.com/OMG-Software/OMGCode/releases/download/testing/omgcode-testing-windows-x86_64.zip`, +`.../omgcode-testing-ubuntu-x86_64.tar.gz`, +`.../omgcode-testing-fedora44-x86_64.tar.gz`, and `.../SHA256SUMS`. + +Limits: + +- This workflow has not run on GitHub. Inspect the first run on main, the + release assets, and the tag target before relying on it. +- `ubuntu-latest` moves when GitHub changes its default image, and the Ubuntu + archive's glibc and WebKitGTK requirements move with it. +- Enabling immutable releases would block reusing the `testing` tag. Revisit + ADR-0052 first. +- A start-up check is not a platform qualification. The + [platform support guide](platform-support.md) remains the support statement. + ## SonarQube Cloud Project: [OMGCode](https://sonarcloud.io/project/overview?id=OMG-Software_OMGCode) From 4faab12fef4f959c6af56c9d473c402ce655dc51 Mon Sep 17 00:00:00 2001 From: James Chapman Date: Tue, 17 Nov 2026 15:38:09 +0000 Subject: [PATCH 2/4] fix: keep the testing release from moving backwards or stalling Scope the Testing build concurrency group by ref, so a manual run on another branch, which cannot publish, no longer replaces a waiting main run. Before replacing the release, compare the run's commit with the commit the testing tag points to and refuse anything that is not the same commit or ahead, so re-running an older main run cannot roll the release back. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/testing-build.yml | 22 +++++++++++++++---- CHANGELOG.md | 7 ++++-- ...ublish-rolling-testing-builds-from-main.md | 9 +++++--- docs/repository-checks.md | 13 +++++++++-- 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testing-build.yml b/.github/workflows/testing-build.yml index ea5d8af..63a025e 100644 --- a/.github/workflows/testing-build.yml +++ b/.github/workflows/testing-build.yml @@ -12,11 +12,13 @@ on: permissions: contents: read -# One run at a time and never cancelled, so a publish cannot stop halfway -# through replacing the release. A newer push waits; GitHub keeps only the -# newest waiting run, so the release ends at the newest main commit. +# One run per ref at a time and never cancelled, so a publish cannot stop +# halfway through replacing the release. A newer push waits; GitHub keeps only +# the newest waiting run, so the release ends at the newest main commit. The +# group includes the ref, so a manual run on another branch, which cannot +# publish, never replaces a main run that is waiting. concurrency: - group: testing-build + group: testing-build-${{ github.ref }} cancel-in-progress: false jobs: @@ -276,6 +278,18 @@ jobs: Verify downloads against \`SHA256SUMS\`. Workflow run: ${GITHUB_SERVER_URL}/${GH_REPO}/actions/runs/${GITHUB_RUN_ID} EOF + # Never move the tag backwards. A re-run of an older main run keeps + # its original GITHUB_SHA, so compare it with the published commit + # and refuse anything that is not the same commit or a descendant. + if published=$(gh api "repos/${GH_REPO}/commits/refs/tags/testing" --jq .sha 2>/dev/null); then + if [ "$published" != "$GITHUB_SHA" ]; then + status=$(gh api "repos/${GH_REPO}/compare/${published}...${GITHUB_SHA}" --jq .status) + if [ "$status" != "ahead" ]; then + echo "::error::testing is at ${published}; ${GITHUB_SHA} is ${status} of it, not ahead. Refusing to replace a newer build." + exit 1 + fi + fi + fi # Delete the previous release and its tag, then recreate both at # this commit. With assets, gh creates a draft, uploads, and then # publishes, so readers never see a mix of old and new archives. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f31578..fdc03d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,11 @@ Changes are recorded here before a release version is assigned. (`.tar.gz`), and Fedora 44 x86_64 in a digest-pinned container (`.tar.gz`). Each package job checks that both binaries start. After every job passes, a publish job, the only one with `contents: write`, replaces the rolling - `testing` prerelease and tag with the archives and a `SHA256SUMS` file. The - workspace tests do not run on Fedora. The Rust and Frontend workflows no + `testing` prerelease and tag with the archives and a `SHA256SUMS` file. It + refuses a commit behind the published one, so a re-run of an older run cannot + roll the release back, and runs queue per ref, so a manual run on another + branch cannot displace a waiting main run. The workspace tests do not run on + Fedora. The Rust and Frontend workflows no longer trigger on a push to `main`, gain `workflow_call`, and use caller-scoped concurrency groups; the Rust workflow takes a `linux-runner` input. There is no application change, so the version stays 0.34.0. This diff --git a/docs/adr/0052-publish-rolling-testing-builds-from-main.md b/docs/adr/0052-publish-rolling-testing-builds-from-main.md index d9ef31c..e24db8d 100644 --- a/docs/adr/0052-publish-rolling-testing-builds-from-main.md +++ b/docs/adr/0052-publish-rolling-testing-builds-from-main.md @@ -40,9 +40,12 @@ owns the details. the archives, writes `SHA256SUMS`, deletes the previous `testing` release and tag, and recreates them at the built commit as a prerelease that is never marked latest. It does not check out or run repository code. -- **Ordering.** Runs share one concurrency group and are never cancelled, so a - publish cannot stop halfway. GitHub keeps only the newest waiting run, so the - tag ends at the newest tested commit. +- **Ordering.** Runs on a ref share one concurrency group and are never + cancelled, so a publish cannot stop halfway. GitHub keeps only the newest + waiting run, so the tag ends at the newest tested commit. The group includes + the ref, so a manual run on another branch cannot displace a waiting main + run. The publish job also refuses a commit that is not the published commit + or ahead of it, so re-running an older run cannot roll the release back. Fedora's archive is built and start-checked only. The workspace tests do not run on Fedora, and the release notes and `BUILD-INFO.txt` say so. diff --git a/docs/repository-checks.md b/docs/repository-checks.md index 9756c36..c0d950b 100644 --- a/docs/repository-checks.md +++ b/docs/repository-checks.md @@ -151,9 +151,18 @@ assets, `gh` creates a draft, uploads, and then publishes, so nobody sees a mix of old and new archives. Downloads fail for a few seconds between the delete and the publish. -Runs share the `testing-build` concurrency group with `cancel-in-progress: +Runs use the concurrency group `testing-build-` with `cancel-in-progress: false`. A publish is never cancelled part way. GitHub keeps only the newest -waiting run, so the tag ends at the newest main commit whose tests passed. +waiting run in a group, so the tag ends at the newest main commit whose tests +passed. Because the group includes the ref, a manual run on another branch +cannot replace a waiting main run. + +Before deleting anything, the publish job resolves the commit that `testing` +points to and compares it with the run's commit through the compare API. It +continues only when the two are the same commit or the run's commit is ahead. +A re-run of an older main run keeps its original commit, so without this check +it could roll the release back; with it, the job fails and leaves the newer +release in place. If the tag is missing, the check is skipped. The assets have stable names, so links do not change between builds: `https://github.com/OMG-Software/OMGCode/releases/download/testing/omgcode-testing-windows-x86_64.zip`, From be739798e52265303d78137b5c7e4610f0558c7f Mon Sep 17 00:00:00 2001 From: James Chapman Date: Tue, 17 Nov 2026 15:41:42 +0000 Subject: [PATCH 3/4] fix: fail closed when the testing tag lookup errors The rollback guard skipped its comparison on any failure to read the testing tag, so an API error followed by a successful release lookup could still let an older run replace a newer release. Look the tag up with git/matching-refs, which returns an empty list when it is absent, so only a confirmed missing tag skips the comparison and any API error stops the job before anything is deleted. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/testing-build.yml | 9 ++++++++- docs/repository-checks.md | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing-build.yml b/.github/workflows/testing-build.yml index 63a025e..7dd2831 100644 --- a/.github/workflows/testing-build.yml +++ b/.github/workflows/testing-build.yml @@ -281,7 +281,14 @@ jobs: # Never move the tag backwards. A re-run of an older main run keeps # its original GITHUB_SHA, so compare it with the published commit # and refuse anything that is not the same commit or a descendant. - if published=$(gh api "repos/${GH_REPO}/commits/refs/tags/testing" --jq .sha 2>/dev/null); then + # Fail closed: matching-refs returns an empty list (HTTP 200) when + # the tag is absent, so any API error stops the job here, under + # `set -e`, before anything is deleted. matching-refs matches by + # prefix, so keep only the exact ref. + tag_count=$(gh api "repos/${GH_REPO}/git/matching-refs/tags/testing" \ + --jq '[.[] | select(.ref == "refs/tags/testing")] | length') + if [ "$tag_count" != 0 ]; then + published=$(gh api "repos/${GH_REPO}/commits/refs/tags/testing" --jq .sha) if [ "$published" != "$GITHUB_SHA" ]; then status=$(gh api "repos/${GH_REPO}/compare/${published}...${GITHUB_SHA}" --jq .status) if [ "$status" != "ahead" ]; then diff --git a/docs/repository-checks.md b/docs/repository-checks.md index c0d950b..b531fb0 100644 --- a/docs/repository-checks.md +++ b/docs/repository-checks.md @@ -162,7 +162,10 @@ points to and compares it with the run's commit through the compare API. It continues only when the two are the same commit or the run's commit is ahead. A re-run of an older main run keeps its original commit, so without this check it could roll the release back; with it, the job fails and leaves the newer -release in place. If the tag is missing, the check is skipped. +release in place. The check fails closed: it looks the tag up with +`git/matching-refs`, which returns an empty list when the tag is absent, so only +a confirmed missing tag skips the comparison. Any API error stops the job +before anything is deleted. The assets have stable names, so links do not change between builds: `https://github.com/OMG-Software/OMGCode/releases/download/testing/omgcode-testing-windows-x86_64.zip`, From 5467b9ddd0d1e8d712edffbcea999110fc304dab Mon Sep 17 00:00:00 2001 From: James Chapman Date: Tue, 17 Nov 2026 16:05:01 +0000 Subject: [PATCH 4/4] ci: publish the rolling build under a latest tag Rename the rolling release and tag from `testing` to `latest`, and the assets from omgcode-testing- to omgcode-, so the download URL is releases/download/latest/omgcode-.. The release stays a prerelease not marked latest, so GitHub's own /releases/latest route does not resolve to it; the guides say so. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/testing-build.yml | 50 +++++++++---------- AGENTS.md | 4 +- CHANGELOG.md | 4 +- ...ublish-rolling-testing-builds-from-main.md | 9 ++-- docs/coding-rules.md | 2 +- docs/desktop-interface.md | 4 +- docs/platform-support.md | 2 +- docs/repository-checks.md | 22 +++++--- 8 files changed, 53 insertions(+), 44 deletions(-) diff --git a/.github/workflows/testing-build.yml b/.github/workflows/testing-build.yml index 7dd2831..5bb3aef 100644 --- a/.github/workflows/testing-build.yml +++ b/.github/workflows/testing-build.yml @@ -1,7 +1,7 @@ name: Testing build # Every push to main (a merged pull request) tests, builds, and packages the -# CLI and desktop binaries, then replaces the rolling `testing` prerelease. +# CLI and desktop binaries, then replaces the rolling `latest` prerelease. # See docs/repository-checks.md#testing-build-workflow and ADR-0052. on: @@ -68,7 +68,7 @@ jobs: shell: pwsh run: | $ErrorActionPreference = 'Stop' - $name = 'omgcode-testing-windows-x86_64' + $name = 'omgcode-windows-x86_64' New-Item -ItemType Directory -Path "dist/$name" | Out-Null Copy-Item target/release/omgcode.exe, target/release/omgcode-desktop.exe, LICENSE, README.md "dist/$name/" $version = (& .\target\release\omgcode.exe --version) @@ -86,8 +86,8 @@ jobs: Compress-Archive -Path "dist/$name" -DestinationPath "dist/$name.zip" - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - name: omgcode-testing-windows-x86_64 - path: dist/omgcode-testing-windows-x86_64.zip + name: omgcode-windows-x86_64 + path: dist/omgcode-windows-x86_64.zip if-no-files-found: error retention-days: 7 @@ -131,7 +131,7 @@ jobs: fi - name: Package env: - PACKAGE_NAME: omgcode-testing-ubuntu-x86_64 + PACKAGE_NAME: omgcode-ubuntu-x86_64 RUNTIME_NOTE: >- Runtime prerequisites for omgcode-desktop: libwebkit2gtk-4.1-0 and its GTK dependencies. The binaries link against this Ubuntu release's glibc. @@ -152,8 +152,8 @@ jobs: tar -C dist -czf "dist/$PACKAGE_NAME.tar.gz" "$PACKAGE_NAME" - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - name: omgcode-testing-ubuntu-x86_64 - path: dist/omgcode-testing-ubuntu-x86_64.tar.gz + name: omgcode-ubuntu-x86_64 + path: dist/omgcode-ubuntu-x86_64.tar.gz if-no-files-found: error retention-days: 7 @@ -204,7 +204,7 @@ jobs: fi - name: Package env: - PACKAGE_NAME: omgcode-testing-fedora44-x86_64 + PACKAGE_NAME: omgcode-fedora44-x86_64 RUNTIME_NOTE: >- Runtime prerequisites for omgcode-desktop: webkit2gtk4.1 and its GTK dependencies. Built in a Fedora 44 container; the workspace tests did @@ -226,13 +226,13 @@ jobs: tar -C dist -czf "dist/$PACKAGE_NAME.tar.gz" "$PACKAGE_NAME" - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: - name: omgcode-testing-fedora44-x86_64 - path: dist/omgcode-testing-fedora44-x86_64.tar.gz + name: omgcode-fedora44-x86_64 + path: dist/omgcode-fedora44-x86_64.tar.gz if-no-files-found: error retention-days: 7 publish: - name: Publish the testing release + name: Publish the latest release # Publish only after every test and package job succeeds, and only from # main; a manual run on another branch builds but does not publish. needs: [rust, frontend, package-windows, package-ubuntu, package-fedora] @@ -246,16 +246,16 @@ jobs: steps: - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - pattern: omgcode-testing-* + pattern: omgcode-* path: assets merge-multiple: true - name: Write checksums working-directory: assets run: | set -euo pipefail - sha256sum -- omgcode-testing-* > SHA256SUMS + sha256sum -- omgcode-* > SHA256SUMS cat SHA256SUMS - - name: Replace the testing release + - name: Replace the latest release env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} @@ -285,14 +285,14 @@ jobs: # the tag is absent, so any API error stops the job here, under # `set -e`, before anything is deleted. matching-refs matches by # prefix, so keep only the exact ref. - tag_count=$(gh api "repos/${GH_REPO}/git/matching-refs/tags/testing" \ - --jq '[.[] | select(.ref == "refs/tags/testing")] | length') + tag_count=$(gh api "repos/${GH_REPO}/git/matching-refs/tags/latest" \ + --jq '[.[] | select(.ref == "refs/tags/latest")] | length') if [ "$tag_count" != 0 ]; then - published=$(gh api "repos/${GH_REPO}/commits/refs/tags/testing" --jq .sha) + published=$(gh api "repos/${GH_REPO}/commits/refs/tags/latest" --jq .sha) if [ "$published" != "$GITHUB_SHA" ]; then status=$(gh api "repos/${GH_REPO}/compare/${published}...${GITHUB_SHA}" --jq .status) if [ "$status" != "ahead" ]; then - echo "::error::testing is at ${published}; ${GITHUB_SHA} is ${status} of it, not ahead. Refusing to replace a newer build." + echo "::error::latest is at ${published}; ${GITHUB_SHA} is ${status} of it, not ahead. Refusing to replace a newer build." exit 1 fi fi @@ -300,16 +300,16 @@ jobs: # Delete the previous release and its tag, then recreate both at # this commit. With assets, gh creates a draft, uploads, and then # publishes, so readers never see a mix of old and new archives. - if gh release view testing >/dev/null 2>&1; then - gh release delete testing --yes --cleanup-tag + if gh release view latest >/dev/null 2>&1; then + gh release delete latest --yes --cleanup-tag fi - if gh api "repos/${GH_REPO}/git/ref/tags/testing" >/dev/null 2>&1; then - gh api -X DELETE "repos/${GH_REPO}/git/refs/tags/testing" + if gh api "repos/${GH_REPO}/git/ref/tags/latest" >/dev/null 2>&1; then + gh api -X DELETE "repos/${GH_REPO}/git/refs/tags/latest" fi - gh release create testing \ + gh release create latest \ --target "$GITHUB_SHA" \ --prerelease \ --latest=false \ - --title "Testing build (${short_sha})" \ + --title "Latest testing build (${short_sha})" \ --notes-file notes.md \ - assets/omgcode-testing-* assets/SHA256SUMS + assets/omgcode-* assets/SHA256SUMS diff --git a/AGENTS.md b/AGENTS.md index 9bcfd22..cf5eac1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -65,8 +65,8 @@ edit tool call in progress is not interruptible On the CLI, Ctrl-C during `chat` or `session compact` cancels instead of ending the process. The desktop shell has no settings interface, development panels, installer, or -recovery interface. CI publishes unsigned `testing` archives from each merge to -`main` ([ADR-0052](docs/adr/0052-publish-rolling-testing-builds-from-main.md)). Most other planned features are not +recovery interface. CI publishes unsigned archives of each merge to `main` under +the rolling `latest` tag ([ADR-0052](docs/adr/0052-publish-rolling-testing-builds-from-main.md)). Most other planned features are not implemented. The core validates replacement records and can prepare protected checkpoints on Linux and Windows through a live authorized binding. The CLI provides diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc03d7..12402d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,11 @@ Changes are recorded here before a release version is assigned. (`.tar.gz`), and Fedora 44 x86_64 in a digest-pinned container (`.tar.gz`). Each package job checks that both binaries start. After every job passes, a publish job, the only one with `contents: write`, replaces the rolling - `testing` prerelease and tag with the archives and a `SHA256SUMS` file. It + `latest` prerelease and tag with the archives and a `SHA256SUMS` file. It refuses a commit behind the published one, so a re-run of an older run cannot roll the release back, and runs queue per ref, so a manual run on another branch cannot displace a waiting main run. The workspace tests do not run on - Fedora. The Rust and Frontend workflows no + Fedora. Assets are named `omgcode-.`. The Rust and Frontend workflows no longer trigger on a push to `main`, gain `workflow_call`, and use caller-scoped concurrency groups; the Rust workflow takes a `linux-runner` input. There is no application change, so the version stays 0.34.0. This diff --git a/docs/adr/0052-publish-rolling-testing-builds-from-main.md b/docs/adr/0052-publish-rolling-testing-builds-from-main.md index e24db8d..e62cfbb 100644 --- a/docs/adr/0052-publish-rolling-testing-builds-from-main.md +++ b/docs/adr/0052-publish-rolling-testing-builds-from-main.md @@ -37,7 +37,7 @@ owns the details. a `BUILD-INFO.txt`. Windows produces a `.zip` and Linux a `.tar.gz`. - **Publication.** A final job runs only from `main` after every test and package job succeeds. It is the only job with `contents: write`. It downloads - the archives, writes `SHA256SUMS`, deletes the previous `testing` release and + the archives, writes `SHA256SUMS`, deletes the previous `latest` release and tag, and recreates them at the built commit as a prerelease that is never marked latest. It does not check out or run repository code. - **Ordering.** Runs on a ref share one concurrency group and are never @@ -73,7 +73,10 @@ run on Fedora, and the release notes and `BUILD-INFO.txt` say so. ## Consequences - Stable download URLs: - `releases/download/testing/omgcode-testing-.`. + `releases/download/latest/omgcode-.`. The tag is named + `latest`, but it stays a prerelease that is not marked latest, because the + prototype is not release-ready. GitHub's `/releases/latest` route therefore + does not resolve to it. - The archives are unsigned prototype builds. They carry no claim of release qualification, sandbox containment, or platform support beyond the [platform support guide](../platform-support.md). @@ -83,7 +86,7 @@ run on Fedora, and the release notes and `BUILD-INFO.txt` say so. archive's glibc and WebKitGTK requirements move with it. - The Fedora image digest freezes the base packages until someone updates it. - If the repository enables immutable releases, deleting and recreating the - `testing` tag will fail. Revisit this decision before enabling that setting. + `latest` tag will fail. Revisit this decision before enabling that setting. - None of this has run on GitHub. Check the first run on `main`, the release assets, and the tag target before relying on it. diff --git a/docs/coding-rules.md b/docs/coding-rules.md index 572c03b..b7eb598 100644 --- a/docs/coding-rules.md +++ b/docs/coding-rules.md @@ -239,7 +239,7 @@ Clippy, tests, and doc tests on Ubuntu 24.04 and Windows Server 2025. `.github/workflows/frontend.yml` runs the type check, Biome, Vitest, and the bundle checks on the same two systems. On a push to main, `.github/workflows/testing-build.yml` calls both, builds and packages release -binaries for Windows, Ubuntu, and Fedora 44, and replaces the `testing` +binaries for Windows, Ubuntu, and Fedora 44, and replaces the `latest` prerelease. None of these workflow changes has run on GitHub yet. The desktop shell is a prototype, and native confinement exists only for the trusted `run` command and the approval-gated command tool; it is not release-qualified. Rustfmt checks formatting; Clippy and diff --git a/docs/desktop-interface.md b/docs/desktop-interface.md index 956730c..a8cc1cd 100644 --- a/docs/desktop-interface.md +++ b/docs/desktop-interface.md @@ -4,7 +4,7 @@ This guide owns the desktop shell: what it is, how to start it, what each window may call, how the session tree, search, chat, and approvals behave, and what the design does and does not defend. It is a prototype. It is not release-ready, and it has no installer. CI publishes unsigned archives of -the binaries as a rolling `testing` prerelease +the binaries as a rolling `latest` prerelease ([ADR-0052](adr/0052-publish-rolling-testing-builds-from-main.md)). The decisions behind it are recorded in @@ -53,7 +53,7 @@ merged to `main` at the time of writing): Not implemented: - Installers, signing, and Tauri bundles. `bundle.active` is `false`. The - `testing` archives hold the bare binaries only. + `latest` archives hold the bare binaries only. - Interrupting a read, list, or edit tool call in progress. Cancelling such a turn waits for the call to end. - A settings interface. Workspace settings change only through the trusted diff --git a/docs/platform-support.md b/docs/platform-support.md index b7adbca..ffc5f27 100644 --- a/docs/platform-support.md +++ b/docs/platform-support.md @@ -13,7 +13,7 @@ containment. | --- | --- | | Windows versions and architectures | CI tests and packages on Windows Server 2025 x86_64; supported client versions and architectures are not selected | | Linux distributions, kernels, and architectures | CI tests on Ubuntu 24.04 and `ubuntu-latest`, packages on `ubuntu-latest`, and builds a Fedora 44 archive in a container without running the tests there. All x86_64. Supported distributions, kernels, and architectures are not selected | -| Testing archives | Unsigned `.zip`/`.tar.gz` archives of `omgcode` and `omgcode-desktop` for each merge to main, published as the rolling `testing` prerelease ([testing build](repository-checks.md#testing-build-workflow)). No installer. Not a release or a support claim | +| Testing archives | Unsigned `.zip`/`.tar.gz` archives of `omgcode` and `omgcode-desktop` for each merge to main, published as the rolling `latest` prerelease ([testing build](repository-checks.md#testing-build-workflow)). No installer. Not a release or a support claim | | Rust edition and minimum version | Edition 2024; workspace `rust-version` is 1.99.1 | | Pinned development toolchain | Rust 1.99.1 in `rust-toolchain.toml`, with rustfmt and Clippy | | Webview and frontend prerequisites | Windows needs the WebView2 runtime. Linux needs the WebKitGTK 4.1 development packages to build ([Desktop shell](#desktop-shell)). The frontend build needs Node 24. No other version is qualified | diff --git a/docs/repository-checks.md b/docs/repository-checks.md index b531fb0..8ccae53 100644 --- a/docs/repository-checks.md +++ b/docs/repository-checks.md @@ -111,7 +111,7 @@ start delegated `systemd-run --user` scopes and fail without one. ## Testing build workflow `.github/workflows/testing-build.yml` runs on every push to main and on manual -dispatch. It replaces the rolling `testing` prerelease with archives of the +dispatch. It replaces the rolling `latest` prerelease with archives of the newest tested commit ([ADR-0052](adr/0052-publish-rolling-testing-builds-from-main.md)). | Job | Runner | Work | @@ -145,8 +145,8 @@ The publish job needs every test and package job and runs only for `refs/heads/main`, so a manual run on another branch builds but publishes nothing. It is the only job with `contents: write`. It never checks out or runs repository or dependency code. It downloads the archives, writes `SHA256SUMS`, -deletes the previous `testing` release and tag, and runs `gh release create -testing --target --prerelease --latest=false` with the assets. With +deletes the previous `latest` release and tag, and runs `gh release create +latest --target --prerelease --latest=false` with the assets. With assets, `gh` creates a draft, uploads, and then publishes, so nobody sees a mix of old and new archives. Downloads fail for a few seconds between the delete and the publish. @@ -157,7 +157,7 @@ waiting run in a group, so the tag ends at the newest main commit whose tests passed. Because the group includes the ref, a manual run on another branch cannot replace a waiting main run. -Before deleting anything, the publish job resolves the commit that `testing` +Before deleting anything, the publish job resolves the commit that `latest` points to and compares it with the run's commit through the compare API. It continues only when the two are the same commit or the run's commit is ahead. A re-run of an older main run keeps its original commit, so without this check @@ -168,9 +168,15 @@ a confirmed missing tag skips the comparison. Any API error stops the job before anything is deleted. The assets have stable names, so links do not change between builds: -`https://github.com/OMG-Software/OMGCode/releases/download/testing/omgcode-testing-windows-x86_64.zip`, -`.../omgcode-testing-ubuntu-x86_64.tar.gz`, -`.../omgcode-testing-fedora44-x86_64.tar.gz`, and `.../SHA256SUMS`. +`https://github.com/OMG-Software/OMGCode/releases/download/latest/omgcode-windows-x86_64.zip`, +`.../omgcode-ubuntu-x86_64.tar.gz`, +`.../omgcode-fedora44-x86_64.tar.gz`, and `.../SHA256SUMS`. + +The tag is named `latest`, but GitHub's own `/releases/latest` route and the +release list's "Latest" badge select the newest release that is not a +prerelease. This release is a prerelease created with `--latest=false`, so +those do not point to it. Link to `releases/tag/latest` or +`releases/download/latest/` instead. Limits: @@ -178,7 +184,7 @@ Limits: release assets, and the tag target before relying on it. - `ubuntu-latest` moves when GitHub changes its default image, and the Ubuntu archive's glibc and WebKitGTK requirements move with it. -- Enabling immutable releases would block reusing the `testing` tag. Revisit +- Enabling immutable releases would block reusing the `latest` tag. Revisit ADR-0052 first. - A start-up check is not a platform qualification. The [platform support guide](platform-support.md) remains the support statement.