Merge feat/panproto-codegen: v0.4.0 panproto-native architecture

Author: Aaron Steven White
Commit 2fa39d9c70594575220ca1133fea99ed8c26e004
Structural diff unavailable

These commits were pushed via plain git push, so no pre-parsed schemas are available. Install git-remote-cospan and re-push via panproto:// to see scope-level changes, breaking change detection, and semantic diffs.

brew install panproto/tap/git-remote-cospan
167 files changed +9114 -2761
@@ -68,4 +68,18 @@ jobs:
6868       - run: cargo run -p cospan-codegen
6969       - run: test -f generated/sql/schema.sql
7070       - run: test -f generated/rust/types.rs
71+      - run: test -f generated/rust/row_types.rs
72+      - run: test -f generated/rust/crud.rs
73+      - run: test -f generated/rust/from_json.rs
7174       - run: test -f generated/typescript/types.ts
75+      - run: test -f generated/sql/baseline.json
76+
77+  schema-check:
78+    name: Schema Breaking Change Detection
79+    runs-on: ubuntu-latest
80+    steps:
81+      - uses: actions/checkout@v4
82+      - uses: dtolnay/rust-toolchain@stable
83+      - uses: Swatinem/rust-cache@v2
84+      - run: cargo run -p cospan-codegen
85+      - run: cargo run -p cospan-codegen -- --check
@@ -13,5 +13,7 @@ build/
1313 planning/
1414 PROGRESS.md
1515 /generated/
16+crates/cospan-appview/src/db/generated/
17+vendor/
1618 .claude/
1719 pnpm-lock.yaml
1719 
\ No newline at end of file
@@ -1,5 +1,47 @@
11 # Changelog
22 
3+## v0.4.0
4+
5+### Panproto-native architecture
6+
7+Every data layer is now powered by panproto — schemas, morphisms, field transforms, and instance parsing replace all hand-written string munging.
8+
9+**Schema-driven record processing**
10+- All 130 Lexicon files (56 Cospan + 74 Tangled) parsed via `panproto_protocols::atproto::parse_lexicon()`
11+- Every incoming Jetstream record goes through `parse_json()` → `lift_wtype_sigma()` → `to_json()` → `serde_json::from_value()`
12+- DB projection field transforms (AT-URI decomposition, field renames, counter defaults, nested extraction) defined as panproto `FieldTransform` expressions (`ComputeField`, `RenameField`, `AddField`, `DropField`, `PathTransform`)
13+- 19 Cospan DB projections compiled at codegen time via `panproto_mig::compile()`
14+
15+**Tangled interop via panproto morphisms**
16+- 17 Tangled→Cospan morphisms defined as explicit `Migration` vertex/edge maps
17+- Compiled at codegen time, serialized to msgpack, loaded at appview startup
18+- Applied at runtime via `lift_wtype_sigma()` — no string template code generation
19+- Added `scripts/fetch-tangled-lexicons.sh` to pull latest from tangled.org/tangled.org/core
20+
21+**Generated code from Lexicons**
22+- sqlx-compatible Row types for all 19 record types
23+- CRUD functions (upsert, delete, get, list) per record type
24+- SQL DDL migrations generated from Schema vertices/edges/constraints
25+- 24 XRPC Input/Params types generated from Lexicon query/procedure definitions
26+- 36 new Lexicon files for all XRPC query and procedure endpoints
27+- TypeScript interfaces now exported (`export interface`)
28+- Breaking change detection via `panproto_check::diff()` + `classify()` (`--check` mode)
29+
30+**Consumer dispatch**
31+- Generic dispatch table for simple records (upsert/delete with no side effects)
32+- Special-case arms only for records with business logic (counter updates, SSE events, state transitions)
33+- Centralized `at_uri` module replaces all inline AT-URI parsing
34+
35+**Replaced ~2,700 lines of hand-written code** with panproto-powered codegen and runtime transforms.
36+
37+## v0.3.2
38+
39+- fix: include all 248 languages (was filtering out injection grammars)
40+
41+## v0.3.1
42+
43+- fix: profile avatar display, consistent page titles, UX polish
44+
345 ## v0.3.0
446 
547 ### Frontend UX revamp
@@ -28,6 +70,22 @@
2870 - Fixed web container missing `@sveltejs/kit` runtime dependency
2971 - Rust 1.88+ in Dockerfiles (MSRV for home, time crates)
3072 
73+## v0.2.4
74+
75+- fix(auth): request `transition:generic` scope for write permissions
76+
77+## v0.2.3
78+
79+- feat: add logo to header and favicon (dark mode optimized with light strokes)
80+
81+## v0.2.2
82+
83+- fix(auth): add root URL to `redirect_uris` for browser OAuth client
84+
85+## v0.2.1
86+
87+- fix(auth): use `token_endpoint_auth_method: "none"` for browser OAuth client
88+
3189 ## v0.2.0
3290 
3391 ### Tangled interop
@@ -436,7 +436,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
436436 
437437 [[package]]
438438 name = "cospan-appview"
439-version = "0.3.2"
439+version = "0.4.0"
440440 dependencies = [
441441  "anyhow",
442442  "async-trait",
@@ -455,11 +455,14 @@ dependencies = [
455455  "panproto-expr-parser",
456456  "panproto-gat",
457457  "panproto-inst",
458+ "panproto-mig",
459+ "panproto-protocols",
458460  "panproto-schema",
459461  "panproto-xrpc",
460462  "rand 0.8.5",
461463  "redis",
462464  "reqwest",
465+ "rmp-serde",
463466  "serde",
464467  "serde_json",
465468  "sha2",
@@ -479,21 +482,24 @@ dependencies = [
479482 
480483 [[package]]
481484 name = "cospan-codegen"
482-version = "0.3.2"
485+version = "0.4.0"
483486 dependencies = [
484487  "anyhow",
485- "panproto-core",
488+ "panproto-check",
489+ "panproto-expr",
486490  "panproto-gat",
491+ "panproto-inst",
487492  "panproto-mig",
488493  "panproto-protocols",
489494  "panproto-schema",
495+ "rmp-serde",
490496  "serde",
491497  "serde_json",
492498 ]
493499 
494500 [[package]]
495501 name = "cospan-node"
496-version = "0.3.2"
502+version = "0.4.0"
497503 dependencies = [
498504  "anyhow",
499505  "async-trait",
@@ -7,7 +7,7 @@ members = [
77 resolver = "2"
88 
99 [workspace.package]
10-version = "0.3.2"
10+version = "0.4.0"
1111 edition = "2024"
1212 license = "AGPL-3.0-or-later"
1313 repository = "https://github.com/cospan-dev/cospan"
cospan · schematic version control on atproto built on AT Protocol