|
| 1 | +# Demo Fleet Control Plane |
| 2 | + |
| 3 | +## Ownership |
| 4 | + |
| 5 | +The control plane has a deliberately split ownership model: |
| 6 | + |
| 7 | +1. [`shakacode/react_on_rails`](https://github.com/shakacode/react_on_rails/tree/main/internal/contributor-info) |
| 8 | + owns release policy, the canonical `demo-fleet.yml`, RC prompts, tracking issues, and final |
| 9 | + release decisions. |
| 10 | +2. This repository owns reusable runtime mechanics: parsing the canonical manifest, rendering |
| 11 | + deterministic plans, applying exact versions, bounded parallel execution, and opt-in PR setup. |
| 12 | +3. Each demo repository owns its tests, build, review-app deployment, smoke behavior, and any |
| 13 | + repository-specific upgrade work. |
| 14 | + |
| 15 | +The runtime defaults to the manifest on `react_on_rails/main`. A release manager can pass |
| 16 | +`--manifest PATH_OR_URL` (or set `DEMO_FLEET_MANIFEST`) to exercise an unmerged policy change. This |
| 17 | +keeps one inventory and prevents an operational snapshot here from silently drifting. |
| 18 | + |
| 19 | +The canonical manifest's `verify: true` marker means an entry is still a draft. Such entries are |
| 20 | +reported by `validate` but excluded from actionable plans. `execute-plan --dry-run` reports an empty |
| 21 | +selection successfully for hosted planning, while mutating execution refuses an empty selection, |
| 22 | +and an entry cannot become actionable until `review_app.cpflow_app_name` is present unless it |
| 23 | +explicitly sets `review_app: null` to opt out. The exact-version updater fails if a requested gem is |
| 24 | +absent from the checkout's root `Gemfile`. For npm, it searches |
| 25 | +bounded repository manifests (excluding dependency, cache, and generated directories), updates every |
| 26 | +direct declaration, and only permits a missing declaration when that package is named in the repo's |
| 27 | +`transitive_only_npm_packages`. Installs run in each directory whose `package.json` changed, which |
| 28 | +covers split layouts such as HiChee's root and `client` applications. |
| 29 | + |
| 30 | +Pro-only apps are a bounded exception: directly declaring the Pro gem or npm package satisfies the |
| 31 | +corresponding base React on Rails target because Pro depends on it. Other absent targets still fail |
| 32 | +closed unless the canonical manifest marks them as transitive-only. |
| 33 | + |
| 34 | +## Safety Boundary |
| 35 | + |
| 36 | +`update-plan` and `execute-plan --dry-run` do not mutate demo repositories. The pilot executor |
| 37 | +requires an explicit workspace for mutations. It commits local changes but does not push or open a |
| 38 | +draft PR unless `--allow-remote-prs` is supplied. |
| 39 | + |
| 40 | +Mutating runs require an authenticated GitHub CLI. Fresh checkouts use its configured Git protocol |
| 41 | +so the same path works for public and private fleet repositories and later pushes retain that |
| 42 | +authenticated remote. |
| 43 | + |
| 44 | +The executor starts from a clean checkout, stages dependency manifests and lockfiles at any depth, |
| 45 | +plus Yarn Berry PnP/cache artifacts, and rejects tracked, staged, or untracked changes outside that |
| 46 | +allowlist. Verification-generated drift therefore fails the lane instead of being silently included |
| 47 | +or left behind. |
| 48 | + |
| 49 | +Freshness is plan-only in this pilot. The CLI rejects `--track freshness --execute` until it can |
| 50 | +resolve registry candidates and enforce the canonical minimum-age policy before changing a repo. |
| 51 | +Release-track execution remains available for explicitly supplied React on Rails package versions. |
| 52 | + |
| 53 | +The executor is not yet a release gate. It does not poll hosted CI, discover CPFlow review-app |
| 54 | +URLs, run behavioral browser smoke, update the tracking issue, or make a go/no-go decision. Those |
| 55 | +steps remain in the canonical React on Rails release process and its copy/paste batch prompts. |
| 56 | + |
| 57 | +## Verification |
| 58 | + |
| 59 | +```bash |
| 60 | +ruby -Ilib test/demo_fleet_test.rb |
| 61 | +script/demo-fleet validate |
| 62 | +script/demo-fleet update-plan --track freshness |
| 63 | +``` |
| 64 | + |
| 65 | +The Ruby runtime uses only the standard library. The default manifest validation requires network |
| 66 | +access; tests pass local temporary manifests and are deterministic. When every canonical entry is |
| 67 | +still pending verification, hosted dry-runs report an intentionally empty plan and mutating execution |
| 68 | +refuses to run it. |
0 commit comments