Skip to content

Lane contract and AGENTS.md steps 2-4 for cloud lanes (cloud migration item 5) - #223

Merged
thejackshelton merged 35 commits into
masterfrom
lane-contract-cloud
Oct 8, 2026
Merged

thejackshelton merged 35 commits into
masterfrom
lane-contract-cloud

Conversation

@thejackshelton

@thejackshelton thejackshelton commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Cloud migration plan item 5 (docs/goals/milestone-2-proof/notes/cloud-migration.md). Docs only. Every quality rule is kept; only how each rule is met changes for a cloud lane (Ubuntu x86_64, fresh clone, 30-minute command limit, no macOS, Chrome, Swift or Kotlin). The local-Mac path stays documented as an alternative.

What changed

lane-contract.md

  • New "GitHub commands (REST)" section: exact gh api forms for creating a PR, head sha and conflict state, the files a PR changes, open PRs, PR comments, review comments, replying to a review comment, adding and removing labels, and a commit's checks. Lanes use these until the PM confirms GraphQL passes the proxy.
  • Regen: only on CI and only through the regen label, with no local fallback in the cloud; how to find the run over REST (pull_request runs on the branch, skipped ones dropped).
  • Targeted tests: node scripts/test-shards.ts group-files decides; platform-free files run locally, Chrome and native files through pnpm ci:test-files ... --once. New Never rule: no claim that a Chrome or native file passed unless ci:test-files reported it. The cross-cutting registry tests (Chrome group) go in the ci:test-files run. Macos-only floor and pin writes use --floor-write.
  • Heavy commands: never run regen, full test, captures, wpt:run or tw:sweep in a cloud session (replaces the heavy-lease rule; the lease stays for the Mac).
  • Waiting: end the turn while CI runs and resume from GitHub state; single polls (--once, pr:review without --wait), optionally repeated in a foreground loop under 25 minutes. No watchers, job.sh, leases or .done files.
  • Push work in progress early. The local-prep exception for a queued parent now pushes the prep branch (no PR, no regen).
  • Stop rule 5: under 5 GB free on the session disk (df -h .) replaces the macOS /System/Volumes/Data 40 GB check (the cloud disk is 30 GB in total, so the old rule would always fire).
  • Review loop: what to do while pr:review still uses GraphQL (plan item 2): answer findings over REST, check CI over REST, report that pr:review could not run; never claim clean without its exit 0.
  • Landing: the precomputed Claude review the driver needs is provided by the PM (plan item 8 moves it to a PR comment); lanes don't write it.
  • Specs move from /tmp/specs to docs/goals/milestone-2-proof/notes/-spec.md on a pushed spec/<task> branch, which the PM commits as a board update.
  • Resuming a killed lane reads GitHub state (branch, PR, checks, regen and test-files runs) instead of /tmp transcripts and worktrees.
  • Receipt: a waiting on line with run ids replaces job ids; the READY line from the lane header is now in the contract.
  • The header's reference to notes/PM-2026-10-03.md for "Defaults D1–D13": that note has the owner's approval but its D1–D13 table was never filled in. The header now cites the approval section and says the defaults are this file's Work and Scope sections.
  • New "Local Mac" section keeps the Mac path: worktrees, job.sh, heavy lease, local Chrome and native tests, the 15-minute local regen fallback, watchers, gh pr create, pr:review --wait, the 40 GB disk rule, transcript-tail resume.

AGENTS.md

  • "Before reporting done": pnpm typecheck plus the tests for what you changed, saying exactly what passed. The full pnpm test runs once per landing in the driver. In the cloud, platform-free files run locally and Chrome and native files through ci:test-files.
  • Step 2: push work in progress early; regen on CI only in the cloud, through the regen label (pnpm regen still allowed on the Mac); targeted tests, with the full test left to the driver.
  • Direct pushes to master: owner-requested changes need the full test of the exact commit first (pnpm test on the Mac; in the cloud, full-test.yml dispatched on a scratch branch's commit, then the push and the scratch branch's deletion). Board-only docs/goals/** pushes need only typecheck.
  • Step 3: REST form of PR creation (gh pr create still fine on the Mac).
  • Step 4: in the cloud, pr:review without --wait as a single poll, ending the turn while CI runs.

Review fixes (42a11b6, from the Claude review of e3b21ae)

Review fixes (second round, from the Claude review of 42a11b6)

  • READY gate. pr:review can't see ci:test-files runs (their checks are filed under master), so Landing step 4 and the READY line now require, on the PR's current head sha: pr:review exit 0, the regen run finished for that sha (or none was needed), typecheck passed, and every targeted test passed (platform-free locally, the rest through ci:test-files runs whose tested <ref> at <sha> line names that sha). The READY report lists the sha and every run URL. Lanes now pass the full head sha, not the branch, to ci:test-files.
  • AGENTS.md step 3: audit before opening the PR, not before the first push.
  • Direct-push full test: rebase onto origin/master first; if master moves before the push, rebase and test again.
  • The ci:test-files resume command filters by the head sha in the run title. I tested the filter mechanics on real runs by title prefix (test files of ci-test-files lists exactly that ref's two runs, not ci-test-files-mismatch or -plant). No run with a sha ref exists yet, so the sha form itself hasn't run; test-files.yml documents ref as "Full commit sha or branch".

What passed

  • pnpm vitest run packages/parity/test/regen.test.ts -t "catch-up procedure" (it reads AGENTS.md steps 1 and 2): 1 passed.
  • pnpm typecheck: pass.
  • The REST commands in the contract were run against this repo (head sha, files, comments, review comments, regen-on-ci, test-files and full-test run lookups); this PR was created with the contract's REST create command, and its label add and remove commands were run on this PR.

No tolerance, check, test or fixture changed.

🤖 Generated with Claude Code

…Apps kept the host in the scaled window one scene rotation left, so capture trust's OS screenshot showed the wallpaper
# Conflicts:
#	packages/parity/test/device-run.test.ts
…t lanes rerun, so the device records await the landing driver's device run)
…h pnpm ci:test-files to dispatch and read it over REST
…ems 1 and 4)

scripts/cloud-setup.sh, run by the project SessionStart hook only when CLAUDE_CODE_REMOTE=true, installs the Node every
workflow pins and the pnpm of packageManager, then pnpm install --frozen-lockfile and pnpm setup:git, which now also turns
rerere off. DRAGON_REQUIRE_NATIVE=1 turns a native run with a missing toolchain from blocked (owner tooling) into a failure
naming the tool, in runTarget and runHostLane, as CI's "No native run was blocked" step does.
…atch mode)

regen-on-ci.yml takes a sha (patch mode): no push, run-name "regen of <sha>", the combined
outputs.patch uploaded as regen-patch, every cache restored only. land-devices-ci.ts adds the
regen workflow, land-regen/c-<sha> scratch branches and the patch application; land.ts sends its
four regen call sites and the parallel preparations through it.
…group; ci:test-files reads reports strictly and removes them
…then the merge drivers)

floor-merge.test.ts pins pnpm setup:git to exactly what the landing driver sets; rerere.enabled false joins both, so the
exact-equality check stays and covers the new line.
The master warm run no longer yields to patch-mode runs; a regen step cut off (timeout, lost
runner, cancel) is CiUnavailable, only one that completed with failure blames the tree; patch mode
does not use setup-node's saving pnpm cache; DEFAULT_REGEN_WAIT_S covers the 6-round chain; a
commitApart error is CiUnavailable; the regen commit names the CI run; abandonCiRun says CI run.
…_NATIVE=1, prove the Linux path in CI

Review of 892a687: the hook now has no matcher, so it reruns after compact, clear and fork (compaction drops CLAUDE_ENV_FILE
exports); in a cloud session the script writes export DRAGON_REQUIRE_NATIVE=1 to CLAUDE_ENV_FILE first (PM ruling) and fails
without that file; only the summary line reaches stdout; npm --prefix; curl --retry-connrefused. ci.yml's checks job runs on
ubuntu-24.04 and runs cloud-setup.sh twice before setup-node, checking Node, pnpm, the export, typecheck and no reinstall.
…oid ABI rebaseline

- LAND_DEVICES, LAND_TEST and LAND_REGEN accept ci-only; LAND_CI=only sets all three. Under ci-only
  GitHub Actions not running a step is a CiOutage: the driver stops, fails no PR, and every PR not
  landed stays queued (status: STOPPED BY A CI OUTAGE). All three ci-only skips the priority and
  quiet files; the leases are only on local paths, which ci-only never reaches.
- awaitOnCi tells a run queued for runners (jobs queued, or the run pending) from one that never
  started: queued runs are waited for up to LAND_CI_QUEUE_WAIT (default 3 h); the run's own wait
  counts from its first job's start.
- LAND_CI_MAX_INFLIGHT (default 2) caps the prepared CI regens a batch dispatches at once.
- R3: a CI device run whose only model changes are Android image ABI changes is an architecture
  rebaseline, logged loudly and recorded in the landing; each changed lane must keep the previous
  state and exactly its failures. Under LAND_DEVICES=ci a local fallback onto records of another
  ABI stops the driver instead of blaming the PR.
…re; a nonce finds the dispatched run; every test vitest collects must run; the setup test covers env, vitest command and blocked scan
Commands: pnpm regen; pnpm run parity:devices; pnpm regen
@thejackshelton thejackshelton added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Oct 8, 2026
thejackshelton and others added 6 commits October 8, 2026 01:33
…review)

A macOS job waiting for a runner while the Ubuntu jobs ran is queued, under LAND_CI_QUEUE_WAIT from
when it was first seen waiting; a running job has the step's wait from its own start; a run with
jobs done but not completed is waited for up to the queue wait. Under LAND_CI=only, the PR's own CI
never running or never finishing is a CiOutage. Unreadable previous device records in the ci-mode
fallback refusal stop the driver (Fatal) instead of blaming the PR.
Commands: pnpm regen; pnpm run parity:devices; pnpm regen
…s on the clean head; audit before the PR; direct-push rebase
iOS simulators boot pinned to Full Screen Apps (iPad capture-trust failures in queues 59 and 60)
Land: LAND_REGEN=ci runs the driver's regens on CI (regen-on-ci.yml patch mode)
@thejackshelton
thejackshelton merged commit 76b7307 into master Oct 8, 2026
4 checks passed
@thejackshelton
thejackshelton deleted the lane-contract-cloud branch October 8, 2026 07:49
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