Repository navigation
ci: sync-fork-dev uses the narrowed sync-fork key and scoped order lookup - #31
Merged
Merged
Conversation
…okup Part of Eyevinn/osaas-maker-manager#251 Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Research Review
Verified
GET /sync-fork/ordersexists inosaas-maker-manager/src/api_sync_fork_scoped.ts(main), querystringrepositoryUrl(required), response schemaSyncForkOrderLookupResponse=[{order:{orderId,status:{phase}}}]. The jq paths.[0].order.orderIdand.[0].order.status.phasematch.POST /sync-forkbody{repositoryUrl}and response{jobId}, andGET /sync-fork/:idreturning.status, match the same file. The scoped plugin registers all three under one bearer-auth key set (platform keys plus the dedicated key).- The dedicated-key checks (registered-repo 403, 429 with 60s interval) apply only to
isDedicatedCaller, which matches the PR's claim thatcurl -sSfsurfaces 403/429 in the log. - Lessons check:
## Lessonspresent and filled in, with Claude trailer. - Adjacent-stub sweep on
sync-fork-dev.yml: no TODO/FIXME/|| undefined; no leftoverMAKER_API_KEYreferences. Workflow file is the only touched file; there are no orphan or Playwright concerns.
Needs Verification
sync-fork-dev.yml(remake loop):curl -sSf ... || echo '[]'still swallows a 401/403 on the order lookup for up to 120 iterations (the loop ends as NOT_FOUND). That was the previous behaviour, so it is not a regression. Because-Sis now set, the error text does appear in the log./sync-fork/ordersmatches on exactorder.spec.githubRepository === repositoryUrl.REPO_URLishttps://github.com/${{ github.repository }}, which has no.gitand a case taken from the repo name. The PR says it captured a live dev response for this form. Worth confirming for each of the six repos in Eyevinn/osaas-maker-manager#255.- If
orderProviderwere not wired in the maker-manager deployment, the route would return[]silently. The route code treats that as the no-orders case, and the dedicated key's POST would then 403. #255 covers this.
Escape Hatch Coverage
- The
Expected at most one orderguard and the missing-secret guard are workflow-level failures, not request-handler rejections. The PR's harness covers both the single-order passing path and the failure cases. No bypass is claimed. Fine.
Object Shape Verification
- No spread or re-serialisation of fetched objects in the diff.
Contract diff
- No request handler or timeout changed. Files checked:
.github/workflows/sync-fork-dev.ymlonly. The 20s polling and 60/120 loop counts are unchanged. This is a CI client, not a server handler.
Impact Analysis
- Blast radius: dev sync-fork workflow in python-runner only; the same file is said to be byte-identical across six runner repos (sibling PRs are separate).
- Downstream consumers: none in code.
- Coordinated changes needed: the dev
sync-fork-api-keySecret, the maker-manager restart, and the GitHub secretOSC_DEV_SYNC_FORK_API_KEYmust exist before or soon after merge. The PR states this, and says a run before then fails at the missing-secret check. - Breaking change risk: low, and deliberate; the workflow fails closed with no fallback to the platform key.
Risks Not Tested
- No live run against dev with the narrow key. The harness uses a fake
curl, andactionlintandshellcheckwere not run. I did not execute the harness myself. - The
API_KEY_SYNC_FORKdeployment state on dev (Secret key present, pod restarted) could not be checked from here. - I could not clone
osaas-maker-managerlocally (403), so I read the route source through the GitHub API onmain.
Research Suggestions
- Confirm in #255 that a real run succeeds with the narrow key before deleting
OSC_DEV_MAKER_API_KEY.
Verdict
No blocking issues found.
Reviewed by PR Research Validator. This review checks whether code is based on verified sources rather than assumptions.
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.
Part of Eyevinn/osaas-maker-manager#251
Summary
.github/workflows/sync-fork-dev.ymlnow runs on the narrowed sync-fork key (OSC_DEV_SYNC_FORK_API_KEY) and no longer callsGET /maker(the narrow key gets 401 there).OSC_DEV_SYNC_FORK_API_KEYintoSYNC_FORK_API_KEY; no fallback toOSC_DEV_MAKER_API_KEY; clear errorSecret OSC_DEV_SYNC_FORK_API_KEY is not set.GET /maker?repositoryUrl=calls replaced withGET /sync-fork/orders?repositoryUrl=. The scoped route returns the same wrapped shape as/maker([{"order":{"orderId","status":{"phase"}}}],src/api_sync_fork_scoped.tsschemaSyncForkOrderLookupResponse), so the jq paths stay.[0].order.orderIdand.[0].order.status.phase.Expected at most one order for $REPO_URL, found $COUNT) in both steps. All other behaviour is kept: "order before sync", same-order-id check ("Order was not remade"), DONE / FAILED / ERROR handling, 20 s polling and timeouts.curl -sSfon the order lookup and onPOST /sync-forkso HTTP status (for example 403 or 429 for the narrow key) shows in the log. Workflowname:unchanged (Sync fork in dev).sync-fork-prod.yml) is out of scope (follow-up Eyevinn/osaas-maker-manager#256).Follow-ups
Tests (no network, scratchpad harness, nothing committed here)
A harness puts a fake
curland a no-opsleepfirst onPATH, extracts each step'srun:script from the workflow and runs it with fake values. Samples: the one-order response captured from dev ([{"order":{"orderId":"dca57768-f713-449e-a311-5c86c224335c","status":{"phase":"DONE"}}}]) and a two-order copy. Results (20 checks, all ok):bash -non all three extracted scripts: okprev_order_id=dca57768-...andjob_idwritten to$GITHUB_OUTPUTExpected at most one orderSecret OSC_DEV_SYNC_FORK_API_KEY is not setDONEexits 0; same id exits 1Order was not remade; two orders exits 1Expected at most one order; empty list exits 1grep -c '\$MAKER_URL/maker'is 0,OSC_DEV_MAKER_API_KEYabsent,OSC_DEV_SYNC_FORK_API_KEYpresentactionlintandshellcheckare not installed on the runner, so no lint was run. The file is byte-identical across the six runner repos.What a human does next
sync-fork-api-keyin Secrettokenin namespaceosaason the dev cluster, and restart maker-manager (the Deployment reads it at pod start).OSC_DEV_SYNC_FORK_API_KEYwith the same value for the six repos (web-runner, python-runner, golang-runner, wasm-runner, dotnet-runner, php-runner); an org-level secret restricted to those repos is enough.OSC_DEV_MAKER_API_KEYfrom the six repos.OSC_PROD_MAKER_API_KEYafter Eyevinn/osaas-maker-manager#256.Lessons
The issue said the scoped route has no
orderwrapper; the real schema and live dev response are wrapped like/maker, so only the URL, key and guard change and the jq paths stay as they were. Thegrepcheck must target$MAKER_URL/maker, because the host//maker.svc...also contains/maker.Co-Authored-By: Claude noreply@anthropic.com
🤖 Generated with Claude Code