Skip to content

Commit b7d60a0

Browse files
committed
Merge branch 'main' into chatd-list-templates-telemetry
Resolve conflicts in listtemplates.go, listtemplates_internal_test.go, and listtemplates_test.go by taking the branch version: main's squashed "rank chat workspace templates" (#25037) is byte-identical to this branch's pre-telemetry base for those files, so the branch already contains all of main's changes there plus the telemetry additions.
2 parents 137ccf9 + a5a4c49 commit b7d60a0

183 files changed

Lines changed: 7427 additions & 5169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/docs/DOCS_STYLE_GUIDE.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# Documentation Style Guide
22

3-
This guide documents prose, structure, and formatting patterns for documentation files in the `docs/` directory. It complements, and does not replace, the canonical content rules.
3+
This guide documents structure, research, and content patterns for documentation files in the `docs/` directory. It complements, and does not replace, the canonical content rules or the prose style guide.
44

55
> [!IMPORTANT]
66
> **What belongs in the docs (and what doesn't)** is governed by
77
> [`docs/.style/content-guidelines.md`](../../docs/.style/content-guidelines.md).
88
> Read that first. When this style guide conflicts with the content
9-
> guidelines, the content guidelines govern. This file covers prose,
10-
> formatting, and structural conventions only.
9+
> guidelines, the content guidelines govern.
10+
>
11+
> **For prose rules**, the canonical Coder documentation style guide lives
12+
> at [`docs/.style/style-guide.md`](../../docs/.style/style-guide.md) and
13+
> will be enforced by the Vale rules under `docs/.style/styles/Coder/`.
14+
> That guide is currently a scaffold; continue using the **Writing Style**
15+
> section below until it is populated. This file also remains authoritative
16+
> for structure, research, and content patterns.
1117
1218
See [CONTRIBUTING.md](../../docs/about/contributing/CONTRIBUTING.md) for general contribution guidelines.
1319

.github/.linkspector.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ excludedDirs:
66
- docs/reference
77
# Older changelogs may contain broken links
88
- docs/changelogs
9+
# Contributor-facing style guide and Vale config. Not deployed to
10+
# coder.com/docs; chasing external links here is overkill.
11+
- docs/.style
912
ignorePatterns:
1013
- pattern: "localhost"
1114
- pattern: "example.com"

.github/workflows/deploy-docs.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ on:
4545
# Intentionally only docs/**. Edits to this workflow file must not
4646
# auto-trigger a production reindex; use workflow_dispatch instead.
4747
# See DOCS-121 (incident) and DOCS-124 (fix).
48+
#
49+
# docs/.style/** is contributor tooling and never deploys to
50+
# coder.com/docs. Negating it here skips the workflow on .style-only
51+
# commits. GitHub Actions only suppresses when every changed file
52+
# matches a negation, so mixed commits still trigger; the surgical
53+
# diff step below drops .style paths from the payload.
4854
- "docs/**"
55+
- "!docs/.style/**"
4956
release:
5057
# Fires when a draft release is published, when a release goes from
5158
# prerelease to non-prerelease, or when a release is created already
@@ -174,7 +181,11 @@ jobs:
174181
# + save) from deleted/renamed-old-side (delete only), and
175182
# so paths containing whitespace or quotes survive intact.
176183
DIFF_FILE=$(mktemp)
177-
git diff --name-status -z "$BEFORE_SHA" "$AFTER_SHA" -- 'docs/**/*.md' > "$DIFF_FILE"
184+
# 'docs/**/*.md' to keep markdown-only paths, ':(exclude)docs/.style/**'
185+
# so contributor-tooling pages never reach the surgical-reindex payload
186+
# on mixed commits. The trigger filter already short-circuits .style-only
187+
# pushes; this is defense in depth.
188+
git diff --name-status -z "$BEFORE_SHA" "$AFTER_SHA" -- 'docs/**/*.md' ':(exclude)docs/.style/**' > "$DIFF_FILE"
178189
# Parse the NUL-delimited diff into <path>\t<status> lines.
179190
# `--name-status -z` uses NUL between fields and between
180191
# records, with a special twist for renames: the record is

.github/workflows/docs-preview.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ on:
2424
- reopened
2525
paths:
2626
- "docs/**"
27+
# docs/.style/** is contributor tooling and never deploys to coder.com.
28+
# Skipping the workflow on .style-only PRs avoids posting a preview
29+
# link that 404s, since manifest-driven coder.com routing rejects
30+
# paths under .style. Mixed PRs still trigger; the selection logic
31+
# below filters .style files out of the preview-target pick.
32+
- "!docs/.style/**"
2733

2834
concurrency:
2935
group: docs-preview-${{ github.event.pull_request.number }}
@@ -69,11 +75,18 @@ jobs:
6975
"repos/${REPO}/pulls/${PR_NUMBER}/files" \
7076
--jq '.[] | select(.status != "removed") | .filename')
7177
72-
# Pick the first Markdown file under docs/. `|| true` keeps
73-
# the pipeline from failing when grep finds no matches or
74-
# head triggers SIGPIPE under `set -o pipefail`.
78+
# Pick the first Markdown file under docs/, excluding the
79+
# contributor-tooling subtree at docs/.style/**. Mixed PRs that
80+
# touch both .style and a public docs page should land the
81+
# preview link on the public page; .style-only PRs already get
82+
# short-circuited by the trigger filter above and never reach
83+
# this code path.
84+
#
85+
# `|| true` keeps the pipeline from failing when grep finds no
86+
# matches or head triggers SIGPIPE under `set -o pipefail`.
7587
first_doc=$(printf '%s\n' "$all_files" \
7688
| grep -E '^docs/.*\.md$' \
89+
| grep -v '^docs/\.style/' \
7790
| head -n 1) || true
7891
7992
if [ -z "$first_doc" ]; then

.github/workflows/weekly-docs.yaml

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,83 @@ jobs:
117117
# See: https://github.com/UmbrellaDocs/action-linkspector/issues/62
118118
PUPPETEER_EXECUTABLE_PATH: ${{ needs.prepare-linkspector-browser.outputs.chrome-path }}
119119
with:
120-
reporter: github-pr-review
120+
# On PRs, use github-pr-review for inline comments. On schedule/dispatch,
121+
# use local so reviewdog actually reports failures instead of silently
122+
# exiting 0 (github-pr-review requires a PR context).
123+
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'local' }}
121124
config_file: ".github/.linkspector.yml"
122125
fail_on_error: "true"
123-
filter_mode: "file"
126+
filter_mode: ${{ github.event_name == 'pull_request' && 'file' || 'nofilter' }}
124127

125128
- name: Send Slack notification
126-
if: failure() && github.event_name == 'schedule'
129+
if: failure() && github.event_name != 'pull_request'
127130
run: |
128131
curl \
129132
-X POST \
130133
-H 'Content-type: application/json' \
131-
-d '{"msg":"Broken links found in the documentation. Please check the logs at '"${LOGS_URL}"'"}' "${{ secrets.DOCS_LINK_SLACK_WEBHOOK }}"
134+
-d '{"text":":warning: *Broken links found in the documentation.*\nPlease check the logs: '"${LOGS_URL}"'"}' "${{ secrets.DOCS_LINK_SLACK_WEBHOOK }}"
135+
echo "Sent Slack notification"
136+
env:
137+
LOGS_URL: https://github.com/coder/coder/actions/runs/${{ github.run_id }}
138+
139+
audit-docs-paths:
140+
runs-on: ubuntu-22.04
141+
permissions:
142+
contents: read
143+
steps:
144+
- name: Harden Runner
145+
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
146+
with:
147+
egress-policy: audit
148+
149+
- name: Checkout
150+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
151+
with:
152+
persist-credentials: false
153+
154+
- name: Check for audit script
155+
id: check-script
156+
run: |
157+
if [ ! -f site/scripts/audit-docs-paths.mjs ]; then
158+
echo "::notice::Audit script not yet available (pending PR #25740). Skipping."
159+
echo "skip=true" >> "$GITHUB_OUTPUT"
160+
fi
161+
162+
- name: Set up mise tools
163+
if: steps.check-script.outputs.skip != 'true'
164+
uses: ./.github/actions/setup-mise
165+
with:
166+
install-args: "node"
167+
168+
- name: Fetch redirects.json
169+
if: steps.check-script.outputs.skip != 'true'
170+
run: |
171+
curl -sfL \
172+
https://raw.githubusercontent.com/coder/coder.com/main/redirects.json \
173+
-o /tmp/redirects.json
174+
175+
- name: Audit TS/TSX docs paths against redirects
176+
if: steps.check-script.outputs.skip != 'true'
177+
run: |
178+
node site/scripts/audit-docs-paths.mjs \
179+
--redirects=/tmp/redirects.json \
180+
--roots=site/src \
181+
--out=/tmp/audit-report.md 2>&1 | tee /tmp/audit-output.txt
182+
183+
count=$(grep -oP 'Total findings: \K\d+' /tmp/audit-output.txt || echo "0")
184+
if [ "$count" -gt 0 ]; then
185+
echo "::error::Found $count stale docs path(s) pointing at redirect sources"
186+
cat /tmp/audit-report.md >> "$GITHUB_STEP_SUMMARY"
187+
exit 1
188+
fi
189+
190+
- name: Send Slack notification
191+
if: failure() && github.event_name != 'pull_request'
192+
run: |
193+
curl \
194+
-X POST \
195+
-H 'Content-type: application/json' \
196+
-d '{"text":":warning: *Stale docs paths found in site/src/.*\nTS/TSX files reference docs URLs that now redirect. Please check the logs: '"${LOGS_URL}"'"}' "${{ secrets.DOCS_LINK_SLACK_WEBHOOK }}"
132197
echo "Sent Slack notification"
133198
env:
134199
LOGS_URL: https://github.com/coder/coder/actions/runs/${{ github.run_id }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,9 @@ license.txt
115115

116116
# Agent planning documents (local working files).
117117
docs/plans/
118+
119+
# Local audit reports (e.g. site/scripts/audit-docs-paths.mjs output).
120+
# The file is for local inspection only.
121+
docs/.audit/
122+
118123
/release-action

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Rule #1: If you want exception to ANY rule, YOU MUST STOP and get explicit permi
1212
- Docs content scope: Use [Coder Docs Content Guidelines](docs/.style/content-guidelines.md) to decide whether a piece of content belongs in `docs/` at all. The Documentation Style Guide above covers prose and formatting; the content guidelines govern scope and routing and supersede the style guide on conflicts.
1313
- Compatibility: `.agents/docs` symlinks to `.claude/docs` for agent runtimes that look there.
1414
- Frontend: Read [Frontend Development Guidelines](site/AGENTS.md) before changing anything under `site/`.
15+
- Docs prose: When editing anything under `docs/`, see the prose style guide at [`docs/.style/style-guide.md`](docs/.style/style-guide.md). It is currently a scaffold; until it is populated, use the **Writing Style** section in [`.claude/docs/DOCS_STYLE_GUIDE.md`](.claude/docs/DOCS_STYLE_GUIDE.md). That file also covers structure, research, and content patterns.
1516

1617
## Foundational rules
1718

@@ -84,6 +85,10 @@ instructions focused on guardrails that agents should see immediately.
8485
[OAuth2 Development Guide](.claude/docs/OAUTH2.md). OAuth2 endpoints must
8586
use RFC-compliant errors such as `writeOAuth2Error(...)`, and public
8687
endpoints that need system access should use `dbauthz.AsSystemRestricted`.
88+
- **Chatd**: consult [Chatd Architecture](coderd/x/chatd/ARCHITECTURE.md) to
89+
understand the architecture of the chatd subsystem. If you update the
90+
chatd subsystem in ways that affect the architecture, you must update the
91+
architecture document.
8792
- **API design**: Follow the API guardrails in
8893
[Development Workflows and Guidelines](.claude/docs/WORKFLOWS.md),
8994
including swagger annotations for new public HTTP endpoints.

cli/testdata/coder_server_--help.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,5 +982,9 @@ These options are only available in the Enterprise Edition.
982982
Enables SCIM and sets the authentication header for the built-in SCIM
983983
server. New users are automatically created with OIDC authentication.
984984

985+
--scim-use-legacy bool, $CODER_SCIM_USE_LEGACY (default: true)
986+
Use the legacy SCIM implementation instead of the SCIM 2.0 handler.
987+
This is provided for backward compatibility for existing users.
988+
985989
———
986990
Run `coder --help` for a list of global options.

cli/testdata/server-config.yaml.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,10 @@ sshKeygenAlgorithm: ed25519
519519
# URL to use for agent troubleshooting when not set in the template.
520520
# (default: https://coder.com/docs/admin/templates/troubleshooting, type: url)
521521
agentFallbackTroubleshootingURL: https://coder.com/docs/admin/templates/troubleshooting
522+
# Use the legacy SCIM implementation instead of the SCIM 2.0 handler. This is
523+
# provided for backward compatibility for existing users.
524+
# (default: true, type: bool)
525+
scimUseLegacy: true
522526
# Disable workspace apps that are not served from subdomains. Path-based apps can
523527
# make requests to the Coder API and pose a security risk when the workspace
524528
# serves malicious JavaScript. This is recommended for security purposes if a

0 commit comments

Comments
 (0)