fix(tia): use jq equality in GitHub artifact size lookup (#1930)

`GitHubRemote::artifactSize()` passes `select(.name === "…")` to
`gh api --jq`. jq has no `===` operator: gh's embedded jq rejects the
filter ("unexpected token"), so the lookup always fails and the baseline
download never shows its size.

The filter used `==` while it lived in `BaselineSync`, which the strict
arch preset ignores. #1841 moved it into `GitHubRemote`, where the preset
flags the `==` inside the jq string. Restore `==` and ignore
`GitHubRemote` in the strict preset, as `BaselineSync` already is.
This commit is contained in:
Augusto Soto
2026-10-31 08:46:21 -06:00
committed by GitHub
parent a9d66a0ebe
commit 52ee93b3c4
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ final readonly class GitHubRemote extends BaseRemote
'gh', 'api',
sprintf('repos/%s/actions/runs/%s/artifacts', $repo, $runId),
'--jq', sprintf(
'.artifacts[] | select(.name === "%s") | .size_in_bytes',
'.artifacts[] | select(.name == "%s") | .size_in_bytes',
self::ARTIFACT_NAME,
),
]);
+2
View File
@@ -3,6 +3,7 @@
declare(strict_types=1);
use Pest\Expectation;
use Pest\Plugins\Tia\Baselines\GitHubRemote;
use Pest\Plugins\Tia\BaselineSync;
arch()->preset()->php()->ignoring([
@@ -17,6 +18,7 @@ arch()->preset()->php()->ignoring([
arch()->preset()->strict()->ignoring([
BaselineSync::class,
GitHubRemote::class,
'usleep',
]);