diff --git a/AGENTS.md b/AGENTS.md index e543f22400..c9447359a2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -107,6 +107,10 @@ When changing Go source files under any Go module (`cli/common`, `cli/dispatcher equivalent of Go CLI CI (format, vet, lint, tests, binary rebuild). Use `scripts/build-go-cli.sh` to refresh `dist` binaries; they are git-ignored and must not be committed. +To validate an unreleased project runner from an external Unity project, set the +`ULOOP_PROJECT_RUNNER_PATH` environment variable to a locally built binary — it overrides the +pin-based resolution entirely (see `docs/project-runner-pin.md`). + ## Unity Freeze Prevention Unity EditMode tests can freeze the Editor. Never run multiple `uloop run-tests` commands in diff --git a/docs/project-runner-pin.md b/docs/project-runner-pin.md index 039fb77b14..10b6e0671d 100644 --- a/docs/project-runner-pin.md +++ b/docs/project-runner-pin.md @@ -21,6 +21,27 @@ There is no dispatcher⇄package integer contract generation; the pin's semver floor is the only dispatcher gate. The IPC `protocolVersion` pair (see `docs/protocol-version.md`) is the only integer generation in the system. +## Local override: `ULOOP_PROJECT_RUNNER_PATH` + +The environment variable `ULOOP_PROJECT_RUNNER_PATH` (defined in +`cli/dispatcher/internal/nativepath/path.go`) makes the dispatcher run the +project runner binary at that path instead of resolving one from the pin. +`resolveDispatcherRealCLI` checks it before everything else — pin validation, +the sibling binary next to the dispatcher, the version cache, and the GitHub +release download are all skipped. The path must point at an existing executable +file, or the dispatcher fails with an explicit error rather than falling back. + +This override exists for dogfooding checkouts: release-please stamps +`projectRunnerVersion` ahead of the matching GitHub release, so the normal +download path 404s until the release is published. Pointing the variable at a +locally built binary (e.g. `dist/darwin-arm64/uloop-project-runner`, refreshed +via `scripts/build-go-cli.sh`) lets you exercise unreleased project-runner and +`cli/common` changes against real Unity projects before merge. Unset the +variable to return to normal pin-resolved behavior. + +Related overrides in the same file: `ULOOP_INSTALL_DIR` (dispatcher install +directory) and `ULOOP_CACHE_DIR` (project runner download cache). + ## Pin format discipline The pin evolves additively only — never delete or rename an existing field.