.demoman/app.json tells a refresh how to start the app. setup --ci
proposes it from the repo, naming where each answer came from, and asks about
any it cannot find. The detector reads, in order, the first that answers: the
Playwright config’s webServer, a CI workflow, copilot-setup-steps.yml,
package.json. It never reads .env.
How refresh uses it
refresh starts the app from this file. With --base-url it ignores the file
and records the app at that address. It refuses with appOriginMismatch,
naming the flows, when a flow records at a different origin than url.
Off CI it uses an app already answering at url, and otherwise runs start.
It never starts services: when the app does not answer and the file declares
services, the refusal names each with its port, to start them yourself. In CI
it always starts its own, and the workflow gives the job the services,
corepack (pnpm, yarn) and bun when the commands use them.
The install, start and reset commands inherit refresh’s environment without
Demoman’s own secrets: no DEMOMAN_SECRET_* unless secrets names it, and in
GitHub Actions no GH_TOKEN or GITHUB_TOKEN. The workflow’s checkout keeps
no token in .git/config. These commands run in a job whose token can only
read, though it still reads this repo’s contents and its runs’ artifacts. The
push runs in a separate job that never runs them. Demo-account secrets that
secrets names are still theirs to read.
If a workflow of yours already starts the app before demoman refresh (a
“Start your app” step, or wait-on), delete that step: both would use the
same port.
Pinned dates
An app that shows dates relative to today (due dates, “3 days ago”, the current cycle) looks different every day, so every refresh would replace its videos. Setnow and the app is recorded at that instant every time:
- Demoman gives the app’s install, start and reset commands
DEMOMAN_NOW. - The page’s clock starts at
nowand runs from there.
DEMOMAN_NOW wherever it seeds data or decides what “now” is,
and falls back to the real clock when it is not set:
nowmust have passed, and be at most 7 days old. A later instant is refused asappNowInFuture, an older one asappNowTooOld: the browser keeps its own clock for cookies, and a page clock far behind it can drop the cookies the app sets. Movenowforward when it is refused; every video that shows a date is recorded again once.- A sign-in library that rejects a token issued “in the future” can fail under a pinned clock. If a pinned refresh cannot sign in, check this first.
- The pin reaches the page’s own
Date. It does not reach web workers, iframes from another origin, orIntl.DateTimeFormat().format()called without a date. - It applies only when Demoman starts the app. A local refresh with the app
already running is refused as
appNowNotPinned: stop the app, or let CI refresh. - With
--base-url, or a workflow that records a deployment, the date is not pinned, and refresh says so once. - Changing
nowrecords every video that shows a date again.