Skip to content

test(action): share runner resources and completed scan fixtures - #2981

Draft
mldangelo-oai wants to merge 1 commit into
mainfrom
mdangelo/codex/simplify-action-fixtures-9870af01
Draft

mldangelo-oai wants to merge 1 commit into
mainfrom
mdangelo/codex/simplify-action-fixtures-9870af01

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

The Action tests could leave a temporary directory behind if Git setup failed or leave a synthetic environment variable set if a child-process assertion failed. Registering teardown when each resource is acquired lets the test harness clean up in both cases.

Changes

The runner and result tests build their simulated CLI response from the copied manifest, findings, coverage and report paths. One loopback fixture records real artifact client requests and serves both accepted and rejected creation responses.

Teardown closes the server and restores the inherited environment and runner exit code before removing temporary directories. The refactor removes 61 lines net.

Testing

On this commit, 227 Action tests passed on Linux. The run also passed SDK and plugin builds, type checks, and formatting.

To exercise artifact creation rejection and archive read failure through the real client, run npm --prefix github-action test.

An earlier Linux comparison on Node 24.22.3 matched test names and the order of 2,171 assertion calls across 15 suites. Separate probes confirmed that the runner and three runtime tests restored process state before injected directory-removal errors, and that the enterprise artifact server closed before the same error.

Risk and rollout

The changes are confined to Action tests. Server teardown uses async disposal under the existing Node 24 requirement. The archive permission case stubs blob upload and skips on Windows or when run as root.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@mldangelo-oai mldangelo-oai added the skip-release-notes Omit internal changes from generated release notes label Dec 5, 2026

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks—no material issues found. The shared fixtures preserve the existing assertions and real artifact-client paths while registering process-state and resource cleanup before later setup can fail.

Validation: full Action validation passed on Node 24.19.0: type checking, all 227 tests with no skips, metadata/docs checks and distribution comparison. This includes the loopback artifact client and native archive-read failure case. Exact-head hosted checks show 15 successes and 11 conditional skips. Native Windows/macOS and unrelated SDK/plugin suites were not repeated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release-notes Omit internal changes from generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants