Skip to content

CI probe 2: Windows crash in internal/cmd on #108, cache off (do not merge) - #113

Closed
byte2pixel wants to merge 10 commits into
mainfrom
ci-probe-windows-cmd-2
Closed

byte2pixel wants to merge 10 commits into
mainfrom
ci-probe-windows-cmd-2

Conversation

@byte2pixel

Copy link
Copy Markdown
Owner

Throwaway, replaces #112 whose loops hit the test cache. Same tree as #108 at ddd66ee; ci.yml replaced by three Windows-only jobs running the full suite three times each with -count=1: default GC, GOEXPERIMENT=nogreenteagc, and default GC with -p 1. Closed and deleted once the runs finish.

RED checkpoint. go test ./internal/gh fails to compile because the new
tests reference TeamList, TeamImport and maxListPages, and call OrgTeams
and TeamDetails with their new result shapes:

  queries_test.go:96:10: list.Total undefined (type []TeamInfo ...)
  queries_test.go:127:14: assignment mismatch: 2 variables but TeamDetails returns 3 values
  FAIL github.com/byte2pixel/gh-statline/internal/gh [build failed]

New tests: TestViewerPagesOrganizations, TestOrgTeamsPagesToTheEnd,
TestOrgTeamsStopsAtThePageCap, TestTeamDetailsPagesMembersAndReposIndependently,
TestTeamDetailsDropsEverythingOnALateError. Adapted: TestOrgTeams,
TestTeamDetails, TestQueryErrorsPropagate.
GREEN checkpoint. go test ./internal/gh -run "Viewer|OrgTeams|TeamDetails|QueryErrors" -v:
  --- PASS: TestViewer
  --- PASS: TestOrgTeams
  --- PASS: TestTeamDetails
  --- PASS: TestQueryErrorsPropagate
  --- PASS: TestViewerPagesOrganizations
  --- PASS: TestOrgTeamsPagesToTheEnd
  --- PASS: TestOrgTeamsStopsAtThePageCap
  --- PASS: TestTeamDetailsPagesMembersAndReposIndependently
  --- PASS: TestTeamDetailsDropsEverythingOnALateError
  ok  github.com/byte2pixel/gh-statline/internal/gh

Each lookup walks its connection with a shared cursor loop until
hasNextPage is false or maxListPages (50) is hit; OrgTeams returns a
TeamList and TeamDetails a TeamImport, each carrying the totalCount so a
cut list can be reported. Team members and repositories are walked as
two documents so a finished connection is not re-fetched. The wizard
call sites are adapted only as far as the build needs; the totals are
carried through in the next cycle.
RED checkpoint. go test ./internal/tui/wizard -run Wizard fails to
compile because teamsMsg carries no teams/total fields and detailsMsg no
totals yet:

  wizard_test.go:176:27: undefined: teams
  wizard_test.go:382:15: teams.teams undefined (type teamsMsg has no field or method teams)
  FAIL github.com/byte2pixel/gh-statline/internal/tui/wizard [build failed]

New: pagedTeamDoer (150 teams over two pages, 250 members over three,
150 repos over two), TestWizardImportsWholeTeam (PRD metric "whole-team
import"), TestWizardSaysWhenAListWasCut (PRD metric "truncation
honesty"). TestWizardTeamFilter builds teamsMsg in its struct form.
GREEN checkpoint. go test ./internal/tui/wizard -run Wizard -v:
  --- PASS: TestWizardManualFlow
  --- PASS: TestWizardFullFlow
  --- PASS: TestWizardTeamFilter
  --- PASS: TestEmbeddedWizardReportsInsteadOfQuitting
  --- PASS: TestStandaloneWizardStillQuits
  --- PASS: TestWizardImportsWholeTeam
  --- PASS: TestWizardSaysWhenAListWasCut
  ok  github.com/byte2pixel/gh-statline/internal/tui/wizard

teamsMsg carries the teams and the count the API reported; detailsMsg is
the TeamImport itself. The model keeps both result types and derives a
note under the step title from their Missing() counts, so a cut list is
reported on the team picker and on the review, and shows again after
backing out and returning. The team list title and the review section
headings carry plain counts. The list and review bodies give up the rows
the note takes.
…every picker (#103)

Reproducers for the review of #108. bubbles binds the list quit key to v
and labels it select, so the org and team pickers quit on v: init ended
with setup aborted and the embedded wizard took the app down with it.
Also pins: a failed TeamDetails walk names the import rather than the
team list, a resize made on the review reaches both pickers, and the app
footer under the wizard offers only ctrl+c.
…er the embedded wizard (#103)

newList disables the list quit keybinding and hides the list help; each
picker renders the wizard style help line saying what enter and esc do
there. A TeamDetails failure arrives as detailsFailMsg and the manual
form says which team failed to import. WindowSizeMsg resizes both
pickers, each for its own note, so backing out of the review finds the
team picker sized to the terminal. The app footer under the wizard
describes ctrl+c only, and contentHeight measures that same footer.
@byte2pixel

Copy link
Copy Markdown
Owner Author

Probe done with -count=1: 9 of 9 full-suite runs passed on windows-latest (3 default GC, 3 nogreenteagc, 3 default GC with -p 1). Together with attempt 3 of the Windows job on #108 passing, the tree that crashed twice has now passed 10 full-suite runs. Runtime flake, not the merged code.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant