Skip to content

fix(#739): return error when IAM operation has no name and is not done - #6033

Merged
rh-hemartin merged 1 commit into
mainfrom
agent/739-iam-op-empty-name
Aug 27, 2026
Merged

rh-hemartin merged 1 commit into
mainfrom
agent/739-iam-op-empty-name

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Return an error from waitForIAMOperation when the IAM API response has done: false and an empty name field, instead of silently returning nil (success). This prevents callers from proceeding on a false success when the operation hasn't completed and cannot be polled.

Related Issue

Closes #739

Changes

  • Changed waitForIAMOperation in internal/dispatch/gcf/gcp.go to return fmt.Errorf("IAM operation returned no name and is not done") instead of nil when done is false and name is empty
  • Added unit tests covering all four branches of waitForIAMOperation: done immediately, done with error, not-done with empty name (the bug), and not-done with valid name (polls until done)

Testing

  • go test -race ./internal/dispatch/gcf/... passes
  • go vet ./internal/dispatch/gcf/... passes
  • Tests added for new error behavior
  • golangci-lint could not run in sandbox (not installed)

Closes #739

Post-script verification

  • Branch is not main/master (agent/739-iam-op-empty-name)
  • Secret scan passed (gitleaks — 743f99d88b883f61b19f09d00b723f7a3f8ae4f8..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

waitForIAMOperation previously returned nil (success) when the IAM
API response had done:false and an empty name field. This silently
swallowed an incomplete operation, making it appear successful when
there was no way to poll for completion.

Return an error instead, consistent with handleCloudRunLRO which
already returns an error in the same situation. This ensures callers
(CreateWIFPool, CreateWIFProvider, UpdateWIFProvider, etc.) surface
the failure rather than proceeding on a false success.

Add unit tests covering all branches of waitForIAMOperation:
done immediately, done with error, not-done with empty name
(the bug), and not-done with valid name (polls until done).

Note: golangci-lint could not run (not installed in sandbox).
go vet and go test -race passed.

Closes #739
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team August 10, 2026 11:09
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Aug 10, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:11 AM UTC · Completed 11:24 AM UTC

Commit: a67e2ce · View workflow run →

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Aug 10, 2026
@rh-hemartin
rh-hemartin added this pull request to the merge queue Aug 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 26, 2026
@rh-hemartin
rh-hemartin added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit e43b57e Aug 27, 2026
34 checks passed
@rh-hemartin
rh-hemartin deleted the agent/739-iam-op-empty-name branch August 27, 2026 07:46
@fullsend-ai-retro

fullsend-ai-retro Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 7:48 AM UTC · Completed 8:00 AM UTC

Commit: a67e2ce · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.95

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #6033 — fix IAM operation silent false-success

Timeline

  1. 2026-05-07 — Issue #739 filed by waynesun09, originating from a PR #503 review comment. Triage agent ran RICE prioritization (score 4.8).
  2. 2026-08-10 10:55 — ifireball triggered /fs-triage on the issue.
  3. 2026-08-10 10:56–10:59 — Triage agent re-triaged, provided test-case guidance covering all 4 branches of waitForIAMOperation, and labeled ready-to-code.
  4. 2026-08-10 10:59–11:09 — Code agent implemented the fix: 1-line change in gcp.go + 59 lines of new tests in gcp_test.go (4 subtests covering all branches). 8 minutes.
  5. 2026-08-10 11:09 — PR #6033 created.
  6. 2026-08-10 11:10–11:24 — Review agent ran 5 sub-agents (correctness, security, intent-coherence, style-conventions, challenger), 76 tool calls total. Approved with "Looks good to me" — no findings above threshold. 14 minutes, $3.31.
  7. 2026-08-26 08:40 — Human reviewer rh-hemartin approved (no comments). 15.9-day wait.
  8. 2026-08-27 07:46 — PR merged.

What went well

  • Code agent quality was excellent. Single-attempt success: 1-line fix exactly matching the issue description, plus comprehensive test coverage for all 4 branches. Codecov confirmed 100% patch coverage. Zero rework.
  • Triage guidance was useful. The triage agent's proposed test cases closely match what the code agent implemented, suggesting the guidance meaningfully shaped the output.
  • Pipeline coordination was smooth. Triage → Code → Review completed within 30 minutes of the /fs-triage trigger.
  • Review verdict was correct. The human reviewer also approved without comments, confirming the agent's approval was appropriate.

Evidence for existing issues

  • #2640 / #2836 (style sub-agent early-exit / exploration budgets): The style-conventions sub-agent made 32 tool calls over 2.5 minutes to find zero issues on a well-crafted 1-line fix. It counted space-based vs underscore-based subtest names (76 vs 39) across the entire test file. Early-exit criteria or exploration budgets would have caught this as a no-op much faster.
  • #3240 / #4060 (fast-path triage / reduce sub-agent dispatch): All 5 sub-agents were dispatched for a 2-file, 1-line production change. A PR-level triage step that detects trivially small, well-scoped changes could have skipped the style-conventions and possibly intent-coherence sub-agents, saving ~3 minutes and ~30% of the token cost.
  • #6666 (stale sonnet model mapping): The style-conventions sub-agent ran on Sonnet. If the stale model mapping was already in effect during this Aug 10 run, the 2.5-minute, 32-tool-call session may have been inflated by the cost multiplier described in that issue.

Merge latency

The 17-day PR-to-merge latency is a 30.7× outlier versus the 13-hour median for recent agent PRs. The bottleneck was entirely human reviewer availability (rh-hemartin, 15.9 days), not agent performance. Recent PRs reviewed by ggallen typically merge within hours. This appears to be a one-off reviewer routing/availability issue rather than a systemic problem.

Proposals skipped (target repo not allowed)

File manually or update create_issues.allow_targets in config.yaml:

  • Review agent should include a verification summary when approving code PRs with no findings (fullsend-ai/agents)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gcf: handle IAM operation with done:false and empty name

2 participants