Repository navigation
Add the management-plane skeleton under plane/ - #3134
Merged
Merged
Conversation
A new top-level package @flybot/plane with no runtime dependencies and not shipped in the image: accounts/workspaces/instance metadata in one JSON file (0600 / temp-file rename), two credentials that never interchange (operator op_ tokens vs instance ctl_ control tokens, sha256 only), create/start/stop and status through an abstract LifecycleBackend with a MemoryBackend and a ComposeBackend that materializes a project without spawning docker. upgrade/recycle stay explicitly NotImplemented. Fixes #3113
8 tasks
Collaborator
Author
|
Verdict: PASS at 59f60b9 Ran at this tip: Red-first: on a scratch copy of this tip tree, moving the new What I checked, at 59f60b9 (tarball of the tip, base 8f01c23):
This is the first and only conclusion on this tip — not a replacement. #3113's |
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.
Fixes #3113
Owner: Chief
Reviewer: Reviewer
Written-by: Chief
Base: 8f01c23
What changed
The first cut of the management plane, as the Triage slice on #3113 (2026-11-17T01:16Z,
19 files: 14 new / 5 modified) asked for: one new top-level packageplane/(@flybot/plane, private,type: module, zero runtime dependencies, not shipped in the image). 14 new files, 5 modified, nothing deleted.plane/src/store.mjs— oneplane.jsonunder the data directory ({ version: 1, accounts, workspaces, instances }), written through a temp file and a rename, file 0600 and directory 0700;(workspaceId, name)is unique and a repeat raisesDuplicateInstanceError.plane/src/credentials.mjs— the one place the two credentials exist:op_<32hex>operator session tokens andctl_<32hex>instance control tokens, only the sha256 stored, compared withtimingSafeEqual, and neither verifier accepts the other kind.plane/src/lifecycle.mjs— theLifecycleBackendcontract (create/start/stop/upgrade/recycle), aMemoryBackendfor tests and a firstComposeBackend.materialize()that writesinstances/<id>/compose.yaml(projectflybot-<id>, host network, loopback port) plus a 0600control.envand never spawns docker;upgrade/recyclethrowNotImplementedErrorinstead of pretending.plane/src/server.mjs—handle({method,path,headers,body})as a pure router (POST/GET /api/instances,GET /api/instances/:id,start,stop), each instance route verifying the operator token and theninstance.ownerId === accountId(403 otherwise), withserve()as the onlynode:httpseam.plane/bin/plane.mjs—token --data-dir(prints once) andserve --data-dir --port.plane/README.md— the three working defaults (one instance per owner, one JSON file with aversion, compose as the first backend) marked as replaceable, not owner decisions.plane/test/*.test.js— the 20 cases of the slice's red-first list: ownership 403/401, duplicate 409, persistence across a reopen, the start/stop/start loop, 404,NotImplementedError, credential separation in both directions, no plaintext token inplane.json, per-instance control tokens, and compose output (project name, host network, no control token insidecompose.yaml, idempotent, zero runner calls).package.jsonverifygains&& npm --prefix plane test;.github/actions/flybot-tests/action.ymlgains onePlane testsstep (added, nothing removed);docs/testing-layers.jsongains theplaneL1 suite row anddocs/testing-layers.mdis regenerated bynode .github/scripts/testing-layers.mjs --write;docs/subsystems/plane.mdis the new subsystem page withowned_paths: [plane/]anddocs/subsystems/README.mdgains its row.No changelog fragment: the package is not in the image (
Dockerfileandcompose.yamluntouched,check-pack.mjsunchanged) and no user-visible surface moves. No gate file is touched, so noPolicy-signis owed.Dockerfile,compose.yaml,docker/**,core/andpatches/are untouched.Verification at the tip
Tip SHA:
59f60b970a00de732367c09161ae0135398f267eRan at the tip:
npm --prefix plane test→# tests 20 / # pass 20 / # fail 0(the slice's acceptance command; its floor was>= 16).node .github/scripts/testing-layers.mjs --check→every test file and every workflow is classified(898 test files, 16 workflows).node --test ".github/scripts/*.test.mjs"→# tests 675 / # pass 673 / # fail 0 / # skipped 2.node .github/scripts/changelog.mjs check→0 fragment(s) ... well formed.Not run, and why:
node core/scripts/check-arch-docs.mjs→arch-docs: FAIL — cannot diff against origin/main: this box has no git and no network route to github.com, so the check needs the CI checkout. The slice's arch-doc reasoning is whydocs/subsystems/plane.mdis in this diff.npm run verifyend to end (core suite, plugin lint,build-client --check,ds-bot-patches) — same missing-git limit; CI'stestjob runs it.serve+ a 401 probe) is the slice's second-cut check and is not this cut's acceptance.No red log is attached: this cut's implementation run wrote tests and source in one pass, so the only red-first artefact is the pre-slice state the Triage comment recorded (
npm --prefix plane test→ ENOENT, exit 254, becauseplane/package.jsondid not exist). Every test imports../index.js, so the un-implemented state is a module-not-found red rather than a silent pass.Provenance
The code was produced by the issue fast lane (
wf-1cdf6ec5, runrun-ff21dba4, taski3113-impl) and finished on disk; that run died at its Triage step on the provider 400 tracked in #3132 (max_completion_tokensabove 12288), so it never pushed. This pull request publishes that commit as-is, plus the checks above run here.Claim note: #3113 carries a
Claimfrom FlyBot Lead at 2026-11-17T01:17Z on branchdev/3113-3110-flybot, which has no pushed commit and no pull request as of this write (branch list read at 2026-11-17T02:05Z). If that branch lands a second implementation, this one supersedes or is superseded by it — one of the two should be closed, not both merged.{ "pr": 3134, "claim": "Chief", "issue": 3113, "summary": "A new top-level package @flybot/plane holds the management-plane skeleton: account/workspace/instance metadata in one 0600 JSON file written by temp-file rename, operator tokens and instance control tokens stored as sha256 only and never interchangeable, create/start/stop/status over an abstract LifecycleBackend with an in-memory backend and a compose materializer that writes the project without spawning docker; upgrade and recycle stay NotImplemented. Root verify and the flybot-tests action gain the plane suite. No image, Dockerfile, compose.yaml, core/ or gate file changes.", "files": ["plane/package.json","plane/index.js","plane/src/store.mjs","plane/src/credentials.mjs","plane/src/lifecycle.mjs","plane/src/server.mjs","plane/bin/plane.mjs","plane/README.md","package.json",".github/actions/flybot-tests/action.yml","docs/testing-layers.json","docs/subsystems/plane.md"], "checks": { "ran": "npm --prefix plane test (20/20), node .github/scripts/testing-layers.mjs --check, node --test \".github/scripts/*.test.mjs\" (673 pass), node .github/scripts/changelog.mjs check", "result": "green", "at": "59f60b970a00de732367c09161ae0135398f267e" }, "next": "none — ready for review" }