docs(fork): pin merged upstream SHA, use npm ci, verified startup recipe
PR Check / limit-pull-requests (pull_request_target) Skipped
PR Check / limit-pull-requests (pull_request_target) Skipped
Addresses Archimedes' review on PR #11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
86f9e963d2
commit
a181ed3ebd
1 file changed
+41
-17
@@ -34,28 +34,36 @@ git fetch origin
|
||||
git switch main
|
||||
git merge --ff-only origin/main
|
||||
git switch -c sync/upstream-YYYY-MM-DD
|
||||
git fetch upstream && git merge upstream/master
|
||||
git fetch upstream
|
||||
UPSTREAM_SHA=$(git rev-parse upstream/master)
|
||||
git merge "$UPSTREAM_SHA"
|
||||
# Resolve conflicts, preserving the fork's isolated features; commit if needed.
|
||||
npm install
|
||||
npm ci # lockfile-exact; needs Node 26 (on the VM use the container below)
|
||||
npm run build
|
||||
npm test
|
||||
npm run lint:dry
|
||||
git push -u origin sync/upstream-YYYY-MM-DD
|
||||
```
|
||||
|
||||
Open a PR against `main`, include the imported upstream range and validation
|
||||
results, and request Archimedes' review (Claudia reviews Archimedes' own PRs).
|
||||
Open a PR against `main`, name the merged upstream commit (`$UPSTREAM_SHA`) and
|
||||
the imported range `origin/upstream..$UPSTREAM_SHA`, include validation results, and request Archimedes' review (Claudia reviews Archimedes' own PRs).
|
||||
Do not merge your own PR. Do not rebase or squash imported upstream history.
|
||||
After the reviewed sync merges, advance the pristine tracking branch:
|
||||
After the reviewed sync merges, advance the pristine tracking branch to exactly
|
||||
the upstream commit that was merged into `main` (never to a newer, unreviewed
|
||||
`upstream/master`):
|
||||
|
||||
```sh
|
||||
git fetch origin
|
||||
git fetch upstream
|
||||
git merge-base --is-ancestor origin/upstream upstream/master
|
||||
git push origin upstream/master:refs/heads/upstream
|
||||
UPSTREAM_SHA=<upstream commit named in the sync PR>
|
||||
git merge-base --is-ancestor "$UPSTREAM_SHA" origin/main &&
|
||||
git merge-base --is-ancestor origin/upstream "$UPSTREAM_SHA" &&
|
||||
git push origin "$UPSTREAM_SHA:refs/heads/upstream"
|
||||
```
|
||||
|
||||
The ancestry check and non-force push must succeed. If upstream rewrites history,
|
||||
The first check ensures the commit really is merged into `main`; the second
|
||||
prevents `upstream` from moving backwards or onto rewritten history. The push is
|
||||
not a force push. Afterwards `git log origin/upstream..origin/main` shows exactly
|
||||
the fork delta. If upstream rewrites history,
|
||||
stop for review instead of force-pushing. Never merge `main` into `upstream`.
|
||||
Use a feature branch from current `main` and a reviewed PR for fork changes.
|
||||
Keep credentials in the environment; never put tokens in remote URLs or files.
|
||||
@@ -79,17 +87,33 @@ Track implementation and review status on the
|
||||
|
||||
Consult `package.json` for the actual engine requirements: this imported revision
|
||||
requires Node >=26.4.0 and npm >=10.8 <12. The older Node guidance in the upstream
|
||||
README does not match this revision. Start a separate local MongoDB instance,
|
||||
then run:
|
||||
README (v16+) does not match this revision. MongoDB must be >= 4.4, the minimum
|
||||
supported by the bundled MongoDB driver (7.7).
|
||||
|
||||
```sh
|
||||
export NODE_ENV=local
|
||||
export MONGODB_URI=mongodb://127.0.0.1:27017/homebrewery
|
||||
npm install
|
||||
npm start
|
||||
npm install # also runs the production asset build via postinstall
|
||||
npm start # http://localhost:8000
|
||||
```
|
||||
|
||||
Installation runs the production asset build through `postinstall`. The default
|
||||
application URL is `http://localhost:8000`. Use only disposable test data and stop
|
||||
test processes and containers when finished. See import PR validation for the
|
||||
actual result on the development VM.
|
||||
### Development VM
|
||||
|
||||
The VM runs Node 24, and its CPU lacks AVX, so MongoDB >= 5.0 exits immediately
|
||||
(code 132). Do not install Node system-wide; use disposable containers instead:
|
||||
|
||||
```sh
|
||||
docker network create hb-dev
|
||||
docker run -d --name hb-mongo --network hb-dev --memory 400m \
|
||||
mongo:4.4 --wiredTigerCacheSizeGB 0.25
|
||||
docker run --rm --name hb-app --network hb-dev --memory 1200m \
|
||||
--user "$(id -u):$(id -g)" -e HOME=/tmp -e NODE_ENV=local \
|
||||
-e MONGODB_URI=mongodb://hb-mongo:27017/homebrewery \
|
||||
-p 127.0.0.1:8000:8000 -v "$PWD":/app -w /app \
|
||||
node:26 sh -c 'npm install && npm start'
|
||||
# when finished
|
||||
docker rm -f hb-app hb-mongo && docker network rm hb-dev
|
||||
```
|
||||
|
||||
MongoDB 4.4 is end-of-life: use it only with disposable test data. Verified on
|
||||
2026-11-24 with `node:26` (Node 26.13.1, npm 11.20.0) and `mongo:4.4`.
|
||||
Reference in new issue
Block a user