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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if has nix && [ -f flake.nix ]; then
fi

# Project environment variables
export PROJECT_NAME="{{PROJECT_NAME}}"
export PROJECT_NAME="gv-clade-index"
export RSR_TIER="infrastructure"
# export DATABASE_URL="..."
# export API_KEY="..."
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/boj-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
trigger-boj:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/worker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
build-test:
name: Lint, format, test, bundle
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -34,11 +35,10 @@ jobs:
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '22'
cache: npm
cache-dependency-path: worker/package-lock.json

# No tracked package-lock.json (npm-avoidant policy) → npm install, not npm ci.
- name: Install dependencies
run: npm ci
run: npm install --no-audit --no-fund

- name: Lint (eslint)
run: npm run lint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
timeout-minutes: 15
# Manual dispatch picks the env (production requires approval if the
# "production" GitHub Environment has protection rules); push → staging.
environment: ${{ github.event_name == 'workflow_dispatch' && inputs.environment || 'staging' }}
Expand All @@ -45,11 +46,10 @@ jobs:
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '22'
cache: npm
cache-dependency-path: worker/package-lock.json

# No tracked package-lock.json (npm-avoidant policy) → npm install, not npm ci.
- name: Install dependencies
run: npm ci
run: npm install --no-audit --no-fund

- name: Test before deploy
run: npm test
Expand Down
10 changes: 4 additions & 6 deletions .well-known/security.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# RFC 9116 - security.txt
# https://securitytxt.org/

Contact: mailto:{{SECURITY_EMAIL}}
Expires: {{CURRENT_YEAR}}-12-31T23:59:59.000Z
Encryption: {{PGP_KEY_URL}}
Contact: mailto:j.d.a.jewell@open.ac.uk
Expires: 2026-12-31T23:59:59.000Z
Preferred-Languages: en
Canonical: https://{{FORGE}}/{{OWNER}}/{{REPO}}/.well-known/security.txt
Policy: https://{{FORGE}}/{{OWNER}}/{{REPO}}/blob/main/SECURITY.md
Hiring: https://{{WEBSITE}}/careers
Canonical: https://github.com/hyperpolymath/gv-clade-index/.well-known/security.txt
Policy: https://github.com/hyperpolymath/gv-clade-index/blob/main/SECURITY.md
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ This repo includes a `clade-hygiene.a2ml` contractile:
| 0 | Clade taxonomy, repo seed, VCL schema | *Complete*
| 1 | Deploy CLADE.a2ml to all 200 repos | Pending
| 2 | VeriSimDB instance on VPS | Pending
| 3 | Cloudflare Worker API | Pending
| 4 | AffineScript/typed-WASM portal | Pending
| 3 | Cloudflare Worker API (hardened, tested, CI-gated) | In progress (~60%)
| 4 | ReScript/typed-WASM portal | Pending
| 5 | LLM query endpoint | Pending
| 6 | Bot write endpoints | Pending
| 7 | Contributor OAuth | Pending
Expand Down
51 changes: 37 additions & 14 deletions ROADMAP.adoc
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
// SPDX-License-Identifier: MPL-2.0
= Gv Clade Index Roadmap
= gv-clade-index Roadmap

== Current Status
Mirrors the canonical phase plan in `.machine_readable/6a2/STATE.a2ml`. The registry
is the *map* of the hyperpolymath ecosystem; "production" means a hardened, observable,
CI-deployed Cloudflare Worker API backed by a live VeriSimDB.

Initial development phase.
== Current status

== Milestones
* Maturity: *alpha*. Phase 0 complete; Phase 3 (Worker API) in progress.
* The Cloudflare Worker is import-fixed, hardened, tested (Vitest) and CI-gated.
Automated deploy and live VeriSimDB backing are the remaining external steps.

=== v0.1.0 - Foundation
* [ ] Core functionality
* [ ] Basic documentation
* [ ] CI/CD pipeline
== Phases

=== v1.0.0 - Stable Release
* [ ] Full feature set
* [ ] Comprehensive tests
* [ ] Production ready
[cols="1,4,2"]
|===
| Phase | Deliverable | Status

== Future Directions
| 0 | Clade taxonomy, repo seed, VCL schema, named queries | *Complete*
| 1 | Deploy CLADE.a2ml to all ~200 repos | Pending
| 2 | VeriSimDB instance on VPS + ingest | Pending (external infra)
| 3 | Cloudflare Worker API (hardened, tested, deployed) | In progress (~60%)
| 4 | ReScript/typed-WASM portal on github.io | Pending
| 5 | LLM query endpoint (API-key tier) | Pending
| 6 | Bot write endpoints (signed JWT) + TODO octads | Pending
| 7 | Contributor OAuth + scoped access | Pending
| 8 | Repo lockdown (visibility management) | Pending
|===

_To be determined based on community feedback._
== Cross-cutting workstreams

* *Engineering hygiene* — toolchain, tests, linting, docs/reality alignment.
* *Worker hardening* — input validation, security headers, rate limiting, structured logs, readiness.
* *Observability & ops* — logging, metrics, backups, drift detection, runbook.
* *Security* — tiered auth (public / LLM key / bot JWT / contributor OAuth), secrets, supply chain.
* *CI/CD* — test-gated CI + automated Cloudflare deploy (staging → production).

== External prerequisites (owner-provided)

* `CLOUDFLARE_API_TOKEN` secret — enables automated Worker deploys (Phase 3).
* VeriSimDB instance on a VPS — the declared source of truth (Phase 2).
* GitHub OAuth app + JWT signing key — Phases 6–7.

See `.machine_readable/6a2/STATE.a2ml` for live status and blockers.
43 changes: 27 additions & 16 deletions TEST-NEEDS.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
# TEST-NEEDS.md — gv-clade-index

## CRG Grade: C — ACHIEVED 2026-04-04
## Current test state

## Current Test State
The deliverable is the Cloudflare Worker registry API (`worker/`). Tests run on
Vitest (Node) and are gated in CI by `.github/workflows/worker-ci.yml`.

| Category | Count | Notes |
|----------|-------|-------|
| Test files | 1 | Current state |
| Suite | Location | Count | Covers |
|-------|----------|-------|--------|
| Worker integration | `worker/test/worker.test.js` | 30 | Routing, input validation, security headers, CORS, pagination, search/LLM, 405/404/429/500/503 paths, KV-fallback queries, fuzz (no uncontrolled 5xx) |
| Data contract | `worker/test/data.test.js` | 3 | 12-clade invariant + snapshot count/membership consistency |

## What's Covered
Run:

- [x] 1 existing test file(s)
- [x] Zig FFI integration tests
```bash
cd worker && npm install && npm test
```

## Still Missing (for CRG B+)
## Covered

- [ ] CI/CD test automation
- [ ] Property-based tests
- [ ] Edge case coverage
- [x] Unit + integration tests for all 9 API endpoints
- [x] Input validation and error-path tests (400/404/405/429/500/503)
- [x] Fuzz sweep (random paths/params → no uncontrolled 5xx)
- [x] Data contract test (clade invariant, count consistency)
- [x] CI automation (lint + format + test + bundle dry-run on every PR)

## Run Tests
## Still missing

```bash
cd src/interface/ffi/test && cargo test
```
- [ ] Integration tests against a live VeriSimDB (blocked on Phase 2)
- [ ] End-to-end smoke tests against a deployed staging Worker
- [ ] Tests for the future auth tiers (LLM key, bot JWT, contributor OAuth)

## Notes

This project has **no native/FFI surface**. The former Zig FFI template stubs
under `src/interface/ffi/` were removed — they were non-compiling `{{project}}`
template placeholders, not real tests.
15 changes: 14 additions & 1 deletion src/interface/ffi/README.adoc
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
= ffi Logic
// SPDX-License-Identifier: MPL-2.0
= FFI surface

gv-clade-index has *no native/FFI surface*. It is a data + edge project: the runtime
artifact is a Cloudflare Worker (JavaScript, see `worker/`) backed by VeriSimDB; there
is no compiled library exposing a C ABI.

The `src/interface/{abi,ffi,generated}` directories are retained only to satisfy the RSR
repository structure (`just validate-rsr`). Their previous contents were non-compiling
`{{project}}` Zig/Idris template stubs and have been removed to avoid implying a
verification or FFI surface that does not exist (cf. `PROOF-NEEDS.md`).

If a native surface is ever introduced, restore `build.zig`, `src/main.zig` and
`test/integration_test.zig` from the RSR template and wire them into CI.
94 changes: 0 additions & 94 deletions src/interface/ffi/build.zig

This file was deleted.

Loading
Loading