Repository navigation
rebuild: testdata: GitClone steps clone git bundles kept beside the runbook, with no network - #1651
Merged
odgrim merged 1 commit intoDec 2, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
odgrim
force-pushed
the
rebuild/p6-classb-gitclone-bundles
branch
from
December 1, 2026 23:27
a5550c0 to
2419198
Compare
odgrim
force-pushed
the
rebuild/p6-classb-gitclone-bundles
branch
from
December 2, 2026 00:55
2419198 to
b7e71fa
Compare
odgrim
force-pushed
the
rebuild/p6-classb-gitclone-bundles
branch
from
December 2, 2026 01:37
b7e71fa to
b42a108
Compare
…unbook, with no network
Change
- Each fixture keeps its remotes as git bundles in test-remotes/, with a
README giving the command that made them, and a test case's env has git
read the remote's URL as the bundle: GIT_CONFIG_COUNT, GIT_CONFIG_KEY_n
`url.${RUNBOOKS_TEST_DIR}/test-remotes/<x>.bundle.insteadOf`,
GIT_CONFIG_VALUE_n the URL.
- The 7 skipped GitClone steps run, `success`, with their outputs
asserted:
- feature-demos/file-workspace: generated-only, renamed
staging-account, runs clone-infra, modify-repo and account-config
(clone_path, root.hcl modified, account.hcl with its staging inputs).
full-workspace-flow clones the same bundle, asserts clone_path,
repo_owner, repo_name, and that modify-repo deleted CODEOWNERS.
- feature-demos/git-clone: clone-generic and clone-helper take
`https://git.example.invalid/acme/infra.git` from the test's inputs
(gitUrl), and clone-helper a localPath, `helper`: clone_path,
repo_owner, repo_name, README.md in the folder.
- feature-demos/inputs-and-outputs: happy-path's clone-from-inputs and
clone-merged clone runbooks-test.bundle and runbooks.bundle;
clone-merged's NEW-SYNTAX.md is only on feature/new-syntax, the
override's branch.
- sample-runbooks/dual-clone: clone-after-cd, issue #94's check: after
cd-subdir's cd, the clone is in the working folder (infra/README.md),
not in subdir (dir_not_exists subdir/infra). The TODO that waited for
"a local bare repo" goes.
- baseline/behaviour-changes/dual-clone.patch: regenerated for the test
file's new lines (same changes, new context and index line).
- Docs: testing.mdx's Testing GitClone blocks: a block with no
prefilledUrl fails "Needs input: gitUrl", so give the URL in inputs; an
offline example with a bundle; git takes the longest matching URL.
blocks/git-clone/docs.mdx's Testing names the test case env route.
Decisions
- The route is the lead's ruling (2026-12-01): ${RUNBOOKS_TEST_DIR}
(67c56ac45) in env, git's insteadOf to a bundle. GitClone's refusal of
file:// URLs and paths stays: the block is given the https URL, and
only git, after the block's check, reads it as the bundle.
- The folder is test-remotes/, as the token commit's testing.mdx example
names it (beside test-stubs/), not remotes/: one name in the docs and
the fixtures.
- A block with a prefilledUrl keeps the runbook's GitHub URL, mapped. A
block with none gets `https://git.example.invalid/...` from inputs:
`.invalid` never resolves, so a mapping that broke couldn't reach a
real host.
- full-workspace-flow and happy-path, which cloned github.com, now clone
bundles too (the lead's ruling 3): infra-live.bundle holds root.hcl and
CODEOWNERS, the files the test reads, and nothing reads runbooks-test's
files. git-clone's github-clone-with-auth is left as it was: a real
authenticated clone with CI's secret.
- The least history each test needs: one commit per bundle, except
runbooks.bundle, which holds main (HEAD) and feature/new-syntax one
commit on, so the branch the clone checked out can be told apart (G1).
Each is made with `HEAD main` (the token commit's note: without HEAD a
clone warns "remote HEAD refers to nonexistent ref"), a fixed author
and date, so the README's command makes it again byte for byte.
- The runbooks don't change; only the test files, test-remotes/, and
dual-clone.patch's context.
- The e2e map's dual-clone item stays left: it is the old overwrite
dialog (git-clone.spec.ts:87-101 has Replace Existing), and this commit
covers where the clone goes, not the dialog.
Gaps
- CI's Runbook Tests jobs run the old CLI (cli/test), which skips a
GitClone with no prefilledUrl (cli/test/executor.ts:2408) and passes
${RUNBOOKS_TEST_DIR} on as written, so these fixtures fail there. This
commit depends on the skip agent's CI commit, which moves those jobs to
the gate's runner, landing below it. Index row at the next index
commit.
- showFileTree has no effect in the rebuilt window (GitClone's docs), so
clone-with-show-file-tree-false checks the clone into the folder the
test gives, not a hidden file tree. Index row at the next index commit.
- git-clone's github-clone-with-auth still clones github.com, with CI's
RUNBOOKS_GITHUB_TOKEN, by the lead's ruling. Index row at the next index
commit.
Evidence
- Restacked onto rebuild/main 20cc5f0, with the skip check now near
the top: bun check, lint, fmt:check and knip clean; bun test
packages/cli packages/core packages/app-renderer
packages/platform-node scripts baseline blocks: 6386 pass, 0 fail.
The counts below were taken before the restack, on the earlier
base. A "skip only sign-in blocks" failure among them is the skip
check, which sat below this commit then.
- No network: every run below has https_proxy, HTTPS_PROXY, http_proxy,
HTTP_PROXY and ALL_PROXY set to http://127.0.0.1:9, where nothing
listens, and GITHUB_TOKEN, GH_TOKEN, RUNBOOKS_GITHUB_TOKEN empty.
Without the mapping (N1) the same clone fails "fatal: unable to access
'https://github.com/gruntwork-io/runbooks-infrastructure-live-example/':
Failed to connect to 127.0.0.1 port 9 after 0 ms: Couldn't connect to
server".
- HOME=$S/home-g76 bun baseline/gate/fixtures.ts
testdata/sample-runbooks/dual-clone testdata/feature-demos/file-workspace
testdata/feature-demos/inputs-and-outputs: "3 fixtures: 3 passed every
test case, 0 failed, 0 missing; 4 test cases passed, 0 did not."
- With testdata/feature-demos/git-clone added: "4 fixtures: 3 passed
every test case, 1 failed, 0 missing; 7 test cases passed, 1 did not.",
the one "github-clone-with-auth: gh-auth: Expected success, got skip: No
login was found to sign in with." (no token here; CI has it).
- HOME=$S/home-g76 bun packages/cli/src/main.ts test <fixture>, the tree
without the gate's patches:
- inputs-and-outputs: "✓ happy-path", 1 passed.
- git-clone: ✓ skip-without-credentials, generic-clone-public-repo,
clone-with-show-file-tree-false; ✗ github-clone-with-auth (no token).
- file-workspace: both cases "account-config: Expected success, got
config_error: the `repository` prop of <TemplateInline>", the change
file-workspace.patch makes; clone-infra and modify-repo pass.
- dual-clone: "verify-cwd.cwd ... does not match \/subdir$", the cd
change dual-clone.patch makes; clone-after-cd passes.
- The README commands, run in empty folders: bundles byte-identical to
the committed ones (cmp), heads dafe4038 (infra-live), 6e33c8a9
(infra), 14401fa6 (runbooks-test), bbee2bd5 main and b6268669
feature/new-syntax (runbooks).
- testing.mdx's new example, run as written beside a GitClone with no
prefilledUrl and infra.bundle: "✓ offline-clone". The same block with
no inputs: "Expected success, got fail: Needs input: gitUrl".
- Mutants, each run through the gate on the four fixtures as above
(unmutated: 7 test cases pass, 1 did not, github-clone-with-auth);
failing cases beyond that one:
- G1 run.ts: the ref read as "": 1 (clone-merged NEW-SYNTAX.md)
- G2 block.ts: localPath ignored: 3 (clone_path, both file-workspace
cases and clone-helper)
- G3 run.ts: owner and name read from "": 4 (repo_owner, repo_name)
- G4 modify-repo.sh keeps CODEOWNERS: 1 (file_not_exists)
- G5 dual-clone's clone-after-cd given prefilledLocalPath subdir/infra:
1 (../infra/README.md is not a file)
- N1 file-workspace GIT_CONFIG_COUNT 0: 2 (the dead proxy, above)
- N2 inputs-and-outputs GIT_CONFIG_COUNT 0: 1
- N3 inputs-and-outputs maps runbooks only, so runbooks-test's URL
reads runbooks.bundle-test: 1 (git could not clone)
- HOME=$S/home-g76 bun test packages/cli blocks/git-clone
blocks/git-pull-request scripts baseline: 1065 pass, 1 fail, "skip only
sign-in blocks", on 18 skips, none GitClone: demo2 12 and lambda 6, the
stubs agent's. behaviour-changes.test.ts: dual-clone.patch applies.
- cspell 10.4.0 (docs/cspell.json) on testing.mdx and
blocks/git-clone/docs.mdx: 0 issues.
- bun run lint, fmt:check, knip, bun check: exit 0 each.
odgrim
force-pushed
the
rebuild/p6-classb-gitclone-bundles
branch
from
December 2, 2026 02:03
b42a108 to
42190f7
Compare
odgrim
marked this pull request as ready for review
December 2, 2026 02:20
This branch was successfully deployed
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.
Stack: rebuild phase 6, rows class B skips, part 20 of 22: GitClone from git bundles. Base: #1650 (rows class B skips, part 19 of 22). Map:
.more9s/rebuild.mdonrebuild/main.213 changed lines, 179 of them tests and test runbooks.
Change
url.${RUNBOOKS_TEST_DIR}/test-remotes/<x>.bundle.insteadOf, GIT_CONFIG_VALUE_n the URL.success, with their outputs asserted:https://git.example.invalid/acme/infra.gitfrom the test's inputs (gitUrl), and clone-helper a localPath,helper: clone_path, repo_owner, repo_name, README.md in the folder.Decisions
https://git.example.invalid/...from inputs:.invalidnever resolves, so a mapping that broke couldn't reach a real host.HEAD main(the token commit's note: without HEAD a clone warns "remote HEAD refers to nonexistent ref"), a fixed author and date, so the README's command makes it again byte for byte.Gaps
Evidence
Local, in a scratch worktree with a scratch HOME. CI's run on this head is the gate.
repositoryprop of ", the change file-workspace.patch makes; clone-infra and modify-repo pass.