Repository navigation
Pre-push test selection finds tests in monorepo apps that use their own @/ alias - #4464
Merged
Merged
Conversation
The pre-push test selection read tsconfig paths and baseUrl only from the repository root, so in an app such as apps/mobile whose tsconfig maps @/* to ./src/* every touched source file failed with PREGATE_NO_LANE, even with a test right beside it. Each file now takes its aliases from the nearest tsconfig.json or jsconfig.json above it that declares paths or baseUrl; a nested config that declares neither defers upward, the root config governs the rest, and extends still never leaves the repository. Rebuilt from gstack#4462 by dtoelke. Co-authored-by: stackpt-agent <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…he import graph Review-Finding: p1/specialist-batched#1 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ize limit Review-Finding: p2v/outside-voice#1 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 of 5 tasks
stackpt-agent
added a commit
to dtoelke/gstack
that referenced
this pull request
Nov 17, 2026
…ytan#4464) Upstream's version of lib/pregate/import-graph.ts and its tests replaces the fork's; docs/pregate.md keeps the fork's removed-path text beside upstream's alias paragraph; fork/README.md no longer lists the alias fix. Co-Authored-By: Claude Fable 5.2 <[email protected]>
capy-ai Bot
added a commit
that referenced
this pull request
Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466) - An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481) - A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481) - `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470) - `revise --plan` with a different file now says the run follows that file. (#4470) - A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471) - The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460) - A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456) - A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451) - /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458) - A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458) - A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458) - A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473) - /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461) - /ship on Codex no longer stops at the test coverage audit. (#4489) - A cold first-use check before an app build reaches its owner (GST-3025). (#4465) - `skill_prefix=true` now survives updates when gbrain is installed. (#4454) - The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454) - `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454) - /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464) - /office-hours explains why it recommends a mode. (#4450) - /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463) - Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490) - A Captain can check an ask against the owner's earlier answers before sending it. (#4467) - `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488) - GitHub release notes now list every change in plain words, with a link to its pull request. (#4390) - gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442) - /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469) - /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472) - A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479) - The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457) - A security finding's location and reason no longer go into a PR body. (#4486) - The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487) - A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485) - A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452) - /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474) - A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440) - One queued record with a malformed path no longer stops artifacts sync for every project. (#4455) - A failed artifacts push stays reported until a push succeeds. (#4455) - The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455) - ### Tests (#4495) - A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495) - CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453) - Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447) - The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447) - Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484) - Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459) - Two /autoplan runs started in the same second no longer share a run id. (#4459) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/ship's pre-push test selection now finds the tests of a monorepo app that imports through its own
@/alias (for exampleapps/mobilemapping@/*to./src/*).Why: only the root tsconfig was read, so every touched file in such an app failed with
PREGATE_NO_LANEeven with a test beside it. Rebuilt from #4462 by @dtoelke, who found and fixed it; thank you.Nothing to do: a repo whose only tsconfig is at the root (gstack itself) resolves exactly as before.
What changed
A monorepo app's own @/ alias now maps its source file to the test beside it.
Before/after as text: A monorepo app's own @/ alias now maps its source file to the test beside it
"My app's tests sit right next to the file, but /ship says there is no test for it." Each JS/TS file now takes its
pathsandbaseUrlfrom the nearest tsconfig.json or jsconfig.json above it that declares them, itself or through a relativeextendsinside the repository. A nested config that declares neither defers to the next one up, and the root config governs the rest. Config files are read only when they resolve inside the repository and are under 1 MB, so a tracked tsconfig that is a symlink to a file outside the repository, or to a device such as/dev/zero, is skipped instead of read.Why
"Every touched file in apps/mobile failed with PREGATE_NO_LANE even though its test was right beside it" (#4462). Monorepos with per-app aliases now get their tests picked before the push, and gstack's own single-tsconfig layout is unchanged.
Blast radius
Only
buildGraphinlib/pregate/import-graph.tschanges: its callers (test selection, the flaky-exception check, the policy draft and the test-impact cache key) take the same graph type, andlib/test-impact/key.tsalready hashes every nestedtsconfig*.json, so no stale cache can reuse an old graph (file:line read by two reviewers). Reading configs through the existingreadRepoFilealso applies to the root config, so a root tsconfig larger than 1 MB, or a symlink out of the repository, is now treated as unreadable (test run).Pre-Landing Review
Two full review passes and one focused re-check of the last fix found nothing left that blocks. One finding was fixed in each round. In the first pass, a test reached into an internal helper, so the helper is now private and the test checks only the graph. In the second-model review, nested config files were read without a size or location check. They are now read through the existing bounded, in-repository reader, and a new test that failed before the fix passes now. The re-check confirmed that fix and noted one narrower gap, listed below. Four smaller notes are listed under Review notes and are left as follow-ups.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/pregate/import-graph.ts:283notes from every nested config are printed for every file with no test found (same as red-team#1)lib/pregate/import-graph.ts:293root fallback can apply aliases TypeScript would not, including through an unfollowed package-name extends (same as red-team#2; not a regression)lib/pregate/import-graph.ts:284a nested config with only baseUrl now governs its files, so root alias edges they had before (e.g. @repo/* to packages/*) disappear; matches TypeScript and fails closed with PREGATE_NO_LANElib/pregate/import-graph.ts:216an unparseable nested config drops its aliases with no note in the explanation printed when no test is found (root config always behaved this way)lib/pregate/import-graph.ts:83readRepoFilechecks containment only when the last path part is a symlink, so a relativeextendsthrough a tracked directory symlink can still read an outside file (size and file-type limits still apply; it already worked this way before this PR)test/pregate-import-graph-paths.test.tsa nested config whose aliases come only through an unfollowed package-nameextendsfalls back to the root aliases (identical on main; reproduced in QA)Exploratory QA
A functional smoke test ran on a throwaway monorepo built outside the checkout, calling
buildGraphandtestsFor. In the success case,apps/mobile/src/media/close-bar.tsxmaps to its@/test. In the riskiest edge, a nested config whose aliases come only through an unfollowed package-nameextendsfalls back to the root aliases and names that config in the notes, as the docs describe. Both captures were rerun after the review fix and passed (2 probes, 4 captures, verdict pass). The jsconfig-only and deleted-file paths were not probed.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
Scope Drift
Scope Check: CLEAN
Verification Results
No plan file, so there were no plan checks to run (0 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN).
TODOS
No TODO items completed in this PR.
Documentation
Status: current. The release docs already match the code, so no edits were needed.
Audited scope: base da98d0a to head c77fe7f, 3 commits and 4 files:
lib/pregate/import-graph.ts,test/pregate-import-graph-paths.test.ts,docs/pregate.mdandchangelog.d/nested-tsconfig-path-aliases.md. Nothing was staged, unstaged or untracked. I also searched the repository's Markdown files and templates for stale claims about root-only tsconfig aliases and found none.Documentation health:
docs/pregate.md: current. The branch adds a paragraph on nested tsconfig/jsconfigpathsandbaseUrlresolution, and it matches the resolver.changelog.d/nested-tsconfig-path-aliases.md: current. It is consistent with the code and credits the reporter.CHANGELOG.mdandVERSION: consistent with each other (1.100.0.0). Neither was touched.Coverage debt: the nested alias resolution has reference coverage in
docs/pregate.mdand test coverage intest/pregate-import-graph-paths.test.ts. It needs no how-to or tutorial. The docs leave out a small hardening detail: a nested config must be inside the repository and under the 1 MiB read limit.Diagram drift: none. The change touches no diagram entities.
Tests
bun test test/pregate-import-graph-paths.test.ts test/pregate-selection.test.tsat c77fe7f: 76 pass, 0 fail (22 in the paths file)bun run typecheck: clean; module-size ratchet: 6 passAgent notes
Credit: Co-authored-by stackpt-agent (the author of #4462's commit, 431b800); PR author @dtoelke. GST-3029.
Outside code was read as text only (
gh pr diff 4462); the branch was never checked out, built or run. The change reads only tsconfig/jsconfig files listed bygit ls-files(now through the bounded in-repo reader), spawns nothing, and touches no network, secrets, workflows, install scripts or dependencies.REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=1 fixed=2 scope=frozen ledgers_read=5 fix_checks=1 dispatches=8
Review-loop exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-17 via a-4c06134a82c5: one scoped fix-check covering the readRepoFile change for config reads (fix-check at c77fe7f, 1 finding)
Gate edits: none detected (2 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: openai/gpt-6.1-sol (second-model review) completed; 1 blocking finding, fixed in c77fe7f.
Approvals
Approved: yes (record r-3cd1834d1d6f). The full approval record stays private.
Plan: exempt: bug fix
Plan check: exempt bug fix