Skip to content

fix(ci): keep whitepaper builds off protected main - #789

Merged
dp-web4 merged 1 commit into
mainfrom
codex/whitepaper-workflow-main-safety
Aug 27, 2026
Merged

fix(ci): keep whitepaper builds off protected main#789
dp-web4 merged 1 commit into
mainfrom
codex/whitepaper-workflow-main-safety

Conversation

@dp-web4

@dp-web4 dp-web4 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Closes #780.

The whitepaper workflow now uses read-only contents permission and contains a self-check that rejects source-branch mutation commands. Pushes to main still build and upload all artifacts, but never create a repository commit or push.

Pull requests now also trigger when this workflow changes. After building, they fail when generated Markdown or web publication surfaces drift from the reviewed artifacts. The generated timestamp footer is deliberately ignored. PDF generation is not byte-deterministic across toolchains, so the workflow verifies the two checked-in PDF copies remain identical rather than making a false reproducibility claim.

Verification: workflow YAML parsed; the read-only contract check passed; the parity command passed against current artifacts; staged diff was whitespace-clean. RWOA+S+V: this removes an unreviewed direct-main mutation path and makes artifact drift visible before merge.

@dp-web4
dp-web4 merged commit f2fea2a into main Aug 27, 2026
5 of 6 checks passed
dp-web4 added a commit that referenced this pull request Aug 27, 2026
… degraded HTML, and #789's parity check is the first thing that noticed

The PR artifact-parity check #789 added failed on its first real use, on a
log-only PR that touches no source. The diff is not drift: every code block
rendered as `<pre class="codehilite"><code>` in the CI build and
`<div class="codehilite"><pre><span></span><code>` in the committed artifacts.

That is the codehilite extension with and without Pygments. `make-web.sh`
already hard-fails on a missing `markdown` module -- a guard added after
link-broken HTML shipped -- but says nothing about Pygments, and the whitepaper
workflow installs no Python packages at all (only pandoc and texlive via apt).
So CI produced the degraded form on every run while committed artifacts, built
locally where Pygments is present, carried the rich one. Both are valid HTML and
both render, so nothing ever failed.

Worth stating plainly: before #789 removed the deploy arm, a successful CI run
would have published the *worse* of the two over the better. The check earned
its keep on first use.

Fix follows the existing idiom exactly -- install if missing, hard-fail rather
than degrade -- and is placed below the git-sync block so `sed '6,29d'` still
derives the CI scripts cleanly (verified).

Verified locally: with Pygments present, `sed '6,29d'`-derived make-md.sh and
make-web.sh reproduce the committed artifacts with both index.html byte-identical
and a 1-line delta in each monolith, which is the *Generated:* wall-clock footer
the workflow already ignores. So the artifacts were always reproducible; the
missing module was the whole of the divergence.
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.

whitepaper workflow has failed every main push: it commits generated artifacts directly to protected main

1 participant