Repository navigation
chore: sync upstream b4f8b6756c - #384
Conversation
…eyboard navigation (coder#30682) > [!NOTE] > This PR was generated by Coder Agents on behalf of @chrifro. Follow-up to coder#30472. The blue ring on highlighted dropdown options also showed on mouse hover, which made the menus feel heavy without helping pointer users. It now shows only when the keyboard moved the highlight. cmdk uses one highlight (`data-selected`) for both arrow keys and hover and doesn't record which one moved it. A small `useHighlightSource` hook on the cmdk root tracks this: a document `keydown` sets `data-highlight-source="keyboard"`, `pointermove` on the root sets `"pointer"`, and focus starts from the last input on the page, so a menu reached with Tab shows the ring right away. Keys are tracked on the document because the Agents slash menu gets its arrow keys from the composer editor, outside the cmdk root. Items apply the ring only under `in-data-[highlight-source=keyboard]`. It's wired into the shared `Command`/`CommandItem` (which covers the Agents slash menu and `MultiSelectCombobox`) and `FilterComboboxRoot`/`FilterComboboxItem`. The hover background and the `focus-visible` rings on chip and flyout buttons are unchanged. WCAG 2.2 still passes: 2.4.7 Focus Visible and 1.4.11 Non-text Contrast apply to the keyboard indicator, which is unchanged (7.0:1 dark, 4.7:1 light). Neither criterion requires a pointer hover indicator. **`/workspaces` filter menu:** | Mouse hover, before | Mouse hover, after | Keyboard (ArrowDown), unchanged | |---|---|---| |  |  |  | **Agents composer slash menu (`/agents`, type `/`):** | Mouse hover, before | Mouse hover, after | Keyboard (ArrowDown), unchanged | |---|---|---| |  |  |  | <details> <summary>Verification</summary> - Playwright on the dev server, `/workspaces`: hovering a row leaves `box-shadow: none`; ArrowDown adds the 2px inset `content-link` ring; hovering again removes it. - Playwright on the dev server, `/agents` slash menu: the ring shows after typing `/` and on ArrowDown, hides on hover, and returns on the next ArrowDown from the composer. - New `Command.test.tsx` covers keyboard/pointer switching, keys pressed outside the root, and the initial state on focus. - vitest unit (Command, Filter, MultiSelectCombobox, ChatMessageInput): 307 tests pass. - `make pre-commit` passes. </details>
coder#32012) The check icon on the selected option in the Create user "Login type" select and "Organization" combobox took its color from the option text. When keyboard focus moved to another option, the check dimmed from `#FFFFFF` to `#A1A1AA` (2.56:1), which Deque flagged under WCAG 1.4.11. The icon now always uses `text-content-primary`, so the selected indicator keeps the same color whether or not its option has focus. In light mode it stays near-black. Closes DEQ-88. The other two parts of that ticket (focus rings on the organization and login type options) were fixed in coder#30354 and coder#31567. A new `SelectedOptionNotHighlighted` story lets Pixel capture the selected org's check while another option has focus. The Login type state is already covered by `LoginTypeKeyboardFocus`. ## Before and after The selected option ("password" and "My Organization") is shown while focus is on another option. Check icon color measured with Playwright in Storybook: | | Before (`#A1A1AA`) | After (`#FFFFFF`) | |---|---|---| | Login type | <img width="420" src="https://raw.githubusercontent.com/coder/coder/assets/fix-deq-selected-check-icon-color/pr/before-login.png" /> | <img width="420" src="https://raw.githubusercontent.com/coder/coder/assets/fix-deq-selected-check-icon-color/pr/after-login.png" /> | | Organization | <img width="420" src="https://raw.githubusercontent.com/coder/coder/assets/fix-deq-selected-check-icon-color/pr/before-org.png" /> | <img width="420" src="https://raw.githubusercontent.com/coder/coder/assets/fix-deq-selected-check-icon-color/pr/after-org.png" /> | <details> <summary>Decision log</summary> - **Constant color instead of a dimmer focused state.** The check marks selection, not focus, so it should not change when focus moves. `content-primary` matches the focused text color, so the icon looks the same as before while its option has focus. - **Scoped to the two audited controls.** The shared `SelectItem` and `DropdownMenuCheckboxItem`, and about 10 other `CommandItem` comboboxes (Autocomplete, FilterCombobox, the agents org and project selectors, and others), have the same pattern. Changing the shared `SelectItem` would restyle about 31 selects that Create user does not use, so those belong in a follow-up. </details> --- _Generated by Coder Agents on behalf of @chrifro._
…text spacing (coder#32055) Under WCAG 1.4.12 text spacing overrides, workspace agent metadata values such as "23.3/147 GiB (16%)" and "0.098/13 cores (1%)" were cut off with an ellipsis on the workspace page. `StaticWidth` measures each value once and then pinned that measurement as a fixed `width` in pixels. When a user stylesheet later widened the text, the box kept its old width, and the value stayed clipped until it changed. It now sets `minWidth` instead. Values still never shrink, so there is no jitter between updates, but they can grow when spacing changes. Closes DEQ-434 | Ticket | Surface | Screenshots | |---|---|---| | DEQ-434 | Workspace page, agent metadata row | [before/after](https://linear.app/codercom/issue/DEQ-434/text-spacing-content-cut-off#comment-d4517782) | <details> <summary>Verification, decisions, and dropped findings</summary> **Repro.** I used `./scripts/develop.sh` with the `docker` starter template, whose metadata matches the ticket (CPU Usage, Memory Usage (Host), Load Average (Host)). I injected the WCAG spacing stylesheet after the first render and listed clipped elements. On main, five values were clipped (for example `23.3/147 GiB (16%)`: scrollWidth 157, width 122). On this branch, nothing is clipped. Default spacing renders the same widths on both. **Coverage.** `StaticWidth` returns early under Storybook (`process.env.STORYBOOK`), and jsdom has no layout. That leaves an inline-style assertion with a stubbed `getBoundingClientRect` as the only possible test, and FE1 and FE10 discourage that. I verified in a real browser against the dev server instead. **Not changed.** Values keep `truncate max-w-64`. Text longer than 256px is already cut off at default spacing, so that cap doesn't come from the spacing override. The stale-value branch renders `StaticWidth` under `TooltipTrigger asChild`, which replaces the ref, so the effect never pins that element. That's pre-existing and doesn't clip. **Accessibility audit (axe 4.11).** The `AgentMetadataView` story shows a pre-existing `color-contrast` violation from the stale or disabled value color. This diff doesn't change it. **Dropped deep-review findings.** - TN5 (nit), rename `StaticWidth`: dropped. The component still holds a value's width steady across updates, and a rename would add churn to a 5-line fix. **Branch name.** I used `a11y/text-spacing-cut-off-agent-metadata` instead of `...-2`, because `off-2` would auto-link to an issue on Linear's OFF team. **Doc check.** No docs describe metadata value widths, so no docs changes are needed. </details> 🤖 Generated by Coder Agents on behalf of @chrifro.
…n the overview card (coder#31410) Adds a Subagents section to the overview card view from coder#31409. It lists at most five subagents that are not idle, with no toggle. A row links to the subagent's chat. When its title is cut off, a tooltip shows it in full on hover and on keyboard focus. Chats can have 100 or more subagents, and the sidebar's chat tree already lists all of them. Subagents that need the user (`error`, `requires_action`) sort first, so the five-row cap hides them last. The order within each group stays as the API returns it, newest first. The heading reads "Subagents · N of M not idle" and counts every subagent. A chat whose subagents are all idle shows that heading instead of "Nothing to show yet". The prototype in coder#31260 said "active" and counted errored subagents. The shared `isActiveChatStatus` leaves errors out, so I kept errors in the list and changed the word to "not idle". That matches the "Idle" label of the `waiting` status. The wording is an open question for Jaayden in coder#31412.  ## How to test 1. Open Storybook at `pages/AgentsPage/ChatOverviewCardView`, stories `ManySubagents` and `IdleSubagents`. 2. Run `pnpm exec vitest run --project=unit src/pages/AgentsPage/components/ChatOverviewCardView.test.tsx` in `site/`. ## What to look at first 1. `SubagentsSection`: the filter, the sort, the cap, and the count in one component. 2. `OverviewRow`: the new link form. Its props type allows `onClick` or `to`, never both. <details> <summary>Review history</summary> Follow-up fix: the link row uses the tooltip from coder#31409, which now opens only for truncated text. A new test focuses a truncated subagent row and checks its accessible description. It fails when the link row skips the tooltip. No existing assertion changed. `origin/main` reached this branch by merge from coder#31409. Polish pass changes: extracted `SubagentsSection` and named the two status checks `isIdle` and `needsUser`. Behavior and test assertions are unchanged. Declined: - Earlier round and final round: delete the view tests for the filter, cap, sort, and count, and the all-idle count, as checks of rendered content. They cover the selection logic, and each fails when the sort or the section condition is reverted. The requester also asked to keep existing assertions unchanged. - Final round: a stronger assertion in the all-idle test. Same reason. - Final round: inline `isIdle`. The polish plan named this check on purpose, and it reads next to `needsUser`. </details> --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ --------- Co-authored-by: Jaayden Halko <[email protected]>
Fixes GRU-104 Test was flaky in that multiple runs of the Eventually loop could attempt to write to the channel more often than it was read, leaking the goroutine. This also moves the assertion that the payload is correct outside the loop, so that we fail the test if we get a corrupted payload. If NATS or our implementation doesn't protect the integrity of messages, I'd want to know about it.
## Description Adds 3 database queries for the organization AI spend overview. They read the daily spend aggregate (`ai_user_daily_spend`), scoped to the organization through each spend row's effective group, over a `[period_start, period_end)` range of UTC days. 1. `GetOrganizationAISpendTotals`: the number of users with spend, the total spend, and the median of the users' total spend. 2. `ListOrganizationAISpendPerUser`: paginated users, most spend first, with one row for each group their spend was attributed to. 3. `GetOrganizationAISpendPerDay`: the spend for every UTC day in the range, including days without spend. Note: Only users with spend above zero are included, so users with only unpriced usage are not listed. ## Changes - dbauthz checks matching `/ai/spend/users` (read on organization group members). - Querier and dbauthz tests. Related to AIGOV-728 > [!NOTE] > Generated by Coder Agents on behalf of @ssncferreira.
## Description
Adds the experimental `GET
/api/experimental/organizations/{organization}/ai/spend` endpoint that
backs the new Overview tab of the organization AI spend page ([Figma
design](https://www.figma.com/design/6TkixpkUIM5Qv6I7qhM3xZ/AI-Gov---user-spend?node-id=12-5152&t=YlCC7RGSMNrzMxVo-4)).
It returns the organization's spend summary, daily spend, and a page of
users with their per-group spend, using the queries from coder#31711.
## Changes
- Add the `organizationAISpend` handler and
`ExperimentalClient.OrganizationAISpend`:
- Reuses the period handling of `/ai/spend/users`: `period_start` and
`period_end` must be provided together and span at most 31 days, and the
default is the current budget period.
- Also requires both bounds at 00:00:00 UTC, since the daily spend
aggregate holds whole UTC days.
- Is not limited by the AI Gateway data retention window, since the
daily spend aggregate is not purged. `/ai/spend/users` and the export
keep the retention check, now in `aiSpendRetainedPeriod`.
- Returns `count`, `totals` (`spend_micros`, `median_spend_micros`),
`intervals` (daily spend, one interval per UTC day, zeros included), and
`users` (paginated with `limit`/`offset`, most spend first, with
per-group spend).
- Echoes the applied period, and reads every value in one read-only
repeatable-read transaction so the values agree.
- Extract `parseOrganizationAISpendPage`, shared with `/ai/spend/users`.
- Add handler tests.
Closes AIGOV-728
> [!NOTE]
> Generated by Coder Agents on behalf of @ssncferreira.
Prepare `forwardingHandler` to forward bridged requests to the provider. Nothing calls it yet.
Adds the test-audit agent skill at .agents/skills/test-audit/ (adapted from OpenClaw's MIT-licensed test-audit skill, attribution in NOTICE.md) and an AGENTS.md workflow bullet: apply its authoring gate when adding or changing tests, and run it in audit mode on the branch's test diff before opening or updating a PR with test changes.
A client could resume the chat stream only with after_id, a message ID. A message ID does not identify what a client has received. A reconnect could skip a message that another client sent, send no history_reset for an edit the client missed, or resend the whole history. A client can now resume with the chat's snapshot_version, which the newest messages page returns and the stream's events then include. The stream sends what changed at that version or later. For an edit it sends the ID of the edited message and the messages written since, not the whole history. A stream opened without snapshot_version sends the same events as before. A write outside a chat state transition does not increase snapshot_version, and a stream can miss it. The queries that only tests used for such writes are removed. When the stream cannot be set up, the server now returns 500 before the WebSocket upgrade. It used to upgrade and send an error event, which the web client shows as a chat error. The Tasks to Chats migration guide told clients to reconnect with after_id. It now describes snapshot_version.
Merged PRs cannot reopen, so their diff-status rows do not need the two-minute TTL used for open and closed PRs. Use a one-hour TTL after successful diff-status refreshes of merged PRs while retaining periodic metadata updates. Workspace git reports still set `stale_at` to the past so merged diff-status rows remain eligible for the next worker tick. Refs CODAGT-1543
Route centralized provider requests through the existing key-pool failover transport. Retries replay a consumed request prefix and continue the still-open source, discard rejected attempt responses, and preserve client bytes and headers. BYOK requests do not fall back to pooled credentials. Generated by Coder Agents on behalf of @pawbana.
## Description Updates the unpriced AI models query behind the weekly owner notification to count token usage by when it was recorded (`token_usages.created_at`) in a `[period_start, period_end)` window, consistent with the other AI spend queries. It also returns one row per provider name and model instead of per provider type, so the unpriced models endpoint later in this stack can reuse it. The notification payload keeps the same format. ## Changes - Rename `GetUnpricedAIModelsSince` to `GetUnpricedAIModels`. It used `interceptions.started_at` with no end. - Treat usage as unpriced only when no price was found (`cost_micros IS NULL AND priced_model IS NULL`), so usage whose price was found but whose cost could not be computed is not reported. - Return one row per live provider name and model, with the provider's display name, icon and type. - The notification passes the last 7 days and merges rows by provider type, since site-wide prices are keyed by type, so its payload keeps the same shape. - Table-driven query tests and a notification test for providers sharing a type. Related to AIGOV-730 > [!NOTE] > Generated by Coder Agents on behalf of @ssncferreira.
…er#31752) ## Description Scopes `GetUnpricedAIModels` to an optional organization and checks organization prices, so the unpriced models endpoint can list what an organization still needs to price. Usage is attributed to an organization through its token usage's effective group, the same as spend. ## Changes - Optional `organization_id`: when set, only that organization's usage counts, and when null (the notification), all usage counts. - A model still holds a price if it has a site-wide price for the provider type, or an organization price (`ai_model_configs`, live and with a price) for the provider in the usage's organization. - dbauthz reads `ResourceAiModelPrice`, scoped to the organization when one is given, like `GetAIModelPriceForProvider`. - Table-driven query tests run every case for all organizations, org A and org B. <details> <summary>Cases</summary> Model X is on `anthropic-prod`. Y is the model the provider reports serving for X. "Notif" is the deployment-wide notification, "UI A/B" is the endpoint for org A/B. | # | Prices | Usage | Notif before | Notif after | UI A | UI B | |---|---|---|---|---|---|---| | 1 | No price for X anywhere | A uses X, unpriced | ✅ | ✅ | ✅ | ❌ (B didn't use X) | | 2 | Site-wide price for X | A and B use X, priced | ❌ | ❌ | ❌ | ❌ | | 3 | A priced X before the usage | Only A uses X, priced | ❌ | ❌ | ❌ | ❌ | | 4 | A priced X after the usage | Only A uses X, unpriced when recorded | ✅ (wrong) | ❌ | ❌ | ❌ | | 5 | A priced X, B has none | A uses X (priced), B uses X (unpriced) | ✅ (because of B) | ✅ (because of B) | ❌ | ✅ | | 6a | No price for X or Y when recorded, then Y priced site-wide | Only A uses X, unpriced when recorded | ✅ | ✅ | ✅ | ❌ | | 6b | Same as 6a | A and B use X, unpriced when recorded | ✅ | ✅ | ✅ | ✅ | | 7a | No price for X, but a site-wide price for Y | A uses X, priced through Y | ❌ | ❌ | ❌ | ❌ | | 7b | No price for X, A priced Y, and B has none | A and B use X: A priced through Y, B unpriced | ✅ (because of B) | ✅ (because of B) | ❌ | ✅ | </details> Note: pagination will be added in a follow-up. Related to AIGOV-730 > [!NOTE] > Generated by Coder Agents on behalf of @ssncferreira.
coder#29320) Linear: [CODAGT-1101](https://linear.app/codercom/issue/CODAGT-1101/agent-plugins-read-only-support-behind-the-agent-plugins-experiment) **tl;dr:** Adds the `agent-plugins` experiment and the Agent API v2.17 messages that carry Agent Plugins data from the agent to coderd. First of eight stacked PRs adding read-only [Agent Plugins](https://agent-plugins.org/) v1.0.0 support. A plugin is a directory with a `plugin.json` manifest, skills under `skills/`, and an optional `mcp.json`. Across the stack, the agent discovers plugins in `plugins/` and `.agents/plugins/` under its scan roots (for example `~/.coder/plugins/<name>`), chatd lists their skills with plugin attribution, the agent runs the MCP servers of plugins in the workspace working directory, and the Agents page shows plugin attribution in the chat context. Hooks, commands, agents, install flows, and org-managed plugins are out of scope. Background: [research/agent-plugins-standard.md](https://github.com/coder/scott-misc/blob/main/research/agent-plugins-standard.md) (internal). This PR adds `codersdk.ExperimentAgentPlugins` and a `PluginBody` oneof variant on `ContextResource` (tag 18) that carries the validated manifest fields and nests the plugin's skills and MCP servers. `Manifest` gains `agent_plugins_enabled` (field 23), which coderd sets when the experiment is enabled; the agent discovers plugins only then. coderd stores each nested resource as its own row with the plugin's name in a new `plugin_name` column (migration 000642), which the hydrate, MCP sync, and re-pin queries copy. With the experiment off, `PushContextState` drops plugin resources and everything nested in them. Otherwise it rejects pushes with plugin names that fail `workspacesdk.ValidatePluginName` (the spec's name grammar, shared by agent and coderd), OK plugins without a name or with a duplicate name, a non-OK plugin that nests resources, nested entries of the wrong kind, plugin skill sources outside `<plugin source>/skills/`, and plugin MCP servers with an empty `server_name` or a source other than `<plugin name>/<server_name>`. Nested resources count toward the 1000-resource cap. Agents now dial v2.17, so a new agent needs a coderd that supports it, as with every Agent API minor. Turning the experiment off does not remove plugin data already pinned to existing chats. <!-- pr-map:start --> <details><summary>PR map</summary> `main..4b0cfc9` | Category | Files | + | - | |---|---:|---:|---:| | prod (backend) | 15 | 342 | 78 | | test (backend) | 9 | 534 | 3 | | migrations | 2 | 14 | 0 | | generated (backend) | 7 | 1216 | 1027 | | generated (frontend) | 1 | 2 | 0 | | **Total** | 34 | 2108 | 1108 | 1. `coderd/agentapi/context.go` (+211/-51, API): drops plugin resources when the experiment is off; otherwise validates plugin names and nesting, and stores each nested skill and MCP server as its own row with the plugin's name. 2. `agent/proto/agent.proto` (+39/-9, API): `PluginBody` with nested `skills` and `mcp_servers`, and `Manifest.agent_plugins_enabled`. 3. `codersdk/workspacesdk/frontmatter.go` (+31/-0): `ValidatePluginName` and `MaxPluginNameLength` (manifest name grammar). 4. `coderd/database/queries/chats.sql`, `workspaceagentcontext.sql`, migration 000642 (+28/-7, DB): the `plugin_name` column on both context resource tables, copied by the hydrate, MCP sync, and re-pin queries. 5. `codersdk/agentsdk/agentsdk.go`, `agent/agent.go` (+18/-4, API): `Manifest.AgentPluginsEnabled` and `ConnectRPC217WithRole`; the agent dials v2.17. 6. `coderd/agentapi/api.go`, `manifest.go` (+4): the manifest flag follows the experiment. 7. `tailnet/proto/version.go` (+8/-1, API): Agent API v2.17. 8. `codersdk/deployment.go` (+4, API): the `agent-plugins` experiment. </details> <!-- pr-map:end --> --- This PR was generated by Coder Agents on behalf of @jscottmiller. Co-authored-by: Garrett Delfosse <[email protected]>
Adds pubsub to the deployment health report types in `healthsdk`:
- New top-level `pubsub` section (`PubsubReport`) in
`HealthcheckReport`. It embeds `BaseReport` and adds one field,
`backend` (string).
- New `HealthSectionPubsub` constant, added to `HealthSections` so the
section can be dismissed.
- `HealthcheckReport.Summarize` includes pubsub errors and warnings,
which `coder support bundle` prints.
This is the first PR in a stack for GRU-100. It only changes the SDK and
the files generated from it (Swagger, API docs, `typesGenerated.ts`),
plus the two frontend health mocks that need the new required field. The
server does not fill in this section yet. That comes in a follow-up PR.
<details>
<summary>Plan</summary>
- Add `PubsubReport { BaseReport; Backend string }` to
`codersdk/healthsdk`.
- Add `Pubsub PubsubReport \`json:"pubsub"\`` to `HealthcheckReport`.
- Add `HealthSectionPubsub` and include it in `HealthSections`.
- Include `Pubsub` in `HealthcheckReport.Summarize`, with test coverage.
- Regenerate TS types, Swagger and API docs.
- Follow-up PRs: populate the report in `coderd/healthcheck` (including
severity and dismissal handling) and update the health UI.
</details>
---
Generated by Coder Agents on behalf of @spikecurtis.
Fills in the `pubsub` section of the deployment health report on the server. Stacked on coder#31620. - New `pubsub.ReportingPubsub` interface: `Pubsub` plus `HealthReport(ctx) healthsdk.PubsubReport`. The `Pubsub` interface itself is unchanged. - The PostgreSQL, NATS and in-memory backends implement it. Each reports its backend name (`postgres`, `nats` or `memory`) and its connection state: - **PostgreSQL:** tracks the `pq` listener's connected state from its event callback. When it's not connected, the report has severity `warning` and `EPS01`. - **NATS:** warns with `EPS02` if the embedded server isn't `Running()`, and with `EPS01` for each publish or subscribe connection whose `Status()` isn't `CONNECTED`. - **In-memory:** always `ok`. - `coderd.Options.Pubsub` is now a `ReportingPubsub`. `ReplicaSyncPubsub` stays a plain `Pubsub`. - `coderd/healthcheck` has a new `Pubsub` check, which counts toward `healthy` and the overall severity like the other sections. `formatHealthcheck` applies the dismissed setting for it. - New health codes `EPS01` (not connected) and `EPS02` (embedded NATS server not running), documented in `docs/admin/monitoring/health-check.md`. - Test helpers follow the type change: `coderdtest.Options.Pubsub` and the pubsub returned by `dbtestutil.NewDB` are now `ReportingPubsub`, and a few test wrappers embed `ReportingPubsub` instead of `Pubsub`. <details> <summary>Decision log</summary> - `HealthReport` returns a `healthsdk.PubsubReport` rather than filling one in place. This matches the `healthcheck.Checker` methods. `ctx` is unused for now. - The healthcheck layer sets `Dismissed`, so backends don't need to know about health settings. - Problems are reported as warnings, not errors, so they show on the health page without marking the deployment unhealthy. Both backends reconnect on their own. - Postgres connection state comes from the listener event callback, not from `pq.Listener.Ping`, so the health check doesn't do database I/O. Closing the pubsub also marks it disconnected. - NATS `conn` gains `Status()`, which `*natsgo.Conn` already implements. The pools are immutable after construction, so `HealthReport` reads them without locking. - The docs say the pubsub section appears in the JSON response, because the health UI doesn't show it until a later PR in this stack. - psmock is not regenerated: none of its users pass it to coderd. </details> --- Generated by Coder Agents on behalf of @spikecurtis.
Stacked on coder#31621. Adds a **Pubsub** section to the deployment health page (`/health/pubsub`). It shows: - the pubsub severity dot and the mute-warnings button, - the report error, if one is set, - each warning, with a link to its docs (EPS01, EPS02), - the backend in use (`postgres` or `nats`). The section is added to the health sidebar. Storybook stories cover the default, warning (NATS), and error states. <details> <summary>Plan and decisions</summary> - The page follows the same pattern as `DatabasePage`: it reads the report from the outlet context and renders warnings as dismissible Alerts with `HealthMessageDocsLink`. - Warning keys use `code-message` instead of `code`. The NATS backend can report the same code (EPS01) once for each publish and subscribe connection, so a key on `code` alone could repeat. - The page shows `pubsub.error` as an error Alert, because the server sets `error` when the report cannot be produced. - If the backend is empty, the page shows "Unknown". - The sidebar entry comes from the existing `sections` map in `HealthLayout`, so the severity dot and the dismissed state work the same way as in other sections. - Stories: `Pubsub` (default MockHealth), `WithWarnings` (NATS with EPS02 and two EPS01 warnings), `WithError`. </details> Generated by Coder Agents on behalf of @spikecurtis.
Adds `--cluster-host` to develop.sh, so that coder server uses NATS in the development run. --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
…1702) The `dev.coder.com` instance has been torn down and now only redirects to another instance. Nothing in the repo calls it. Every reference was a test fixture, mock, story, Helm test input, docs example, or comment. Replace all occurrences with `coder.example.com` and update the comments that claimed the mocks were fetched from that instance. The Helm golden files were updated to match their inputs. Closes DOG-43 https://linear.app/codercom/issue/DOG-43/scan-codercoder-repo-for-remaining-references-to-devcodercom-and
Bumps the bundled Terraform from 1.17.1 to [1.17.2](https://github.com/hashicorp/terraform/releases/tag/v1.17.2) (released 2026-11-11). 1.17.2 pins `klauspost/compress` v1.20.2, which contains the fix for [GHSA-fpmh-frq8-7rj8](GHSA-fpmh-frq8-7rj8) / [GO-2026-6865](https://pkg.go.dev/vuln/GO-2026-6865) (panic in the zstd decoder on a crafted frame). 1.17.1 pins v1.19.1. Iron Bank reports GO-2026-6865 against `/opt/terraform/terraform` in `coder/coder-enterprise/coder-service-2:2.38.7` (High). The Iron Bank image takes its Terraform from the version coder bundles, so this bump is how that finding goes away. This is a patch bump, so `maxTerraformVersion` stays at 1.17.9. It does not change the Go toolchain Terraform is built with (still go1.26.10) or its `go-getter` pin (still v1.8.6). ## Changes Same file set as coder#30516: - `provisioner/terraform/install.go`: `TerraformVersion` - `install.sh`, `scripts/Dockerfile.base` - `mise.toml`, `mise.lock` (checksums from HashiCorp's `terraform_1.17.2_SHA256SUMS`) - `flake.nix` (fetchurl SRI hashes derived from the same SHA256SUMS) - `docs/install/prepare/airgap.md` - `provisioner/terraform/testdata/generation.sha1`: fixture fingerprint, regenerated with `generate.sh --if-needed`. No plan or state fixture changed. I checked the checksum conversion first by deriving the 1.17.1 values from `terraform_1.17.1_SHA256SUMS`; it reproduces every value currently in `flake.nix` and `mise.lock`. ## Verification ``` $ mise install terraform # mise.lock checksums verified against the download $ mise exec -- terraform version Terraform v1.17.2 on linux_amd64 $ ./provisioner/terraform/testdata/generate.sh --if-needed only generation.sha1 changed $ go test ./provisioner/terraform/ -run 'TestInstall|Version|Golden' -count=1 ok github.com/coder/coder/v2/provisioner/terraform (75 tests passed, 0 failed) ``` `flake.nix` was not evaluated with Nix; its hashes come from the same SHA256SUMS as `mise.lock`. ## AI disclosure Prepared with an AI coding agent on behalf of @droopy4096. The agent ran the verification above; a human review is still needed before merge.
One of the main costs in terms of DB load from chats is extra round trips during transactions. This results in locks being held for longer periods of time -> an increase in lock waits for chats related queries. One of the opportunities for reducing some of the round trips is to eliminate extra chat row reads after we have just read the row in order to lock it. In this PR `ChatMachine.Update` now seeds the transaction struct with the row returned by `LockChatAndBumpSnapshotVersion`, plus a queue count taken right after it. We can then pass it into `Update` as an optional parameter validate against it, so neither re-reads the chat row from the database while the row lock is held. `updateChat` (send, edit, promote, tool results, interrupt, compact, clear, reconcile), hook failure, family archive, and the worker's generation and task transitions use it instead of reloading the chat under the lock. This PR relative to main: |measurement | main | this PR | percent change | |-- | -- | -- | -- | | Round trips under lock | 180.9 | 142.0 | -39% | | Statements under lock | 86.1 | 66.6 | -23% | | GetChatByID under lock | 54.1 | 35.8 | -34% | | GetChatByID total | 75.5 | 57.1 | -25% | | Statements | 235.8 | 216.2 | -8% | Generated by Coder Agents on behalf of @cstyan.
Uses the `cliui` output helpers from coder#30508. `coder tokens create` printed only the new token's secret, so scripts had to call `tokens view` afterwards to get the token's ID, expiry, and scopes. This adds `-o/--output` with `text` (default) and `json`. The JSON document contains the token's metadata from `APIKeyByID` plus the one-time `key`. **Behavior change:** Additive. The default output is still just the secret, so `$(coder tokens create ...)` keeps working. The command now makes one extra API call after creating the token; if it fails, the command prints a warning to stderr and still outputs the secret rather than exiting with an error. <details> <summary>Decisions</summary> - The metadata lookup uses the key ID parsed from the `<id>-<secret>` token, the same convention `tokens view` and `tokens remove` use. - A failed metadata lookup never fails the command, because the token already exists and the secret can't be shown again. </details> Closes [CLI-14](https://linear.app/codercom/issue/CLI-14) _This PR was generated by Coder Agents on behalf of @nickvigilante._
…cached (coder#32146) fix(test): avoid unnecessary Terraform provider downloads in CI Fix Terraform provider download flakes caused by GitHub 500/504 errors by improving provider cache reuse and CI cache uploads. - **Fix provider cache misses:** Use a stable providers-only configuration in `TestWorkspaceTemplateParamsChange` instead of a template containing a temporary path. - **Update CI cache keys:** Include a hash of cache entry names so new providers are cached immediately after a successful `main` run, rather than waiting for the next day. - **Reduce cache growth:** Avoid approximately 13 MB of redundant cache data per job per day. - **Preserve existing behavior:** Failed jobs do not save caches, and cache restore and retry behavior remain unchanged. **Validation:** - Confirmed repeated test runs reuse cached providers without creating new cache directories. - Verified Terraform tests pass with network access blocked after the cache is populated. - Confirmed cache keys remain stable when entries are unchanged and update when entries change. - All affected tests and `make lint/actions/actionlint` pass. **Note:** The CI upload action runs only on `main` and requires post-merge verification. Refs: https://linear.app/codercom/issue/CORE-40/flake-gen-terraform-provider-download-failure-context-deadline
Text that looks and acts like a section heading was a `span`, `p`, or
table-cell text, so screen reader users could not see it in the heading
outline or jump to it. This changes each one to a real `h2`/`h3`, at the
level Deque suggested. The only added classes (`m-0`, a size class)
cancel the base-layer heading margin, size, and weight rules in
`site/src/index.css`, so the page looks the same. Computed font size,
weight, line height, margin, and box match `main` for every changed
element in Storybook, so there are no screenshots.
Closes DEQ-93
Closes DEQ-161
Closes DEQ-257
Closes DEQ-328
Closes DEQ-453
Closes DEQ-455
Closes DEQ-333
| Ticket | UI surface | Element | Level |
|---|---|---|---|
| DEQ-93 | Audit log (also Connection log and template Versions, which
share `TimelineDateRow`) | date group rows ("Today", "last Friday") | h3
|
| DEQ-161 | Workspaces list, sharing tooltip | "Workspace permissions" |
h2 |
| DEQ-257 | Deployment settings `OptionsTable` (Overview and the other
settings pages) | option names ("Access URL", "Experiments") | h3 |
| DEQ-328 | Workspace page sidebars (`FullPageLayout` `SidebarCaption`)
| "Resources", "History" | h2 |
| DEQ-453 | Create template, base template step | "Alternatives to
create a template:" | h2 |
| DEQ-455 | Notifications inbox popover | "Inbox" | h2 |
| DEQ-333 | Agents chat top bar (`ChatTopBar`) | current chat title | h2
|
The build page has its own copy of `SidebarCaption` ("Builds") with the
same pattern. It gets the same `h2` change.
DEQ-130 (emoji picker category labels) is not in this PR. See the
decision log.
<details>
<summary>Grouping and decision log</summary>
- One PR for the whole `semantic-heading` label (one rule, one PR across
the product). DEQ-333 was added in a second commit after it got
`agent-ok`. Its h2 matches the Agents sidebar section headers, which are
already h2.
- **DEQ-130 left open.** Frimousse renders category headers inside its
`role="grid"`. A bare `h2` there triggers axe `aria-required-children`
(critical). Wrapping it as `row > gridcell > h2` passes axe, but those
rows are outside Frimousse's `aria-rowcount`/`aria-rowindex` numbering
and keyboard model, and Biome flags them (`useFocusableInteractive`). A
correct fix needs Frimousse to count header rows (a patch or upstream
change), or the headings rendered outside the grid. The ticket is
commented, unassigned, and back in Open.
- Heading levels follow each ticket's suggestion. On deployment
Overview, the option-name `h3`s follow the page's existing `h1` then
`h3` ("User Engagement"). axe `heading-order` reports that same node on
`main`.
- axe-core 4.11 on the affected stories, branch vs `main`: no violation
added. The remaining violations exist on `main` too: `aria-dialog-name`
on the Inbox popover, `scrollable-region-focusable` on the sharing
tooltip list and build logs, `link-in-text-block` on Overview and
Template builder, and `button-name` on History sidebar loading items.
- Dropped review findings:
- SD2, "the `children` destructure in `FullPageLayout/Sidebar.tsx` is
redundant": oxlint `jsx-a11y/heading-has-content` fails on `<h2
{...props} />` without it.
- RO1, "use `TooltipTitle` for the sharing tooltip title":
`TooltipTitle` is a `p` shared by more than 20 tooltips and is styled
differently (`mb-1`, no `text-sm`). Making it a heading would change all
of them, so it belongs in its own PR.
- SD4 (nit), "the build page `SidebarCaption` ignores `className`": this
predates the PR, and no caller passes one. Left out to keep the PR
scoped.
</details>
🤖 Generated by Coder Agents on behalf of @aqandrew.
…oder#30145) Uses the `cliui` output helpers from coder#30508. `coder organizations members edit-roles` printed only `Member roles updated to [...]`, while `members list` supports `-o table|json` and `-c`. It now accepts `-o text|table|json` and `-c`. Table and JSON show the updated member using the `members list` row type and columns. **Behavior change:** Additive. Default text output is unchanged. The command now fetches the member after updating roles, on every invocation; if that read fails, it exits with an error even though the roles were already updated. <details> <summary>Decisions</summary> - The update endpoint doesn't return user data, so the member is re-read to build the table and JSON rows. </details> Closes [CLI-27](https://linear.app/codercom/issue/CLI-27) _This PR was generated by Coder Agents on behalf of @nickvigilante._
Keyboard focus could land on elements hidden behind the dashboard's sticky chrome (WCAG 2.4.11 Focus Not Obscured). When the browser scrolls a focused element into view, it ignored the sticky `Navbar` at the top and the `DeploymentBanner` at the bottom, as well as the sticky header inside the notifications inbox. - `site/src/index.css`: `scroll-padding` on `html` that matches the Navbar (`h-18`) and DeploymentBanner (`h-9`) heights. Focus scrolling then keeps elements clear of both bars on every dashboard page. - `InboxPopover.tsx`: `scroll-pt-15` on the inbox scroll viewport, so focused notifications stay clear of its sticky header. Closes DEQ-62 Closes DEQ-332 Closes DEQ-337 Closes DEQ-371 Closes DEQ-424 Closes DEQ-436 Closes DEQ-437 Closes DEQ-441 Closes DEQ-461 Closes DEQ-519 | Ticket | UI surface | Screenshots | |---------|------------|-------------| | DEQ-62 | Groups page | [before/after](https://linear.app/codercom/issue/DEQ-62#comment-8462b3c3) | | DEQ-332 | Template builder modules | [before/after](https://linear.app/codercom/issue/DEQ-332#comment-60d02b32) | | DEQ-337 | AI gateway session threads | [before/after](https://linear.app/codercom/issue/DEQ-337#comment-5f8c8544) | | DEQ-371 | Workspace details | [before/after](https://linear.app/codercom/issue/DEQ-371#comment-e3e2d91b) | | DEQ-424 | Users table | [before/after](https://linear.app/codercom/issue/DEQ-424#comment-95dd3b60) | | DEQ-436 | Notifications popup (inbox header) | [before/after](https://linear.app/codercom/issue/DEQ-436#comment-0e1e108d) | | DEQ-437 | AI gateway sessions | [before/after](https://linear.app/codercom/issue/DEQ-437#comment-723efba1) | | DEQ-441 | Notification settings | [before/after](https://linear.app/codercom/issue/DEQ-441#comment-3e657bce) | | DEQ-461 | Audit logs | [before/after](https://linear.app/codercom/issue/DEQ-461#comment-bcb100c7) | | DEQ-519 | Deployment settings left nav | [before/after](https://linear.app/codercom/issue/DEQ-519#comment-e81c54e1) | **Review findings dropped** - The padding values are hardcoded and could drift from the bar heights. Both bars have fixed Tailwind heights, and the CSS comment names them. - `scroll-pb-9` applies even when the DeploymentBanner is hidden. This is harmless: it only adds a small margin at the bottom when the page scrolls to a focused element. <details> <summary>Grouping and decision log</summary> - All 10 tickets share one root cause: focus scrolling did not account for sticky elements. Nine are covered by the global `html` scroll-padding. DEQ-436 lives in the inbox's own scroll container, which needs its own padding. - I chose `scroll-padding` over per-page offsets or `scroll-margin` on focusable elements because it fixes every dashboard page from one place. - No stories are included. Assertion stories (focused rect vs. bar rect) failed with the fix reverted and passed with it applied, but review flagged them for asserting layout geometry (FE1/FE10). Visual Pixel versions needed contrived scroll setup and Radix internals (`[data-radix-scroll-area-viewport]`), and would only catch deletion of the CSS, not drift in bar heights. They were removed as low value for a two-line CSS fix. The before/after screenshots on each ticket record the verification. - Verified on a local `./scripts/develop.sh` build at 1280×720 by pressing Shift+Tab from the bottom of the page, the same way the reports reproduce it. With the fix reverted, the focused element ended up at y=0 under the Navbar on the users table, notification settings and deployment left nav, and under the header in the notifications inbox. With the fix, the same element lands fully in view. The other six pages could not be reproduced locally (no groups, workspaces or AI gateway sessions, and an unlicensed audit log), but they render in the same dashboard layout as the users page. </details> 🤖 Generated by Coder Agents on behalf of @jeremyruppel.
…e text in sharing control names (coder#32137) Two workspace sharing controls had accessible names that did not contain their visible text, so speech input users could not activate them by saying what they see (WCAG 2.5.3, Label in Name). - **Role selects** show "Use" or "Admin", but were named only "Role for <member>" or "Role". The names now end with the selected role, for example "Role for alice: Use" and "Role: Use". - **The "Search for user or group" trigger** shows only the selection once something is picked, so its name became just "Platform Engineering". A hidden label now comes before the selection in the name: "Search for user or group Platform Engineering". Callers that pass their own `triggerAriaLabelledBy` (`ProjectAccessDialog`) keep it. Closes DEQ-266 Closes DEQ-603 | Ticket | UI surface | |---|---| | DEQ-266 | Workspace sharing dialog and settings page: role select in the add member row and in each member and group row | | DEQ-603 | Agents chat Share flyout, plus the workspace sharing dialog and settings page: "Search for user or group" trigger after a selection | No screenshots: only accessible names change, so nothing looks different. Already fixed on `main` by coder#31873, so this PR does not touch them: DEQ-204 (AI Bridge client and model filter search), DEQ-336 (Find organization search), DEQ-606 (Agents "Search workspaces..." picker), and element 2 of DEQ-266 (the "Search for user or group" search input). <details> <summary>Grouping and decision log</summary> - Label `speech-accessible-name-missing` has 5 `agent-ok` tickets: DEQ-204, DEQ-266, DEQ-336, DEQ-603, DEQ-606. DEQ-603 and DEQ-606 have no project set and were added on request. - DEQ-204, DEQ-336 and DEQ-606 are cmdk search inputs. coder#31873 set the cmdk `label` on every `Command` with a search input. In Storybook on `main`, the inputs are named "Search client", "Search model", "Find organization" and "Search workspaces". No change needed. - DEQ-266: coder#30796 added `aria-label="Role for <name>"` after the audit, which replaced the visible value in the name. The fix appends the selected role to that label. - DEQ-603: fixed in the shared `modules/workspaces/WorkspaceSharingForm/UserOrGroupAutocomplete`, which renders the trigger on the Agents Share flyout and in workspace sharing. It reuses the existing `ProjectAccessDialog` pattern (`aria-labelledby="<label> <trigger>"`). The labelledby applies only while a value is selected. With no selection the placeholder is already the visible text and the name, so it is not repeated. The label is `hidden` instead of `sr-only`, so screen readers do not read it as stray text in browse mode. `aria-labelledby` still uses it. - The fallback trigger id is now `useId()` instead of the literal `workspace-user-or-group-autocomplete`, because `aria-labelledby` now references it and FE6 requires generated ids. Nothing in `site/src` or `site/e2e` referenced the literal. - Self-review: frontend-review, frontend-deep-review, and frontend-accessibility pass. In Storybook (`pages/AgentsPage/ChatSharingPopover/EmptyACL`), after picking "developer" the trigger is named "Search for user or group developer", and axe-core 4.11.1 reports no WCAG violations. - Out of scope, no tickets: `ProjectRoleSelect` in `ProjectAccessDialog` has the same role select pattern as DEQ-266. `TemplatePermissionsPage/UserOrGroupAutocomplete` and `ACLPrincipalAutocomplete` lose their label after a selection, like DEQ-603. </details> 🤖 Generated by Coder Agents on behalf of @aqandrew.
…ders (coder#32141) Sonner always renders its toast container as `<section aria-label="Notifications alt+T" aria-live="polite">`. NVDA reads it as an empty "Notifications alt+T region" at the bottom of every page, even when no toast is shown. This PR upgrades sonner from 2.0.7 to 2.0.8, which adds `customAriaLabel`, and passes an empty label while there are no toasts. An unnamed `section` is not a landmark, so screen readers no longer stop on it. It stays a polite live region, so toasts are still announced, and it gets its usual name back while toasts are visible. Closes DEQ-474 Closes DEQ-497 | Ticket | UI surface | |---|---| | DEQ-474 | Toast container on every page (reported after the footer on `/login?redirect=/workspaces`) | | DEQ-497 | Toast container on every page (reported at the bottom of `/login`) | This changes ARIA only and nothing visible, so there are no screenshots. The sonner 2.0.8 bump also brings upstream fixes: dismissal and re-creation of toasts with the same ID, bounded toast history, `aria-hidden` on its default icons (we supply our own), and a `data-react-aria-top-layer` attribute on the section. The CSS changes in the release apply only to `[data-styled=true]`, and our Toaster is `unstyled`. In 2.0.8, a newly mounted Toaster replays every active toast from sonner's module-level store. Without cleanup, toasts from one test or story leaked into the next and duplicated text queries. So `site/test/setup/msw.ts` (Vitest) and `site/.storybook/preview.tsx` (a project-level `beforeEach`) now call `toast.dismiss()`. **Self-review findings left as they are:** - *FE1/TS5, test asserts presence (`.not.toBeInTheDocument()`) on a role query.* The behavior under test is the accessible name, which a screenshot cannot capture. The rest of the file uses the same assertions. - *`useSonner()` counts toasts for all toasters and ignores `toasterId`.* The app has one Toaster and nothing sets `toasterId`, so filtering would be dead code. - *The name is cleared about 200 ms before the last toast finishes its exit animation.* The region uses `aria-relevant="additions text"`, so removals are not announced anyway. - *`{...props}` spreads after `customAriaLabel`, so a caller could override it.* No caller passes props, and moving the spread would change precedence for every other prop. <details> <summary>Grouping and decision log</summary> - The `reading-order-hidden-content` label has three tickets. DEQ-474 and DEQ-497 report the same element (`#root > section`, the Sonner container), so they share one root cause and one fix in the shared `Toaster` wrapper. - DEQ-299 (hidden Emoji picker content on the template builder's Customizations step) was already fixed on main. coder#30181 made the pre-warm picker `inert` and `aria-hidden`, and coder#30526 replaced Emoji Mart. The collapsed popover's content is not mounted. Nothing to change here; noted on the ticket. - Options considered for the Sonner region: 1. Mount `<Toaster>` only while toasts exist. Rejected: a live region inserted together with its content is often not announced. 2. A pnpm patch to drop the label on 2.0.7. Rejected because 2.0.8 ships `customAriaLabel` upstream. 3. Upgrade and pass `customAriaLabel=""` while empty. Chosen: smallest change, no patch to maintain. - Verified in Storybook (`NotificationsInbox/MarkAllAsReadFailure`): with a toast, the section is named `Notifications alt+T`. After closing it, `aria-label=""` and `aria-live="polite"` remain, and no region shows in the accessibility tree. axe reports only the existing `aria-dialog-name` on the popover. - The new Vitest test fails on main and passes on this branch. </details> 🤖 Generated by Coder Agents on behalf of @aqandrew.
…er#32143) Screen readers did not announce copy confirmations, the logs and user search loading states, latency refreshes, or sign in and password errors (WCAG 4.1.3 Status Messages). Each of these now updates a live region that is already mounted before its message appears, so the text change is announced reliably. Nothing changes visually: all new regions are `sr-only`, and the form layout keeps its spacing. - **Copy feedback:** `CopyButton` (workspace name, SSH command via `CodeExample`, and every other caller), the agent logs copy button, and the user menu's deployment ID item render a `role="status"` span that reads "Copied" while the check icon shows. In the menu, the span sits inside the menu item because `status` is not an allowed child of `menu`. - **Logs loading:** a `role="status"` span outside `CollapsibleContent` reads "Loading logs" while the logs spinner shows. `CollapsibleContent` unmounts when closed, so a region inside it would mount at the same moment as its text. - **Autocomplete loading:** the shared `Autocomplete` (Share Chat "Search for user or group" and the other sharing pickers) announces "Loading" while options load, from a `role="status"` span outside its popover. - **Refresh latencies:** a `role="status"` span next to the proxy menu (outside the menu content, which is non-modal since coder#31969) reads "Refreshing latencies", then "Latencies refreshed". - **Form errors:** the sign in and Settings > Security `ErrorAlert`s now render inside an always-mounted `role="alert"` wrapper. The inner `Alert` gets `role="none"` through a new optional `role` prop, so the message is announced once. The sign in field errors ("Please enter an email address.") are always-mounted `role="alert"` spans; `gap-2` moved to margins so the empty span takes no space. Mutation errors reset on retry, so a repeated failure is announced again. | Ticket | UI surface | | --- | --- | | DEQ-203 | Workspace page: copy workspace name, logs loading spinner, logs copy, SSH command copy | | DEQ-329 | Settings > Security: password update error | | DEQ-82 | Agents: user menu deployment ID copy, Share Chat user and group search loading | | DEQ-480 | Navbar: Refresh latencies, user menu deployment ID copy | | DEQ-560 | Login: field validation errors, "Incorrect email or password." error (includes its detail text) | The `ChatPageContent` story `InterruptingShowsBusyComposer` now picks its status out of several live regions, because chat messages render `CopyButton`s. Closes DEQ-82 Closes DEQ-203 Closes DEQ-329 Closes DEQ-480 Closes DEQ-560 Screen reader announcements were not verified with NVDA here; tests assert that each message lands in a region that existed before it appeared. **Dropped review findings** - No `AgentRow` render test for the logs copy and loading status: rendering `AgentRow` needs agent log websockets. `CopyButton.test.tsx` covers the identical copy pattern. - Not extracting the repeated `<span role="status" className="sr-only">` into a component: about five existing call sites already inline the same span, and a new primitive for one line is premature. <details> <summary>Grouping and decision log</summary> - All four tickets share one root cause (status text with no live region, or a live region mounted together with its text), so they ship as one PR per the one-PR-per-axe-rule convention. 149 non-test lines. - DEQ-82 was added after `agent-ok` was applied. Its first element (deployment ID copy) was already covered by the user menu change. Its second element is fixed in the shared `Autocomplete`. The trigger's inline spinner adds "Loading spinner" to the trigger's accessible name. That predates this PR and is left alone. - `Alert` already had `role="alert"`, yet Deque reported the login and security errors as not announced. Instead of changing `Alert` timing globally, the two affected forms keep an always-mounted region and neutralize the inner role to avoid a double announcement. - Copy feedback uses a sibling span, not text inside the button, so the button's accessible name stays "Copy workspace name". The span is `position: absolute` (`sr-only`), so it adds no flex gap. All 14 `CopyButton` call sites were checked for `space-*`, `divide-*`, `last:` and similar sibling selectors; none apply. - Copy toasts (as in coder#31402) were considered and rejected because they add a visible change that needs design input. - Field errors use `role="alert"` (assertive) to match the form error alert. After a failed submit, the first keystroke that changes the message ("enter an email" to "enter a valid email") is announced once. - Self-review: frontend-review, frontend-deep-review, and frontend-accessibility (code audit, Storybook axe panel not run) passed after fixes. </details> 🤖 Generated by Coder Agents on behalf of @aqandrew.
…val (coder#32212) ## Summary **Unblocks releases after the `coder/coder` lockdown.** Only the `coder-release-publisher` App can now create tags and release branches (rulesets "Release tags (App only)" and "Release branch creation", managed in `coder/github-org-terraform`). Its key is only available in environments that need a **second release manager's approval** (`release-managers`, no self-review, no admin bypass). People can't push release tags anymore, so the tag is now created **inside the approved release run**. ### Releasing (`./scripts/release.sh` works as before, minus one step) 1. Run `./scripts/release.sh` on `release/X.Y` (or `main` for an RC), as today. It still picks the version, checks open PRs and breaking changes, and writes the release notes. 2. Instead of creating and pushing the tag, it checks the commit is already on `origin/<branch>` and dispatches `release.yaml` **on the branch** with `version`, `commit`, `release_channel` and `release_notes`. 3. The releaser prints the run's URL. GitHub also notifies the `release-managers` reviewers. **Another release manager approves** the run's `release` environment (Review deployments). 4. The approved job creates the annotated tag `version` at `commit` with the App, then builds, signs and publishes that commit as before. `release.yaml` can also be run by hand from the Actions UI with the same inputs. ### `release.yaml` - New `version` and `commit` inputs (required unless `dry_run`). - The `release` job checks out `commit`. Before anything else, it: - refuses a malformed version; - refuses a version that doesn't match the branch (`release/X.Y`, or `main`/`release/X.Y` for `-rc.N`); - refuses a commit that isn't already on the dispatched branch; - refuses an existing tag that points elsewhere; - otherwise creates the annotated tag with the App. A re-run reuses a tag already at that commit. `version.sh` and the rest of the job are unchanged. - **Homebrew and the `coder/packages` dispatch use the new `coder-package-publisher` App** (`release-publish` environment) instead of `CDRCI_GITHUB_TOKEN`. The dispatch moves to its own `publish-packages` job in `release-publish`, where that key lives; it's approved together with Homebrew and winget. Winget still uses the `cdrci` machine user, since an App can't open PRs on `microsoft/winget-pkgs`. - Every App token is scoped to one repository and the permissions it needs (`zizmor`'s `github-app` audit: 5 high findings to 0, one of which predates this PR). ### `create-release-branch.yaml` (new) Dispatched on `main` with `version` (e.g. `2.40`) and `commit`. After approval in the `release-refs` environment, it creates `release/X.Y` at that commit, refusing one that isn't on `main` or a branch that already exists. ### `scripts/releaser` - `ReleaseExecutor` drops `CreateTag`/`PushTag`. - `TriggerWorkflow` dispatches on the branch with `version` and `commit`. - An existing tag must already point at HEAD. - After dispatching, it looks up the run (`gh run list`, polling briefly) and prints its URL and the approval steps. ## Before merging - [ ] `RELEASE_APP_ID` and `RELEASE_APP_PRIVATE_KEY` set in the **`release-refs`** environment (currently empty), and the rotated release App key in `release`. - [x] `CODER_PACKAGE_PUBLISHER_APP_ID` / `CODER_PACKAGE_PUBLISHER_APP_PRIVATE_KEY` in `release-publish`; App installed on `homebrew-coder` and `packages`. ## After merging: backport to every branch you release from `release.yaml` runs from the dispatched branch's own copy, and `./scripts/release.sh` runs the branch's releaser. So **each `release/X.Y` needs this change before it can release**. Active lines by recent tags: `release/2.39`, `2.38`, `2.37`, `2.36`, `2.35`, `2.34`, `2.29`. ## Relation to coder#31321 coder#31321 (`Tag release`) runs the releaser non-interactively in CI. This PR is the smaller change that unblocks releases now. coder#31321 can build on it: its tagging job would need `environment: release-refs` (where the App key lives) plus the extra App permissions it asks for, which are a manifest change in `coder/github-org-terraform` `apps/`. ## Testing - `go build`, `go vet`, `go test ./scripts/releaser` pass. - `actionlint` and `zizmor` are clean on both workflows. - Not exercised end to end. Suggest the first use be an RC (`v2.40.0-rc.N` from `main`), watching the tag step. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…oder#32218) ## Summary Replaces the `cdrci`/`cdrci2` personal access tokens in three workflows with short-lived GitHub App tokens. Each token is scoped to one repository and the permissions it needs. | Workflow | Was | Now | | --- | --- | --- | | `aigateway-prices-refresh` | `CDRCI_GITHUB_TOKEN` | `coder-automations` App: contents + pull requests write on `coder/coder`. App-opened PRs still trigger CI. | | `contrib` (CLA) | `CDRCI2_GITHUB_TOKEN` | `coder-cla` App: contents write on `coder/cla` only. | | `audit-docs-paths` | `CDRCI_GITHUB_TOKEN` | `coder-ci-reader` App: contents read on `coder/coder.com` only. | The App IDs and keys are already in the `main` environment, which all three jobs already use. Nothing else in the jobs changes. The `CDRCI_GITHUB_TOKEN` uses in `release.yaml` (winget) are separate: they need a token for a fork on a personal account, which an App can't provide. ## Testing - `actionlint` is clean. - `zizmor`: no new findings. The two it reports (the archived CLA action, and `community-label`'s token) were already on `main`. - After merge: dispatch `aigateway-prices-refresh` once, and comment `recheck` on a community PR to confirm the CLA bot. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
Automated docs update for v2.29.28 release. Created by `releasetui`.
`version.sh` fails when the released commit has two release tags, with a misleading "not tagged with an annotated tag" error. Re-releasing without a new commit (v2.39.3, v2.38.9, v2.37.13) tagged the same commit as the previous release, failed at "Print version", and left a stray tag that only the release App can remove. This fails before creating the tag instead, saying the commit was already released and to merge a new commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Automated docs update for v2.29.29 release. Created by `releasetui`.
…coder#32229) > [!NOTE] > Generated by Coder Agents on behalf of @deansheather. Main builds and releases now build and sign through one shared composite action, so they can't drift apart. PR builds use the same action unsigned, in a job with no environment, so they can't reach signing secrets or identities. Depends on coder/gcp#343, which must merge first. The `release-signer` identity provider only accepts tag-dispatched releases and `ci.yaml`. Since coder#32211 made that login unconditional, releases and non-push main runs already fail today. ## Changes - **`.github/actions/build-coder` (new):** tool setup, then `make` for the given targets. With `sign: true` it signs darwin binaries with the Apple key in Cloud KMS, Windows binaries with EV, and everything with GPG (the legacy key plus the optional KMS key). With `notarize: true` it also notarizes. Composite actions can't read secrets, so callers pass them in. - Signing material goes in a `$RUNNER_TEMP/coder-signing` directory with mode 700 and is removed with `if: always()`. - Signing builds disable the mise, pnpm and rcodesign caches. - KMS signing no longer checks the event or ref. If the provider rejects a run, the build fails loudly. - **`.github/workflows/build.yaml` (new):** the signed main and `release/*` build, moved out of `ci.yaml`. - Triggers: `push` to `main` and `release/*` (ignoring the same docs-only paths as `ci.yaml`'s `changes` filter), plus `create` for `release/*`. No `pull_request` or `workflow_dispatch`. Top-level `permissions: {}`. - The `build` job runs in `ci-signing`. It builds and signs, pushes `coder-preview` tags, then runs SBOM, image attestations and binary attestations (new), and uploads artifacts. - `prune` runs `action-ghcr-prune` in its own job, away from the signing credentials. - `deploy` calls `deploy.yaml`. `notify-slack-on-failure` covers build, prune and deploy failures on main. - **`ci.yaml`:** - The `build` and `deploy` jobs are removed. - `check-build` now runs `make build-slim` through the action, unsigned. That compile-checks all 7 OS/arch targets without the frontend and fat builds. - `check-build` also runs when CI files change. - **`release.yaml`:** - Builds and signs through the action with `notarize: true`. Tagging, base image, images, attestations and publishing are unchanged. - The `refs/tags/*` KMS gate is removed. - The publish step now reads the `release-signer` credentials from the action's output. - **Hardening on top of coder#32211:** - `install-rcodesign` gains a `use-cache` input, which signing jobs set to `false`. Depot caches are shared across branches, so a PR could otherwise plant a binary under the cache key that a signing job would run with signing credentials. - `cargo install --locked` pins rcodesign's dependency tree. I verified the lockfile resolves with the patch at the pinned revision. - `sign_darwin.sh` takes `AC_PKCS11_CREDENTIALS_FILE` and sets `GOOGLE_APPLICATION_CREDENTIALS` only for `rcodesign`. The `release-signer` credentials no longer reach the whole `make` step. - The jsign jar is now verified against a pinned sha256. ## Validation - `make lint/actions/actionlint` passes. zizmor (offline, strict collection) reports no findings. shellcheck passes on every `run` block in the composite actions. - I dry-ran the signing-material and target-parsing logic locally. The kmsp11 config renders correctly and files are mode 600. Multi-line targets parse correctly. - Not run: a real signed build. The first main run after merge should show `.asc` and `.v2.asc` files, rcodesign and jsign output, `coder-preview:main` pushed and dogfood deployed. A release dry run from `main` covers `release.yaml` once #56 lets the `release` environment run on `main`; release branches still carry the old `release.yaml`. ## Follow-ups (manual) - After the first successful signed main build and release, delete `AC_CERTIFICATE_P12_BASE64` and `AC_CERTIFICATE_PASSWORD`. - The Rust toolchain is still whatever `stable` the runner has. Rebuilding rcodesign without the cache adds a few minutes to each signed build. The `release` environment changes and the release-branch `ci.yaml` signing are handled in coder/github-org-terraform#56 and coder/gcp#343. ## Merge order (all 8 PRs) coder/gcp applies on merge, so the order matters. 1. coder/github-org-terraform#56: the `code-signing` environments, tag rulesets, and coder/coder `release` and `release-publish` allowing `main`. This must be applied before an RC can be dispatched from `main`. 2. coder/gcp#343, then coder#32229 right after. Signed `ci.yaml` builds on `main` fail between those two. `release/2.37` to `2.39` keep signing through `ci.yaml` under #343's temporary rule until 2027-02-16. 3. coder/coder-desktop-windows#192, coder/mutagen#19, coder/pr-buddy#69 and coder/xum#8170. 4. coder/gcp#347. Windows signing in those 4 repos breaks if this lands before step 3. <details> <summary>Plan and decision log</summary> **Goal:** main and `release/*` pushes build coderd fully, sign everything (EV, Apple, GPG and KMS GPG) the same way releases do, push `coder-preview`, and deploy dogfood. PRs get a compile check with no signing access. **Verified constraints:** - Signing secrets exist only in the `ci-signing` and `release` environments. There are none at the repo or org level. - `ci-signing` allows `main` and `release/*`. `release` requires `release-managers` with self-review prevented, and admins can't bypass. - `ev-code-signing` (coder-ci) and `release-signer` (coder-release-signing) are bound only to the `environment:ci-signing` and `environment:release` subjects. - The `release-signer` provider condition checks `job_workflow_ref`. A reusable workflow would change that claim, so the shared code is a composite action that runs inside the caller's job. This also keeps the release job as a single job, with no artifact handoff between build and publish. **Decisions:** - The new workflow is named `build.yaml`. - There is no cutover period, so the provider names only `build.yaml`. - Main builds are signed identically to releases. Only notarization and publishing differ, because main doesn't build darwin archives. - `release/*` still gets `coder-preview:release-X.Y` images. - PR `check-build` builds slim binaries only, which keeps the cross-compile coverage at a fraction of the cost. </details>
> 🤖 This PR was modified by Coder Agents on behalf of Jake Howell. Move cited web pages from the separate source-pill row into a compact Sources control in the message action bar, alongside Copy and Attachments. Stacked site icons open a list of cited page titles and hosts, while each search row keeps the pages that search found. Non-HTTP(S) sources remain unlinked. Collect and deduplicate citations across each completed turn so they appear with its final assistant output, including when steps are collapsed. Add regression tests, Storybook coverage, and documentation for the control. <img width="762" height="458" alt="image" src="https://github.com/user-attachments/assets/0bc59d13-6f42-48a6-8c38-46922bbdca50" /> Refs CODAGT-1476. <details> <summary>Review follow-up</summary> Long source titles wrap, non-web URLs remain fully visible, and new-tab links have visual and accessible indicators. Opening Sources focuses the first web link, with dialog fallback when no link exists. The action bar wraps on narrow screens. Attachments and citations share turn splitting, host selection, and completion checks. Folded-block source lookup skips row slicing when a row has no citations. A synthetic 10,000-row helper benchmark improved from 23.9 ms to 5.2 ms (median); this is not an end-to-end rendering measurement. </details>
Switches dogfood from push-based deploys to pull-based, digest-pinned deploys with Flux image automation (SEC-863): - **Remove the push deploy.** Deletes `deploy.yaml` and `scripts/should_deploy.sh`, and drops the `deploy` job from `build.yaml`. CI no longer assumes the AWS deploy role, fetches EKS credentials, runs `flux reconcile` or `kubectl rollout restart`, or retags `:dogfood`, which nothing consumes. `build.yaml` now has no cluster access, and only the signing job's existing `id-token: write` remains. - **`coder.image.digest`** in the `coder`, `provisioner` and `ai-gateway` charts. When set, the image renders as `repo:tag@digest`. Empty (the default) keeps today's output, and existing golden files are unchanged. - **Sortable main tag.** `build.yaml` pushes an extra `main-<commit unix time>-<12 char sha>` tag for every main build, which the Flux `ImagePolicy` orders on. The `prune` job already prunes `^main-` tags older than 30 days. Companion PR: coder/dogfood#857, which installs the image controllers and pins dogfood-cdr by digest. **Merge this one first**: the ai-gateway chart's schema rejects unknown keys, so dogfood's new `digest` value would fail on the current chart. Merging this before dogfood#857 doesn't regress anything. The `dogfood-coder-repo-ci` role's trust was disabled during containment, so the deploy job currently fails at OIDC role assumption on every main build and only sends a failure alert to Slack. Until dogfood#857 is live, dogfood stays on its current image. <details> <summary>Design notes and decision log</summary> - **Delete the deploy instead of keeping a Flux webhook ping.** A ping would only cut latency. Flux scans the registry every 2m, so any trigger can be added later as a notification-controller `Receiver` without giving CI cluster credentials. - **Separate digest value instead of `tag: x@sha256:...`.** Flux's `:tag` and `:digest` setters write separate fields, and no setter writes `tag@digest` into a single field. A dedicated chart value is the documented Flux pattern for HelmReleases and is useful to customers who pin by digest. - **Commit timestamp in the tag.** `git log -1 --format=%ct` makes the tag sort by commit time, which Flux's `numerical` policy selects on. The sha suffix keeps tags unique and traceable. - **Not done here:** - Making the cosign and GitHub attestation steps required. They're still `continue-on-error`. Admission-time signature verification is a separate SEC-863 step. - Removing the AWS role itself and the `AWS_DOGFOOD_*` repo variables. Those are settings outside the repo, and they become unused once this merges. </details> Verified: `go test ./helm/...`, `make lint/helm`, `make lint/actions`. I also rendered the dogfood-cdr values against this branch's charts, and the server, provisioner and ai-gateway images all come out as `ghcr.io/coder/coder-preview:<tag>@sha256:<digest>`. Refs SEC-863 > Generated by Coder Agents on behalf of @deansheather.
…s moving (coder#32099) Stops the pending job reaper from failing jobs in a queue that's still moving. This is an alternative to coder#31469 that came out of Steven's [review](coder#31469 (review)) asking whether 2h is enough, and it builds on George's work there. A pending job past 30m is now only protected while a matching online provisioner is making progress, meaning it finished a job in the last 30m or is running one that's still being updated. A moving queue never gets reaped and a frozen one still does at 30m like today. There's no absolute cap. No migration since it uses the existing `provisioner_jobs_worker_id_organization_id_completed_at_idx`. One tradeoff is that a stuck build whose provisioner keeps heartbeating counts as progress, so if every matching provisioner is stuck like that, the queue waits until that build is canceled. Still a draft so we can talk it through with Spike and Steven. Part of CORE-586 --------- Co-authored-by: George Katsitadze <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
…2256) The `release` job in `release.yaml` checked out the `commit` workflow_dispatch input before validating it. The only check (full SHA, ancestor of the dispatched branch head) ran in the `Create release tag` step, which is skipped when `dry_run` is true. A dry run could therefore check out any ref the repository resolves, such as an unprotected branch, a pull-request head or an unmerged commit, and run its scripts and the local `build-coder` action in the `release` environment with the signing secrets, the OIDC signing identities and the release App token. Changes: - Always check out the dispatched commit (`github.sha`) first. A new step, run from the workflow file and not from the tree being checked, requires `commit` to be a full 40-character SHA that is an ancestor of `GITHUB_SHA`, then switches to it with `git checkout --detach`. This runs for dry runs and real releases before any repository script, local action or credential. Without a `commit` input nothing changes. - Skip `Generate release App token` on dry runs. A dry run creates no release, and `scripts/release/publish.sh --dry-run` never calls `gh`, so it needs no token. - Document that dry runs still sign (to exercise the signing path) and that this relies on the commit check above. The existing check in `Create release tag` stays as a second line of defence. Verification: ran the new step's script against a scratch repository. It accepted an ancestor SHA and the branch head. It refused an unmerged branch SHA, a branch name, `refs/pull/1/head`, an uppercase SHA and a missing SHA, leaving HEAD unchanged. actionlint passes. --- _Generated by [Claude Code](https://claude.ai/code/session_015koAoN7npVzwZjdWhi3V5o)_ Co-authored-by: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 307fb092e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| JOIN groups ON groups.id = spend.effective_group_id | ||
| WHERE groups.organization_id = @organization_id |
There was a problem hiding this comment.
Preserve spend when attributed groups are deleted
When an administrator deletes a custom group after usage has been recorded, DeleteGroupByID physically removes the group while ai_user_daily_spend.effective_group_id has no foreign key, so the aggregate rows remain. This inner join then drops those rows; the same join is repeated in the totals and per-user queries, causing GET /api/experimental/organizations/{organization}/ai/spend to underreport daily and total spend and omit affected users for the rest of the reporting period. Persist the organization attribution with the aggregate or retain enough group metadata to include deleted groups.
Useful? React with 👍 / 👎.
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| sparse-checkout: .github/scripts |
There was a problem hiding this comment.
Check out trusted scripts before exposing workflow secrets
On a same-repository pull request, this checkout defaults to the event's PR/merge content, so .github/scripts is controlled by the branch under review. The following steps execute those scripts while exporting DOC_CHECK_CODER_SESSION_TOKEN and, for the previous-review step, the PR-write github.token; a PR that changes doc-check-previous-trace.sh or doc-check-stop-review.sh can therefore exfiltrate or use those credentials before any review occurs. Pin this checkout to the base/default-branch SHA and fetch PR data separately.
Useful? React with 👍 / 👎.
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Move the read permission to the job
This new workflow grants contents: read at workflow scope instead of denying permissions globally and opting the create job in. That makes any future job silently inherit repository read access and directly violates the repository's GitHub Actions permission boundary; use top-level permissions: {} and add contents: read under jobs.create.permissions.
AGENTS.md reference: AGENTS.md:L82-L82
Useful? React with 👍 / 👎.
| {href && hostname && ( | ||
| <img | ||
| src={`https://www.google.com/s2/favicons?domain=${encodeURIComponent(hostname)}&sz=16`} | ||
| alt="" |
There was a problem hiding this comment.
Avoid automatically disclosing cited hostnames to Google
When a completed answer cites an HTTP(S) hostname, the always-mounted trigger now requests its favicon from Google's S2 service without any user interaction. Merely viewing an answer can therefore disclose the first three cited hostnames—including private or internal names—to www.google.com; previously these requests were inside ToolCall.Content, which did not mount until the user explicitly expanded Sources. Use local or generic icons in the collapsed trigger, or defer external favicon loading until the popover is opened.
Useful? React with 👍 / 👎.
Merges upstream
coder/codermain up to b4f8b67 (2026-11-16 14:43Z, the newest commit at least 24 hours old, the same target the daily sync script picks). Takes over the hand merge from #362; the fork was 56 commits behind this target. New upstream migration: 000642_context_resource_plugin_name, routedcoreby chatdmig (routes.txt updated); no mixed routes, so this PR does not need Mike.Conflict resolutions (14 files)
Hand-merged, preserving fork behavior and taking upstream elsewhere:
agent/proto/agent.proto: upstream addedPluginBody plugin = 18to the body oneof and aPluginBodymessage; the fork hadSubagentBody subagent = 100with its tag-100 fork-reservation comment. Both kept; fork tags stay clear of upstream additions.coderd/database/queries/chats.sql: both sides extended the context-diff predicate; upstreamplugin_name =and the forksource_path IS NOT DISTINCT FROMmarkers are both kept in both branches of the query.coderd/x/chatd/context_prompt.go: doc comments only; took upstream wording (plugin is now a tracked kind).coderd/agentapi/api.go,context.go: upstream added anExperimentsfield/Pluginbody marshal case; the fourFork*experiment fields andmarshalSubagentBodyare kept alongside.codersdk/deployment_test.go: display-name map now covers both the forkpluginsand the upstreamagent-pluginsexperiments.docs/coder-agents/architecture.md: tool table taken from upstream (no fork content).siteChatTopBar/ConversationTimeline stories: upstream switched the chat title to<h2>; forkForkAgentTypeBadge/ForkSubagentSlotBadgerestored after it, and the fork async ask-user-question stories kept before upstream's citations story.Regenerated files
agent.pb.go,queries.sql.go/querier.go, apidocdocs.go/swagger.json,docs/reference/api/*.mdandsite/src/api/typesGenerated.tswere regenerated with the repo generators (pinned protoc 23.4 / sqlc / swag / apitypings) instead of hand-merged.Fork fallout fixed
Upstream changed
chatstate.ChatMachine.Updateto take and return a*chatstate.ChatSnapshot; five fork call sites (fork_archive_agent.go,fork_context.go,fork_isolation_cleanup.go,fork_isolation_workspace.go) and three fork test files were updated to the new signature. Upstream also replaced the legacy queued-message queries (InsertChatQueuedMessage,DeleteAllChatQueuedMessages,SoftDeleteChatMessageByID) with...WithCreator/...ReturningCountvariants; the three fork test files that poked the old queries now use the current ones (raw SQL for the per-message soft delete) instead of restoring test-only queries.Validation
Local:
go build ./...green;go test ./codersdk/...and./coderd/agentapi/...green; chatd/database/chatdmig/site suites could not get a clean local run (Colima slot ended; chatd/database/chatdmig are covered by fork-ci here). New upstream migrations routecore.