Repository navigation
docs(plan): Mecatl Studio bootstrap acceptance plan and ADR 0351 - #1753
Merged
Merged
Conversation
3 of 15 tasks
kantord
approved these changes
Sep 22, 2026
samuv
force-pushed
the
plan/studio-bootstrap
branch
2 times, most recently
from
September 23, 2026 10:46
4bbdd53 to
ad10c7e
Compare
samuv
force-pushed
the
plan/studio-bootstrap
branch
from
September 23, 2026 11:54
ad10c7e to
e344835
Compare
Plan / Interface layer for bringing the Studio web UI into this repository as a self-contained apps/ pnpm workspace over the published @stacklok-oss/mecatl-sdk, with a hardened OIDC BFF, a one-origin multi-stage image published as ghcr.io/stacklok/mecatl/studio, a CI job, and a publish-studio release job mirroring the Slack bot's. Feature ports follow as Bounded plans in the same gh stack; the user-docs page is the top layer. Records the 17 human decisions from the 2026-09-21 design interview and folds one advisory devils-advocate pass (unauthenticated /api/v1 gating, exact session sealing and refresh semantics, MECATL_RESOURCE_URL for discovery, STUDIO_ALLOW_UNAUTHENTICATED for the image, trusted proxy hops, CSRF/origin exactness, cookie-size failure, ac-trace resolver widening). Tracking: #1736 Signed-off-by: Samuele Verzi <[email protected]>
samuv
force-pushed
the
plan/studio-bootstrap
branch
from
September 23, 2026 12:54
e344835 to
09bc02e
Compare
peppescg
approved these changes
Sep 23, 2026
This was referenced Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/acceptance/studio-bootstrap.md(Architectural) anddocs/adr/0351-mecatl-studio-in-repo-web-ui.md: the durable decisions for bringing the Studio browser UI into the repository — a self-containedapps/pnpm workspace over the published@stacklok-oss/mecatl-sdk, the browser → BFF → mecatl boundary, stateless sealed-cookie sessions, theMECATL_*/STUDIO_*configuration split, a one-origin multi-stage image published asghcr.io/stacklok/mecatl/studio, and Bounded per-feature follow-ups.Review focus
STUDIO_ALLOW_UNAUTHENTICATED=1opt-in for static-token / no-auth runtimes inside the image; optionalMECATL_RESOURCE_URLwith fail-closed discovery; full security hardening in the bootstrap; theuser-docs/page as the top layer of the stack.Checker:
check-acceptance-plan.shpasses;task docspasses. Stacked delivery: nothing in this series merges until the whole stack is reviewed; the plan's approval-by-merge event is deferred to the end, as its Delivery line records.Contract amendments
/api/healthmust carry the host ofSTUDIO_PUBLIC_URL, or a loopback host when it is unset; anything else is421 host_not_allowed(AC3.16). This closes DNS rebinding, which the same-origin check alone could not.Originmust equal the configured origin,Sec-Fetch-Site: same-originis required only whenOriginis absent, and any otherSec-Fetch-Sitevalue is refused (AC3.12).STUDIO_HOST:127.0.0.1by default,0.0.0.0inside the image (AC2.10).GET /api/v1/auth/sessionpoll and now covers the/oauth/callbackalias (AC3.13). A forged callback no longer clears an existing session (AC3.6).return_togets its own AC (AC3.17).400 invalid_requestproblem details. A daemon code Studio does not name maps by its Connect class instead of falling to500(AC2.7).org.stacklok.mecatl.studio.stability=early-accessin every document (the plan, ADR 0351, AGENTS.md, and the architecture doc). The compose decision now says the compose file runs the image withSTUDIO_ALLOW_UNAUTHENTICATED=1./api/v1route except the auth routes and/runtimewaits up to 10 seconds for compatibility negotiation, then answers503 runtime_unavailable. A feature route never reports a capability as unsupported from an empty snapshot (AC2.11).GET /api/v1/auth/sessiongains an opaqueaccountkey. The browser clears everystudio.-prefixed key on sign-out and when a different account signs in (AC4.6).publish-studiopublishes nothing, with a notice, for a tag withoutapps/Dockerfile, or when the checked-out tag differs from the run's own commit and its provenance would name the wrong source (AC5.4).Development stage
Contract linkage
gh stack) delivery for the whole Studio series: nothing merges until every layer is reviewed, so the plan's approval-by-merge event is deferred to the end (recorded in each plan's Delivery line), and each implementation layer records the exact plan commit it built against.docs/acceptance/studio-bootstrap.mdInterface conformance
MECATL_*target settings,STUDIO_*Studio settings incl.STUDIO_PUBLIC_URL,STUDIO_SESSION_SECRET,STUDIO_IMAGE,STUDIO_ALLOW_UNAUTHENTICATED,STUDIO_TRUSTED_PROXY_HOPS), the fourstudio_*cookies and their sealing, the security boundary (PKCE login,401gating, CSP, same-origin + double-submit CSRF, rate limiting, audit records), the one-origin image, thestudio:*tasks, thestudioCI category, and thepublish-studiorelease job. No gRPC, Go, or tool-schema change.Issue relationship
Relates to #1746 (parent #1736; stack #1766). Non-closing: the step completes when both of its layers merge.
Type of change
Test plan
Baseline checks
task lint)task test)go run ./cmd/mecademo)task docs)Plan layer: the acceptance-plan checker and
task docspass. The Studio gates (task studio:check,task ac-trace) run on the implementation layer above, since this layer adds noapps/code.User-facing change
None — a plan document and, for the bootstrap, ADR 0351.
Special notes for reviewers
Part of a fourteen-layer stack; review bottom-up. Nothing merges until the whole series is reviewed.