Skip to content

fix(parser): handle self-repository references in comparison parser - #4707

Closed
nobbs wants to merge 1 commit into
actions:mainfrom
nobbs:fix/self-repository-parser-validation
Closed

nobbs wants to merge 1 commit into
actions:mainfrom
nobbs:fix/self-repository-parser-validation

Conversation

@nobbs

@nobbs nobbs commented Sep 11, 2026

Copy link
Copy Markdown

Accept $/ self-repository references consistently when action-manifest parser comparison is enabled.

The newer parser previously emitted a false validation annotation and converted this reference differently from the legacy parser. This aligns validation and conversion with the legacy behavior, with a regression test covering comparison mode.

Fixes #4706

Accept self-repository references consistently in both action-manifest parser paths and cover the comparison mode.

Fixes: actions#4706
Copilot AI lite review requested due to automatic review settings September 11, 2026 11:39
@nobbs
nobbs requested a review from a team as a code owner September 11, 2026 11:39

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.

🔵 Needs a closer look

The regression test should directly verify the new-parser converted repository reference.

Pull request overview

Fixes parser comparison handling for $/... self-repository references by aligning validation and conversion with legacy behavior.

Changes:

  • Accepts valid self-repository references during validation.
  • Converts references consistently in comparison mode.
  • Adds composite-action regression coverage.
File summaries
File Summary
src/Test/TestData/self_repository_composite_action.yml Adds composite-action test data using a self-repository reference.
src/Test/L0/Worker/ActionManifestParserComparisonL0.cs Adds comparison regression coverage, but assertions currently inspect only the legacy result.
src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs Excludes valid self-repository references from validation.
src/Runner.Worker/ActionManifestManagerWrapper.cs Converts self-repository references consistently.
Review details

Suppressed comments (1)

src/Test/L0/Worker/ActionManifestParserComparisonL0.cs:125

  • These assertions inspect the legacy result: ActionManifestManagerWrapper.Load always returns the legacy result, while CompareCompositeExecution only compares step count and outputs. The test would therefore still pass if the new-parser path in ConvertToLegacySteps (including the new $/ mapping) produced a different repository reference. Please compare or directly assert the converted new step reference so the regression covers both changes.
                var reference = Assert.IsType<GitHub.DistributedTask.Pipelines.RepositoryPathReference>(nestedAction.Reference);
                Assert.Equal(GitHub.DistributedTask.Pipelines.PipelineConstants.SelfRepositoryAlias, reference.RepositoryType);
                Assert.Equal("actions/nested", reference.Path);
                Assert.False(_ec.Object.Global.HasActionManifestMismatch);
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nobbs

nobbs commented Sep 11, 2026

Copy link
Copy Markdown
Author

Closing as a duplicate of #4669, which contains the same production fix and broader regression coverage for self-repository references in parser comparison.

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.

Bug: self-repository references emit false validation errors in parser comparison

2 participants