Skip to content

Commit 9a69b42

Browse files
Merge pull request #205 from CodeForPhilly/develop
Release: v0.6.0
2 parents 0aa4b8f + a2adc5f commit 9a69b42

100 files changed

Lines changed: 5192 additions & 1505 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.env.example‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ NODE_ENV=development
1717
# Public gitsheets data repo
1818
# ---------------------------------------------------------------------------
1919

20-
# Path to the codeforphilly-data working tree. Relative paths are resolved
21-
# from the API workspace dir (`apps/api/`) — prefer absolute paths in dev.
22-
# Bootstrap a fresh dev data repo with the sheet configs the API needs:
23-
# npm run -w apps/api script:setup-dev-data
24-
# (Uses this CFP_DATA_REPO_PATH; creates the directory + git repo + .gitsheets/<sheet>.toml.)
25-
# In production, point at a clone of https://github.com/CodeForPhilly/codeforphilly-data.
20+
# Path to a BARE clone of codeforphilly-data (the API refuses a non-bare
21+
# clone). Relative paths are resolved from the API workspace dir
22+
# (`apps/api/`) — prefer absolute paths in dev. For a small seed:
23+
# git clone --bare --branch fixture https://github.com/CodeForPhilly/codeforphilly-data.git ../codeforphilly-data
24+
# (`--branch published` for the full laddr import.)
2625
CFP_DATA_REPO_PATH=../codeforphilly-data
2726

2827
# Git remote URL to push public data commits to. Optional in dev; required in prod.

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,23 @@ jobs:
3535
- name: Test
3636
run: npm test
3737

38+
# Tests seed from apps/api/gitsheets/; fail if that copy drifts from
39+
# the data repo's `empty` branch, which production configs descend from.
40+
# codeforphilly-data is private: this needs a read-only deploy key in
41+
# CFP_DATA_DEPLOY_KEY, and warns instead of failing without one.
42+
- name: Check sheet configs against codeforphilly-data
43+
env:
44+
CFP_DATA_DEPLOY_KEY: ${{ secrets.CFP_DATA_DEPLOY_KEY }}
45+
run: |
46+
if [ -z "$CFP_DATA_DEPLOY_KEY" ]; then
47+
echo "::warning title=Sheet-config drift check skipped::CFP_DATA_DEPLOY_KEY is not set, so CI can't read the private codeforphilly-data repo."
48+
exit 0
49+
fi
50+
mkdir -p "$HOME/.ssh"
51+
printf '%s\n' "$CFP_DATA_DEPLOY_KEY" > "$HOME/.ssh/id_ed25519"
52+
chmod 600 "$HOME/.ssh/id_ed25519"
53+
ssh-keyscan github.com >> "$HOME/.ssh/known_hosts"
54+
npm run -w apps/api check:sheet-configs
55+
3856
- name: Build
3957
run: npm run build

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build/
1818
# it ships in the code repo so contributors can load a fake-data baseline.
1919
private-storage/
2020

21-
# Dev data repo created by `npm run -w apps/api script:setup-dev-data`.
21+
# Local data-repo clone, if placed inside this repo.
2222
# Resolved relative to apps/api/ per .env.example's CFP_DATA_REPO_PATH default.
2323
apps/codeforphilly-data/
2424
codeforphilly-data/
@@ -39,3 +39,6 @@ codeforphilly-data/
3939
# Logs
4040
*.log
4141
npm-debug.log*
42+
43+
# Lavish review artifacts
44+
.lavish/

‎apps/api/gitsheets/blog-posts.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[gitsheet]
2+
root = 'blog-posts'
3+
path = '${{ slug }}'
4+
5+
[gitsheet.format]
6+
type = 'markdown'
7+
body = 'body'
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"$id" = "https://codeforphilly.org/person-evaluations/v1"
2+
"$schema" = "http://json-schema.org/draft-07/schema#"
3+
description = 'One spam verdict about one person from one evaluator. Machine evaluators (heuristic, LLM, github-probe) write these in the private codeforphilly-spam-detection repo; staff votes are written to codeforphilly-data by the site with evaluator = "human-<voterSlug>". Records are interchangeable at prune time.'
4+
required = ["evaluatedAt", "evaluator", "flags", "personSlug", "verdict"]
5+
title = "Person evaluation"
6+
type = "object"
7+
8+
[properties.confidence]
9+
description = "0-1. LLM and probe evaluators; 1 on human votes; absent on heuristic records."
10+
maximum = 1
11+
minimum = 0
12+
type = "number"
13+
14+
[properties.evaluatedAt]
15+
description = "ISO 8601 UTC."
16+
format = "date-time"
17+
type = "string"
18+
19+
[properties.evaluator]
20+
description = "Model/run id (e.g. haiku-2026-05) or human-<voterSlug>."
21+
minLength = 1
22+
type = "string"
23+
24+
[properties.flags]
25+
description = "Short reason tags."
26+
type = "array"
27+
28+
[properties.flags.items]
29+
type = "string"
30+
31+
[properties.personSlug]
32+
description = "Slug of the evaluated person."
33+
minLength = 1
34+
type = "string"
35+
36+
[properties.reasoning]
37+
description = "Free-text justification. Optional on human votes."
38+
type = "string"
39+
40+
[properties.score]
41+
description = "Heuristic evaluators only: rule points, unbounded."
42+
type = "integer"
43+
44+
[properties.verdict]
45+
enum = ["spam", "legit", "uncertain"]
46+
type = "string"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[gitsheet]
2+
root = 'help-wanted-interest'
3+
path = '${{ roleId }}/${{ personSlug }}'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[gitsheet]
2+
root = 'help-wanted-roles'
3+
path = '${{ projectSlug }}/${{ id }}'

‎apps/api/gitsheets/people.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[gitsheet]
2+
root = 'people'
3+
path = '${{ slug }}'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[gitsheet]
2+
path = "${{ personSlug }}/${{ evaluator }}"
3+
root = "person-evaluations"
4+
5+
# One spam verdict per (person, evaluator). On this repo's branches the only
6+
# writer is the site: staff votes with evaluator = "human-<voterSlug>" (see
7+
# codeforphilly-ng specs/api/moderation.md). Machine evaluators (heuristic,
8+
# LLM) live in the private codeforphilly-spam-detection repo. The record
9+
# shape is the versioned contract below, which both repos and the site open
10+
# the sheet against; change it by adopting a new version (…/v2), never by
11+
# editing v1.
12+
implements = ["codeforphilly.org/person-evaluations/v1"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[gitsheet]
2+
root = 'project-buzz'
3+
path = '${{ projectSlug }}/${{ slug }}'

0 commit comments

Comments
 (0)