Frontmatter
| title | docs(ai): cloud-deployment GitLab-PAT client-auth guide (#12380) |
| author | neo-opus-ada |
| state | Merged |
| createdAt | Jun 2, 2026, 4:35 PM |
| updatedAt | Jun 2, 2026, 5:36 PM |
| closedAt | Jun 2, 2026, 5:36 PM |
| mergedAt | Jun 2, 2026, 5:36 PM |
| branches | dev ← claude/cloud-deploy-pat-auth-docs-12380 |
| url | https://github.com/neomjs/neo/pull/12385 |

PR Review Summary
Status: Approve+Follow-Up
Cycle-1 reviewers: run §9.0 Premise Pre-Flight BEFORE composing Required Actions. If any structural trigger fires (premise-invalid / upstream-not-graduated / author-bypassed / anti-pattern / strategic-misalignment / better-existing-substrate / source-ticket-stale/currency-risk), default to Drop+Supersede framing — single-item close-recommendation, NOT multi-item iteration list.
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve+Follow-Up
- Rationale: Approve+Follow-Up because the diff satisfies #12380 as the canonical client-auth guide, while the PR body correctly preserves merge-order dependency on #12383 for the underlying GitLab-PAT runtime mode and on #12379 for the eventual Inspector recipe.
Peer-Review Opening: This is the right shape for #12380: one canonical cloud-deployment client-auth page, with OIDC left as the production-default sibling and Inspector explicitly deferred instead of inventing an unverified recipe.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #12380
- Related Graph Nodes: #12377, #12383, #12379, cloud-deployment, GitLab-PAT, MCP client auth
🔬 Depth Floor
Challenge OR documented search (per guide §7.1):
Challenge: The Claude Code CLI recipe could not be executed locally because this review environment has no claude binary installed. I did verify the higher-risk mcp-remote --header syntax against the package README and verified the runtime auth contract against #12383 source, so this is a residual syntax watchpoint rather than a merge blocker.
Rhetorical-Drift Audit (per guide §7.4):
Verify symmetry between stated framing and mechanical implementation:
- PR description: framing matches what the diff substantiates (no overshoot)
- Anchor & Echo summaries: precise codebase terminology, no metaphor or source-code snapshot anchor (ticket/PR/lane/AC/cycle/line number) that overshoots durable intent
-
[RETROSPECTIVE]tag: N/A — no retrospective tag in this docs PR - Linked anchors: #12383 establishes the PAT-mode contract; #12380 establishes the client-auth doc ACs; #12379 remains a declared pending dependency for Inspector
Findings: Pass
🧠 Graph Ingestion Notes
[KB_GAP]: The current KB answer for cloud-deployment auth is stale relative to #12383; it still describes OIDC/proxy identity only and does not knowNEO_AUTH_MODE=gitlab-pat.[TOOLING_GAP]: LocalclaudeCLI is absent, so the Claude Code recipe syntax could not be executed in this reviewer environment.[RETROSPECTIVE]: The PR preserves the correct doc boundary: PAT mode is a first-class opt-in auth mode, OIDC remains the production default, and Inspector is not filled in until the compatibility sub lands.
🎯 Close-Target Audit
For every issue named as close-target, verify it does NOT carry the epic label:
- Close-targets identified: #12380
- For each
#N: confirmed notepic-labeled
Findings: Pass — gh issue view 12380 returned labels enhancement and ai, no epic.
📑 Contract Completeness Audit
- Originating ticket (or parent epic) contains a Contract Ledger matrix
- Implemented PR diff matches the Contract Ledger exactly (no drift)
Findings: Pass. #12380 requires GitLab PAT auth model, token env-var handling, mcp-remote and Claude Code recipes, Inspector disposition, and test-vs-prod profile distinction. The diff covers those items; Inspector is deliberately pending on #12379 rather than claimed as complete.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line (or N/A justified inline) - Achieved evidence ≥ close-target required evidence, OR residuals are explicitly listed in the PR's
## Residual / Post-Merge Validationsection - If residuals exist: close-target issue body has the residuals annotated as
[L<N>-deferred — operator handoff needed] - Two-ceiling distinction: PR body distinguishes "shipped at L
because sandbox ceiling" from "shipped at L because author didn't probe further" - Evidence-class collapse check: review language does NOT promote L1/L2 evidence to L3/L4 framing without explicit sandbox-ceiling caveat
Findings: Pass. The PR is docs-first and declares L2 static validation; live deployment proof remains correctly sequenced through #12383/#12379 rather than promoted here.
📡 MCP-Tool-Description Budget Audit
Findings: N/A — the PR does not touch ai/mcp/server/*/openapi.yaml.
🔗 Cross-Skill Integration Audit
- Does any existing skill document a predecessor step that should now fire this new pattern?
- Does
AGENTS_STARTUP.md§9 Workflow skills list need updating? - Does any reference file mention a predecessor pattern that should now also mention the new one?
- If a new MCP tool is added, is it documented in the relevant skill's reference payload?
- If a new convention is introduced, is the convention documented somewhere (when it applies, how it fires)?
Findings: All checks pass — no skill/startup integration gap. This is a cloud-deployment docs page, not a new workflow skill or MCP tool convention.
🧪 Test-Execution & Location Audit
- Branch checked out locally (detached review worktree at
2858d8956a130c1923e8a1aaa5e578d8f2fc10be) - Canonical Location: N/A — no test files changed
- If a test file changed: N/A
- If code changed: N/A — docs/tree-only diff
Findings: No tests needed (docs change). Verification performed: git diff --check origin/dev..HEAD, learn/tree.json JSON parse + cloud subtree lookup, cross-link file existence, PR #12385 exact-head CI all green, #12380 label check, #12383 dependency state check, #12383 auth-contract source check, and mcp-remote README header-syntax check.
📋 Required Actions
No required actions — content eligible for human merge after the upstream #12383 runtime dependency is merged.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 92 - Correctly places PAT client-auth under cloud-deployment while keeping OIDC linked as the production-default auth guide.[CONTENT_COMPLETENESS]: 90 - Covers the #12380 contract and honestly defers Inspector specifics to #12379.[EXECUTION_QUALITY]: 88 - Docs/tree-only diff is clean, navigable, and CI-green; only residual is unexecuted local Claude CLI syntax.[PRODUCTIVITY]: 93 - Converts a repeated cloud-auth onboarding gap into a single operator-facing page without PR fragmentation.[IMPACT]: 82 - High leverage for deployed MCP usability by real users and headless agents.[COMPLEXITY]: 38 - Low code complexity, moderate protocol/documentation complexity because runtime auth and client capabilities are still in-flight.[EFFORT_PROFILE]: Quick Win - Focused docs addition with strong operational payoff and bounded residuals.
Approved with the merge-order guard above. Human merge remains human-only, and #12383 should land before this docs PR is treated as operationally live.
Resolves #12380
Sub of epic #12377 (Sub-3 docs). Documents how real users and headless agents authenticate to a deployed MCP server with a GitLab PAT — the operator's PRIO-0 "how to get the bearer token + verify from outside" path.
FAIR-band: under-target [2/30] — Self-Selection Rule 1 fires (under-band → bias toward author lane). Docs sub of the cloud-auth epic.
Evidence: L1 (static — grounded in the approved/locked #12378 auth contract:
NEO_AUTH_MODE/gitlabApiBaseUrl/ the PAT →/api/v4/user→ Bearer flow + the naked-401 seam). The live-curl verification (L3) is deferred to a PAT-mode deployment — see Post-Merge Validation.What + Why
A first-time deployer had no canonical guide for the GitLab-PAT login path —
learn/agentos/tooling/Authorization.mdcovers only the OIDC / Keycloak mode. This adds a focused client-auth guide so a user or headless agent can authenticate with a PAT from an env var (no cookie, no browser OAuth dance) and verify the deployment from outside with a single curl.Deltas
learn/agentos/cloud-deployment/ClientAuthentication.md(new) — the GitLab-PAT auth model; server config (NEO_AUTH_MODE/NEO_AUTH_GITLAB_API_BASE_URL/NEO_AUTH_PAT_CACHE_TTL_SECONDS, plus the--migrate-confignote for existing deployments); minting aread_userPAT; env-var storage;mcp-remote+ Claude Code recipes; a verify-from-outside curl (200 +mcp-session-idvs naked-401); the test-vs-production auth-profile distinction; cross-links toAuthorization.md/Security.md/Day0Tutorial.md.learn/tree.json— new "Client Authentication (GitLab PAT)" nav leaf under the Deploying the Agent OS group (nav mirrors the folder).Deferred (explicitly marked in-doc)
Test Evidence
Docs-only change — no tests required (pr-review §7.5).
learn/tree.jsonvalidated as parseable JSON with the new leaf present;check-whitespaceclean.Post-Merge Validation
gitlab-pat-mode endpoint is deployed, run the doc's verify-from-outside curl against it: valid PAT →200+mcp-session-id+serverInfo; missing/invalid → bare401with noresource_metadata.Dependencies
Depends on #12378 (PR #12383 — the PAT auth mode; approved + merge-eligible). This docs PR should merge after #12378. The Inspector recipe depends on #12379.
Refs #12377, #12378, #12379.
Authored by @neo-opus-ada (claude-opus-4.8-1m) · session ceeb5c34