fix(deploy): blueprint MANAGER pattern everywhere — never hand-run the instance binary#53
Merged
Merged
Conversation
…e instance binary Recurring mistake: agents deploy 'inference-bazaar-operator run' directly (with a hardcoded SERVICE_ID / TEST_MODE) as if that IS the blueprint. It is not — that's local testing only. Production runs the Blueprint Manager daemon (cargo-tangle blueprint run), which spawns the per-service instance itself when a user's service request is approved. Encode this so it stops happening: - CLAUDE.md (NEW, repo-level, loaded every session here): the rule front-and-center + the on-chain lifecycle (deploy manager -> register -> request -> approve -> spawn) + the resell-backend + toolchain gotchas. - deploy/gen-resell-operator.sh: rewritten to generate a Blueprint MANAGER systemd unit (cargo-tangle blueprint run + --keystore-uri + EnvironmentFile=settings.env) and the operator settings.env (no SERVICE_ID — the manager assigns it). Was wrongly ExecStart-ing the operator binary. - docs/OPERATOR_ONBOARDING.md §7/§8: split testing (direct run) vs production (manager spawns the instance); fixed the lifecycle prose + the unit it pointed at. - deploy/hetzner/*-blueprint-runtime.service: marked TEST/DEV (they direct-run). Also fixed in the Tangle skills (separate repos, edited in place): tangle-blueprint- expert (3 copies), blueprint-launch (corrected a wrong-pattern step), blueprint- frontend, sandbox-blueprint. Reference pattern: ai-trading-blueprint/deploy/go-live.sh.
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.
The recurring mistake
Agents keep deploying
inference-bazaar-operator rundirectly (hardcodedSERVICE_ID/TEST_MODE=true) as if that is the blueprint. It isn't — that's local testing only. In production each operator box runs the Blueprint Manager daemon (cargo-tangle blueprint run), which watches the chain and spawns the per-service instance itself when a user's service request is approved.This PR encodes the rule so it stops happening, and fixes the artifacts (including one I just introduced).
Prevention (so it never recurs)
CLAUDE.md(NEW, repo-level — loaded every session in this repo): the rule front-and-center, the full on-chain lifecycle (deploy manager → operator registers → user requests a service → operators approve → manager spawns the instance), plus the resell-backend + 1.91/PROTOC+ stale-ref gotchas.Fixes
deploy/gen-resell-operator.sh— rewritten to generate a Blueprint Manager systemd unit (cargo-tangle blueprint run --keystore-uri … --data-dir …/bpm-data --settings-file …) + the operatorsettings.env(the resell config the manager hands the spawned instance; noSERVICE_ID— the manager assigns it). It previouslyExecStart-ed the operator binary — this PR supersedes deploy: gen-resell-operator.sh — one-command resell operator unit + runbook #51.docs/OPERATOR_ONBOARDING.md§7/§8 — split testing (direct run) vs production (manager spawns the instance); corrected the lifecycle prose and the unit it pointed at.deploy/hetzner/*-blueprint-runtime.service— headers marked TEST/DEV (they direct-run the binary).Also fixed in the Tangle skills (separate repos, edited in place by a fan-out)
tangle-blueprint-expert(×3 copies),blueprint-launch(caught presenting a wrong-pattern step and corrected it),blueprint-frontend,sandbox-blueprint— each now carries the "production = Blueprint Manager, never the instance binary" rule. (4 unrelated skills correctly skipped.)Reference that does it right:
ai-trading-blueprint/deploy/go-live.sh+trading-blueprint.service.Verification:
bash -non the script; the unitExecStartiscargo-tangle blueprint run, not the binary.