Skip to content

docs: amend and accept ADR 077 on the /api/v1 prefix - #2356

Merged
fforootd merged 3 commits into
mainfrom
claude/api-v1-merge-impact-506209
Nov 1, 2026
Merged

fforootd merged 3 commits into
mainfrom
claude/api-v1-merge-impact-506209

Conversation

@fforootd

@fforootd fforootd commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

Checking the proposal against the code showed that more moves than the mount and the client base URL. This amends ADR 077 before accepting it:

  • §2 Probes. /livez and /readyz stay operations of the spec, which the console reads through the client, so they answer under /api/v1 too; the root stays their home for good. /healthz is gone since fix!: make /readyz check the database and remove /healthz #2308. The protocol bullet cites ADR 081's /oauth/.
  • §4 Alias. A root-path response carries Deprecation (the date the prefix shipped) and Link rel="deprecation"; probes and 405s never do; no Sunset until GA has a date. GA removes the alias once the measured root-path traffic has died down.
  • §5 What changes.
    • Server: two ogen servers over one handler, the root one marking its spans and metrics; the path readers (session no-store rule, audit) handle both spellings.
    • Clients: the Go client module gets a helper that adds the prefix to an origin.
    • Origins stay origins; a client given one that ends in /api/v1 drops it.
    • Apps: replaces "Apps need no change". The project-secret gate, the session-cookie handling and the hosted cloud's bot check in front of the sign-in widget decide by path, so until 1.0.0 every such check accepts both spellings. zitadel doctor --fix rewrites a dev proxy an earlier CLI wrote; a hand-written proxy must be changed before its app upgrades.
    • Versions: a self-hosted server upgrades before its apps; zitadel start and zitadel setup check the version of a local server they find running; a client that gets req.not_found says the server may predate the prefix.
    • Rollout: every step leaves every mix of versions working.
  • Negative consequences and documentation impact name the proxies that decide by path, the SDK proxy page and the console's ADRs and AGENTS.md.
  • The ADR index row, the glossary (§7 and its renames row), the API design guide and the resource map say the prefix is accepted but not shipped, and drop the login UI they listed at the root.

Validation

  • node scripts/check-adrs-index.mjs: ok (82 records).
  • Every relative link and heading anchor in the changed files resolves (115 links, 0 broken).
  • node scripts/check-pr-title.mjs --title "docs: amend and accept ADR 077 on the /api/v1 prefix": ok.

Release notes / changeset

  • No changeset required — no shipped behavior changed.

Notes

🤖 Generated with Claude Code

Checking the proposal against the code showed that more moves than the
mount and the client base URL. The project secret, the SDKs' session-cookie
handling, the dev proxies the CLI writes and the production proxies the docs
describe all decide by exact path; so do the session no-store rule and the
audit's route fallback in the server.

The amendment keeps the probes in the spec and at the root for good, gives
the root alias a Deprecation header and a measure of its traffic, has every
path check accept both spellings until 1.0.0 (with a doctor --fix migration
for scaffolded proxies), and orders the rollout so every mix of versions
keeps working. The design docs say the prefix is accepted but not shipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Oct 31, 2026 10:31pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: 76c8ebc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

fforootd and others added 2 commits October 31, 2026 15:28
…mpact-506209

No conflicts. Brings the branch up to date so the PRs stacked on it show
only their own changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hosted cloud's functions check the sign-in widget's flow writes for
bots by path (ADR 084), so section 5 lists them with the checks that
accept both spellings. The version check a separate PR proposed for
every CLI command is not part of this rollout; section 5 names the
checks zitadel start and zitadel setup already make.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fforootd added a commit that referenced this pull request Oct 31, 2026
…ath-gates

Stacks this PR on #2356 (ADR 077's amendment), so the stack's top tests
the whole change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fforootd added a commit that referenced this pull request Oct 31, 2026
Stacks this PR on #2357 (the path checks that accept both spellings),
itself on #2356, so the stack's top tests the whole change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fforootd added a commit that referenced this pull request Oct 31, 2026
Stacks this PR on #2358 instead of the merge branch of #2357 and #2358,
and brings in main through them. Conflicts:

- ADR 077, its README row and the design docs keep this PR's
  "Implemented" and "shipped" wording, with #2356's new section 5 text
  and main's other edits to the resource map.
- The console's Vite config is main's, restructured for the cloud's
  add-on, with this PR's proxy for /api/v1; the test base moved to
  vitest.config.ts, which now names the origin. The console's specs that
  main added or changed call /api/v1, as the rest do.
- sdk-core's revokeSession (ADR 083, main) asks for the CSRF token and
  revokes under the prefix; its tests and the six server SDKs' tests take
  main's cookie names and this PR's prefixed URLs.
- The scaffold guidance, sdk-next's docs, the CLI's SKILL.md, the
  console README and src/api/zitadel.ts take main's text with this PR's
  /api/v1 paths. The CLI's local-server tests and console-real's
  response match take main's cases on the prefixed paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fforootd
fforootd added this pull request to stack #2564 October 31, 2026 22:42
@fforootd
fforootd marked this pull request as ready for review October 31, 2026 23:55
Copilot AI balanced review requested due to automatic review settings October 31, 2026 23:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-31T23:57:45.070939Z 76c8ebc Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation-only change has no outstanding review comments or unresolved defects, as the status consistency, cross-references, dates, and changeset determination were all checked without any issues raised.

No open issues 🎉

What changed in this PR

This PR amends and accepts ADR 077, which moves the resource API from the root to the /api/v1/ prefix. It's the bottom of a four-PR stack (#2356→#2357→#2358→#2359); this step is documentation-only and flips the ADR from Proposed to Accepted after reconciling the proposal with the actual code, without shipping any behavior change. The amendment expands §2 (probes stay spec operations and answer under both the root and the prefix), §4 (the root alias carries Deprecation/Link headers and its traffic is measured), and §5 (the by-path checks, client/server version ordering, and rollout sequencing), and propagates the "accepted but not shipped" state to the design docs.

Changes:

  • Updates ADR 077's status to Accepted and rewrites §2/§4/§5, Risks, and Documentation impact to match the real implementation plan.
  • Flips the ADR index row for 077 to Accepted with an expanded summary.
  • Updates the glossary, resource-map, and API design README from RECOMMENDED/Proposed to LOCKED/Accepted ("not shipped yet"), and drops the login UI from the root-path lists.
File Description
docs/​adrs/​077-api-path-prefix.md Core amendment: status → Accepted, revised §2 (probes), §4 (deprecation headers/measurement), §5 (by-path checks, versions, rollout), Risks, and Documentation impact.
docs/​adrs/​README.md Index row for ADR 077 updated to Accepted with an expanded summary; status matches the ADR body for the index checker.
docs/​design/​glossary.md §7 and the renames row changed from RECOMMENDED/Proposed to LOCKED/Accepted, "not shipped yet"; login UI dropped from root list.
docs/​design/​api/​resource-map.md "How to read" note updated to ADR 077 Accepted, prefix not yet implemented.
docs/​design/​api/​README.md Thesis updated to Accepted framing and drops the login UI from the root-path list.

Review effort: Balanced

@fforootd
fforootd added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 17f84f7 Nov 1, 2026
23 checks passed
@fforootd
fforootd deleted the claude/api-v1-merge-impact-506209 branch November 1, 2026 03:36
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Nov 1, 2026
fforootd added a commit that referenced this pull request Nov 1, 2026
…-catalog-mock

Main serves the API under /api/v1 and routes only the server's own paths
to it in the cloud (#2356 to #2359, #2566):

- buildHTTPMux takes main's api.Servers and keeps this branch's cron
  triggers; a job no trigger runs leaves its path to the root alias.
- vercel.json and the cloud runbook route /cron/usage to the server, as
  /cron/events-retention, or the usage cron would reach the website.
- The functions' and the console's usage specs answer under /api/v1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 76c8ebc0 Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants