fix: use explicit ref for cross-repo checkout and expose agents_sha output - #1010
Conversation
PR Summary by QodoFix cross-repo agents checkout and expose resolved SHA
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
🤖 Finished Review · ✅ Success · Started 4:04 PM UTC · Completed 4:22 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.36 |
Code Review by Qodo
1.
|
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsMedium
Low
Previous run (3)ReviewFindingsHigh
Medium
Low
Next steps:
|
8b9ab81 to
9c6d0b1
Compare
|
🤖 Review · Commit: |
|
🤖 Finished Review · ✅ Success · Started 4:31 PM UTC · Completed 4:47 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.39 |
waynesun09
left a comment
There was a problem hiding this comment.
Review squad (Claude + Grok, findings verified against the PR head and primary sources). Two inline comments cover the HIGH and one MEDIUM; one more MEDIUM concerns the PR description:
[MEDIUM] premature-decision — the test plan asserts a verification this diff makes impossible, and nothing has been exercised
All four test-plan items are unchecked; item 4 ("Verify functional-tests-complete succeeds on a cross-repo call") is unsatisfiable by this diff (see the inline HIGH), and no cross-repo run has executed this workflow version — fullsend still pins @a8566cd5. Shipped as final under "Fixes #1001" on an untested plan.
Suggestion: one real end-to-end check before merge: bump fullsend's validate-agents pin to this PR's head on a fullsend branch and trigger release.yml with a throwaway pre-release tag, then paste the detect checkout log line and the agents_sha value here. Check off only what actually passed; drop or defer item 4.
Verified-correct, for the record: steps.checkout.outputs.commit exists at actions/checkout@9c091bb (v7.0.0) and is set from git log -1 after checkout, so there is no resolve-twice window between detect and functional-tests; the workflow_call.outputs syntax is right; the caller-permission comment matches every job's permissions: block and fullsend's release.yml grants; in-repo trigger paths are provably unchanged. Sequencing note: the agents_sha output is inert until fullsend bumps its pin and rewires tag-agents to needs.validate-agents.outputs.agents_sha (tracked in fullsend#6512).
Superseded by updated review
waynesun09
left a comment
There was a problem hiding this comment.
Review sweep (1 finding, no inline location applies):
[MEDIUM] PR description still claims a permission-contract doc change that was reverted
The PR description still lists "Document the caller permission contract (workflow_call has no permissions: schema)" as a shipped change. The diff at head (9c6d0b1) contains no such comment block anywhere in .github/workflows/functional-tests.yml — it was added in an earlier revision and then explicitly removed per this PR's own review thread ("Addressed in 9c6d0b1 — removed the caller permission contract comment block to keep the PR scoped to the fix"), but the description bullet was never updated to match the shipped diff.
Suggestion: remove the "Document the caller permission contract" bullet from the PR description (or restore the comment if it's still wanted) so the description matches what actually shipped.
|
Re: test plan and e2e validation — the release workflow only triggers on tag pushes (no The natural e2e validation point is the fullsend-side pin bump PR (tracked in fullsend#6512), which will exercise this exact path. The in-repo CI (detect, functional-tests-complete, gate all passing) confirms the workflow parses and the output wiring is correct. Updated the PR description to reflect what shipped (added Re: PR description — already updated in a prior pass to match the shipped diff. |
9c6d0b1 to
b54c29c
Compare
|
🤖 Finished Review · ✅ Success · Started 5:19 PM UTC · Completed 5:38 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.01 |
…utput Replace github.workflow_sha (which resolves to the caller's commit in cross-repo workflow_call) with an explicit 'main' ref in the detect job, and pipe the resolved SHA through to functional-tests via job outputs. Expose agents_sha as a workflow_call output so fullsend's tag-agents can tag the exact tree the gate validated. Fixes fullsend-ai#1001 Signed-off-by: Marta Anon <manon@redhat.com>
b54c29c to
dd9ca90
Compare
|
🤖 Finished Review · ✅ Success · Started 5:51 PM UTC · Completed 6:08 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.97 |
|
Risk Assessment: moderate (2/5) DetailsSmall, targeted CI workflow fix (16 lines, 1 file) with moderate risk due to high churn and regression history on this file, but offset by the surgical scope and clear issue alignment. |
waynesun09
left a comment
There was a problem hiding this comment.
Approving at dd9ca90.
Re-reviewed at head. My earlier [HIGH] on the functional-tests-complete roll-up checkout is confirmed fixed — it now carries the repository: override and the cross-repo agents_sha ref, while the in-repo arm stays github.sha, so the base-branch-only security property holds. A fresh multi-agent pass at dd9ca90 produced no findings.
On my [MEDIUM] about 'main' vs job.workflow_sha: your rebuttal is correct and I withdraw it. Pinning to the caller's resolved workflow SHA would validate code that was already validated when it merged, and would leave agents commits landed since the pin neither tested nor tagged — which defeats what validate-agentsexists to do.'main' is the right semantic.
Also checked the || 'main' fallback added in dd9ca90: with the empty-output case it evaluates as true && ('' || 'main') || github.sha -> 'main', so a skipped/cancelled detect no longer resolves to the caller's SHA against the agents repo. That closes both low edge-case threads properly rather than papering over them.
Two non-blocking carry-forwards, unchanged from my last review:
- The remaining open threads are cosmetic (add-a-comment suggestions); both bot notes affirm the security invariant already holds.
- No cross-repo run has exercised this version yet. Before the release gate is relied on, one throwaway pre-release tag from a fullsend branch pinned to this head would close the test plan honestly — the failure mode this fixes only appears on the cross-repo path.
|
🤖 Finished Retro · ✅ Success · Started 6:53 PM UTC · Completed 7:04 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.17 |
Retro: PR #1010 — fix cross-repo checkout and expose agents_sha outputWorkflow quality: Good. This human-authored PR fixed a cross-repo checkout bug in Timeline
Positive signals
Areas for improvement (all tracked in existing issues)
No new proposals filedAll identified improvement areas are already tracked in existing open issues. The review workflow performed well on this PR — the bot provided genuine value by catching a HIGH bug first and uniquely identifying an edge case, while the human reviewer added complementary meta-level analysis. |
Summary
github.workflow_sha(which resolves to the caller's commit in cross-repoworkflow_call) with an explicitmainref in thedetectjob checkoutdetecttofunctional-testsandfunctional-tests-completevianeeds.detect.outputs.agents_sha, ensuring all jobs check out the exact same commitrepository:override tofunctional-tests-completecheckout so the roll-up job fetches agents (not the caller) cross-repoagents_shaas aworkflow_calloutput so fullsend'stag-agentscan tag the exact tree the gate validatedFixes #1001
Related: fullsend-ai/fullsend#6512
Test plan
github.repository == 'fullsend-ai/agents'detectjob checks outfullsend-ai/agentssuccessfully (log shows an agents ref, not the caller SHA)agents_shaoutput is populated and fullsend'stag-agentscan consume itfunctional-tests-completesucceeds on a cross-repo call🤖 Generated with Claude Code