Skip to content

Name the missing Pages setting instead of failing on it, and stop the browser test failing on a long game - #3

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/document-pages-prerequisite-6a10
Aug 13, 2026
Merged

Name the missing Pages setting instead of failing on it, and stop the browser test failing on a long game#3
cursor[bot] merged 3 commits into
mainfrom
cursor/document-pages-prerequisite-6a10

Conversation

@BruceMoseti

@BruceMoseti BruceMoseti commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Everything here came out of working out why the published page returns 404.

The page cannot publish itself, and the workflow now says so

The deploy job has gone red on every push to main:

Get Pages site failed. Error: Not Found
Create Pages site failed. Error: Resource not accessible by integration

That reads like a broken workflow. It is not. GitHub Pages has never been switched on for this repository, and no workflow can switch it on: creating a Pages site requires administration: write, which a workflow's GITHUB_TOKEN cannot be granted — it is not one of the values permissions: accepts. The action's own maintainers changed its default away from attempting this for the same reason (actions/configure-pages#40, #48). Pushing a gh-pages branch is not a way around it either: publishing from a branch still needs the source configured, and GitHub does not run a Pages build for commits pushed with a workflow token.

So enablement: true is gone, and the deploy job now checks the precondition and names it. With no Pages site it ends with a warning saying exactly which setting to set, and publishes nothing rather than failing at it; with a site, every step runs as before.

The one-time step: in Settings → Pages, set Source to GitHub Actions. Then re-run the deploy workflow, or push anything to main, and the game is live at https://brucemoseti.github.io/cueai/#play.

The browser test could fail on a game that was fine

While checking that the page survives being served from a subpath — /cueai/, the way Pages serves it; it does, every asset path is relative, and four games played to completion that way with no console errors — the browser test failed with game did not reach a conclusion. Nothing was wrong. The harness aims at a random legal ball on purpose, so it plays badly, and one game reached 66 shots and was still making progress when the 40-turn cap cut it off.

That cap exists to catch a table that has stopped progressing, not to say how long a game should take, so it moves to 120 — selfplay.mjs already allows 250 for the same reason — and the failure now reports how many shots were played and which phase the game was in, so a stuck table is distinguishable from an unlucky one.

Games observed since, all reaching a legal conclusion: 5, 6, 23, 29, 31, 33 and 37 shots.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 12, 2026 23:15
enablement: true cannot work with a workflow token: creating a Pages site
needs administration:write, which GITHUB_TOKEN cannot be granted, so the
step failed with "Resource not accessible by integration" rather than
enabling anything. The action's own maintainers changed the default away
from attempting it for the same reason.

Removed, and the one-time human step it was trying to avoid is written down
where the next person will look for it.

Co-authored-by: BruceMoseti <BruceMoseti@users.noreply.github.com>
The harness aims at a random legal ball, so it plays badly and its games
run long in the tail: one reached 66 shots and was still making progress
when the 40-turn cap stopped it, failing a test that had nothing wrong with
it. Games observed since: 5, 6, 23, 29, 31, 33, 37 shots, all concluding.

The cap is there to catch a table that has stopped progressing, not to
express how long a game should take, so it moves to 120 and the failure now
says how many shots were played and what phase the game was stuck in.
selfplay.mjs already allows 250 for the same reason.

Co-authored-by: BruceMoseti <BruceMoseti@users.noreply.github.com>
@cursor cursor Bot changed the title Stop pretending the workflow can switch GitHub Pages on Explain why the page cannot publish itself, and stop the browser test failing on a long game Aug 12, 2026
The deploy job has gone red on every push to main, with "Resource not
accessible by integration" from configure-pages. That reads like a broken
workflow. It is not: Pages has never been switched on for the repository,
and no workflow token can switch it on.

The precondition is now checked and named. If the site does not exist the
job ends with a warning saying which setting to set, and publishes nothing
rather than failing at it. Once the setting is set, every step runs as
before.

Co-authored-by: BruceMoseti <BruceMoseti@users.noreply.github.com>
@cursor cursor Bot changed the title Explain why the page cannot publish itself, and stop the browser test failing on a long game Name the missing Pages setting instead of failing on it, and stop the browser test failing on a long game Aug 12, 2026
@cursor
cursor Bot merged commit f4553fa into main Aug 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants