Update checkout front matter for current repository#18713
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot review github context prompt and populate with the list of checkouts, including the current so that the agent knows where the checkouts are and what repos they are for. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 688ab13. The GitHub context prompt now includes the full checkout list when user checkouts are configured. For each checkout, it shows the path and repository, marking the The checkout list is injected into 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:
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in b137b96. Updated
|
There was a problem hiding this comment.
Pull request overview
Adds support for a current: true flag in checkout: frontmatter to identify a single “primary” repository, and enriches the GitHub context prompt with a rendered list of configured checkouts (marking the current one).
Changes:
- Adds
currentto checkout config parsing/validation, internal checkout merging, and JSON schema. - Adds
CheckoutManager.GetCurrentRepository()and prompt-building helpers to surface checkout information to the agent. - Updates docs and the smoke workflow lock file to reflect the new GitHub context content.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/unified_prompt_step.go | Injects a generated checkout list into the GitHub context prompt before expression extraction/substitution. |
| pkg/workflow/checkout_manager.go | Adds Current to config + resolved entries, parses/validates current, and generates markdown checkout-list prompt content. |
| pkg/workflow/checkout_manager_test.go | Adds unit tests for parsing/validation, GetCurrentRepository, and checkout prompt rendering. |
| pkg/parser/schemas/main_workflow_schema.json | Extends checkout schema with current: boolean. |
| docs/src/content/docs/reference/cross-repository.md | Documents current and adds a new section with examples. |
| .github/workflows/smoke-codex.lock.yml | Updates the locked prompt content to include the new checkouts section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot merge main recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. 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:
|
|
@copilot merge main and recompile Show full path in prompt and cwd |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 07fd42b. The checkout prompt now shows full absolute paths using 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:
|
|
@copilot add checkout entry to smoke-codex and recompile |
…val; add current:true to smoke-codex checkout Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in 5bee2d3. Two issues addressed:
Done in 5bee2d3. Converted 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:
|
|
@copilot lint go |
…d isDockerAvailable and schemaValidationLog Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in 3b8e283. Three lint issues resolved:
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
Commit pushed:
|
|
🤖 Smoke test §22524448380 results for PR #18713:
Status: cc
|
There was a problem hiding this comment.
This PR adds current: true checkout support to tell agents which repository is their primary target. The implementation is clean: schema update, validation, prompt injection, and tests all present. The injection approach (inserting before (/github-context)) is a reasonable pattern. Docs and smoke-codex workflow are updated accordingly. No issues found — looks good.
📰 BREAKING: Report filed by Smoke Copilot
| // "${{ github.repository }}" for any checkout that does not have an explicit repository | ||
| // configured; callers must ensure these expressions are processed by an ExpressionExtractor | ||
| // so the placeholder substitution step can resolve them at runtime. | ||
| func buildCheckoutsPromptContent(checkouts []*CheckoutConfig) string { |
There was a problem hiding this comment.
The buildCheckoutsPromptContent function cleanly separates the prompt-building concern from the checkout manager's core responsibilities. The (cwd) marker and **current** annotation should give agents clear guidance about which repository to target. Nice design.
| unifiedPromptLog.Printf("Injecting checkout list into GitHub context (%d checkouts)", len(data.CheckoutConfigs)) | ||
| const closeTag = "</github-context>" | ||
| if idx := strings.LastIndex(combinedPromptText, closeTag); idx >= 0 { | ||
| combinedPromptText = combinedPromptText[:idx] + checkoutsContent + combinedPromptText[idx:] |
There was a problem hiding this comment.
The injection approach using strings.LastIndex to find and insert before (/github-context) is clever and resilient. One thing worth noting: if the closing tag appears multiple times in githubContextPromptText (e.g., in code examples), this would still work correctly since LastIndex finds the last occurrence. A comment explaining this intent would help future readers.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
💥 KAPOW! 🦸 THE SMOKE TEST AGENT WAS HERE! 🦸 💨 WHOOOOSH! Claude swooped in like a caped crusader, tested ALL the systems, and — BLAMMO! — everything checks out! 🔥 ZAAAAP! The agentic workflows live! The MCP tools respond! The builds compile!
POW! BAM! BOOM! Mission accomplished. This agent has left the building. 🦸♂️💨
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
💥 [THE END] — Illustrated by Smoke Claude
Current boolfield toCheckoutConfigstructcurrent booltoresolvedCheckout; propagate inadd()GetCurrentRepository()method toCheckoutManagercurrentfield and normalizepath: "."to""incheckoutConfigFromMap()path: "."to""inadd()so""and"."always merge as the same root checkout(repository, path)pair keyscurrentpropertybuildCheckoutsPromptContent()and inject checkout list into GitHub context prompt$GITHUB_WORKSPACE-based absolute paths in prompt; mark root checkout as(cwd)currentflag in table + "Marking a Primary Repository" sectiontoken:notgithub-token:foractions/checkoutpath: .from root checkout entries in docs examples and code commentsrenderGuardPoliciesJSONfrom mergeTestCodexEngineRenderMCPConfigunit test: removepayloadSizeThresholdexpectation (removed from renderer in main merge)payloadSizeThresholdremovalcurrent: trueto smoke-codex checkout entry and recompileassert.Emptyin checkout_manager_test.go (testifylint)isDockerAvailablefrom docker_images.go; move to integration test fileschemaValidationLogfrom parser/schema_validation.go💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
✨ PR Review Safe Output Test - Run 22524448275