feat(compass-app): revive embedded dual-mode + supervisor pipeline (RIG-3197, RIG-3198) - #844
Open
rigel-mintaka wants to merge 2 commits into
Open
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Compass engineering docs preview: https://compass-native-rig-3197-embe.compass-eng-docs.pages.dev Deployed from |
…IG-3197, RIG-3198) Reverse the RIG-2554 client-only retirement: embedded app mode returns alongside the surviving client mode, per the frozen embedded-revival design (docs/designs/ui/compass-native-embedded-revival/design.md, §A1/§A2/§A3/§A6 shell half). T-1 and T-2 land together because T-1 alone would flip the absent-app.toml default to a ModeEmbedded whose launch arm is only a transient error, and T-2 alone would not compile (embedded.go consumes T-1's appconfig API). T-1 (RIG-3197) revives dual-mode in go/internal/appconfig: ModeEmbedded is added after ModeClient so ModeClient keeps the zero value; Parse resolves absent/empty/embedded mode to ModeEmbedded (the zero-config onboarding default) and rejects the client-only server_url/ca_cert fields under embedded mode legibly; Load gains the override parameter and resolves absent-file to the embedded default rather than a first-run error; the --mode/$COMPASS_APP_MODE override returns with flag>env>file>default precedence. The RIG-2554 retirement-error copy is deleted, not kept beside a working arm. T-2 (RIG-3198) revives the in-process supervisor pipeline in go/cmd/compass-app (embedded.go, lifecycle.go, preflight_adapters.go) and the go/internal/preflight package, reconciled against current main rather than restored verbatim. The app supervises the stack through the compass-stack binary (fire-and-return): preflight then compass-stack up then a WhoAmI dial over the stack's Unix socket. Reconciliations: the app-side DSN duplicate and the DB preflight probe are dropped (postgres is now a DL-260 container the stack starts; up-Ready is the DB verification); stackUpArgs passes only up --state-dir --image --socket and none of the CLI-defaulted postgres/collector/listen flags; the revived files carry the current (linux && gtk4) || darwin build tags; the launch dispatch regains the two-arm switch handing bridge.NewUnixTarget(socket) plus the WhoAmI account id to the bridge service. Preflight v2 widens the OS check to linux|darwin, adds a darwin-only machine-ready seam (its adapter is a later task), drops the DB and uid checks (main's runner is uid-agnostic via the userns keep-id remap), and adds a fatal podman-version floor check that surfaces the podman 4.3+ requirement at the front door instead of deep inside a fire-and-return stack whose exit 0 hides the runner's own refusal. The bring-up timeout is raised to cover a three-image cold pull. shellStartupJS re-parameterizes on the resolved mode. Ledger-impact: none Refs RIG-1662 Co-authored-by: Matt Wilkinson <matt@rigel.build>
…RIG-3197) Review fixes on the embedded-revival T-1+T-2 slice. Add an embedded subtest to TestShellStartupJS asserting the embedded arm emits window.__COMPASS_MODE__="embedded" and omits __COMPASS_SERVER_URL__ (a non-empty server URL is ignored in embedded mode), pinning the OQ-8 startup-global contract the UI embedded boot arm reads; correct the client_test.go doc comment that falsely claimed this arm was already covered. Tighten the launch() bring-up context comment to name the actual call site. Ledger-impact: none Refs RIG-1662 Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-native/rig-3197-embedded-dual-mode-supervisor
branch
from
September 3, 2026 02:42
dc94eda to
3b93f1f
Compare
rigel-mintaka
marked this pull request as ready for review
September 3, 2026 02:54
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.
Reverse the RIG-2554 client-only retirement: embedded app mode returns alongside the surviving client mode, per the frozen embedded-revival design (docs/designs/ui/compass-native-embedded-revival/design.md, §A1/§A2/§A3/§A6 shell half). T-1 and T-2 land together because T-1 alone would flip the absent-app.toml default to a ModeEmbedded whose launch arm is only a transient error, and T-2 alone would not compile (embedded.go consumes T-1's appconfig API).
T-1 (RIG-3197) revives dual-mode in go/internal/appconfig: ModeEmbedded is added after ModeClient so ModeClient keeps the zero value; Parse resolves absent/empty/embedded mode to ModeEmbedded (the zero-config onboarding default) and rejects the client-only server_url/ca_cert fields under embedded mode legibly; Load gains the override parameter and resolves absent-file to the embedded default rather than a first-run error; the --mode/$COMPASS_APP_MODE override returns with flag>env>file>default precedence. The RIG-2554 retirement-error copy is deleted, not kept beside a working arm.
T-2 (RIG-3198) revives the in-process supervisor pipeline in go/cmd/compass-app (embedded.go, lifecycle.go, preflight_adapters.go) and the go/internal/preflight package, reconciled against current main rather than restored verbatim. The app supervises the stack through the compass-stack binary (fire-and-return): preflight then compass-stack up then a WhoAmI dial over the stack's Unix socket. Reconciliations: the app-side DSN duplicate and the DB preflight probe are dropped (postgres is now a DL-260 container the stack starts; up-Ready is the DB verification); stackUpArgs passes only up --state-dir --image --socket and none of the CLI-defaulted postgres/collector/listen flags; the revived files carry the current (linux && gtk4) || darwin build tags; the launch dispatch regains the two-arm switch handing bridge.NewUnixTarget(socket) plus the WhoAmI account id to the bridge service. Preflight v2 widens the OS check to linux|darwin, adds a darwin-only machine-ready seam (its adapter is a later task), drops the DB and uid checks (main's runner is uid-agnostic via the userns keep-id remap), and adds a fatal podman-version floor check that surfaces the podman 4.3+ requirement at the front door instead of deep inside a fire-and-return stack whose exit 0 hides the runner's own refusal. The bring-up timeout is raised to cover a three-image cold pull. shellStartupJS re-parameterizes on the resolved mode.
Ledger-impact: none
Refs RIG-1662
Co-authored-by: Matt Wilkinson matt@rigel.build