Repository navigation
[avenger] Stub engine release lookups in workflow integration tests - #80525
Conversation
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. The No-op messagePR #80525 is already merged; per review policy, no specification review or publication was performed.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. The No-op messageNo action needed: the only changed test file, pkg/workflow/test_main_integration_test.go, is a new integration-tagged TestMain that stubs engineReleaseTimeLookup. It adds no behavioral test cases, and it has the required (go/redacted):build integration tag, no mock-library usage, and no goleak entries. Its sibling test_main_test.go is !integration, so the two cannot both compile. Per the act-vs-noop rubric, no report is posted.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messageCompleted PR #80525 review: submitted one inline finding and a REQUEST_CHANGES review; recorded the review-history outcome.
|
There was a problem hiding this comment.
🟡 Changes recommended
The integration test harness discards the result of m.Run(), allowing failed assertions to produce a successful process exit and potentially mask CI failures.
1 open issue
What changed in this PR
Adds an integration-specific test entry point that stubs engine release-metadata lookups, keeping workflow compiler integration tests deterministic and independent of live network access.
Changes:
- Adds an
integration-taggedTestMainfor deterministic release metadata behavior. - Preserves injected HTTP clients for cooldown-specific tests.
- Prevents unrelated integration compiles from emitting release metadata warnings.
| File | Description |
|---|---|
| pkg/workflow/test_main_integration_test.go | Adds integration-test setup that stubs engine release-metadata lookups while preserving explicitly injected HTTP clients. |
Review effort: Lite (adaptive)
| import ( | ||
| "testing" | ||
| "time" | ||
| ) | ||
|
|
||
| // TestMain keeps integration compiler tests independent of live release | ||
| // metadata, matching the unit-test TestMain. Cooldown tests inject HTTP responses. | ||
| func TestMain(m *testing.M) { | ||
| engineReleaseTimeLookup = func(c *Compiler, endpoint, packageName, version string) (time.Time, error) { | ||
| if c.engineReleaseClient != nil { | ||
| return c.fetchEngineReleaseTime(endpoint, packageName, version) | ||
| } | ||
| return time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), nil | ||
| } | ||
| m.Run() |

CI failure
Integration: Workflow Compiler(run 45249829683) failed inTestCompileDefaultModelRouting_ProviderMatrix/*/routed(require.Zero(compiled.warnings)).Root cause
The
!integrationTestMainstubs engine release-metadata lookups, but theintegrationbuild tag had no equivalent. Compiles therefore tried a live lookup, failed in the sandbox, and emittedCould not validate engine.cooldown ..., which counted as a warning (introduced by #80476).Fix
Add
pkg/workflow/test_main_integration_test.go((go/redacted):build integration) with the same lookup stub.Validation
go test -tags integration -parallel=8 -run TestCompileDefaultModelRouting|TestEngineReleaseCooldown|TestCompileEngineReleaseCooldown ./pkg/workflowpasses;go vet -tags integrationandgofmtare clean. Broad suites were not run per the runtime budget.