Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# The participant platform pin decides which build /survey26/platform/ serves.
# Changes here are routed to the platform maintainer for a look.
/scripts/agent-observer.json @BH3GEI
# Event ownership moved to the independent repositories listed in config/event-sites.json.
/config/ @hzeng8
/scripts/ @hzeng8
/.github/workflows/ @hzeng8
41 changes: 0 additions & 41 deletions .github/workflows/agent-observer-pin.yml

This file was deleted.

90 changes: 32 additions & 58 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,68 @@ name: Deploy hackathon sites to GitHub Pages

on:
push:
branches:
- main
branches: [main]
pull_request:
workflow_dispatch:
schedule:
# Refresh the ARC-Bench leaderboard snapshot for the public competition (the upstream API restricts browser CORS).
# Collect independently published events and refresh the ARC-Bench snapshot.
- cron: '*/5 * * * *'

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true
group: pages-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: |
hub/package-lock.json
events/oaic-harness-2026/package-lock.json
events/agentic-hackathon-paris-2026/package-lock.json
events/agentic-cosmos-2026/package-lock.json
events/agent2app-2026/package-lock.json

- name: Install Hub dependencies
run: npm ci --prefix hub

- name: Install OAIC Harness dependencies
run: npm ci --prefix events/oaic-harness-2026

- name: Install Paris Agentic Hackathon dependencies
run: npm ci --prefix events/agentic-hackathon-paris-2026

- name: Install Cosmos Agentic Hackathon dependencies
run: npm ci --prefix events/agentic-cosmos-2026

- name: Install Agentic App dependencies
run: npm ci --prefix events/agent2app-2026

- name: Prepare pinned Agent Observer platform
if: vars.COSMOS_PLATFORM_ENABLED == 'true'
run: npm run prepare:platform

- name: Check platform routing
run: npm run test:platform

- name: Build complete site
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Hub and Paris dependencies
run: |
npm ci --prefix hub
npm ci --prefix events/agentic-hackathon-paris-2026
- name: Check routing and release validation
run: |
npm run test:platform
npm run test:releases
npm test --prefix hub
- name: Build complete site from successful event releases
run: npm run build
env:
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
VITE_SITE_URL: https://create.gosim.org/factory26
GH_TOKEN: ${{ github.token }}
PARIS_VITE_SUPABASE_URL: ${{ secrets.PARIS_VITE_SUPABASE_URL }}
PARIS_VITE_SUPABASE_ANON_KEY: ${{ secrets.PARIS_VITE_SUPABASE_ANON_KEY }}
PARIS_VITE_SITE_URL: https://create.gosim.org/agenticparis26
COSMOS_VITE_SUPABASE_URL: ${{ secrets.COSMOS_VITE_SUPABASE_URL }}
COSMOS_VITE_SUPABASE_ANON_KEY: ${{ secrets.COSMOS_VITE_SUPABASE_ANON_KEY }}
COSMOS_VITE_SITE_URL: https://create.gosim.org/survey26
COSMOS_PLATFORM_ENABLED: ${{ vars.COSMOS_PLATFORM_ENABLED }}
COSMOS_VITE_AGENT_OBSERVER_URL: ${{ vars.COSMOS_VITE_AGENT_OBSERVER_URL }}
COSMOS_VITE_AGENT_OBSERVER_LEADERBOARD_API: ${{ vars.COSMOS_VITE_AGENT_OBSERVER_LEADERBOARD_API }}

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
- name: Verify assembled site
run: node scripts/verify-site.mjs
- uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/configure-pages@v5
- id: deployment
uses: actions/deploy-pages@v4
21 changes: 21 additions & 0 deletions .github/workflows/retired-directories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Retired event directories
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Active event source must stay in its own repository
run: |
set -euo pipefail
for directory in events/oaic-harness-2026 events/agentic-cosmos-2026 events/agent2app-2026; do
if test -d "$directory"; then
echo "::error::${directory} has moved. See README.md for its new repository."
exit 1
fi
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ src/**/*.js
supabase/.temp/
supabase/.branches/
.gstack/
__pycache__/
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Shared domain publisher

Read README.md and docs/repository-migration.md before editing.
Active event source code lives in the independent repositories listed in
config/event-sites.json. Do not recreate the removed event source directories.
This repository owns the hub, archived Paris site, shared routing and assembly.
Keep public URLs and authentication callbacks stable.
Use Node.js 22 and Python 3.12+. Validate routing, release validation, hub tests,
and the assembled site when changing deployment.
127 changes: 61 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,84 @@
# GOSIM Hackathons
# GOSIM Hackathons — shared domain publisher

Single GitHub Pages repository for `create.gosim.org`.
This repository owns the hub at **https://create.gosim.org/**, the archived
Paris event, and the final GitHub Pages deployment. The active events are now
maintained and built independently:

## Repository layout
| Website | Source repository | Local development |
| --- | --- | --- |
| `/factory26/` | [gosimfoundation/factory26](https://github.com/gosimfoundation/factory26) | `npm ci && npm run dev` |
| `/survey26/` → `/survey26/platform/` | [gosimfoundation/agent-observer](https://github.com/gosimfoundation/agent-observer) | `npm ci --prefix web && npm run dev --prefix web` |
| `/agenticapp26/` | [gosimfoundation/agenticapp26](https://github.com/gosimfoundation/agenticapp26) | `npm ci && npm run dev` |
| `/agenticparis26/` | `events/agentic-hackathon-paris-2026/` in this repository | `npm run dev:agentic-hackathon-paris-2026` |

```text
hub/ # create.gosim.org/
events/oaic-harness-2026/ # /factory26/
events/agentic-hackathon-paris-2026/
# /agenticparis26/
events/agentic-cosmos-2026/ # /survey26/
events/agent2app-2026/ # /agenticapp26/
scripts/build-site.mjs # assembles the Pages artifact
```
**请在对应的新仓库修改活动网站。旧的本地项目不会自动切换,请重新克隆并在编辑器中打开新仓库。**
See [migration and team handoff](docs/repository-migration.md).

## Publishing

Each active event publishes a versioned GitHub Release only after its build
succeeds. This repository downloads and verifies those artifacts, builds the
hub and Paris, then assembles one GitHub Pages site. Public URLs, DNS, databases,
and authentication callback URLs are unchanged.

Each event is an independent application with its own `package.json`, lockfile,
source code, and maintainers. Event teams should limit pull requests to their
event directory unless a shared deployment change is required.
`config/event-sites.json` selects each source repository and release (`latest`
by default). A failed event build leaves its previous successful release in use.
Download, checksum, or assembly failures abort the deployment and leave the live
site intact. `deployment.json` at the site root records exactly what is deployed.

## Local development
The existing five-minute schedule collects new releases and refreshes Factory's
ARC-Bench leaderboard snapshot. GitHub schedules can be delayed. Run **Deploy
hackathon sites to GitHub Pages** manually for an immediate collection after an
event release succeeds. No cross-repository personal access token is needed.

Install dependencies once per application:
Rollback: change an event's `release` to a known-good `site-...` tag and redeploy.
Set it back to `latest` to resume automatic collection.

## Local development and verification

Use Node.js 22, Python 3.12+, and GitHub CLI (`gh auth login`).

```bash
npm ci --prefix hub
npm ci --prefix events/oaic-harness-2026
npm ci --prefix events/agentic-hackathon-paris-2026
npm ci --prefix events/agentic-cosmos-2026
npm ci --prefix events/agent2app-2026
npm run dev:hub
```

Run one application:
Build and preview the complete site (requires network access to GitHub releases):

```bash
npm run dev:hub
npm run dev:oaic-harness-2026
npm run dev:agentic-hackathon-paris-2026
npm run dev:agentic-cosmos-2026
npm run dev:agent2app-2026
npm run build
npm run preview
```

Build the complete Pages artifact:
For local Paris authentication, set `PARIS_VITE_SUPABASE_URL` and
`PARIS_VITE_SUPABASE_ANON_KEY`. CI retains the existing Paris repository secrets.
The hub obtains Factory and Survey's public project URLs from release manifests.

```bash
npm run build
npm run test:platform
npm run test:releases
npm test --prefix hub
node scripts/verify-site.mjs # after building
```

The result is written to `_site/`. GitHub Actions deploys that directory as one
Pages site.
## Authentication and routes

## Password reset redirects
Keep existing Supabase Site URLs and allowed callbacks:

Each event's Supabase project should use its event URL as the Auth Site URL and
allow its callback URL under **Authentication → URL Configuration → Redirect URLs**:
| Event | Site URL / allowed reset callback |
| --- | --- |
| Factory | `https://create.gosim.org/factory26` and trailing-slash variant |
| Paris | `https://create.gosim.org/agenticparis26` and trailing-slash variant |
| Survey platform | `https://create.gosim.org/survey26/platform` / `/survey26/platform/register` |

| Project | Site URL | Allowed reset callback |
| --- | --- | --- |
| Factory26 | `https://create.gosim.org/factory26` | `https://create.gosim.org/factory26` and `https://create.gosim.org/factory26/` |
| Paris | `https://create.gosim.org/agenticparis26` | `https://create.gosim.org/agenticparis26` and `https://create.gosim.org/agenticparis26/` |
| Survey26 | `https://create.gosim.org/survey26` | `https://create.gosim.org/survey26/register` |

Keep the standard reset email's `{{ .ConfirmationURL }}` link so Supabase verifies
the recovery request before returning to the app. See the
[Supabase redirect URL documentation](https://supabase.com/docs/guides/auth/redirect-urls).

The hub also forwards legacy root auth callbacks, preserving the query and hash.
Build-time public Supabase project URLs select the event; callbacks without a
matching issuer use Factory26, which previously occupied the root. Tokens are
validated by the destination app's Supabase client, not by the hub.

Run redirect regression tests with `npm test --prefix hub`. To verify a real
reset after deployment, request a fresh email, open it in a signed-out browser,
confirm the new-password form appears, and confirm login with the new password.

## Add another event

1. Create `events/<event-slug>/` with its own application and lockfile.
2. Configure the application to build with `/<event-slug>/` as its base path.
3. Add the event to `hub/src/events.ts`.
4. Add the event build to `scripts/build-site.mjs` and the dependency install to
`.github/workflows/deploy.yml`.
5. Add the slug to `hub/public/404.html` so deep links can be restored.
6. Add the slug to `scripts/serve-site.mjs` so local preview deep links work.
7. Add directory ownership rules once the event's GitHub team is known.

The event slug configured by the root build is the public URL segment; it does
not need to match the source directory. Renaming a public slug requires an
explicit redirect from the former URL.
The root 404 handler restores event deep links and recovery fragments. The hub
also forwards legacy root authentication callbacks. Its unmatched-issuer fallback
continues to be Factory, which previously occupied the root.

## Add an event

Create an independent event repository with a versioned site release workflow,
add its identity and required entry points to `config/event-sites.json`, and
update `hub/src/events.ts`, the root 404 routing, local preview routing, and
verification coverage. Preserve established public URL segments.
5 changes: 5 additions & 0 deletions config/event-sites.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
{ "slug": "factory26", "repository": "gosimfoundation/factory26", "release": "latest", "requiredFiles": ["index.html"] },
{ "slug": "survey26", "repository": "gosimfoundation/agent-observer", "release": "latest", "requiredFiles": ["index.html", "platform/index.html", "platform/restore-route.js", "platform/deployment.json"] },
{ "slug": "agenticapp26", "repository": "gosimfoundation/agenticapp26", "release": "latest", "requiredFiles": ["index.html"] }
]
Loading
Loading