Repository navigation
Edge add-on control plane with a managed coding runner, plus provider fixes - #765
Merged
Merged
Conversation
The hub only relayed /api/ and /apis/ prefixes, so the bare /api and /apis discovery roots 404ed for ServiceAccount callers. client-go's REST mapper lists API groups from them first, so a provider running a controller-runtime manager behind the hub could not start. External providers in the embedded Tilt stack now get host port-forwards with CatalogEntry URLs the host hub can reach, a kcp loopback bridge for the 127.0.0.1:6443 virtual-workspace URLs embedded kcp advertises, and the dev serving certificate as a hub CA. They are skipped with a warning when they lack local setup. The api-only passthrough is gone: the provider library no longer has it.
The development sync rejected any node component without a root package.json, but simple-webapp's start command tests for the file and falls back to npx vite. A static index.html project was refused by a sandbox that can run it. Skip the manifest check when the start command itself tests for it.
A GitHub OAuth App with token expiration issues 8h access tokens plus a single-use refresh token. The connect flow kept only the access token, so every such Connection died after eight hours while still reporting Validated. The callback now returns the refresh token and expiry, the portal stores them next to the token, and every credential read renews an expiring token with the app's refresh grant, writing the rotated pair back under a resourceVersion precondition. Connections are also re-validated every 15 minutes, so a token the host revoked stops reading as valid.
package.py takes the target OS, so make package-runner-linux produces railgrid-runner-linux-<arch> archives alongside the macOS ones. The acceptance fixture script is no longer macOS-specific and is renamed to setup.sh.
The edge agent can now materialize add-on services declared in the tenant workspace, following the existing declare -> materialize -> report loop instead of an imperative hub-to-agent channel. - New Addon API (edges.railgrid.ai): spec.edgeRef, type runner, and the runner configuration, with Allowed/Configured/Running/Published conditions. - Two keys are required: the tenant creates the Addon AND the machine owner started the agent with --allow-addon (default none). Edges report status.allowedAddons; the provider publishes the runner Service only after the agent reports Allowed=True. MCPServer tokens never get addons. - The agent supervises the child as a non-root account (--addon-user when the agent is root), with an environment built from scratch, process-group termination, restart backoff and owner-only, symlink-hardened state. - railgrid runner run embeds the runner in the main binary, which is what the agent starts. - Claude Code is a second runner harness next to Codex: headless stream-json turns with resume, customization and MCP disabled, and the credential read from an owner-only file, injected only into the harness process and redacted from events. Addons choose it with spec.runner.harness. The dev server edge allows the runner add-on (DEV_EDGE_ALLOW_ADDONS), and the dev serving certificate covers host.docker.internal so provider pods can verify the host hub.
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.
Five commits. They are independent and could be reviewed or split separately.
1. Relay kcp discovery roots and harden external provider Tilt wiring
/api/and/apis/prefixes./apiand/apisdiscovery roots returned 404 for ServiceAccount callers.failed to get server groups).isKCPAPIPath, with a unit test.host.docker.internal.--external-providers-api-onlypassthrough is removed.2. App Studio: let templates that handle a missing manifest sync without one
simple-webapp's start command falls back tonpx vitewhenpackage.jsonis absent.3. Code: refresh expiring GitHub OAuth tokens and re-validate connections
4. Package the runner for Linux and share the acceptance setup script
5. Edge add-on control plane with a managed coding runner
docs/edge-addons.mdAddonAPI (edges.railgrid.ai).--allow-addon(default: none).status.allowedAddons.Allowed=True.addonsis on the MCPServer RBAC deny list, and no default role grants it.--addon-userwhen the agent is root).railgrid runner run: embeds the runner in the main binary.spec.runner.harness).Verification
go build ./...; cross-builds for linux, darwin and windows.go testforpkg/agent,pkg/runner,pkg/cli,cmd,pkg/huband theproviders/edgesmodulemake test-runnerAddonAPI installed.allowedAddons.RunningandPublished.Not verified
make codegen-edges-providernames the add-on APIResourceSchema from the commit it was generated at. Re-running it after merge should be a no-op (content identical keeps the name), but confirmmake verify-codegenin CI.--setting-sources ""meaning "none" is unverified.go test ./pkg/runner/needs a symlink-freeTMPDIRon macOS (/var→/private/var).