# 26-Nov-2026 — safe clone bundles and reliable first run [#454](https://github.com/Ramblers-GB/ngx-ramblers/issues/454)

## [build 1120](https://github.com/Ramblers-GB/ngx-ramblers/actions/runs/45893175355) — [commit 0ec0dcb](https://github.com/Ramblers-GB/ngx-ramblers/commit/0ec0dcb47dac7a766032294b0897484bf40aa3a4)

_____

First run
- bin/ngx-cli checks Node and npm against .nvmrc and package.json engines
before installing, and stops with the nvm commands when the major
version is wrong or either is missing
- the install hash is only written when both root and server installs
succeed, so a half-finished install is retried instead of failing later
with "Cannot find module 'dotenv'"
- bundle README states the Node/npm prerequisites, the macOS 13.5 limit
and the clean reinstall script

Clone isolation
- the platform endpoint is now /contributor-clone-access: it grants the
site's user access to the clone for copying, creates a database user
whose roles cover only the clone, and creates read-only S3 keys for the
group's bucket (one contributor-read IAM user per group)
- clone bundles carry that clone-only user and the read-only keys instead
of the live site's credentials
- the copy leaves out inbox mail, audit history, refresh tokens, drafts,
expense claims and the AUTH_SECRET-encrypted credential stores
- the clone is cleaned with the sandbox duplicate's sanitising, plus
Mailchimp and Salesforce keys cleared, environments/site-registration
config removed, sending suspended through platform-send-control, and
every member except the requesting admin anonymised
- a clone onto a schema that already has data is refused before the
platform issues new credentials, so an existing contributor's storage
keys are not replaced by a bundle that then fails
- the contributor clone now uses the shared cloneSourceDatabase, which
reads through a cursor in batches of 1000 instead of loading whole
collections into memory
- bundle generation runs over the websocket with progress, so a long copy
no longer sits inside one HTTP request; the REST endpoint keeps
current-database bundles only

Smaller fixes
- new-contributor-env refuses a checkout with uncommitted changes and
rebases onto origin/main instead of resetting hard
- local dev only enables platform admin when environments come from the
platform configuration, not from a contributor's local manifest
- clone access uses the MongoDB Atlas project the site's cluster belongs to,
so sites on clusters in other projects can be cloned, and refuses a
cluster outside the projects the platform manages
- ensureMigrationMongoUser renamed ensureScopedMongoUser now that clones use it
- contributor bundle docs describe the clone isolation and the remaining
risk of a current-database bundle

_____

## quiet test output and replace deprecated url.parse

## [build 1121](https://github.com/Ramblers-GB/ngx-ramblers/actions/runs/45908615170) — [commit 960d85b](https://github.com/Ramblers-GB/ngx-ramblers/commit/960d85b20dc65e948bddb769e183911c3c02ec17)

_____

- Server tests no longer print debug logging from modules that switch it on, so deliberate failure-path tests stop looking like errors.
- Mocha runs with Node's own TypeScript stripping off so ts-node loads specs without the module type warning.
- Replace every url.parse call with the URL class.
- Silence the reserved key warning on the volunteer import audit schema without renaming its stored errors field.
- Read photo capture metadata through a service method so the spec spies on it instead of a hoisted module mock.
- Capture the log viewer's waiting message in its spec.