Skip to content

aidc v3.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 15 Oct 07:02
v3.0.0
7369bb3

The first tagged release. The 2.2.0–2.5.0 sections below document the development increments this tag ships; this section lists the host→container credential seeding that completes the one-way contract, plus the release engineering. (The in-flight labels 2.6.0 and 2.7.0 were used during development and appear in git history as version bumps, but were never released or given sections — everything they described ships here.)

Fixed

  • The CI pin-check image builds codex and grok again — both upstream installers had drifted, silently skipping the agents. The sbom workflow's check-image-pins step reported codex/grok as "executable file not found" while the image build itself succeeded: both install scripts changed behavior under the stages' assumptions. The codex installer now symlinks $CODEX_INSTALL_DIR/codex → $HOME/.codex/packages/standalone/current/bin/codex and defaults HOME to /root in a build stage — the binary landed at /root/.codex/…, outside every path the final stage copies. The x.ai installer downloads the versioned binary to ~/.grok/downloads/grok-<platform> and creates $GROK_BIN_DIR/{grok,agent} as symlinks to it — the build-stage test -x passed because the target existed inside the stage, but the final image copies only .local/, leaving a dangling symlink at runtime (exec: "grok": executable file not found in $PATH). The codex stage no longer uses the installer at all — it downloads the versioned release package directly (releases.openai.com with a GitHub fallback), verifies it against the published SHA256SUMS, and installs the binary (asserting --version executes, so arch mismatches fail the build). The grok stage pins HOME=/home/aidc, installs the downloaded binary explicitly into /home/aidc/.local/bin, and — like all six agent stages now — asserts the binary exists, so the next upstream installer drift fails the image build (where it's diagnosable) instead of surfacing as a pin-check failure after the fact. Verified live: codex-cli 0.162.1 and grok 1.0.52 via the new paths (SHA256SUMS OK, --version clean); drift-guard cases added to tests/base-image-stages.test.sh (32 → 38).

Fixed

  • Container credentials no longer flow to the host: the opencode session sync's db merge is now auth-direction-safe. Root-caused from a real report ("logged into OpenAI on the host, the container never sees it"): opencode v2 no longer writes logins to auth.json — they land in opencode.db (credential rows per provider, account/account_state/control_account for ChatGPT/Codex-style OAuth) — and the session sync's db merge iterated every shared table. So every sync (and every auto-sync trigger: container start, agent exit, down, destroy) could INSERT OR IGNORE the container's credential rows into the host's own db — the exact inverse of the documented "credentials never leave the container" guarantee (it also explains mystery duplicate provider entries in a host opencode auth list). Two hard guards now enforce the one-way contract: the merge skips auth tables — known names (credential, account, account_state, control_account; case-folded like the journal exclusion) plus a schema-driven catch for any table carrying access_token/refresh_token columns, so a future upstream auth table can't slip through while session tables keep merging — and the at-rest quarantine copy is scrubbed of those rows right after extract (secure-deleting DELETEs + WAL checkpoint, so the secret is neither in rows nor recoverable from freed pages; session tables untouched), so container auth state no longer persists on host disk. Host-owned rows are never touched, and existing host dbs are not retro-cleaned (no provenance column distinguishes container-originated rows; audit with opencode auth list). Covered by tests/sync-sessions.test.sh: a direct merge-guard case (session rows merge, auth rows don't, token-column guard catches an unknown table name), restricted-mode guard coverage, an end-to-end case (quarantine scrubbed, host db receives sessions only), and a scrub-helper case.

Added

  • Host logins now seed container-ward — the missing half of the opencode credential contract. The auth-direction guards close container→host; this closes host→container for the v2 world: aidc::opencode_auth_snapshot (host side, every compose-env pass) writes a small 0600 .aidc-auth-seed.json of just the auth tables (read-only SELECTs — WAL readers never block the host's opencode; cmp-quiet, logged only on content change) into the opencode-data seed dir, and the container's bootstrap applies it into the volume db (seed_opencode_auth): version-tolerant column intersection, PK-conflict upsert on time_updated recency (a fresher host login wins; a fresher container-side token refresh is kept), INSERT OR IGNORE for account_state, counts logged — never values. Every stage is visible without sprawl: the container logs what was pushed plus post-apply totals (seeded host auth rows … ; container db now has credential=8, account=1, in docker logs — bootstrap is the container start command); the host prints its auth-table counts only when the snapshot actually changes (refreshed the opencode auth seed … (host db: credential=18, …)) and stays quiet on routine passes (counts available under aidc --debug) — a first cut logged the routine line on every compose-env pass, which sprawled several lines over every launch. AIDC_OPENCODE_SYNC_AUTH=0 disables both halves. Fresh folders work on the first run too: v2 keeps credentials only in the db and ignores auth.json entirely (verified empirically — a fresh db + populated auth.json gains zero credential rows and auth list returns nothing), so on a fresh volume bootstrap kicks opencode once headlessly (opencode run initializes the db + schema before any model call), then applies the snapshot rows immediately — the first session carries the host's logins; on an existing db the apply is direct. A host-side watcher (aidc::opencode_auth_seed_wait) also applies the snapshot the moment a running container's db appears. Covered by the new tests/opencode-auth-seed.test.sh (15 cases: snapshot shape/0600/knob/no-host-db/partial-schema/cmp-quiet, seed insert/upsert/downgrade-protection/idempotency/schema-tolerance/pre-v2 no-op/knob, fresh-volume kick + apply, knob contrast, corrupt-snapshot rollback).
  • The repo's own unit suites now run in CI. The hermetic suites under tests/ were only ever run by hand; the new tests workflow runs the full loop on every push/PR on ubuntu-latest (no Docker needed — the suites stub the container plumbing) and fails with the failing suite's output. README carries the badge alongside shellcheck/scorecard.

Changed

  • All aidc and bootstrap messages are timestamped ([aidc 2026-10-15 09:12:33] … / [bootstrap …] warn: …) — sync/merge lines land in scrollback and docker logs and get triaged later; the wall clock makes that triage possible. Message contracts in the suites grep substrings, which a prefix doesn't break.

  • All GitHub Actions updated to their latest releases — checkout v6→v7.0.1, upload-artifact v4→v7.0.2, cache v4.3.0→v6.1.0, setup-buildx v3.9.0→v4.4.1, scorecard-action v2.4.3→v2.5.0, codeql-action v3.36.3→v4.38.3 (four major bumps) — still SHA-pinned with version comments per the repo convention. And they stay current: a new .github/dependabot.yml (actions ecosystem, weekly) opens update PRs against the pinned SHAs; the bump PR's own CI run remains the validation.

  • README refreshed for the release: release/tests/shellcheck/Scorecard badges, a "What's new in v3.0.0" highlights section, and accuracy updates — the credential-direction contract (host→container seeding; never container→host) is now stated where session sync is described.