Skip to content

[Spec 1951] Read-only PR check for architects: codev check pr | deploy | worktree - #1958

Draft
waleedkadous wants to merge 37 commits into
mainfrom
builder/spir-1951
Draft

waleedkadous wants to merge 37 commits into
mainfrom
builder/spir-1951

Conversation

@waleedkadous

@waleedkadous waleedkadous commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Draft, opened early for CI only. Under the owner's standing ruling main-32, GitHub's run on this head can stand in for porch's local tests check, which fails when the machine is under load (issue #1956). This is not ready for review.

Spec: codev/specs/1951-read-only-pr-check-for-archite.md. Plan: codev/plans/1951-read-only-pr-check-for-archite.md, 7 phases.

Committed so far:

The full description comes at the pr gate.

Fixes #1951


Local tests check skipped once, under owner ruling main-32.

  • Phase 1 (forge_read_concepts), head bb2ad2710.
  • Porch's local tests check failed under machine load (tests: one run of the packages/codev unit suite takes an 18-core Mac from load 8 to 59, and its own spawn-heavy tests then time out #1956). The failing tests were unrelated to this change and each passed alone, and the builder's own full run passed.
  • The architect confirmed GitHub's run on this PR at bb2ad2710 was 8/8 green.
  • porch.checks.tests.skip was set in the worktree's own .codev/config.local.json for a single porch done and removed in the same command. It was never committed. The build check still ran and passed.
  • Phase 2 (readonly_core), head 9081d4367.
    • One porch done at load 9.5. Its tests check failed on four unrelated, spawn-heavy files: agy-auth-cache, windows-console-spawn-guard, pir-1233-session-launch-loop and bugfix-1267-launch-loop. Porch's output did not name them (porch done truncates failing check output; the failing test is never named #1853); vitest's results cache did.
    • Run alone in one invocation, all four passed.
    • The architect confirmed GitHub's run at 9081d4367 was 8/8 green. The skip was then applied once, in the same way, and the build check passed.

… PR mechanics

- pr-view gains optional headRefOid, isDraft, mergeable, mergeStateStatus,
  mergeCommit, mergedAt, reviewDecision (github, gitlab, gitea)
- new read concepts commit-checks and workflow-runs: github implements them,
  gitlab and gitea disable them explicitly (no silent fall-through to gh)
- dispatcher: timeoutMs option and a timedOut flag on ForgeCommandError
- gitlab pr-view now captures before piping (#1645) and declares
  forge-executable: glab (#1455); it also maps body/baseRefName/headRefName
- forge.md documents the concepts and fields
…ab empty-output guard and body default, paginate legacy statuses
… settings, report core and git plumbing

- allow-list.ts: closed per-subcommand git grammar; diff/log/show forced to
  --no-ext-diff --no-textconv; ref-neutral fetch only; four read forge concepts
- runner.ts: the only subprocess path; argv spawn, GIT_TERMINAL_PROMPT=0,
  ls-remote/fetch and forge calls bounded, with its own deadline race
- validate.ts, roots.ts (roots from git), settings.ts (check.* with key+file on error)
- report.ts (schema 1, verdict, exit codes, check.skip, summarizeRuns), render.ts
- git-facts.ts: live tips, ensureCommits, ancestry, :(top,glob) pathspec filters
- test helpers: fixture repos with state snapshot, stub git/gh PATH recorders
- audited-imports test keeps child_process and the forge dispatcher in runner.ts
…ub-git grammar, fetch requires --no-tags, per-worktree FETCH_HEAD

- stub git keeps its own closed grammar (symbolic-ref read form only; fetch from
  origin by full SHA with housekeeping overrides and all ref-neutral flags); new
  stub-bin self-test over every read form and 25 write forms
- allow-list: fetch requires --no-tags --no-recurse-submodules; config --get only
- isRefName rejects any component ending in .lock
- snapshotRepoState reads FETCH_HEAD from the worktree git dir and the common dir;
  tag and linked-worktree cases added to the ref-neutral fetch tests
- settings errors name what each array holds
…r-subcommand stub grammar, gh joined write flags, fake home

- stub git: closed flag list per subcommand; diff-family commands must carry
  --no-ext-diff --no-textconv; shared OFF_GRAMMAR_FORMS refused by both layers
- stub gh: refuses joined and clustered method/body flags (-XPOST, --field=, -iX)
- diff-tree requires --no-ext-diff --no-textconv in the allow-list too
- remoteDefaultBranch rejects an invalid branch name from origin
- settings, roots and runner tests pin HOME/USERPROFILE to an empty fake home
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.

Read-only PR check for architects: merge readiness, deploy status, and whether a builder worktree can be removed

1 participant