Repository navigation
feat: add wiki field to checkout configuration - #28900
Conversation
When wiki: true, clones the repo's wiki git instead of the regular git.
The effective repository becomes "{repository}.wiki". Wiki state is
included in the deduplication key so wiki and non-wiki checkouts of the
same repo/path are never merged together.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c17a0d7c-b808-434a-902c-891657ab7fd9
Co-authored-by: pelikhan <[email protected]>
🧪 Test Quality Sentinel ReportTest Quality Score: 100/100✅ Excellent test quality
Test Classification Details
Verdict
All 9 sub-tests verify observable behavioral contracts: parsing correctness, error handling on invalid input, deduplication key semantics, merge behavior, and generated YAML output. Error/edge coverage is strong — the test suite includes an invalid-type error path, a dedup-boundary case, a depth-merge edge case, and a negative assertion confirming non-wiki behavior is unaffected. 📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators. Language SupportTests analyzed:
References: §25047584638
|
Draft ADR generated by the Design Decision Gate workflow for PR #28900. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Commit pushed:
|
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (149 new lines in AI has analyzed the PR diff and generated a draft ADR to help you get started: 📄 Draft ADR: What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 What the draft ADR coversThe draft ADR captures the following design decisions inferred from the diff:
📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
References: §25047584674
|
There was a problem hiding this comment.
Pull request overview
Adds support for checking out GitHub wiki repositories via a new checkout.wiki frontmatter flag, and updates workflow lock files to expand PR-related permissions and introduce MCP CLI mounting.
Changes:
- Extend checkout config parsing/management/generation to support
wiki: trueby emitting{repository}.wiki(with double-suffix guard) and includingwikiin deduplication. - Update JSON schema to allow the new
checkout.wikiboolean property. - Update multiple
.github/workflows/*lock.ymlfiles (permissions + MCP CLI mounting/prompt wiring).
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/checkout_step_generator.go | Adds wikiRepository() helper and emits .wiki repository for wiki checkouts |
| pkg/workflow/checkout_manager.go | Adds Wiki field, includes wiki in checkoutKey, and threads wiki through resolved entries |
| pkg/workflow/checkout_config_parser.go | Parses checkout.wiki boolean |
| pkg/parser/schemas/main_workflow_schema.json | Adds wiki to checkoutConfig schema |
| pkg/workflow/checkout_manager_test.go | Adds TestWikiCheckout coverage for parsing/dedup/step generation |
| .github/workflows/unbloat-docs.lock.yml | Adds pull-requests: write, MCP CLI prompt injection, and mounts MCP CLIs |
| .github/workflows/tidy.lock.yml | Adds pull-requests: write, MCP CLI prompt injection, and mounts MCP CLIs |
| .github/workflows/plan.lock.yml | Adds pull-requests: write |
| .github/workflows/pdf-summary.lock.yml | Adds pull-requests: write |
| .github/workflows/mergefest.lock.yml | Adds pull-requests: write |
| .github/workflows/brave.lock.yml | Adds pull-requests: write |
| .github/workflows/ace-editor.lock.yml | Adds pull-requests: write |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
.github/workflows/plan.lock.yml:80
- This workflow grants
pull-requests: write. Since this expands the GITHUB_TOKEN scope, please confirm it’s required for the workflow’s PR operations and consider keeping permissions minimal ifissues: writewould suffice (e.g., for issue/PR comments).
pull-requests: write
- Files reviewed: 13/13 changed files
- Comments generated: 15
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
This workflow grants pull-requests: write. Since this expands the GITHUB_TOKEN scope, please confirm it’s required for the workflow’s PR operations and consider keeping permissions minimal if issues: write would suffice (e.g., for issue/PR comments).
| pull-requests: write |
| lfs bool | ||
| current bool // true if this checkout is the logical current repository | ||
| fetchRefs []string // merged fetch ref patterns (see CheckoutConfig.Fetch) | ||
| wiki bool // true if the wiki git should be cloned instead of the regular git |
There was a problem hiding this comment.
resolvedCheckout now stores wiki both in key.wiki and as a separate entry.wiki field. This duplication is easy to let drift over time and isn’t needed since the key already carries the value. Consider removing the redundant field and reading the flag from entry.key.wiki everywhere.
| wiki bool // true if the wiki git should be cloned instead of the regular git |
| depth0 := 0 | ||
| cm := NewCheckoutManager([]*CheckoutConfig{ | ||
| {Repository: "owner/repo", Path: "./wiki", Wiki: true}, | ||
| {Repository: "owner/repo", Path: "./wiki", Wiki: true, FetchDepth: &depth0}, | ||
| }) |
There was a problem hiding this comment.
The wiki checkout tests don’t cover the “already ends with .wiki” normalization path described in the PR (and relied on by wikiRepository). It would be good to add a case where one config uses Repository: "owner/repo" and another uses Repository: "owner/repo.wiki" with Wiki: true, and assert they dedupe (or explicitly assert the intended non-dedup behavior).
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
This workflow grants pull-requests: write. Since this expands the GITHUB_TOKEN scope, please confirm it’s required for the workflow’s PR operations and consider keeping permissions minimal if issues: write would suffice (e.g., for issue/PR comments).
| pull-requests: write |
| assert.Contains(t, combined, "repository: ${{ github.repository }}.wiki", "default wiki checkout must use github.repository.wiki") | ||
| }) | ||
|
|
||
| t.Run("default checkout step uses explicit .wiki repository when repo set", func(t *testing.T) { |
There was a problem hiding this comment.
This subtest name says "default checkout step" but the config sets Path: "./docs-wiki", so it’s exercising an additional checkout step (via GenerateAdditionalCheckoutSteps). Renaming the subtest would avoid confusion about what behavior is being validated.
| t.Run("default checkout step uses explicit .wiki repository when repo set", func(t *testing.T) { | |
| t.Run("additional checkout step uses explicit .wiki repository when repo set", func(t *testing.T) { |
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
This workflow grants pull-requests: write. Since this expands the GITHUB_TOKEN scope, please confirm it’s required for the workflow’s PR operations and consider keeping permissions minimal if issues: write would suffice (e.g., for issue/PR comments).
| pull-requests: write |
| contents: read | ||
| discussions: write | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
The PR description’s “Files changed” list doesn’t mention updates to this workflow lock file (and several others). If these workflow changes are intentional (permissions/MCP CLI mounting/etc.), consider updating the PR description or splitting them into a separate PR so the checkout wiki feature change can be reviewed independently.
This issue also appears on line 80 of the same file.
| if !trialMode && override != nil { | ||
| if override.key.repository != "" { | ||
| if override.wiki { | ||
| // Wiki checkout: use "{repository}.wiki" as the effective repository. | ||
| fmt.Fprintf(&sb, " repository: %s\n", wikiRepository(override.key.repository)) | ||
| } else if override.key.repository != "" { |
There was a problem hiding this comment.
GenerateDefaultCheckoutStep assumes the default checkout is always at index 0 (e.g., it hardcodes checkout-app-token-0 and later looks up cm.index[checkoutKey{}]). With the new wiki default override (checkoutKey{wiki:true}), the default override may not be checkoutKey{} and may not be at index 0 when users provide a checkout list. This can cause the checkout step and/or fetch step to reference the wrong app-token step ID. Consider determining the default checkout's index via cm.index[override.key] (or similar) and using that index consistently for app-token references and fetch-step generation (including wiki defaults).
| actions: read | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
This workflow grants pull-requests: write. Since this expands the GITHUB_TOKEN scope beyond issues: write, please confirm it’s required for the actions this workflow performs (e.g., creating/updating PRs, PR reviews, or PR metadata) and consider keeping the permission set minimal if not needed.
| pull-requests: write |
| GH_AW_MCP_CONFIG_03e8d6cc8aac861b_EOF | ||
| - name: Mount MCP servers as CLIs | ||
| id: mount-mcp-clis | ||
| continue-on-error: true |
There was a problem hiding this comment.
The new "Mount MCP servers as CLIs" step is marked continue-on-error: true, but subsequent steps update PATH (${RUNNER_TEMP}/gh-aw/mcp-cli/bin) and the prompt/tool allowlists appear to assume the CLI(s) are available. If the mount fails, the agent may be instructed/allowed to run commands that won’t exist. Consider either making this step required, or gating the PATH/prompt/tooling changes on successful mount.
| continue-on-error: true |
|
|
🛠️ Agentic Maintenance updated this pull request branch. |
|
@copilot review comments |
- Remove redundant wiki field from resolvedCheckout; use entry.key.wiki everywhere - Normalize .wiki suffix in deduplication key (owner/repo.wiki + wiki:true merges with owner/repo + wiki:true) - Fix current: true validation to include wiki in the key - Update buildCheckoutsPromptContent to show .wiki suffix and annotate wiki checkouts with (wiki) - Fix GenerateDefaultCheckoutStep to look up actual index via cm.index[override.key] instead of hardcoding 0 - Fix subtest name: "default checkout step..." → "additional checkout step..." - Add tests for .wiki normalization dedup and prompt content Agent-Logs-Url: https://github.com/github/gh-aw/sessions/38199c3c-52f5-470b-805e-603b34b9e675 Co-authored-by: pelikhan <[email protected]>
Done in c0987c1. Here's a summary of all changes made: Prompt update: Other review fixes applied:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Extends the
checkoutfrontmatter object with a newwiki: true/falsefield (defaultfalse).When
wiki: true, the repository's wiki git is cloned instead of the regular git. GitHub wiki repositories are accessible at{owner}/{repo}.wiki, so the effectiverepositoryinput toactions/checkoutbecomesowner/repo.wiki.Changes
New field:
wikiDeduplication
The
wikiflag is part of the checkout deduplication key (checkoutKey). This means:(repository, path)remain as separate steps(repository, path, wiki=true)are merged (same rules as before)owner/repo.wikiwithwiki: trueandowner/repowithwiki: trueare treated as the same target and merged (trailing.wikiis normalized in the key)Step generation
wiki: truewith no explicitrepository→repository: ${{ github.repository }}.wikiwiki: truewith explicitrepository: owner/docs→repository: owner/docs.wiki.wikicurrent: truevalidation includeswikiin the uniqueness key, so a wiki checkout and a non-wiki checkout of the same repo/path can independently holdcurrent: truePrompt content
The generated agent prompt now accurately reflects wiki checkouts:
.wikisuffix (e.g.owner/repo.wiki)(wiki)so the agent knows it is working with a GitHub wiki repositoryFiles changed
pkg/workflow/checkout_manager.goWiki booltoCheckoutConfigandcheckoutKey; remove redundant field fromresolvedCheckout(usekey.wiki); normalize.wikisuffix in dedup key; updateadd()andGetDefaultCheckoutOverride()pkg/workflow/checkout_config_parser.gowikiboolean field; includewikiincurrent: truevalidation key; updatebuildCheckoutsPromptContentto show.wikisuffix and(wiki)annotationpkg/workflow/checkout_step_generator.gowikiRepository()helper; useentry.key.wikiin step generators; fixGenerateDefaultCheckoutStepto look up actual checkout index viacm.index[override.key]instead of hardcoding0pkg/parser/schemas/main_workflow_schema.jsonwikiboolean property tocheckoutConfigschemapkg/workflow/checkout_manager_test.goTestWikiCheckoutsuite covering parsing, deduplication,.wikinormalization, step generation, and prompt content