Repository navigation
runtime: in .uigraph.yaml, uigraph runtime detect and check (P2) - #29
Draft
Manasa-uigraph wants to merge 1 commit into
Draft
Manasa-uigraph wants to merge 1 commit into
Manasa-uigraph wants to merge 1 commit into
Conversation
The runtime profile (how to set up, build and test a service, its sidecars
and the names of its secrets) is a runtime: section of .uigraph.yaml. The
CLI owns the schema (pkg/runtime, plus schema/runtime.schema.json and shared
fixtures); uigraph-sandbox carries the same three files and the same
parity test, so drift in either repo fails its CI. Unlike the rest of
.uigraph.yaml, unknown keys in runtime are errors. Sync uploads the section
with the service (the gateway ignores it until it stores it).
`uigraph-cli runtime detect [dir]` proposes the section from, in order of
trust: CI workflow commands, Makefile targets, package.json scripts and
lockfile, go.mod, Dockerfile (HEALTHCHECK, NODE_OPTIONS), compose files and
.env.example. Secrets are names only: a private registry the CI logs in to
becomes a secret plus an .npmrc line that refers to ${NAME}; secrets whose
egress host cannot be read are listed in notes, not guessed. A Makefile
test target that CI does not run is noted, not added: uigraph-api's
test-integration is not in CI and fails on a fresh database, which would
have made the service un-Ready forever. --write appends to .uigraph.yaml,
--force replaces an existing section.
`runtime check` validates the profile and the repo (make targets, package
scripts, compose file exist). With --run it runs setup, build, lint and
tests in the sandbox base image with local Docker: the repo is copied in
without .git and node_modules, postgres and redis sidecars share the
container's network namespace, the network is cut after setup unless egress
hosts are declared, and secrets come from same-named env vars passed by name
(never on the docker command line); steps whose secrets are unset report
needs_secrets instead of running. --report sends the result (status,
reasons, commit, checked profile, steps) to Autopilot with the engineer's
own UIGRAPH_USER_TOKEN; it needs --run and a clean tree.
Verified on copies of uigraph-api (ready, no secrets) and uigraph-ui
(setup passes with the registry secret; needs_secrets without it).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Adds the
runtime:section to.uigraph.yaml(strict, schema shared with uigraph-sandbox via a JSON Schema, fixtures and an identical parity test in both repos),runtime detect(proposes it from CI, Makefile, package.json, Dockerfile, compose, .env.example; secrets by name only) andruntime check(static checks;--runproves it in the sandbox base image with local Docker;--reportsends readiness to Autopilot with your own token). Sync uploads the section; the gateway ignores it until it stores it.Checked: tests with race and lint clean. On copies, uigraph-api detect → check --run is Ready with no secrets; uigraph-ui's setup passes with its registry token and reports needs_secrets without it, then its own build (OOM in an 8GB VM), lint and 4 unit tests fail, which are real.
🤖 Generated with Claude Code