fix: refresh run source during distribution builds

This commit is contained in:
npc0-hue
2026-08-21 23:09:28 +08:00
parent 2381b69d24
commit 0a605495af
12 changed files with 317 additions and 119 deletions
+6 -5
View File
@@ -6,7 +6,7 @@ This repository is the game server management platform workspace. It replaces th
- `platform_web/`: management console frontend.
- `plugins/`: game management plugin workspace. A plugin defines how to create and manage one server type, and one installed plugin can create many server instances.
The machine-side executor source lives in the separate `git@git.npc0.com:admin343/run.git` repository. Local debug and Docker workflows can keep the editable source at `./run` as an ignored nested checkout, or use another path through `RUN_SOURCE_DIR` / legacy `RUN_REPO_DIR`. Local debug snapshots that source into `.local-debug` before building or starting run.
The machine-side executor source lives in the separate `git@git.npc0.com:admin343/run.git` repository. Local debug and Docker workflows can keep the editable source at `./run` as an ignored nested checkout, or use another path through `RUN_SOURCE_DIR` / legacy `RUN_REPO_DIR`. Run distributions refresh the configured repository revision during each platform build, then inject package configuration and compile in the isolated builder workspace.
## Product Scope
@@ -75,7 +75,6 @@ Run executor checks are owned by the separate run checkout:
Run the API-backed local debug workspace when you need platform, run, platform_web, and the dev plugin fixture together:
```bash
git clone git@git.npc0.com:admin343/run.git run # once, if the ignored local checkout is missing
scripts/dev-start.sh
scripts/dev-smoke.sh
```
@@ -83,7 +82,7 @@ scripts/dev-smoke.sh
See `docs/local-debug-workspace.md` for ports, disposable data roots, log files, reset steps, smoke evidence, and the required browser walkthrough. This workflow treats frontend local auth fallback as a verification failure.
Use `LOCAL_DEBUG_SELF_START=true scripts/dev-smoke.sh` when you need the smoke command to own the temporary local stack for the duration of the verification.
For local debug, prefer the managed scripts because they snapshot run source into the closed `.local-debug` build bucket and start the bootstrap worker from the built binary:
For local debug, prefer the managed scripts because they prepare the Run checkout, start the platform-owned builder, and start the bootstrap worker from the current source:
```bash
scripts/dev-start.sh
@@ -94,7 +93,6 @@ scripts/dev-start.sh
Use the root compose file for a local all-in-one deployment:
```bash
git clone git@git.npc0.com:admin343/run.git run # once, if the ignored local checkout is missing
docker compose up --build
```
@@ -166,7 +164,10 @@ Most common edits:
- Log body persistence: `PLATFORM_LOG_BODY_BACKEND=file`, `PLATFORM_LOG_DIR`.
- Run editable source checkout: `RUN_SOURCE_DIR=./run` by default; legacy `RUN_REPO_DIR` is accepted as an alias; `run/` is ignored by the browser repository.
- Run closed build bucket: `RUN_BUILD_BUCKET_ROOT=.local-debug/run/build-buckets`.
- Run build source snapshot: `RUN_BUILD_SOURCE_ROOT=.local-debug/run/build-buckets/source/current`.
- Run source repository: `RUN_SOURCE_REPOSITORY=git@git.npc0.com:admin343/run.git`.
- Run source revision: `RUN_SOURCE_REVISION=main`.
- Platform builder source repository: `PLATFORM_BUILDER_SOURCE_REPOSITORY` (defaults to the Run repository).
- Platform builder source revision: `PLATFORM_BUILDER_SOURCE_REVISION` (defaults to `main`).
- Run bootstrap binary: `RUN_BOOTSTRAP_BIN=.local-debug/run/build-buckets/bootstrap/bin/run`.
- Run worker mode: `RUN_MODE=worker`.
- Run-to-platform URL: `RUN_PLATFORM_URL=http://127.0.0.1:8080` locally, `http://platform:8080` in Docker.