Demo: --headless can't give an editor the pull request's files #82

Closed
opened 2026-11-15 21:28:22 +01:00 by thatrichan · 1 comment
Owner

revue-companion's task shoot:website takes the website's editor screenshots (#73) against REVUE_DEMO=1 revue. Most questions work without a window: --pulls, --branch-pull, --pull, --review with its threads, --pending, --submit-options, and the sides of files.

Getting the pull request's files into the editor's clone doesn't work headless:

REVUE_DEMO=1 revue --headless --fetch-branch https://github.com/tidewater/atlas-api/pull/214
git fetch: fatal: transport 'https' not allowed

The headless demo's own clones are also deleted when the command exits, so there's nothing to fetch from afterwards.

The cost: the task has to start a real revue --demo window on a virtual display, which needs Xvfb with Mesa, just to have a demo clone to fetch from. Revue's shoot:editors does the same.

Ask:

  • Under the headless demo, --fetch-branch and --worktree fetch from the demo's own local clone of the repository.
  • Or there's a headless way to write a demo clone into a given folder.

Related: the demo's commit dates follow the clock (e.g. origin/main about nine days before the run). If two demos also produce different SHAs, then the project and the answers must come from the same demo. A reproducible demo history would remove that constraint.

revue-companion's `task shoot:website` takes the website's editor screenshots (#73) against `REVUE_DEMO=1 revue`. Most questions work without a window: `--pulls`, `--branch-pull`, `--pull`, `--review` with its threads, `--pending`, `--submit-options`, and the sides of files. Getting the pull request's files into the editor's clone doesn't work headless: ``` REVUE_DEMO=1 revue --headless --fetch-branch https://github.com/tidewater/atlas-api/pull/214 git fetch: fatal: transport 'https' not allowed ``` The headless demo's own clones are also deleted when the command exits, so there's nothing to fetch from afterwards. **The cost:** the task has to start a real `revue --demo` window on a virtual display, which needs Xvfb with Mesa, just to have a demo clone to fetch from. Revue's `shoot:editors` does the same. **Ask:** - Under the headless demo, `--fetch-branch` and `--worktree` fetch from the demo's own local clone of the repository. - Or there's a headless way to write a demo clone into a given folder. **Related:** the demo's commit dates follow the clock (e.g. `origin/main` about nine days before the run). If two demos also produce different SHAs, then the project and the answers must come from the same demo. A reproducible demo history would remove that constraint.
Author
Owner

Done in 7a6da09 (in the next release).

  • The headless demo fetches from itself. Each demo writes every mock repository as the service's own in its folder (branches and refs/pull/N/head), and the demo's git sends the repository's addresses there: https://github.com/tidewater/atlas-api(.git), git@github.com:…, ssh://git@github.com/…. So --fetch-branch and --worktree work in any clone whose remote is one of those, headless or with the window (the window had the same transport 'https' not allowed).
  • Reproducible history. REVUE_DEMO_NOW (RFC 3339, or a date such as 2026-11-01) fixes the moment the demo's history counts back from. Demos started with the same value have the same commits, ids included, so the project and the answers can come from different demos.

No window or Xvfb needed:

export REVUE_DEMO=1 REVUE_DEMO_NOW=2026-11-01
git init -b main proj
git -C proj remote add origin https://github.com/tidewater/atlas-api.git
revue --headless --fetch-branch https://github.com/tidewater/atlas-api/pull/214 --dir "$PWD/proj"
# {"branch":"atl-412-tile-cache","remote_branch":"origin/atl-412-tile-cache","created":true,…}
git -C proj checkout atl-412-tile-cache
cd proj && revue --headless --branch-pull   # → #214

--fetch-branch brings only the pull request's branch (with its history), not origin/main.

Done in 7a6da09 (in the next release). - **The headless demo fetches from itself.** Each demo writes every mock repository as the service's own in its folder (branches and `refs/pull/N/head`), and the demo's git sends the repository's addresses there: `https://github.com/tidewater/atlas-api(.git)`, `git@github.com:…`, `ssh://git@github.com/…`. So `--fetch-branch` and `--worktree` work in any clone whose remote is one of those, headless or with the window (the window had the same `transport 'https' not allowed`). - **Reproducible history.** `REVUE_DEMO_NOW` (RFC 3339, or a date such as `2026-11-01`) fixes the moment the demo's history counts back from. Demos started with the same value have the same commits, ids included, so the project and the answers can come from different demos. No window or Xvfb needed: ```sh export REVUE_DEMO=1 REVUE_DEMO_NOW=2026-11-01 git init -b main proj git -C proj remote add origin https://github.com/tidewater/atlas-api.git revue --headless --fetch-branch https://github.com/tidewater/atlas-api/pull/214 --dir "$PWD/proj" # {"branch":"atl-412-tile-cache","remote_branch":"origin/atl-412-tile-cache","created":true,…} git -C proj checkout atl-412-tile-cache cd proj && revue --headless --branch-pull # → #214 ``` `--fetch-branch` brings only the pull request's branch (with its history), not `origin/main`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cleangamedev/revue#82
No description provided.