Skip to content

test(repo): pin installation access in any position, approval scopes without a driver and git-only proxy probes - #3552

Merged
freeqaz merged 2 commits into
mainfrom
mut-1024k-repo
Oct 25, 2026
Merged

freeqaz merged 2 commits into
mainfrom
mut-1024k-repo

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

Mutation testing of the repository refusals added in #3524, #3531 and #3534 found branches no test could fail. Each mutant below passed repository-credentials-admission, http-errors, configuration-startup, egress-enrollment, credential-proxy-configuration and protected-driver-registration:

  • Installation-wide access is checked only when it is the first binding.
  • GET .../repository-approval-scopes stops returning [] for an Agent whose stored binding predates the Installation dropping its repository settings (it answers the save-path 409 instead).
  • The deploy probe rethrows every assertAvailable failure, so an unavailable counterpart answers 503 instead of the binding refusal (CredentialSourceUnprotectedError).
  • The git-only registration check (registeredWithoutExecution) ignores which registration failed, the EXTENSION_KIND_SUPERVISOR_MIDDLEWARE kind encoding, protocol_major, or one or both capability lists.

Change

Test-only, in tests/integration/repository-credentials-admission.test.mjs:

  • The installation-access save test also PATCHes with the installation binding listed last.
  • The "repository capability remains optional" test stores a binding behind the API and expects an empty approval-scope review.
  • protectedOpenShellComposition takes extension (fields of the reported registration) and middlewareName (a separate egress registration). The git-only test runs the earlier Gateway source through a missing registration too (409 binding refusal), then checks six registration shapes at the counterpart check: the named kind is git-only (409), and a missing registration, protocol 2, required-only or supported-only capabilities and a separate egress registration stay 503.

Verification

  • Each new case fails against its mutant (8 mutants) and passes on main.
  • The file passed 20/20 at 2 CPUs on a remote test VM.

Risks

Test-only. Not covered: the deploy probe running for an Agent with repository Git (needs a full repository Git transport composition), and the provisioning worker's pass-through of CredentialProxyRepositoryOnlyError, CredentialSourceUnprotectedError and RepositoryDriverNotConfiguredError messages (reachable only when the Installation changes between request and worker attempt).

…without a driver and git-only proxy probe outcomes

Mutation testing found refusal branches from #3524, #3531 and #3534 that no
case could fail: installation-wide access listed after another binding,
the approval-scope review on an Installation with no repository settings,
the deploy probe keeping the binding refusal when the counterpart is
unavailable, and each condition of the git-only registration check (kind
encoding, protocol major, either capability list, a separate egress
registration).
@freeqaz
freeqaz requested a review from a team as a code owner October 25, 2026 00:34
@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@freeqaz
freeqaz merged commit 7162b9f into main Oct 25, 2026
20 checks passed
@freeqaz
freeqaz deleted the mut-1024k-repo branch October 25, 2026 00:50
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.

1 participant