この文書はknowledge 2026-08-31-01のStack投影である。横断contractの正本ではない。
classroom@1はScratch/Bridge/Minecraftの3サービス、home-alpha-full@2は同じ設定生成・contract検査へCaddyのloopback HTTP転送を加えた4サービスである。ホーム用のHTTPS/WSSはhost側の転送が終端する。ホーム用の起動前確認はホーム用ケータリング手順を参照する。
apply <mc-remote.toml> --dry-run --output <empty-directory>はorderからexact lock、Compose、runtime設定を生成する。artifact取得、Docker操作、current deployment stateの更新は行わない。portの空きやHTTPS入口の到達性はこの操作では未確認であり、hostの観測と起動後のdoctorで確認する。通常applyは進行段階を表示し、Docker command失敗時はexit statusとstderr末尾を返す。
operatorが編集する入力はmc-remote.toml一つである。apply <mc-remote.toml>はpreset解決、exact lock、Scratch runtime configとBridge allowlistの共通target集合からの生成、Scratch schema validation、artifact取得、render、Docker preflight、create/update判定、起動を進める。doctor <deployment>は配信runtime configをlock済みScratch schemaへ通し、exact image、container稼働/Minecraft health、公開port、実containerのBridge allowlist/default target、Bridge containerからMcRemoteへの到達、tokenなしhelloへのauth_requiredを確認する。targetのsandboxは同じtarget集合からMinecraft serviceの内部network aliasにも生成し、Bridgeが同じdeploymentのMcRemoteへ接続する経路を固定する。McRemoteの非秘密runtime policyは初回seed用configとして生成し、b7 JARのfresh-install既定に依存せずauth.enforcement: trueを設定する。実際のenforcementはconfig内容の推測でなくdoctorのtokenなしhelloで確認する。credential実値は生成せず、session-only store/authorityはMinecraft data volume内のruntime stateとして扱う。
applyはcurrent exact lock、永続world volume、管理containerの三者から状態を判定する。lockとvolumeが揃う既存deploymentはcontainerが停止/削除済みでもupdateであり、新規扱いにしない。既存world volumeを再利用する場合だけpreset family変更とrevision後退をmigration要求として停止する。新しいdeployment/volumeにはrevisionの大小を持ち込まない。必要host portはartifact取得とrender公開より前に確認し、同deploymentが現在所有するportだけをupdate時の占有から除外する。
生成したlockとrenderはoperator入力ではなく、既定では$XDG_STATE_HOME/mc-remote/deployments/<deployment>/へ置く。MC_REMOTE_STATE_HOMEを指定した場合は、そのdirectoryのdeployments/以下を使う。artifact storeは既存のcontent-addressed cache契約を使う。
公開VPSのvps-server@17/compose@19は、connection-targets@4の共通接続先台帳と組別selectionから、Scratchごとに一覧と既定を生成する。配信する全Scratch host名にselectionを一つずつ要求し、各既定はその一覧の接続先から選ぶ。WireScopeの対応はpublic-routes@3の組を使い、noticeは共通とする。doctorは各組の生成物と配信runtimeを照合する。
Bridge allowlistとMinecraftの内部DNS別名は、全組で選択した接続先の和集合から生成する。Bridgeの既定は主Scratchの既定とする。組別selectionは組別の認可や外部hostへの経路を追加しない。既存profileの生成仕様は維持する。入力例と更新手順は組別接続先の設定手順を参照する。
Stackへの正式入力は、Scratch GitHub Releaseへ添付されたmanifest.jsonとcontracts.tar.gzである。manifestがrole別に確定するsource commit、Scratch/Bridge image digestを個別のテキスト票として会話やhandoffから聞き出す運用はしない(00-hub/deployment-interface-design_ja.md§4)。
Stack担当は取得したruntime-config contract directoryをsrc/mc_remote_stack/data/scratch-contracts/<commit>/へそのまま収容する。immutable presetはcommit、Git tree SHA、schema SHA-256、全fixtureのSHA-256とaccept/reject期待値、source directory、mount path、Scratch image digestを固定する。resolveとdoctorは収容したdirectoryのGit tree identityを再計算し、schema/fixture digestと全fixtureの判定を再実行する。presetのScratch artifact digestとhandoff image digestが異なる場合も停止する。
実際のcommit/tree/digestはpreset revisionごとにsrc/mc_remote_stack/data/preset_registry/配下のexact preset.tomlが持つ。この文書はそれらの値を転記しない。Scratch GitHub Releaseにmanifest.jsonが添付されている場合、Stackはそのmanifestのrole別artifact identity(source commit、Scratch/Bridge image digest)だけを正式入力とし、tagとregistry manifestをread-only照合する。imageはbuildしない。前回Stackが起動したworkflowのimage digestはpresetやlockから参照しない。
Scratch digestはScratch artifactとdeployment_interface.scratch_contract.image_digestの双方へ同じ値を固定し、Bridge digestもexact artifactとして固定する。resolve時にScratch artifactとhandoff digestが異なれば停止する。
contract directory外のScratch sourceは収容・参照しない。
既存の--project、--bootstrap、deployment updateは移行対象deploymentのために残すが、新しい通常経路のoperator操作には露出しない。探索版home-server@7/compose@15は取り込まない。runtime configへrelease_identityを生成せず、Bridge allowlistへtarget集合外のhostnameを追加しない。