Skip to content

fix: turn main green: CLI scopes, merge-group profile, UI and E2E tests - #4916

Merged
yannickmonney merged 4 commits into
mainfrom
fix/cli-scope-collab-service
Oct 13, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
fix/cli-scope-collab-service

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Four independent defects keep main red, and each fails every release candidate and every pull request or queue run that reaches its scope. They are fixed together so one CI cycle covers them (opened as #4916 and #4917).

  1. The CLI scope lists miss a file (Unit (workspaces)). feat(platform): tell a person when their agent is disconnected #4913 made agent_connections/end-and-tell.ts import ../collab/service.ts, and the CLI's module graph reaches end-and-tell.ts. Two tests of the CLI's own configuration refuse a backend file its scopes do not name: native CLI scopes cover every imported platform backend module and cached CLI checks hash every imported module and generated source tree. This names domains/collab/service.ts in .github/ci-scope.yml, the CLI workflow's push paths and tools/cli/turbo.json, and refreshes the release-candidate source contract that mirrors those paths (release-candidate-contract.ts --write, then oxfmt; the descriptor diff is the one added path).
  2. The merge-group finisher has no reviewed profile for the new cli.yml bytes (Unit (workspaces)). It only finishes a cancelled run whose workflow bytes it has a reviewed profile for, so every cli.yml change adds one (fix(platform): bind organization session authority #4903 added the previous). Changing the workflow's paths changed its hash and turned current seven workflows and verdict closure require an explicit reviewed profile on every source change and current CLI path scope preserves the retained graph and every finishing refusal red. The new profile is the previous one's job and verdict graph under the new hash.
  3. The dashboard test names its controls by bare key (UI (platform 1/4)). app/routes/dashboard.test.tsx found the session-lapse dialog's confirm button as sessionLapse.signIn, which only works while nothing has initialised the i18n singleton. fix(platform): bind organization session authority #4903 made api-client import auth-client-error, which imports the singleton, so from 07419b9c the dashboard's import graph initialises English and the button is named "Sign in". Found by bisecting the test alone: green at 6480adee, red at 07419b9c, nothing else between. The test now mocks the translation hook the way the sibling session-lapse suites do (session-lapse-drafts.test.tsx, dashboard-layout.test.tsx), so the accessible name is auth.sessionLapse.signIn whatever the graph initialises.
  4. Two E2E specs sign the member in from the owner's session (Playwright (platform 4/4)). rbac.spec.ts:16 and return-loops.spec.ts:111 fail on every attempt since fix(platform): bind organization session authority #4903 with 403 ORG_FORBIDDEN at the member's sign-in (E2E run 38358003084, both attempts; the scheduled run 38339529780 before it). fixtures.ts overrides storageState so every test authenticates as its worker's owner, and that override also reaches every context made with browser.newContext(); a probe with the same fixture pattern shows such a context holds the owner's cookie while storageState: { cookies: [], origins: [] } gives an empty jar. The sign-in request then presents the owner's session, and since fix(platform): bind organization session authority #4903 minting a session for another person from a presented session is refused (auth.ts session.create.before). newPersonContext(browser) gives the member a signed-out context. The review lane reached the same reading from the run's logs (TALE-358, comment on fix(platform): bind organization session authority #4903).

Not changed: what a browser holding another person's cookie should do when someone signs in on it. Today it is refused, and the sign-in page words that refusal as a wrong password with the lockout hint (app/routes/_auth/log-in.tsx). That is a product decision; it is filed separately.

Checklist

  • bun run check — the full gate runs in CI. Locally: the whole tools/cli suite (3,171 pass; the 4 failures are this Mac's audit engine, a spawned smoke fixture and two TLS transport tests, none near these files), platform-docs, merge-group finish/retire, descriptor, CLI workflow and CI-ready suites on the first two changes; the dashboard test file 4/4 and its three session-lapse siblings (43 tests); UI (platform 1/4) run whole at the dashboard commit: 184 files, 1,582 tests passed (on main the same shard reports 1 failed | 1,581 passed); oxlint --type-aware and a narrow tsc over the three changed E2E files.
  • bun run lint:sast — N/A for the lists; the hook ran Opengrep on the TypeScript files.
  • Translations — N/A.
  • Docs — N/A.
  • README — N/A.

Test plan

  • cd tools/cli && bun run generate && bun test src/lib/config/platform-docs.test.ts scripts/ci-merge-group-finish.test.ts scripts/ci-retire-merge-group.test.ts
  • cd services/platform && bunx vitest --run --config vitest.ui.config.ts app/routes/dashboard.test.tsx
  • The two Playwright specs need the dev stack, so they are proved by this PR's queue run: Playwright (platform 4/4) must pass.

#4913 made agent_connections/end-and-tell.ts import ../collab/service.ts, and
the CLI's module graph reaches end-and-tell.ts, so the graph now includes a
backend file that the CLI's scopes do not name. Two tests of the CLI's own
configuration refuse that, which turned Unit (workspaces) red on every pull
request that triggers the CLI scope and on every push to main and release
candidate since:

- native CLI scopes cover every imported platform backend module
- cached CLI checks hash every imported module and generated source tree

Name the file where its siblings are named: the pull-request scope
(ci-scope.yml), the CLI workflow's push paths and the CLI's turbo transit
inputs, and refresh the release-candidate source contract that mirrors the
workflow's paths (release-candidate-contract.ts --write, then oxfmt).
The merge-group finisher only finishes a cancelled run whose workflow bytes it
has a reviewed profile for, so every change to cli.yml needs one (#4903 added
the previous). The CLI workflow now names domains/collab/service.ts in its push
paths, which changes its hash and left two tests red in Unit (workspaces):

- current seven workflows and verdict closure require an explicit reviewed
  profile on every source change
- current CLI path scope preserves the retained graph and every finishing
  refusal

Add the profile for the new bytes. The job and verdict graph is the one the
previous profile reviewed, so only the hash and its comment are new.
The dashboard test found the session-lapse dialog's confirm button by the bare
key `sessionLapse.signIn`, which only works while nothing has initialised the
i18n singleton: an uninitialised t() returns its key. #4903 made api-client
import auth-client-error, which imports the singleton, so from 07419b9 on the
dashboard's import graph initialises English and the button is named "Sign in".
The UI shard that holds the file has failed since (found by bisecting the test
alone: green at 6480ade, red at 07419b9, with no other change between).

Mock the translation hook the way the sibling session-lapse suites do, so the
accessible name is `auth.sessionLapse.signIn` whatever the graph initialises.
@yannickmonney yannickmonney changed the title fix(cli): cover collab/service.ts in the CLI scopes fix: turn main green: CLI scopes, merge-group profile, dashboard test Oct 13, 2026
rbac.spec.ts and return-loops.spec.ts sign a member the admin just added in
from a second browser context and failed on every attempt since #4903 with
403 ORG_FORBIDDEN ("This session is limited to the organization that signed
you in"), which kept `Playwright (platform 4/4)` and so every release
candidate red.

The cause is in the specs, not the member: fixtures.ts overrides the
storageState option so every test authenticates as its worker's owner, and
that override also reaches every context made with browser.newContext() (shown
with a probe: the context holds the owner's cookie). The sign-in request then
presents the owner's session, and since #4903 minting a session for another
person from a presented session is refused.

Add newPersonContext(browser), a context from an empty cookie jar, and use it
for both members. What a browser holding another person's cookie should do when
someone signs in on it is a product decision and is not changed here.
@yannickmonney yannickmonney changed the title fix: turn main green: CLI scopes, merge-group profile, dashboard test fix: turn main green: CLI scopes, merge-group profile, UI and E2E tests Oct 13, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 677bc01 Oct 13, 2026
@yannickmonney
yannickmonney deleted the fix/cli-scope-collab-service branch October 13, 2026 09:16
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