Skip to content

Pin generated guidance to the installed CLI release - #78616

Closed
pelikhan wants to merge 3 commits into
mainfrom
copilot/fix-gh-aw-upgrade-dispatcher-skill
Closed

pelikhan wants to merge 3 commits into
mainfrom
copilot/fix-gh-aw-upgrade-dispatcher-skill

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

upgrade, init, and fix generated guidance from main, exposing release-pinned repositories to unsupported prompts and catalog churn without a CLI update.

  • Release catalogs: Use the embedded prompt inventory instead of fetching a mutable remote list.
  • Guidance links: Pin skill and agent URLs—including raw fallbacks and ref labels—to the binary’s release tag, including prereleases.
  • Development builds: Preserve main URLs and remote catalog discovery.

@pelikhan pelikhan changed the title [WIP] Fix dispatcher skill tracking main instead of CLI version Pin generated guidance to the installed CLI release Nov 17, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 17, 2026 06:00
Copilot AI adaptive review requested due to automatic review settings November 17, 2026 06:00
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #78616 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #78616 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-ad32d1e6-8195-4e02-8f0b-8c1505870e2d","parents":[],"payload":{"id":"ldg-5a283b82-0269-456d-807c-782bc47b7e56","operation":"append","value":{"finding_count":0,"head_sha":"6aba14d525c299b18cffd914f579ee80b7453147","outcome":"aligned"}},"sha":"sha256:488d3416567db8f0bd05fb3ec4c84e0f52a5bb5985afc3550833c161d9f848ae","timestamp":"2026-11-17T06:08:55.731Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changed guidance pinning and release/development catalog behavior. I found no actionable correctness, regression, or test issues in the changed lines.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the changes pinning generated guidance to the installed release.

No open issues 🎉

What changed in this PR

Pins generated agent and skill guidance to the installed gh aw release, addressing version skew and catalog churn described in #77390 while preserving development-build behavior.

Changes:

  • Uses the embedded prompt inventory for release builds instead of fetching a mutable remote catalog.
  • Pins guidance URLs and ref labels to the release tag, including prereleases; development builds retain main.
  • Adds tests for version selection, URL rendering, catalog fetching, and reproducible release output.
File Description
pkg/​cli/​copilot_agents.go Selects release-aware guidance refs, pins template links, and uses embedded release catalogs.
pkg/​cli/​copilot_agents_test.go Tests release and development guidance behavior and release-output consistency.

Review effort: Balanced (adaptive)

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-ea5ff9c1-4b3f-4e24-994b-9ab185f3fedb","parents":[],"payload":{"id":"ldg-a2a33253-73c0-4778-aa05-a8f86c9d22e1","operation":"append","value":{"finding_count":0,"head_sha":"6aba14d525c299b18cffd914f579ee80b7453147","outcome":"no_findings"}},"sha":"sha256:c4f080c72823f1d1c06b12343af7dc42f6a8391bbfbb8e47c62328b3c6f4e850","timestamp":"2026-11-17T06:10:15.445Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd. The core change is sound: release builds pin guidance URLs and labels to the release tag, while dev builds keep main and remote catalog discovery. One latent issue is flagged inline.

📋 Key Themes & Verification

Key Themes

  • Replacer scope: the main to ref replacement matches any backticked main in the templates, not just the guidance-ref label (inline comment).
  • Unpinned guide links: three guides under .github/aw/ still hardcode gh-aw/main/ URLs, so they drift to main once an agent follows them. Those files are outside this diff, so this is a follow-up, not a blocker.

Positive Highlights

  • ✅ Release-pinned catalogs avoid mutable remote lists, which addresses #77390.
  • ✅ The new test covers stable, prerelease, dev, tag-only, commit-suffixed, and empty-version cases, and checks that release output is deterministic.
  • ✅ Every .github/aw link in the two templates exists in the embedded fallback list.

Verification

  • TestAgenticWorkflowsGuidanceVersion and related targeted tests pass; gofmt and go vet are clean.
  • Full ./pkg/cli run: only TestLintCacheModeLiteralsCLI fails. It needs a Docker daemon for actionlint, which this sandbox lacks, so it is environmental and unrelated.
🔧 Suggested follow-ups
  • Narrow the replacer as described inline.
  • Pin the https://raw.githubusercontent.com/github/gh-aw/main/ links in agentic-chat.md, debug-bootstrap.md, and upgrade-agentic-workflows.md, or document that they are intentionally canonical.

@copilot please address the inline comment.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

Comment thread pkg/cli/copilot_agents.go Outdated
// Embedded templates default to main; pin both links and their ref labels.
return strings.NewReplacer(
"https://raw.githubusercontent.com/github/gh-aw/main/", "https://raw.githubusercontent.com/github/gh-aw/"+ref+"/",
"`main`", "`"+ref+"`",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/diagnosing-bugs] The main to ref replacement is broader than intended: it rewrites every backticked main in the templates, not just the guidance-ref label. Any future prose such as "on the main branch" would silently become the release tag. Only the two intended labels match today, so this is a latent corruption path.

💡 Suggested fix

Anchor the pattern to the phrase the templates actually use:

strings.NewReplacer(
	"https://raw.githubusercontent.com/github/gh-aw/main/", "https://raw.githubusercontent.com/github/gh-aw/"+ref+"/",
	"URLs showing `main`", "URLs showing `"+ref+"`",
).Replace(content)

Add a case to TestAgenticWorkflowsGuidanceVersion asserting that an unrelated backticked main survives rendering.

@copilot please address this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 744f27f: the ref-label replacement now targets only the intended “URLs showing main” phrase, and a regression assertion confirms unrelated backticked main text is preserved.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/cli/copilot_agents.go:216): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "6aba14d525c299b18cffd914f579ee80b7453147",
  "kind": "requested",
  "schema_version": "1",
  "state": "4b8699855289b268bebd36b605ba37ae387f8c30e0d60aeadd5b5f72c345b40c",
  "work": [
    "15e59b9cfa5a63be87463529e7f7e3709f8d1d9e1f727c1af8c2cce44e5d6c3e"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

…rade-dispatcher-skill

# Conflicts:
#	pkg/cli/copilot_agents.go
#	pkg/cli/copilot_agents_test.go

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Comment thread pkg/cli/copilot_agents.go
awFiles = embeddedFallbackAWMarkdownFiles()
} else {
var err error
awFiles, err = listAgenticWorkflowsMarkdownFiles(ctx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh aw upgrade writes a dispatcher skill that tracks main instead of the installed CLI version

5 participants