Skip to content

ci: reuse exact merge-queue qualification on main - #582

Merged
yaacovcorcos merged 3 commits into
mainfrom
codex/ci-exact-commit-reuse-20261018
Oct 19, 2026
Merged

yaacovcorcos merged 3 commits into
mainfrom
codex/ci-exact-commit-reuse-20261018

Conversation

@yaacovcorcos

Copy link
Copy Markdown
Contributor

Main-push CI currently repeats expensive suites immediately after merge-queue CI validated the identical commit. This change reuses successful queue qualification only when the commit, comparison base, repository, workflow revision, and run attempt all match. Missing or invalid evidence runs full CI.

Behavior

  • A queue-only receipt is written after all 17 existing CI jobs are accounted for, including layout, transfer measurements, and applicable native qualification. Conditional skips require the corresponding detector to explicitly report no changes.
  • The main-push probe accepts only a completed successful merge_group run of this workflow. It validates the receipt and all seven reporting artifacts, and rechecks the source attempt after downloading them.
  • thread-transfer-results and the six Vitest JSON reports are republished with their normal names and destination attempt. Reuse becomes active only after every upload succeeds; partial publication falls back to full CI, whose uploads replace any partially restored artifacts.
  • Every original required check name remains unchanged. PR and queue runs execute their normal suites. On valid main-push reuse, expensive jobs are skipped, Test links to the source qualification, and Transfer report artifact verifies the restored measurement. Branch protection is unchanged.
  • Documentation and provenance retain their event-specific checks. Native packaging artifacts remain available on the linked queue run; release workflows are unchanged. Reuse never chains through another main-push run.

Verification

Reviewed revision: f7bbfcd22c2427b0e290bdf2039b148b7de33e5d, based directly on main 172f8a8099084dc470862679fbd0e7b71fec8bba. Local environment: macOS arm64, Node 24.19.0, pnpm 11.10.0.

Passed:

  • 58 focused Node tests across the reuse helper, transfer reporter, and Compute/packaging gates, including 35 new reuse tests. Coverage includes identity/base mismatches, stale attempts, API/download errors, malformed or oversized archives, report validation, conditional skips, and workflow fallback/publication ordering.
  • actionlint 1.7.12; documentation checker tests and changed-document links; git diff --check.
  • pnpm exec vp fmt --check, pnpm exec vp lint --report-unused-disable-directives (existing warnings), pnpm run knip:check, pnpm run typecheck, pnpm run build, and pnpm run test:desktop-smoke.
  • Read-only live API probe correctly refused older successful queue run 39066044524 because it has no qualification receipt. Real queue-run report ZIPs matched the filename/digest/Vitest assumptions.
  • Independent workflow and helper review found no blocking issues.

Qualification gaps:

  • pnpm run test stopped at the unchanged packages/shared/src/nodeSqliteClient.test.ts:181: “keeps large text and blob parameters off cached statements” returned null instead of 65537. The isolated file reproduces the same failure (30 passing, 1 failing). The implementation, test, package manifest, and lockfile are identical to main. This PR does not change SQLite behavior; the full local suite is not green.
  • Hosted PR CI will qualify this pushed revision. Actual queue-to-main reuse requires a future authorized queue run producing the new receipt; it has not been exercised by merging this PR.

Documentation impact: Updated — docs/internals/ci.md describes eligibility, artifact preservation, fallback, and the unchanged checks.

Model and harness: GPT-6 / Codex desktop, with independent subagent review.

Draft for owner review. Do not merge or enable auto-merge as part of this task.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 17, 2026
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.6 KiB 5.6 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 4.3 KiB 4.3 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 26.2 KiB 26.2 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.6 KiB 5.6 KiB −36 B (−0.6%) 6.8 KiB ✅
Claude Thread snapshot wire 4.3 KiB 4.3 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB −36 B (−2.6%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 26.6 KiB 26.5 KiB −41 B (−0.2%) 29.3 KiB ✅
Claude Live turn messages 2 1 −1 (−50.0%) 8 ✅

Baseline: 9fa9b7e · PR result: e9eed07 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Full compact HTTP snapshot with live cursor.

  • Codex decoded thread snapshot: 133.1 KiB
  • Claude decoded thread snapshot: 133.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Yaacov and others added 2 commits October 19, 2026 10:11
Both jobs now also need queue_ci and are skipped when main reuses the
queue's qualification; their workflow tests still expected the old
needs and conditions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yaacovcorcos

Copy link
Copy Markdown
Contributor Author

Codex review, round 1 (gpt-6.1-sol, high reasoning, read-only)

Verdict on e9eed0786f: merge as is. No P0–P3 findings.

  • Batched merges (the queue now builds 2 and merges up to 4): reuse accepts only a successful merge_group run for the push's final SHA, and its receipt must match the push's before SHA. A final group qualified against an intermediate queue commit falls back to full CI, and earlier groups can't qualify the final head.
  • The receipt covers every CI lane. Validation and all seven report uploads come before the reuse marker, so a failed publication leaves full CI on. Required check names are unchanged; documentation and provenance checks run as before. No issue with token permissions or archive handling.
  • Reuse tests 34 passed (the archive test needs a real python3, which this Windows machine lacks; it runs in CI). Detector and transfer-reporter tests 24 passed. Hosted CI on this head passed. git diff --check clean.
  • Not yet exercised: an actual queue-to-main reuse. The first queue run after this merges writes the first receipt.

Since the previous head: current main merged in, and the compute and Windows packaging workflow tests updated to the new needs/if conditions.

🤖 Generated with Claude Code

@yaacovcorcos
yaacovcorcos marked this pull request as ready for review October 19, 2026 08:13
@yaacovcorcos
yaacovcorcos added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit ed67831 Oct 19, 2026
49 checks passed
@yaacovcorcos
yaacovcorcos deleted the codex/ci-exact-commit-reuse-20261018 branch October 19, 2026 10:12
yaacovcorcos pushed a commit that referenced this pull request Oct 19, 2026
Catches up owned main with Scient PRs #582 (CI exact-commit reuse), #595
(Antigravity and one-click provider sign-in), #568, #569, #570 (Oh My Pi
resume, status, multi-question sign-in), #583 and #594.

- #582's reuse gate and its test no longer require the Test Web layout job,
  which this alignment retired with upstream's move to browser tests.
- #595's sign-in flow is carried into the React Compiler conversion of the
  provider-connection files: plain values and functions instead of
  useMemo/useCallback, conditionals outside try blocks, and the controller's
  authorization page delegated to #595's shared opener.
- The CI guide names the browser coverage that replaced the layout job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant