githubnext/chopinPublic

Let's compose rich plans together

Keep PR maintenance tests off the global git config and scope the Chat unread transition check #421

Mergedlavaman131merged 1 commit intomainfromrefs/pull/421/head
  1. LA

    Fixes two test failures. One shows up on machines that sign git commits by default. The other has failed in CI on `main` since the Projects sidebar decision counts landed.

    ## PR maintenance tests read the developer's global git config

    `scripts/pr-maintenance` tests create fixture repositories and commit to them, and the code under test runs `git` too (for example `application.mjs`). Both inherit the developer's global and system git config. With `commit.gpgsign=true` and `gpg.format=ssh` but no `user.signingkey`, every fixture commit fails with "either user.signingkey or gpg.ssh.defaultKeyCommand needs to be configured", so 47 tests fail across `proposal`, `application`, `artifact`, `worker-run` and `actions`.

    These five test files now import `scripts/pr-maintenance/isolated-git.test-fixtures.ts`. It sets `GIT_CONFIG_GLOBAL` to `os.devNull` and `GIT_CONFIG_NOSYSTEM=1` for the test process, so git in the tests never reads a developer's or host's config. The fixtures already set their own author and committer identity.

    ## "a closed desktop Chat tab keeps unread activity visible"

    The test records `transitionstart` and `transitionend` on every `[data-motion-feedback="count"]` element on the page, then waits for `starts > 0 && ends >= starts`.

    Since the Projects sidebar decision counts (`98a8bffd`..`87d6bdcb`), the sidebar's quiet `Count` uses the same `count` feedback. `UnansweredCount` keys it on `attention-${unanswered}` / `"settled"`, so it replays its pop when a count rises, by design. That replaces a sidebar badge mid-transition, and the removed element never fires `transitionend`. The tally reached 6 starts and 4 ends, and the poll timed out.

    I found this by adding a temporary `MutationObserver` to the test: every count badge removed mid-transition was a child of `span.project-sidebar-count`, never the Chat toggle. The test is about the Chat toggle, so it now counts only `.chat-toggle [data-motion-feedback="count"]`. No product code changes.

    CI on `main` passed at `dc25a857` and has failed this test since `87d6bdcb` (run 37855394975, including retries).

    ## Verification

    - `bun test`: 4407 pass, 3 skip, 0 fail, with `commit.gpgsign=true` still in my global git config. The same config fails 47 tests on `main`. - `bun run e2e e2e/responsive-activity.e2e.ts`: 9 of 9 pass, three runs in a row. - `bun run types` and `bun run ci` pass, with no new findings. - Full `bun run e2e`: 471 pass, 4 skipped, 2 fail. Neither failure is related to this change: - `document-navigation.e2e.ts:748` "overlapping document workspaces keep IDs, ARIA targets, and focus instance-scoped" fails the same way on `main` locally. It passed in CI's last `main` run. - `research-child-surface.e2e.ts:696` "a channel link opens one parent room that a child opens and closes over" is intermittent: run alone three times it failed, passed, failed. CI already marks other tests in that file flaky.

    Assistant-workflow: inline Assistant-duration: 25m converged, estimated unmeasured Assistant-verification: bun test passed: 4407 pass, 3 skips, 0 fail with commit.gpgsign=true in the global config Assistant-verification: playwright e2e passed: responsive-activity.e2e.ts 9/9 three times; failed on main locally and in CI Assistant-verification: manual diagnosis passed: MutationObserver showed the removed transitioning badges were sidebar counts Assistant-verification: bun run types passed; bun run ci passed Assistant-verification: full e2e failed: 2 unrelated failures (document-navigation:748 also fails on main locally; research-child-surface:696 intermittent) User-preference: Fix pre-existing test failures in their own PR, separate from dependency upgrades Co-authored-by: Alex Lavaee <lavaman131@github.com>

  2. lavaman131head-ref-force-pushed 18a895ae330elast month on GitHub

  3. lavaman131auto-rebase-enabledlast month on GitHub

  4. lavaman131merged ee24630cf037last month on GitHub

  5. lavaman131closedlast month on GitHub

  6. lavaman131head-ref-deletedlast month on GitHub