Skip to content

feat(tooling): add advisory per-file test caching pilot - #586

Merged
lastobelus merged 4 commits into
lastcode/mainfrom
t3/cached-repair-preflight-pilot
Nov 3, 2026
Merged

lastobelus merged 4 commits into
lastcode/mainfrom
t3/cached-repair-preflight-pilot

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

Repair checks have no bounded way to try per-file test caching without touching checkpoint validation. This adds a small, explicit advisory mode so we can see whether caching is worth pursuing before it gets near anything that gates a checkpoint.

What changed

scripts/test-cached.ts runs an advisory mode on the existing test runner:

  • Scope: 1–16 server test files per run, executed serially.
  • Cache: separate local cache, keyed on a fingerprint of the environment and runtime identity.
  • Audit: at least one cache hit is re-run without caching to confirm it still passes.
  • Always uncached: report-producing transfer-budget tests.
  • No overlap: concurrent advisory runs are refused, so a summary always belongs to the current run.
node scripts/test-cached.ts --advisory --report /path/to/receipt.json apps/server/src/auth/utils.test.ts apps/server/src/imageMime.test.ts

What does not change

  • Checkpoint validation: final Full CI, publication validation, and validation stamps are untouched.
  • Repair preflight: this command is independent of the repair preflight interface.
  • Limitation: tests that depend on network, clocks, or other external state must use --uncached, because the cache cannot see that state.

Validation

  • vp run check:changed origin/lastcode/main passed after rebasing, including nine focused tests.
  • Those subprocess tests cover:
    • invalidation on source, fixture, dynamic filesystem selection, environment, and runtime identity
    • repeated failures
    • report regeneration
    • summary ownership
  • Runtime identity check: switching the launcher to an installed Node 25 runtime caused misses. Repeating it produced two hits and a passing uncached audit.

Timing

One local pilot, two cheap test files:

Run Wall time
Both files forced uncached 1.29 s
Cold 1.52 s
Warm, including one successful uncached hit audit 1.16 s

Whole-command savings are modest, and these cheap tests do not establish any checkpoint speedup. The measurements predate the latest base refresh; the affected checks were rerun on the refreshed candidate.

Refs #577; this PR does not complete the modernization umbrella.

Implemented with GPT-6.1 Sol (high) through the Codex harness in LastCode.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-11-02T23:59:09.804453Z 0981c1e Manual request
ℹ️ 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.

@lastobelus lastobelus changed the title feat(tooling): pilot serial advisory test caching feat(tooling): add advisory per-file test caching pilot Nov 2, 2026

@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: 25e4a8f1ec

ℹ️ 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 scripts/test-cached.ts Resolved
Refs #577. Keep publication checks unchanged; isolate advisory receipts and verify runtime, environment and filesystem invalidation.

Carry-Group: build-ci
Reuse the existing process-owned lock helper so later advisory invocations can run after an owner terminates. Preserve overlap refusal and extend the existing isolation regression with SIGTERM and SIGKILL subprocess owners.

Carry-Group: build-ci
Carry-Fix: #586
Carry-Observation: Advisory cache results remain isolated from final Full CI and publication stamps.
@lastobelus
lastobelus force-pushed the t3/cached-repair-preflight-pilot branch from 25e4a8f to 748ec9a Compare November 2, 2026 23:20
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 748ec9a3e2

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

Keep fixture discovery inputs stable while testing content invalidation. Probe the sibling input explicitly and retain the independent warm entry across source and dynamic-input failures, preserving the exact reuse assertions.

Carry-Group: build-ci

Carry-Fix: #586
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@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: 32eccb8c99

ℹ️ 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 scripts/test-cached.ts Resolved
Hold a separate portable lease in the Vite+ summary-writing process. Guard startup with a run token so a delayed orphan cannot enter a reclaimed namespace. Extend the existing isolation case with a held real CLI worker, launcher SIGKILL, overlap refusal, normal worker completion, and stale startup rejection.

Carry-Group: build-ci

Carry-Fix: #586
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0981c1e5fe

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

@lastobelus
lastobelus merged commit 90e7241 into lastcode/main Nov 3, 2026
20 checks passed
@lastobelus
lastobelus deleted the t3/cached-repair-preflight-pilot branch November 3, 2026 00:12
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