The test instructions file (.github/instructions/tests.instructions.md) documents the integration test architecture for contributors and automated agents. It currently describes a shared Test-{OS}-{TokenType}-{RunID} repository model, which does not reflect the correct per-test-file scoping needed to prevent cross-file resource collisions during parallel execution.
Request
What is confusing or missing
The instructions file tells contributors that all test files share a single repository per OS/auth/run combination. This is incorrect — each test file should own its own repository to avoid cross-file interference. A developer following the current instructions would write tests that conflict with other test files when running in parallel.
Acceptance criteria
- The "Shared test repositories" section is renamed to "Per-test-file repositories" and describes the correct architecture
- The repository naming pattern is updated from
Test-{OS}-{TokenType}-{RunID} to {TestName}-{OS}-{TokenType}-{RunID} in all code examples and the naming conventions table
- The "Setup and teardown" section describes per-test-file provisioning: each test file ensures its own repository exists, cleans up stale resources from prior runs, and tears down after itself
- The "Test file structure" code example includes stale resource cleanup in
BeforeAll and resource teardown in AfterAll
- The "Key rules" section documents the self-containment principle: each test file owns its repo, handles idempotent setup, cleans up after itself, and must work independently across parallel OSes and sequential auth contexts
- The frontmatter description reflects the updated scope
Technical decisions
Scope: Documentation-only change to .github/instructions/tests.instructions.md. No test code changes — those are tracked in #595.
Branch: The changes have already been authored on branch docs/test-instructions-per-test-repos.
Naming pattern update: All occurrences of Test-{OS}-{TokenType}-{RunID} become {TestName}-{OS}-{TokenType}-{RunID}. The naming conventions table gains:
| Resource |
Pattern |
Example |
| Repo |
{TestName}-{OS}-{TokenType}-{RunID} |
Releases-Linux-USER_FG_PAT-1234 |
| Extra repo |
{TestName}-{OS}-{TokenType}-{RunID}-{N} |
Secrets-Linux-ORG_FG_PAT-1234-2 |
Self-containment principle: Each test file is responsible for:
- Ensuring its repository exists (idempotent
Set-GitHubRepository in BeforeAll)
- Cleaning up stale resources from prior runs of the same
GITHUB_RUN_ID
- Tearing down test-specific resources in
AfterAll
Relationship to other issues: This is a documentation sub-task of #595. The actual test code changes that implement the per-test-file model are in #595. The Organizations Install-GitHubApp 404 fix is in #596.
Implementation plan
The test instructions file (
.github/instructions/tests.instructions.md) documents the integration test architecture for contributors and automated agents. It currently describes a sharedTest-{OS}-{TokenType}-{RunID}repository model, which does not reflect the correct per-test-file scoping needed to prevent cross-file resource collisions during parallel execution.Request
What is confusing or missing
The instructions file tells contributors that all test files share a single repository per OS/auth/run combination. This is incorrect — each test file should own its own repository to avoid cross-file interference. A developer following the current instructions would write tests that conflict with other test files when running in parallel.
Acceptance criteria
Test-{OS}-{TokenType}-{RunID}to{TestName}-{OS}-{TokenType}-{RunID}in all code examples and the naming conventions tableBeforeAlland resource teardown inAfterAllTechnical decisions
Scope: Documentation-only change to
.github/instructions/tests.instructions.md. No test code changes — those are tracked in #595.Branch: The changes have already been authored on branch
docs/test-instructions-per-test-repos.Naming pattern update: All occurrences of
Test-{OS}-{TokenType}-{RunID}become{TestName}-{OS}-{TokenType}-{RunID}. The naming conventions table gains:{TestName}-{OS}-{TokenType}-{RunID}Releases-Linux-USER_FG_PAT-1234{TestName}-{OS}-{TokenType}-{RunID}-{N}Secrets-Linux-ORG_FG_PAT-1234-2Self-containment principle: Each test file is responsible for:
Set-GitHubRepositoryinBeforeAll)GITHUB_RUN_IDAfterAllRelationship to other issues: This is a documentation sub-task of #595. The actual test code changes that implement the per-test-file model are in #595. The
OrganizationsInstall-GitHubApp404 fix is in #596.Implementation plan
Test-{OS}-{TokenType}-{RunID}to{TestName}-{OS}-{TokenType}-{RunID}in all code examplesBeforeAlland resource teardown inAfterAll