Skip to content

ci: reuse provenance-checked out builds within maws-app - #173

Merged
SSFSKIM merged 1 commit into
masterfrom
ci-hosted-build-reuse
Oct 26, 2026
Merged

SSFSKIM merged 1 commit into
masterfrom
ci-hosted-build-reuse

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Change

Hosted groups key out/ by the published request tree and plain/harness variant, not by the trailer-bearing request commit. The workflow looks up the newest unexpired matching artifact in maws-app, verifies provenance, downloads by artifact ID into a fresh directory, and delegates digest verification/restoration or a fresh build to the existing e2e-build.sh. A fresh build uploads immediately before tests; their own build call then restores the local cache.

  • Provenance: the originating run must have path .github/workflows/hosted-mac.yml, a ci/hosted/ head branch, and a head commit whose API tree equals this request’s tree. Mismatches log their reason and build locally.
  • Only the e2e job gains actions: read, beside contents: read. No cross-repository token or secret.
  • Lookup/download failures fall back to building; bad or incomplete cache data rebuilds. Upload is best effort, logs failure, and retains artifacts for 1 day. Concurrent builders may independently upload; later lookups choose the newest.

Public-artifact input audit

The artifact contains only the generated {out/, digest}. The published tree supplies electron.vite.config.ts, package.json, source/assets and the lockfile-pinned dependencies. The config reads package.json and git metadata; its only project-local alias module, lowlight-no-grammars.mjs, re-exports the installed lowlight engine and reads no environment. The React/Babel compiler and Tailwind plugins are configured in the tree, with no custom external config or additional define injection.

Input Hosted build value/source Publication consequence
MAWS_HARNESS 0 for plain / 1 for harness, set by e2e-build.sh from the parsed package script Variant is part of the artifact key
MAWS_BUILD_RENDERER 1, pinned by the helper Full renderer, never a main-only build
NODE_ENV; NODE_ENV_ELECTRON_VITE; mode production; production; production, helper and electron-vite build defaults Production code paths
NODE_OPTIONS --max-old-space-size=5120, overlay job Heap limit, not embedded data
VITE_, MAIN_VITE_, PRELOAD_VITE_, RENDERER_VITE_ None, verified in both hosted logs; helper refuses inherited keys without logging values No host-supplied environment is injected into public output or omitted from the key
.env / .env.local / .env.production / .env.production.local None in this tree; helper refuses untracked/modified files and non-regular files Any future accepted dotenv file must match the published tree
import.meta.env.DEV false; the renderer’s only environment reader Dev surfaces excluded
MAWS_DEV_CSP_NONCE null under build, not the development-only random nonce No runtime/host nonce embedded
MAWS_VERSION 0.0.0 from package.json Already public tree data
MAWS_BUILD Builder request’s public short commit SHA and build timestamp Reusers keep the original builder stamp, deliberately; tree provenance is verified
process.env in main/preload Left as runtime process.env by electron-vite; not replaced with a host environment object No bulk environment capture
GH_TOKEN / github.token Used only by the lookup/download steps, not passed as build inputs No repository token embedded

No HOSTED_MAC_E2E consumer compares the build stamp to its checkout. The only such assertion is e2e/bench-edit-live.spec.ts:295, in a live bench group that is never hosted. The coordinator approved retaining the original builder stamp. Both hosted logs below verify the effective production mode/variant, no exposed Vite environment and no dotenv files on the actual image.

Verification

  • New helper tests: 16/16, real helper/build subprocesses with GitHub and electron-vite executable doubles. Covers stable same-tree keys, variant separation, newest/unexpired selection, every provenance rejection, lookup failures at each endpoint, download failure/partial data, corrupt digest rebuild, real build failures, and public environment/dotenv guards.
  • Existing e2e-build tests: 5/5, unchanged implementation. Focused lint passed. No full local suites.
  • Static gate GREEN: 40333453712 on 150e7bef9. Independent reviewer-high found no issues on 150e7bef9: provenance, immutable IDs, expiry/pagination, download extraction, nonfatal cache operations, permissions and public-input refusals checked. Both sequential hosted document-app requests are GREEN on the same head, with matching 20 passed counts. Both must pass with matching counts; first builds/uploads, second provenance-checks/restores the same tree’s artifact.

Hosted proof: first request

MAWS 40333949132 → maws-app 40334080617, 20 passed.

  • Published tree: 9b10a13ec06ccd94ff79f5b385ed90da67e2145e; variant plain.
  • Lookup found no unexpired candidate. The dedicated out/ build step took 152 s (13:51:39–13:54:11Z).
  • Upload succeeded before tests: artifact 12656022506, e2e-build-9b10a13ec06ccd94ff79f5b385ed90da67e2145e-plain, 16,136,646 bytes, created 2026-10-26 13:54:16Z, expires 2026-10-27 13:54:12Z. Upload step 5 s.
  • The tests’ own build call restored the local entry; the count line was 20 passed (3.4m).
  • Actual hosted input log confirms NODE_ENV=production, MAWS_BUILD_RENDERER=1, MAWS_HARNESS=0, exposed Vite environment none, dotenv none.
  • A second document-app request of the identical MAWS head was submitted only after this upload and successful run.

Hosted proof: second request restores across runs

MAWS 40335486565 → maws-app 40335627636, 20 passed again.

The second request logged artifact 12656022506 from run 40334080617: provenance verified for tree 9b10a13ec06ccd94ff79f5b385ed90da67e2145e, downloaded that artifact by ID, and logged e2e-build: out/ (plain) restored from … with the identical digest 0183d06d347cfea7fc9cab90dcde76191297b7cf27bec45f28637c93a5b3b791. Its upload step was skipped; the run produced no duplicate build artifact. Its package script restored the same local entry again before Playwright.

document-app, same MAWS head and published tree First request Second request
Dedicated out/ build step 152 s <1 s (~0.7 s between helper-start and restored log)
Complete lookup/build/upload or lookup/download/restore interval ~157.6 s ~4.0 s
Playwright result 20 passed 20 passed
Hosted e2e job (all phases) 7m30s 3m56s

The reused-build phase saved approximately 154 s of hosted-slot time in this pair. The larger whole-job difference also includes setup and test-duration variation, so it is not all attributed to caching. Only one of these proof jobs ran at a time. Both reported the expected public-build inputs and no exposed Vite/dotenv values.

Landing

Ready for the MAWS architect to land: high review clean, final-head static green (238 gate-script tests), and the sequential cross-run proof green. Head 150e7bef9d1aafb413fabbc090c1946fae2599e1. This worker will not merge. ci-kit’s hosted-spec Decision Log update belongs to the coordinator.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T13:50:48.739333Z 150e7be PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 5cf98f1 into master Oct 26, 2026
SSFSKIM added a commit that referenced this pull request Oct 26, 2026
…ked out/ build per request tree and variant, PR #173)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 7, 2026
…; M4's residue on boards #173 and #174

Progress records each merge with its sha; the cutover is ticked. Outcomes
gains the cutover's entry, and M4's left-for-later items name their tickets
(the conversation fixture is a row in the architect's tracker).

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM added a commit that referenced this pull request Nov 7, 2026
…due on boards #173/#174

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant