Repository navigation
Fix activation metadata loading for private reusable workflows - #78626
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: 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.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
There was a problem hiding this comment.
Found one blocking correctness issue and one test-coverage issue.
Highlights
- Embedded metadata is not size-checked by the compiler, so oversized workflows compile but fail during activation.
- The expression-inertness test checks base64 text, making the assertion vacuous.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (spec-review-history)History |
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs, /codebase-design, and /tdd. Requesting changes because the committed lock files are stale.
📋 Key Themes & Highlights
Key Themes
- Stale lock files (blocking): the compiled activation job changes for every workflow, but none of the 368
.lock.ymlfiles are regenerated. CIcheck-workflow-driftwill fail. Runmake recompile. - Silent skip:
embedActivationMarkdownMetadatareturns nil when the activation job is missing, which hides a broken catalog. - Duplicate work: the catalog is computed twice per compile (embed and manifest).
- Weak test: the
${{check on base64 is always true, so it does not prove what it claims.
Positive Highlights
- ✅ The embedded path bypasses
deduplicateMarkdownMetadata, so the catalog has noReferencesthat the activation job would be unable to resolve. - ✅ Base64 canonical round-trip, bounded decode, and no fallback on malformed input are well tested.
- ✅ Env cleanup in
generate_aw_info.test.cjsprevents leakage between tests.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
The catalog-wide token budget rejects valid collections, while large catalog payloads can exceed workflow-expression and environment-entry size limits.
2 open issues
What changed in this PR
This PR addresses private reusable workflow activation failures by embedding compiler metadata in the activation job, avoiding callee-repository reads with the caller-scoped token.
Changes:
- Embed base64-encoded metadata after prompt generation, keeping authored Actions expressions inert.
- Prefer validated embedded catalogs while preserving revision-based loading for older lock files.
- Add compiler/runtime regression coverage and refresh golden outputs.
| File | Description |
|---|---|
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden |
Update embedded-metadata expectation for imports. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden |
Update Copilot smoke-test output. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden |
Update Playwright CLI fixture output. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/custom-safe-output-max-length.golden |
Update custom safe-output fixture output. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden |
Update basic Copilot fixture output. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden |
Expect embedded metadata for Pi. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden |
Expect embedded metadata for Gemini. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden |
Expect embedded metadata for Copilot. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden |
Expect embedded metadata for Codex. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden |
Expect embedded metadata for Claude. |
pkg/workflow/compiler_yaml.go |
Embed the catalog in activation-job environment variables. |
pkg/workflow/compiler_markdown_metadata_test.go |
Verify encoding and post-substitution metadata inclusion. |
actions/setup/js/markdown_metadata.cjs |
Prefer embedded catalogs and validate their encoding. |
actions/setup/js/markdown_metadata_sources.test.cjs |
Cover private-source loading and malformed-catalog rejection. |
actions/setup/js/generate_aw_info.test.cjs |
Cover run-info generation without private-repository access. |
actions/setup/js/generate_aw_info.cjs |
Pass embedded metadata to the loader. |
Review effort: Max (adaptive)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "eb4b4e0e34eb20980b57a5a7f6fb91aea8270a5d",
"kind": "requested",
"schema_version": "1",
"state": "dc91b1af560f7a90ca8596bfe5ba86ded95aad197ab6f8b43fff8ccd3bf65539",
"work": [
"0fae82acb2e0ea51d2100aa9c47ce2394eb4cbe62aaa1b5ccc02b9ed8930bb3c",
"2340e6be4547a9c83e1d54600d87c02265f275cc19702a3e39b72211f9fae3bf",
"55ef969407b7b55d2390af518b95e14c81eecf6a06060969c8663dad586fa6a8",
"853792647deb236e49b7b453338d418773aa2421bdb653b926787bb6872994a7",
"9582df81128043d76135fd24121be136df9eee222b7ba4a7e8e8ccef5338130e",
"ae02e174372d6af1dc43227f7fece16bba7f8e54fd8e6908030718a208ee9a9b",
"af3a41abb52d9794ec2e6160624a3018ae19f91cbc0b422314b519b69e24bb2a",
"dcea077d2d27deeced3685d663cfc6e027fc3043a7f3d6434dfa0e5a260e1254"
],
"workflow": "pr-sous-chef"
}
|
…workflow-activation Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged main via make merge-main in 4d47109. Addressed all eight linked comments in 104d460, with a lint-only follow-up in 001d27a; each linked thread has a reply. Compiler/WASM golden tests, 152 runtime tests, Go lint, and drift verification for all 368 locks pass. Secret scans are clean. Custom-linter diagnostics remain only in unchanged files. CodeQL timed out without results and instructed against retrying. Working tree is clean; no PR merge or workflow dispatch was performed. |
…workflow-activation Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Records whose compiled value is {} or null and that carry no errors or
references are omitted; absence already means empty at runtime.
Co-authored-by: Copilot App <[email protected]>
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "523dc7ae3dfeed81ceb028d50e73b24abb7fe77f",
"kind": "requested",
"schema_version": "1",
"state": "074f8e1a4dc6f54205e2fb1cb661129151d6ded7e018742eac146752b26ba774",
"work": [],
"workflow": "pr-sous-chef"
}
|
…workflow-activation # Conflicts: # pkg/workflow/type_conversion_test.go Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Set GH_AW_INFO_MARKDOWN_METADATA only on the run info step, as escaped JSON rather than base64, and omit it when no records exist. Repository agent records are recovered from the checkout after the .github checkout in interpolate_prompt. The runtime no longer reads the executing lock file via the Contents API or git objects. Co-authored-by: Copilot App <[email protected]>
…tivation' into copilot/fix-reusable-workflow-activation Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged latest main in 2649f05 and preserved your concurrent metadata update in 370a94e. Added a narrow test-lint exemption in a9425ca. Published successfully. Focused Go tests and 174 runtime tests pass; the final validation rerun is still running. CodeQL timed out without results. No PR merge or workflow dispatch performed. |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "a9425ca4a060393b7394fe8af7b74117206a25df",
"kind": "requested",
"schema_version": "1",
"state": "345eb8a72e8f94206f67d45d317b3854aefc8d9172c55a3e64ba047a5d5ec012",
"work": [
"27ac911a80a91d6b02a3e07caef39b800cb632677606247471a58f9a93975854",
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
…workflow-activation Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged latest main with Targeted Go tests, all 182 selected JavaScript tests, and drift checks for all 366 workflows pass. Secret scans are clean. Unrelated package-wide linter findings remain unchanged; CodeQL timed out without results. Changes are published; no PR merge or workflow dispatch performed. |
Collect the workflow-only and full Markdown metadata catalogs in one scan, and enforce the runtime size limit on the escaped payload the runtime actually reads. Assert the raw embedded value contains no Actions expressions. Co-authored-by: Copilot App <[email protected]>
|
🎉 This pull request is included in a new release. Release: |

Problem
Private reusable (callee) workflows failed in activation:
generate_aw_inforead the executing lock file through the Contents API using the caller's token, which returns 404 for a private callee repository.Strategy
The runtime no longer reads the executing lock file at all. The compiler hands the run info step exactly the metadata it needs.
GH_AW_INFO_MARKDOWN_METADATAis set only on the "Generate agentic run info" step, as escaped JSON ($,'and non-ASCII escaped) rather than base64.{}records are dropped.$RUNNER_TEMP/gh-aw-markdown-metadata.jsonviaGH_AW_INFO_MARKDOWN_METADATA_FILE. The hard limit is 4 MiB.interpolate_promptruns after the.githubcheckout and before the activation artifact upload. It callsrecoverCheckoutMarkdownMetadata, which reads checked-out lock headers and updatesaw_info.jsononly when records were missing.generate_aw_info.Impact