ci: checkout api sibling so cross-repo wire-value gate runs in CI#36
Merged
Merged
Conversation
The registry-iterating tests in internal/jobs/coverage_registry_test.go
(TestWorkerAuditKinds_ValuesMatchApiConstants +
TestSupportedAuditKinds_CoveredByApiSpecOrDocumentedWorkerOnly) text-walk
api/internal/models/audit_kinds.go + api/e2e/reliability_contract_test.go
to assert worker auditKind* wire values match the api source.
Before this patch, ci.yml + deploy.yml only checked out common + proto
siblings — never api — so findApiRepoRoot() returned "" and both tests
silently t.Skip'd. The cross-repo drift gate ran on developer machines
(via the ~/Documents/InstaNode/api fallback) but never in CI.
Wave-3 CI coverage audit (2026-05-21) caught this. Per CLAUDE.md rule 18
(registry-iterating regression tests), a guard that skips in CI is no
guard at all.
Patch:
- ci.yml: add a third actions/checkout@v4 step for InstaNode-dev/api
using REPO_ACCESS_TOKEN (same PAT pattern as common+proto), move it
to ../api via the existing _common_ci-style trick, then set
INSTANT_API_REPO=$GITHUB_WORKSPACE/../api on the test step.
- deploy.yml: same checkout (path: api alongside path: worker/common/proto)
+ INSTANT_API_REPO=$GITHUB_WORKSPACE/api on the test step.
Local verification (with INSTANT_API_REPO set):
$ make gate
ok instant.dev/worker/internal/jobs 24.074s
gate: green — matches deploy.yml test step
Both target tests now run instead of skip:
--- PASS: TestWorkerAuditKinds_ValuesMatchApiConstants (0.00s)
--- PASS: TestSupportedAuditKinds_CoveredByApiSpecOrDocumentedWorkerOnly (0.00s)
Operator note: this assumes REPO_ACCESS_TOKEN's fine-grained PAT scope
includes read on InstaNode-dev/api. If the PAT was minted with only
{common, proto} repo-allowlist, the new checkout step will 404 and CI
will fail loud (clean fail-stop, not silent SKIP). Extending the PAT
scope to include api takes ~30s in the GitHub PAT settings page; until
then this PR's CI run will fail on the api checkout step and the
operator should add api to the PAT's repository-access list before
re-running.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wave-3 CI coverage audit (2026-05-21) caught that two registry-iterating regression tests in
internal/jobs/coverage_registry_test.gosilentlyt.Skipin worker CI because the workflow doesn't check out the api repo as a sibling. The cross-repo wire-value drift gate runs only on developer machines today (via the~/Documents/InstaNode/apifallback infindApiRepoRoot()).Tests affected:
TestWorkerAuditKinds_ValuesMatchApiConstants— asserts every workerauditKind*constant value matches the api'sAuditKind*string value (cross-repo wire drift catcher per CLAUDE.md rule 18).TestSupportedAuditKinds_CoveredByApiSpecOrDocumentedWorkerOnly— asserts everysupportedAuditKindsentry has either an api-side reliability spec entry or a documented worker-only allow-list entry.Patch
ci.yml: add 3rdactions/checkout@v4step forInstaNode-dev/apiusingREPO_ACCESS_TOKEN(same PAT pattern as common+proto),mv _api_ci ../api, setINSTANT_API_REPO=$GITHUB_WORKSPACE/../apion the test step.deploy.yml: same checkout withpath: api(alongside the existingpath: worker/common/proto), setINSTANT_API_REPO=$GITHUB_WORKSPACE/apion the test step.Local verification
Both target tests now run (instead of skip):
Operator-action gate (PAT scope)
This PR assumes
secrets.REPO_ACCESS_TOKEN's fine-grained PAT includes read access toInstaNode-dev/api. The existing comments in both workflows say the PAT was minted withread access to InstaNode-dev/{common,proto}only — if api was not added when api auto-deploy shipped (memory ref #66), the new checkout step will 403/404 on CI.Operator check:
REPO_ACCESS_TOKEN(or whatever the PAT is named).InstaNode-dev/apiis in the allowlist (alongsidecommon+proto).Contents: read.If CI on this PR shows the api checkout step failing with
Error: fatal: could not read Username for 'https://github.com/'orError: HTTP 404, that's the PAT-scope issue.Test plan
gh run view --log | grep TestWorkerAuditKindsshowing PASS not SKIP)🤖 Generated with Claude Code