Skip to content

fix(scripts): PR gate and merge run without installed dependencies - #630

Merged
lastobelus merged 2 commits into
lastcode/mainfrom
lastcode/gate-scripts-no-deps
Nov 8, 2026
Merged

lastobelus merged 2 commits into
lastcode/mainfrom
lastcode/gate-scripts-no-deps

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

pnpm lastcode:pr-gates and pnpm lastcode:merge loaded effect and @t3tools/contracts through shared helpers. Plain node failed with ERR_MODULE_NOT_FOUND, and pnpm 12 installs node_modules (3.2 GB) before any script. So every gate check and merge needed a full dependency install, even for a docs-only PR.

Fix

  • The Git helpers the merge uses (runGit, assertCleanWorktree, cleanGitEnvironment, the Node version guard, …) move from lastcode-local-ci.ts and lastcode-nightly.ts into the dependency-free scripts/lib/lastcode-git.ts. Both old modules re-export them, so their callers don't change.
  • The PR-watch quiet-minute default and range move into an import-free contracts module. The Schema keeps using them, and the host reader checks the integer range itself.
  • Agent docs, skills and the checkpoint recovery prompt run both commands as pnpm --config.verify-deps-before-run=false lastcode:…. The flag skips pnpm's pre-run install and keeps the mise Node pin. A repo-wide verifyDepsBeforeRun change was rejected because other pnpm lastcode:* host scripts may rely on the auto-install.
  • The gate CLI and merge lifecycle tests now run the real scripts under a resolve hook that rejects any installed-dependency import, so a new workspace import fails CI.
  • scripts/tsconfig.json and apps/desktop/tsconfig.json list the new contracts module next to the settings file they already named.
  • --checkpoint merges still start the checkpoint service, which needs dependencies; the lastcode-pr skill now says so.

Proof

  • In this worktree with no node_modules, both scripts failed with ERR_MODULE_NOT_FOUND before the change. After it, node scripts/lastcode-pr-gates.ts --pr 613 reads GitHub and reports, and both pnpm --config.verify-deps-before-run=false commands run without installing anything.
  • Reverting the old imports makes the CLI tests fail with Imports an installed dependency: effect/Schema / @t3tools/contracts/settings.
  • With Node 24 first on PATH, these tests pass: gate CLI, merge, merge lifecycle, checkpoint supervisor, checkpoint lifecycle and publication, local CI (unit and integration), CI collection, nightly, carry (ci, replay, set, delivery, shadow target), quiet references, node launch and main-write lock. Typecheck, lint, knip and format pass too. Without Node 24 on PATH, the merge lifecycle test fails identically on the base, a local Node 26 environment issue.

Local review: 3 rounds with gpt-6.1-terra (xhigh), approved.

🤖 Generated with Claude Code (Opus 5.5, T3 Code)

@lastobelus
lastobelus marked this pull request as ready for review November 8, 2026 04:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T08:24:15.780699Z 6f3a629 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 force-pushed the lastcode/gate-scripts-no-deps branch from 34b0d5f to dd78c22 Compare November 8, 2026 04:34
@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: dd78c22c4f

ℹ️ 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 force-pushed the lastcode/gate-scripts-no-deps branch from dd78c22 to 6f6c353 Compare November 8, 2026 04:39
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/gate-scripts-no-deps branch from 6f6c353 to 7c2618a Compare November 8, 2026 07:11
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 7c2618a840

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

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/gate-scripts-no-deps branch from 7c2618a to 9e74808 Compare November 8, 2026 07:22
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9e748080ca

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

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/gate-scripts-no-deps branch from 9e74808 to 50a3916 Compare November 8, 2026 07:40
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 50a3916ed9

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

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/gate-scripts-no-deps branch from 50a3916 to 26b2d3e Compare November 8, 2026 08:02
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 26b2d3e0cf

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

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/gate-scripts-no-deps branch from 26b2d3e to 9123064 Compare November 8, 2026 08:05
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 9123064911

ℹ️ 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 and others added 2 commits November 8, 2026 01:22
lastcode:pr-gates and lastcode:merge imported effect and @t3tools/contracts
through shared helpers, so every gate check and merge needed a checkout with
node_modules (3.2 GB), and pnpm installed them before running the script.

Move the Git helpers the merge uses into the dependency-free
scripts/lib/lastcode-git.ts, split the PR-watch quiet-minute constants into an
import-free contracts module, and validate the setting without Schema. The CLI
tests now run both scripts under a hook that rejects any installed-dependency
import. Agent docs, skills and the checkpoint recovery prompt run both commands
with --config.verify-deps-before-run=false so pnpm skips its pre-run install.

Carry-Group: incubator
Carry-Observation: Tooling conflicts at its replay position; the PR-watch settings, carry CI and agent docs it edits come from later incubator PRs.
Co-Authored-By: Claude <[email protected]>
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/gate-scripts-no-deps branch from 9123064 to 6f3a629 Compare November 8, 2026 08:22
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 6f3a6295f7

ℹ️ 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 3639b58 into lastcode/main Nov 8, 2026
20 checks passed
@lastobelus
lastobelus deleted the lastcode/gate-scripts-no-deps branch November 8, 2026 08:40
@lastobelus

Copy link
Copy Markdown
Owner Author

Follow-ups from this PR's final report:

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