-
Notifications
You must be signed in to change notification settings - Fork 295
Closed as not planned
Closed as not planned
Copy link
Labels
cookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!
Description
CI Failure Investigation - Run #37905
Summary
- The
testjob onmainis failing because a CLI unit test expects a--verboseflag and a workflow unit test asserts a hard-coded action pin count that no longer matches the embedded data. - These regressions cause the
testjob to exit with code 1 and block the pipeline for commitcaf3a0a8ecb44034ddc12a786d2ace02853b3646.
Failure Details
- Run: 22430443742
- Commit: caf3a0a
- Trigger: push
Root Cause Analysis
NewPRTransferSubcommandalready callscmd.Flags().GetBool("verbose")and logs verbose messages, but the command never registers a--verboseflag, soTestNewPRTransferSubcommandfails withExpected --verbose flag to existwhen it looks up the flag.TestGetActionPinsSortingstill asserts thatgetActionPins()returns 37 entries whilepkg/workflow/data/action_pins.jsoncurrently contains 39 pins, so the hard-coded length mismatch fails immediately whenever new pins are added.
Failed Jobs and Errors
- test –
TestNewPRTransferSubcommand(pr_command_test.go:187):Expected --verbose flag to exist - test –
TestGetActionPinsSorting(action_pins_test.go:302):getActionPins() returned 39 pins, expected 37
Investigation Findings
- Running
go test ./pkg/cli -run TestNewPRTransferSubcommandreproduces the missing flag because the CLI command reads--verbosewithout registering it, so the lookup in the test returnsnil. - Running
go test ./pkg/workflow -run TestGetActionPinsSortingreproduces the pin count mismatch; the embedded JSON has 39 entries in Feb 2026, so the count assertion needs to be updated or derived from the file to stay in sync.
Recommended Actions
- Register the
--verboseflag onpr transfer(matching thetransferPRcode path) soTestNewPRTransferSubcommandcan find it and the CLI tests pass again. - Update
TestGetActionPinsSorting(or pruneaction_pins.json) so the assertion reflects the current number of pins—ideally deriving the expected count from the JSON during test setup to avoid brittle constants.
Prevention Strategies
Add tooling or guardrails that flag stale test expectations when CLI arguments or embedded datasets change (e.g., derive expected flag lists/pin counts from the code or data instead of hard-coded numbers).
AI Team Self-Improvement
When adding CLI flags or updating pinned action data, immediately refresh the corresponding tests or add assertions that derive their expectations from the sources of truth so regressions are caught before landing.
Historical Context
- No existing
[CI Failure Doctor]issue documents this specific failure, so this is a new regression introduced on caf3a0a.
🩺 Diagnosis provided by CI Failure Doctor
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d
- expires on Feb 27, 2026, 6:34 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!