fix(cluster): distinguish missing manifests from read failures

Summary

glab cluster agent check_manifest_usage treated every repository-file read error as a missing agent configuration. Authentication, authorization, server, and transport failures were therefore reported as the agent using defaults, followed by a false 0 audit result.

This change:

  • preserves 404 Not Found as the signal for a missing config/default configuration;
  • returns every other read failure with the agent name;
  • adds independent coverage for the 404 and non-404 paths.

Verification

On origin/main, the non-404 regression case fails with:

Expected error with "repository file request failed" in chain but got nil.

With this change:

go test ./internal/commands/cluster/agent/check_manifest_usage -count=1

passes, and git diff --check reports no errors.

Closes #8421 (closed)

Edited by Lee Seonghyeon · 이성현

Merge request reports

Loading
Loading