feat: panproto-powered codegen for all 19 record types Enhanced cospan-codegen to generate complete database Row types, CRUD functions, and Jetstream deserializers from Lexicon schemas. Each record type's denormalization config (AT-URI decomposition, counter columns, field renames, type overrides, flattened sub-objects) is encoded in record_config.rs so the generated code matches the hand-written modules. New outputs: - row_types.rs: sqlx-compatible Row structs with DateTime<Utc>, proper optionality, serde renames, and denormalized fields - crud.rs: upsert/delete/get/list per record type - from_json.rs: Jetstream record deserializers with AT-URI parsing - baseline.json: schema snapshot for breaking change detection Integrated panproto-check for Lexicon breaking change detection via `cargo run -p cospan-codegen -- --check`. Added schema-check CI job. Removed unused panproto-core dep, added panproto-check. Fixed `ref` keyword collision in generated Rust code. TypeScript interfaces now exported. Generated code written to db/generated/ for appview integration.
Author: Aaron Steven White
Commit
d1e6f3f5097ad4a47297a9dfa30251576dfeeb2aParent: 551a01b49b
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-cospan11 files changed +1578 -9
@@ -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,6 @@ build/
1313 planning/ 1414 PROGRESS.md 1515 /generated/ 16+crates/cospan-appview/src/db/generated/ 1617 .claude/ 1718 pnpm-lock.yaml 1718 \ No newline at end of file
@@ -1,5 +1,27 @@
11 # Changelog 22 3+## v0.4.0 4+ 5+### Panproto-powered codegen 6+ 7+- Enhanced cospan-codegen to generate sqlx-compatible Row types with denormalization config for all 19 record types 8+- Generated CRUD functions (upsert, get, delete, list) for all 19 record types 9+- Generated `from_json()` Jetstream record deserializers with AT-URI decomposition, field renames, and type overrides 10+- TypeScript interfaces now exported (`export interface`) 11+- Integrated panproto-check for Lexicon breaking change detection (`--check` mode) 12+- Added `schema-check` CI job for automated breaking change detection 13+- Schema baseline saved to `generated/sql/baseline.json` for diffing 14+- Removed unused `panproto-core` dependency from cospan-codegen 15+- Generated code written to `crates/cospan-appview/src/db/generated/` for direct appview integration 16+ 17+## v0.3.2 18+ 19+- fix: include all 248 languages (was filtering out injection grammars) 20+ 21+## v0.3.1 22+ 23+- fix: profile avatar display, consistent page titles, UX polish 24+ 325 ## v0.3.0 426 527 ### Frontend UX revamp
@@ -28,6 +50,22 @@
2850 - Fixed web container missing `@sveltejs/kit` runtime dependency 2951 - Rust 1.88+ in Dockerfiles (MSRV for home, time crates) 3052 53+## v0.2.4 54+ 55+- fix(auth): request `transition:generic` scope for write permissions 56+ 57+## v0.2.3 58+ 59+- feat: add logo to header and favicon (dark mode optimized with light strokes) 60+ 61+## v0.2.2 62+ 63+- fix(auth): add root URL to `redirect_uris` for browser OAuth client 64+ 65+## v0.2.1 66+ 67+- fix(auth): use `token_endpoint_auth_method: "none"` for browser OAuth client 68+ 3169 ## v0.2.0 3270 3371 ### Tangled interop
@@ -482,7 +482,7 @@ name = "cospan-codegen"
482482 version = "0.3.2" 483483 dependencies = [ 484484 "anyhow", 485- "panproto-core", 485+ "panproto-check", 486486 "panproto-gat", 487487 "panproto-mig", 488488 "panproto-protocols",
@@ -3,6 +3,8 @@ pub mod collaborator;
33 pub mod cursor; 44 pub mod dependency; 55 pub mod follow; 6+#[allow(dead_code)] 7+pub mod generated; 68 pub mod issue; 79 pub mod issue_comment; 810 pub mod issue_state;