test(scaffold): B-0424.5 — dry-run test suite for create-repo.ts (18 tests)#3025
Merged
Conversation
…tests) Adds tools/scaffold/create-repo.test.ts with 18 subprocess-based tests that verify the dry-run output of create-repo.ts for both forge and ace before anyone runs --apply (the irreversible GitHub repo creation step). Tests cover: - All 12 planned operations present for each repo - Every operation has status:"planned" in dry-run mode - Step 01: public+squash-merge+auto-merge settings; ace has no homepage - Step 02: branch protection data (no force-push, linear history, empty required_status_checks to avoid deadlock before CI is wired) - Step 04: CodeQL default-setup (not advanced-only; guards against the code_scanning ruleset rule regression) - Step 05: fork targets AceHack org - Step 06: scaffold file list includes core governance files - Step 07: manual-step checklist includes budget-cap and CodeQL items - Error handling: non-zero exit + usage message for unknown/missing --repo Build gate: dotnet build -c Release → 0 warnings 0 errors. Test gate: bun test tools/scaffold/create-repo.test.ts → 18 pass 0 fail. operative-authorization: aaron 2026-05-13: "Cooling period: TBD. The memory file IS the durable record" Co-Authored-By: Claude <noreply@anthropic.com>
18 dry-run tests for create-repo.ts; PR #3025. operative-authorization: aaron 2026-05-13: "Cooling period: TBD. The memory file IS the durable record" Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a subprocess-based Bun test suite to validate create-repo.ts --dry-run output for both forge and ace, ensuring the planned GitHub operations are correct before the irreversible --apply step is used.
Changes:
- Introduces
tools/scaffold/create-repo.test.tswith 18 dry-run subprocess tests covering step inventory, key configuration assertions, and error handling. - Adds a hygiene-history tick documenting the work, build, and test status.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/scaffold/create-repo.test.ts | Adds subprocess-driven dry-run tests that assert the full planned operation set for forge and ace, plus invalid-arg behavior. |
| docs/hygiene-history/ticks/2026/05/13/2007Z.md | Records the work session/tick for B-0424.5, including build/test results and contextual notes. |
…tdout, MD032 - Move describe-level runDryRun calls into beforeAll so subprocess failures report as test failures with clear attribution (Copilot #3237144663) - Rename `orgName` → `repoName` in assertCommonInvariants for clarity (Copilot #3237144697) - Check `stderr + stdout` for Usage: to survive output-stream differences (Copilot #3237144717) - Add blank line before list in tick shard to fix MD032 markdownlint error All 18 tests still pass. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced May 13, 2026
feat(scaffold): B-0424.6 — add .semgrep.yml GHA injection rule to forge+ace scaffold templates
#3026
Merged
AceHack
added a commit
that referenced
this pull request
May 14, 2026
…tep documented (#3114) * backlog(b-0424): mark in-progress — document slices 1-8 merged; add --apply next-step All 8 scaffolding slices (PRs #2994, #2996, #3003, #3019, #3025, #3026, #3027, #3028) are merged and tests pass (30/30). Update status to in-progress and document the completed slices table, dry-run verification (12 ops planned for each repo, 2026-05-14), and the --apply execution instructions Aaron needs to review before irreversible repo creation. operative-authorization: aaron 2026-05-13: "Cooling period: TBD. The memory file IS the durable record" Co-Authored-By: Claude <noreply@anthropic.com> * fix(b-0424): add blank line before list — resolve MD032 markdownlint Co-Authored-By: Claude <noreply@anthropic.com> * fix(b-0424): valid status + route --apply through workflow - status: in-progress → open (in-progress not in schema enum) - Next-step instructions now reference scaffold-stage1-create-repos GitHub Actions workflow (actor allowlist + CONFIRM gate + PAT handling + concurrency protection) instead of raw --apply bash Resolves Copilot P1 threads on #3114. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.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.
Summary
tools/scaffold/create-repo.test.ts— 18 subprocess-based tests for the B-0424 Stage 1 scaffold tool--dry-runoutput for bothforgeandacebefore anyone runs--apply(the irreversible GitHub repo creation step)What the tests cover
Why subprocess-based tests
create-repo.tscallsprocess.exit()and runs logic at module load — both break import-time unit testing. Spawning as a subprocess mirrors the actual invocation path, requires zero refactoring, and is zero-network (no GitHub calls, no side effects).Checks
bun test tools/scaffold/create-repo.test.ts→ 18 pass, 0 faildotnet build -c Release→ 0 warnings, 0 errorsContext
docs/backlog/P1/B-0424-three-repo-split-stage1-create-forge-ace-with-scaffolding-aaron-2026-05-13.mddocs/DECISIONS/2026-04-22-three-repo-split-zeta-forge-ace.mdoperative-authorization: aaron 2026-05-13: "Cooling period: TBD. The memory file IS the durable record"
🤖 Generated with Claude Code