Skip to content

CRW-964: local full verification and its verification record - #884

Merged
thisisjun786 merged 27 commits into
devfrom
codex/crw-964-local-ci-record
Oct 8, 2026
Merged

thisisjun786 merged 27 commits into
devfrom
codex/crw-964-local-ci-record

Conversation

@thisisjun786

Copy link
Copy Markdown
Owner

No description provided.

crw-dev ci local runs every job and step of .github/workflows/ci.yml locally, in the same
order and at the same pinned versions, in a clean worktree of the commit being verified with
an isolated home and TZ=UTC, and writes a verification-record/1. --reuse answers a record
instead of running only when the tree, the ci.yml digest, the tool versions, the dependency
digests and the OS and architecture all match. A pre-push hook refuses a push whose range
carries a secret or a blob over 2 MiB.

- internal/dev/ci/local_plan.go: the step table and the ci.yml reader that holds it to the
  workflow, so a step ci.yml grows cannot go unverified.
- internal/dev/ci/local.go: the command, the clean worktree, the step environment, the heavy
  gate and the engine.
- internal/dev/ci/local_record.go: verification-record/1, its canonical digest and reuse.
- internal/dev/ci/local_tools.go: the pinned and observed tool versions and pin_mismatch.
- internal/dev/ci/local_hook.go: the pre-push hook.
- Makefile: the ci-local target. docs/CI.md: the local-step-to-GitHub-job mapping.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T17:21:15.900065Z bcbd3ec 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.

localHookMarker, localBlobLimit and localGitleaksEnv are named in the hook script's own text,
not in Go, and localDigestOfFile was left behind by an earlier shape of the record. The hosted
lint leg (staticcheck U1000) caught all four.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bcbd3ecef4

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/dev/ci/local_plan.go Outdated
Comment thread internal/dev/ci/local_plan.go Outdated
Comment thread internal/dev/ci/local_record.go
Comment thread internal/dev/ci/local.go
Comment thread internal/dev/ci/local.go
Comment thread internal/dev/ci/local_hook.go Outdated
Comment thread internal/dev/ci/local.go
Comment thread internal/dev/ci/local.go Outdated
Comment thread internal/dev/ci/local.go
Comment thread internal/dev/ci/local.go Outdated
CRW-964 child and others added 24 commits October 8, 2026 02:55
… as argv

The first full local run (against a dev commit) caught this: concatenating the gate with the
command into one shell string broke a run text that carries its own quotes (the validate step
became an unquoted word, exit 127) and mangled a block scalar. The gate's words are now argv
before bash -c, and the command stays one element. Also judge dev-gate's aggregate step from
the jobs already recorded rather than passing it unconditionally.
Fixes the findings on the first head, all inside this issue's scope:

- the YAML single quotes around a run scalar are removed by the workflow's parser, so the table
  carries the shell text and the reader unquotes it before comparing (P1).
- the screen commands run in web/, as ci.yml's working-directory says (P1).
- the base commit joins the reuse keys: the blob and secret steps judge base..head, so a
  different base is a different verification (P1).
- the plan is held to the workflow of the verified commit, not the caller's working tree (P1).
- a default base equal to the head is never chosen, so the range checks cannot judge nothing
  (P1).
- the hook requires the pinned Gitleaks release (P1).
- GOFLAGS and GOENV join the reuse keys, and the record names the repository (P1, P2).
- the hook recognises a SHA-256 all-zero object id and an older hook this tool wrote (P2).
- the two tools a step fetches (Gitleaks, staticcheck) are named from their pin when the host
  has no copy, so a normal checkout no longer reports a permanent pin mismatch (P2).
- the sealed digest is printed (P2).
…ment

The measured local run caught this: the heavy-check gate sits between the engine and bash, and
systemd-run expands the arguments it is handed, so a command that uses a shell variable (the
staged skill-script test run, whose file-count expression became a bare token) was mangled. The
step's command is now written to a script under the run's own temporary root and run as
bash <script>, so nothing between the two processes can touch its characters.
…reuse against the plan, and keep the work root out of TMPDIR
…, peel the commit, and sealed version probes
…acement refs, drop an unused variable, and let engine tests run their own work root
…es in probes, never replace a symlinked hook
… own directory and environment, and scrub caller git variables
…not read, and resolve a relative heavy gate once
…e-less names distinct, document heavy-gate arguments
@thisisjun786 thisisjun786 added the crw-lane Merge lane holds this pull request: CI runs every test leg (temporary light PR CI mode, CRW-790) label Oct 8, 2026
@thisisjun786 thisisjun786 added crw-lane Merge lane holds this pull request: CI runs every test leg (temporary light PR CI mode, CRW-790) and removed crw-lane Merge lane holds this pull request: CI runs every test leg (temporary light PR CI mode, CRW-790) labels Oct 8, 2026
@thisisjun786
thisisjun786 merged commit bd826db into dev Oct 8, 2026
58 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crw-lane Merge lane holds this pull request: CI runs every test leg (temporary light PR CI mode, CRW-790)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant