Skip to content

Docs/tests: include pre-agent-steps and post-steps in shared import allowlist#31912

Merged
pelikhan merged 2 commits into
mainfrom
copilot/fix-docs-pre-agent-steps
May 13, 2026
Merged

Docs/tests: include pre-agent-steps and post-steps in shared import allowlist#31912
pelikhan merged 2 commits into
mainfrom
copilot/fix-docs-pre-agent-steps

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Bug Fix

What was the bug?

The imports reference omitted pre-agent-steps (and did not clarify post-steps) from the shared-workflow Allowed Import Fields list, while compiler behavior already accepts and merges both fields. This created a docs/runtime mismatch for reusable workflow components.

How did you fix it?

  • Docs: Allowed Import Fields

    • Added pre-agent-steps: and post-steps: to /docs/src/content/docs/reference/imports.md under shared workflow allowed fields.
  • Docs: Merge semantics

    • Added explicit field-level merge behavior:
      • pre-agent-steps: imported entries are prepended to main workflow entries (import order).
      • post-steps: imported entries are appended after main workflow entries (import order).
  • Integration coverage for import acceptance

    • Extended pkg/workflow/forbidden_fields_import_test.go (TestAllowedFieldsImportSuccess) to include shared imports that define:
      • pre-agent-steps
      • post-steps

Testing

  • Added representative allowed-field test cases for:
    • pre-agent-steps
    • post-steps
pre-agent-steps:
  - name: Prepare context
    run: echo "preparing context"

post-steps:
  - name: Upload summary
    run: echo "uploading summary"

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix documentation to include pre-agent-steps in Allowed Import Fields Docs/tests: include pre-agent-steps and post-steps in shared import allowlist May 13, 2026
Copilot AI requested a review from pelikhan May 13, 2026 10:29
@pelikhan pelikhan marked this pull request as ready for review May 13, 2026 10:32
Copilot AI review requested due to automatic review settings May 13, 2026 10:32
@pelikhan pelikhan merged commit 6ef41da into main May 13, 2026
@pelikhan pelikhan deleted the copilot/fix-docs-pre-agent-steps branch May 13, 2026 10:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a docs/runtime mismatch by documenting that shared imports may include pre-agent-steps and post-steps, and adds integration coverage confirming these fields are accepted in shared workflows.

Changes:

  • Documented pre-agent-steps: and post-steps: as allowed fields for shared workflow imports.
  • Documented merge behavior for imported pre-agent-steps (prepended) and post-steps (appended).
  • Extended the shared-import allowlist integration test to include pre-agent-steps and post-steps.
Show a summary per file
File Description
pkg/workflow/forbidden_fields_import_test.go Expands allowed-field import success coverage to include pre-agent-steps and post-steps.
docs/src/content/docs/reference/imports.md Updates the allowed import fields list and merge semantics to include pre-agent-steps and post-steps.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

- `runtimes:` - Runtime version overrides (node, python, go, etc.)
- `secret-masking:` - Secret masking steps
- `env:` - Workflow-level environment variables
- `pre-agent-steps:` - Steps that run after artifacts are downloaded and before engine execution
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.

Docs: pre-agent-steps: missing from Allowed Import Fields list

3 participants