Move the canonical repo to Gitea; GitHub becomes a private archive
ci / web (push) Successful in 2m42s
ci / python (push) Successful in 2m35s

git.karti.ai/PIG/PIG-Demo is now the source of truth, public and anonymously
cloneable. Every self-link in the site and the docs repoints there — Gitea
serves file paths at /src/branch/main/, not /blob/main/, so those needed
rewriting rather than a hostname swap.

CI moves with it. An archived GitHub repo is read-only and its Actions stop
firing, so leaving the workflow there would have meant a repo whose gates
silently never run. .github/ is deleted rather than kept for reference: a
workflow that can never execute is worse than no workflow, because it looks
like coverage.

The Gitea workflow is not a copy. That runner is aarch64 and installs pnpm
through corepack from `packageManager` rather than pnpm/action-setup, uses
checkout@v4 and setup-node@v4, and fetches uv from astral.sh directly. It is
also configured `container.network: host` — nothing here needs a service
container, but the comment says so, because that setting cost the sibling repo
three failed runs.

The header and footer icon changed from the GitHub mark to a neutral one. A
GitHub logo pointing at a Gitea instance is a small lie about where the code
lives, on a site whose argument is that you can go and check it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mt6sHQHEnEYrJZvoMCJSB
This commit is contained in:
karti-ai
2026-08-28 17:11:56 -07:00
parent 1cd1d3bbba
commit 6c2f3899c8
14 changed files with 171 additions and 123 deletions
+150
View File
@@ -0,0 +1,150 @@
# Continuous integration.
#
# Two jobs, split by language, because they prove different things and the
# Python one is the slow half.
#
# What this actually gates, in order of how likely each is to catch something:
#
# 1. The two implementations of the game agree. `engine.py` and `engine.ts`
# score every ordered pair of words in the answer list — 4,603^2 = 21.2M
# feedback patterns — and their SHA-256 digests must match each other and
# the committed value. The page claims it VERIFIES a recorded run in your
# browser; that claim is only worth something if the browser's scorer and
# the environment's scorer cannot drift.
# 2. The reward measures something. `probe.py` plays seven deliberately
# crafted policies and asserts the reward orders them the way a person
# would, PER WEIGHTED COMPONENT — a component that is flat across every
# policy is measuring nothing and still moves the total. It also asserts
# neither good policy dominates the other, because the reward editor on
# the site is a claim about a real trade-off.
# 3. Every committed fixture replays through the engine and reproduces its
# own recorded rewards. A fixture that cannot be regenerated is a claim
# with no receipt behind it.
# 4. The word lists rebuild byte-identically from their committed sources.
# If they do not, the conformance digest is describing a different game.
# 5. The demo contract holds — see scripts/check-demos.mjs.
# 6. Four things that fail SILENTLY in production and nowhere else:
# prerendered routes carrying their own <head>, sitemap.xml existing,
# no blob-backed worker, and the bundle budget.
#
# NO MODEL IS EVER CALLED. Rollouts are captured by hand and committed; a gate
# that cost a paid inference call would be switched off within a month.
#
# This runner is aarch64 and configured with `container.network: host`. Nothing
# here needs a service container, so the traps that cost PIG three failed runs
# do not apply — but do not add `services:` here without reading that repo's
# workflow first.
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
# Corepack ships with Node and installs the exact pnpm pinned by
# `packageManager`, so CI and a laptop run the same version. The download
# prompt is disabled because a non-interactive runner cannot answer it and
# would otherwise hang until the job times out.
- name: Enable pnpm
env:
COREPACK_ENABLE_DOWNLOAD_PROMPT: '0'
run: |
corepack enable
corepack prepare --activate
test "$(pnpm -v)" = "11.21.0" || { echo "pnpm $(pnpm -v) != 11.21.0"; exit 1; }
- name: Install
env:
CI: 'true'
run: pnpm install --frozen-lockfile
# `pnpm build` ends in the prerender pass, which drives a real browser.
# Without this the build fails on its very last action, after everything
# else has gone green — the most expensive place to find a missing
# dependency.
- name: Install chromium
run: pnpm exec playwright install --with-deps chromium
- run: pnpm typecheck
- run: pnpm check
- run: pnpm test
- run: pnpm build
- run: node scripts/bundle-budget.mjs
# Crawlers do not run JavaScript. Without a real per-route HTML file every
# shared link previews as the homepage, and the failure is invisible from
# inside the app.
- name: The prerendered head is real
run: |
test -f dist/demos/wordle/index.html || { echo "no prerendered demo route"; exit 1; }
grep -q 'og:title' dist/demos/wordle/index.html || { echo "og tags missing"; exit 1; }
grep -q '<title>Word Five' dist/demos/wordle/index.html \
|| { echo "the demo route kept the homepage title"; exit 1; }
test -f dist/404.html || { echo "no 404.html"; exit 1; }
test -f dist/sitemap.xml || { echo "no sitemap.xml"; exit 1; }
# The site's CSP has no `worker-src`, so it falls back to
# `default-src 'self'` and a blob-backed worker is blocked with no console
# error — in production only. Grep for construction FROM a blob, not for
# the string anywhere: React's bundle contains it in a scheme check, and a
# check that fails on a risk which is not present teaches everyone to
# ignore it.
- name: No blob-backed workers
run: |
if grep -rEo "new (Shared)?Worker\([^)]{0,80}" dist/assets/*.js \
| grep -E "blob:|createObjectURL"; then
echo "a worker is constructed from a blob URL; production CSP blocks it silently"
exit 1
fi
echo "ok — no blob-backed worker construction in the bundle"
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: uv sync --all-packages
# If these do not reproduce, every downstream number — the conformance
# digest included — is describing a different game.
- name: The word lists rebuild identically
run: |
uv run python envs/wordle_five/words/build_words.py
git diff --exit-code envs/wordle_five/words/*.json
- run: uv run pytest envs/wordle_five/tests -q
- run: uv run python envs/probe.py
- run: uv run python envs/verify_fixtures.py
# The other half of the cross-language gate. Node scores the same 21.2M
# pairs and must produce the digest Python committed.
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Enable pnpm
env:
COREPACK_ENABLE_DOWNLOAD_PROMPT: '0'
run: |
corepack enable
corepack prepare --activate
- name: Install
env:
CI: 'true'
run: pnpm install --frozen-lockfile
- run: pnpm conformance
-105
View File
@@ -1,105 +0,0 @@
name: ci
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with: { version: 11.21.0 }
- uses: actions/setup-node@v5
with: { node-version: 22, cache: pnpm }
# Asserts the toolchain matches what package.json pins, rather than
# discovering a mismatch three steps later as an unrelated build error.
- name: preflight
run: |
test "$(pnpm -v)" = "11.21.0" || { echo "pnpm $(pnpm -v) != 11.21.0"; exit 1; }
- run: CI=true pnpm install --frozen-lockfile
# `pnpm build` ends in the prerender pass, which drives a real browser.
# Without this the build fails at the very last step, after everything
# else has passed, with a Playwright message about installing browsers.
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm typecheck
- run: pnpm check
- run: pnpm test
- run: pnpm build
- run: node scripts/bundle-budget.mjs
# The prerender pass writes a real HTML file per route. Crawlers do not
# run JavaScript, so without these every shared link previews as the
# homepage — assert the baked tags actually landed.
- name: prerendered head is real
run: |
test -f dist/demos/wordle/index.html || { echo "no prerendered demo route"; exit 1; }
grep -q 'og:title' dist/demos/wordle/index.html || { echo "og tags missing"; exit 1; }
grep -qv 'PIG Demo — RL environments you can play</title>' dist/demos/wordle/index.html \
|| { echo "demo route kept the homepage title"; exit 1; }
test -f dist/404.html || { echo "no 404.html"; exit 1; }
# sitemap.xml is written by a build step, not by Vite copying public/.
# It went missing once because the step was outside `pnpm build`, and
# nothing noticed until a 404 on the live host.
test -f dist/sitemap.xml || { echo "no sitemap.xml"; exit 1; }
# A blob-backed worker is blocked in production and nowhere else: the
# site's CSP has no worker-src, so it falls back to default-src 'self'.
# The failure is silent — the worker simply never boots.
#
# Grep for worker construction FROM a blob, not for the string `blob:`
# anywhere. React's own bundle contains that string in a URL-scheme check,
# so the broad version fails on a risk that is not present, which teaches
# everyone to ignore it.
- name: no blob-backed workers
run: |
if grep -rEo "new (Shared)?Worker\([^)]{0,80}" dist/assets/*.js \
| grep -E "blob:|createObjectURL"; then
echo "a worker is constructed from a blob URL; production CSP blocks it silently"
exit 1
fi
echo "ok — no blob-backed worker construction in the bundle"
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with: { enable-cache: true }
- run: uv sync --all-packages
# Rebuild the word lists from their committed sources and assert the
# output is byte-identical. If it is not, every downstream number —
# the conformance digest included — is describing a different game.
- name: word lists rebuild identically
run: |
uv run python envs/wordle_five/words/build_words.py
git diff --exit-code envs/wordle_five/words/*.json
- run: uv run pytest envs/wordle_five/tests -q
- run: uv run python envs/probe.py
# The cross-language gate. Both halves score all 21.2M (guess, answer)
# pairs; the digests must match each other and the committed value.
- uses: pnpm/action-setup@v4
with: { version: 11.21.0 }
- uses: actions/setup-node@v5
with: { node-version: 22, cache: pnpm }
- run: CI=true pnpm install --frozen-lockfile
- run: pnpm conformance
# Every committed fixture must replay through the Python engine and
# reproduce its own recorded rewards. A fixture that cannot be
# regenerated is a claim with no receipt behind it.
- run: uv run python envs/verify_fixtures.py
+1 -1
View File
@@ -43,7 +43,7 @@ https://github.com/recharts/recharts
--------------------------------------------------------------------------------
PIG (Prime Intellect Growth) — Apache-2.0
https://github.com/karti-ai/PIG-Demo is a sibling of that project. The design
https://git.karti.ai/PIG/PIG-Demo is a sibling of that project. The design
token layer in src/index.css and the palette in tailwind.config.js are derived
from it. Same author; the notice is here because this repository is public and
Apache-2.0 section 4(d) asks for it either way.
+3
View File
@@ -128,6 +128,9 @@ scores above zero.
Full accounting: [demo.primeintellectgrowth.com/honesty](https://demo.primeintellectgrowth.com/honesty)
Also served at [demo.lumbridgecorp.com](https://demo.lumbridgecorp.com); the
canonical name is the first one and every page says so in its `<link rel=canonical>`.
## Adding a demo
```bash
+2 -2
View File
@@ -29,10 +29,10 @@
<h1 style="font-size:1.5rem;margin-bottom:1rem">PIG Demo</h1>
<p>These demos are interactive and need JavaScript. The substance behind them does not.</p>
<p>Every demo on this site ships a real <a href="https://github.com/PrimeIntellect-ai/verifiers">verifiers</a> environment and a set of recorded rollouts, both in the repository. You can run the environment yourself:</p>
<pre style="background:#f4f4f5;padding:1rem;border-radius:.5rem;overflow-x:auto"><code>git clone https://github.com/karti-ai/PIG-Demo
<pre style="background:#f4f4f5;padding:1rem;border-radius:.5rem;overflow-x:auto"><code>git clone https://git.karti.ai/PIG/PIG-Demo
cd PIG-Demo &amp;&amp; uv sync --all-packages
uv run vf-eval wordle-five -n 8</code></pre>
<p><a href="https://github.com/karti-ai/PIG-Demo">Read the source on GitHub </a></p>
<p><a href="https://git.karti.ai/PIG/PIG-Demo">Read the source →</a></p>
</main>
</noscript>
<script type="module" src="/src/main.tsx"></script>
+1 -1
View File
@@ -3,7 +3,7 @@ import type { ErrorInfo, ReactNode } from 'react';
import { AlertTriangle, ExternalLink, RotateCcw } from 'lucide-react';
import { Button } from '@/components/ui/button';
const REPO_URL = 'https://github.com/karti-ai/PIG-Demo';
const REPO_URL = 'https://git.karti.ai/PIG/PIG-Demo';
export interface DemoErrorBoundaryProps {
children: ReactNode;
+1 -1
View File
@@ -35,7 +35,7 @@ import { RecordedBadge, TracePlayer } from './TracePlayer';
import { VerifyBadge } from './VerifyBadge';
import { formatOrDash, useIsDesktop } from './format';
const REPO_BLOB = 'https://github.com/karti-ai/PIG-Demo/blob/main/';
const REPO_BLOB = 'https://git.karti.ai/PIG/PIG-Demo/src/branch/main/';
/** The tab the step-detail strip opens on. Kept out of the URL when it is this. */
const DEFAULT_DETAIL_TAB = 'reasoning';
+3 -3
View File
@@ -1,5 +1,5 @@
import { Link } from 'react-router-dom';
import { Github } from 'lucide-react';
import { GitBranch } from 'lucide-react';
import { Separator } from '@/components/ui/separator';
import { PIG_URL, REPO_URL } from '@/components/site/links';
@@ -24,8 +24,8 @@ export function SiteFooter() {
target="_blank"
rel="noreferrer noopener"
>
<Github aria-hidden="true" className="size-4" />
Source on GitHub
<GitBranch aria-hidden="true" className="size-4" />
Source on Gitea
</a>
<Link
className="tap inline-flex items-center py-1 text-fg underline-offset-4 hover:text-accent-fg hover:underline"
+5 -5
View File
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Link } from 'react-router-dom';
import { ArrowRight, ArrowUpRight, Github, Menu } from 'lucide-react';
import { ArrowRight, ArrowUpRight, GitBranch, Menu } from 'lucide-react';
import { listDemos } from '@/lib/demo-kit/registry';
import type { DemoMeta } from '@/lib/demo-kit/types';
@@ -440,8 +440,8 @@ function MobileNav({
rel="noreferrer noopener"
className="tap flex items-center justify-between border-b border-border py-3 text-sm font-medium text-fg"
>
Source on GitHub
<Github aria-hidden="true" className="size-4 text-muted" />
Source on Gitea
<GitBranch aria-hidden="true" className="size-4 text-muted" />
</a>
<div className="flex items-center gap-1 pt-3">
@@ -534,9 +534,9 @@ export function SiteHeader() {
href={REPO_URL}
target="_blank"
rel="noreferrer noopener"
aria-label="Source on GitHub"
aria-label="Source on Gitea"
>
<Github aria-hidden="true" />
<GitBranch aria-hidden="true" />
</a>
</Button>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@
* The three off-site destinations the chrome links to, in one place so the
* header and the footer can never disagree about them.
*/
export const REPO_URL = 'https://github.com/karti-ai/PIG-Demo';
export const REPO_URL = 'https://git.karti.ai/PIG/PIG-Demo';
export const PIG_URL = 'https://primeintellectgrowth.com';
export const VERIFIERS_WORDLE_URL =
'https://github.com/PrimeIntellect-ai/verifiers/tree/main/environments/wordle';
+1 -1
View File
@@ -125,7 +125,7 @@ export const optimalPlay = {
/** Commands anyone can run against a clone of this repository. */
export const reproduce = {
clone: 'git clone https://github.com/karti-ai/PIG-Demo',
clone: 'git clone https://git.karti.ai/PIG/PIG-Demo',
install: 'cd PIG-Demo && uv sync --all-packages',
evaluate: 'uv run vf-eval wordle-five -n 8',
conformance: 'pnpm conformance',
+1 -1
View File
@@ -43,7 +43,7 @@ export default defineDemo<BoardState>({
},
{
label: 'Our word lists and how they were built',
href: 'https://github.com/karti-ai/PIG-Demo/blob/main/envs/wordle_five/words/PROVENANCE.md',
href: 'https://git.karti.ai/PIG/PIG-Demo/src/branch/main/envs/wordle_five/words/PROVENANCE.md',
},
],
},
+1 -1
View File
@@ -102,7 +102,7 @@ export default function NotFound() {
Honesty
</Link>
<a className={s.btnSecondary} href={REPO_URL} rel="noreferrer noopener" target="_blank">
The source on GitHub
The source
</a>
</div>
</div>
+1 -1
View File
@@ -111,7 +111,7 @@ function describeError(error: unknown): { heading: string; body: string; detail?
if (error instanceof Error) {
return {
heading: 'This page failed to load',
body: 'The rest of the site still works. If this keeps happening, the source is on GitHub and the issue is reproducible from it.',
body: 'The rest of the site still works. If this keeps happening, the source is public and the issue is reproducible from it.',
detail: error.message,
};
}