ci: run codegen before Docker builds, stop committing generated files Generated TypeScript views are now produced by a CI codegen step (runs cargo run -p cospan-codegen) and passed to Docker builds via artifacts. No more locally-generated files committed to the repo. apps/web/src/lib/generated/ added to .gitignore.

Author: Aaron Steven White
Commit e53707050cea2efd64282524f32290cfec684f1d
Parent: 0a3bfa82a5
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
3 files changed +29 -584
@@ -8,8 +8,31 @@ env:
88   REGISTRY: ghcr.io
99 
1010 jobs:
11+  codegen:
12+    name: Run codegen
13+    runs-on: ubuntu-latest
14+    steps:
15+      - uses: actions/checkout@v4
16+
17+      - uses: dtolnay/rust-toolchain@stable
18+
19+      - uses: Swatinem/rust-cache@v2
20+
21+      - name: Run codegen
22+        run: cargo run -p cospan-codegen
23+
24+      - name: Upload generated artifacts
25+        uses: actions/upload-artifact@v4
26+        with:
27+          name: generated
28+          path: |
29+            generated/
30+            crates/cospan-appview/src/db/generated/
31+            apps/web/src/lib/generated/
32+
1133   build-and-push:
1234     name: Build and push Docker images
35+    needs: codegen
1336     runs-on: ubuntu-latest
1437     permissions:
1538       contents: read
@@ -29,6 +52,11 @@ jobs:
2952     steps:
3053       - uses: actions/checkout@v4
3154 
55+      - name: Download generated artifacts
56+        uses: actions/download-artifact@v4
57+        with:
58+          name: generated
59+
3260       - uses: docker/login-action@v3
3361         with:
3462           registry: ${{ env.REGISTRY }}
@@ -14,6 +14,7 @@ planning/
1414 PROGRESS.md
1515 /generated/
1616 crates/cospan-appview/src/db/generated/
17+apps/web/src/lib/generated/
1718 vendor/
1819 .claude/
1920 pnpm-lock.yaml
1920 
\ No newline at end of file
@@ -1,584 +0,0 @@
1-// Auto-generated by cospan-codegen via panproto protolens (from JSON lens files).
2-// Source: packages/lenses/*.lens.json
3-// Do not edit manually.
4-
5-// dev.cospan.repo.pull (via lens file)
6-export interface PullView {
7-  did: string;
8-  rkey: string;
9-  body: string | null;
10-  createdAt: string;
11-  sourceRef: string;
12-  sourceRepo: string | null;
13-  targetRef: string;
14-  title: string;
15-  commentCount: number;
16-  repoDid: string;
17-  repoName: string;
18-  state: string;
19-  indexedAt: string;
20-}
21-
22-export function normalizePullView(raw: Partial<PullView>): PullView {
23-  return {
24-    did: raw.did ?? '',
25-    rkey: raw.rkey ?? '',
26-    body: raw.body ?? null,
27-    createdAt: raw.createdAt ?? '',
28-    sourceRef: raw.sourceRef ?? '',
29-    sourceRepo: raw.sourceRepo ?? null,
30-    targetRef: raw.targetRef ?? '',
31-    title: raw.title ?? '',
32-    commentCount: raw.commentCount ?? 0,
33-    repoDid: raw.repoDid ?? '',
34-    repoName: raw.repoName ?? '',
35-    state: raw.state ?? 'open',
36-    indexedAt: raw.indexedAt ?? '',
37-  };
38-}
39-
40-// dev.cospan.node (via lens file)
41-export interface NodeView {
42-  did: string;
43-  createdAt: string;
44-  publicEndpoint: string | null;
45-  indexedAt: string;
46-}
47-
48-export function normalizeNodeView(raw: Partial<NodeView>): NodeView {
49-  return {
50-    did: raw.did ?? '',
51-    createdAt: raw.createdAt ?? '',
52-    publicEndpoint: raw.publicEndpoint ?? null,
53-    indexedAt: raw.indexedAt ?? '',
54-  };
55-}
56-
57-// dev.cospan.repo.issue.state (via lens file)
58-export interface IssueStateView {
59-  did: string;
60-  rkey: string;
61-  createdAt: string;
62-  issueUri: string | null;
63-  reason: string | null;
64-  state: string;
65-  indexedAt: string;
66-}
67-
68-export function normalizeIssueStateView(raw: Partial<IssueStateView>): IssueStateView {
69-  return {
70-    did: raw.did ?? '',
71-    rkey: raw.rkey ?? '',
72-    createdAt: raw.createdAt ?? '',
73-    issueUri: raw.issueUri ?? null,
74-    reason: raw.reason ?? null,
75-    state: raw.state ?? '',
76-    indexedAt: raw.indexedAt ?? '',
77-  };
78-}
79-
80-// dev.cospan.repo.issue (via lens file)
81-export interface IssueView {
82-  did: string;
83-  rkey: string;
84-  body: string | null;
85-  createdAt: string;
86-  title: string;
87-  commentCount: number;
88-  repoDid: string;
89-  repoName: string;
90-  state: string;
91-  indexedAt: string;
92-}
93-
94-export function normalizeIssueView(raw: Partial<IssueView>): IssueView {
95-  return {
96-    did: raw.did ?? '',
97-    rkey: raw.rkey ?? '',
98-    body: raw.body ?? null,
99-    createdAt: raw.createdAt ?? '',
100-    title: raw.title ?? '',
101-    commentCount: raw.commentCount ?? 0,
102-    repoDid: raw.repoDid ?? '',
103-    repoName: raw.repoName ?? '',
104-    state: raw.state ?? 'open',
105-    indexedAt: raw.indexedAt ?? '',
106-  };
107-}
108-
109-// dev.cospan.repo.issue.comment (via lens file)
110-export interface IssueCommentView {
111-  did: string;
112-  rkey: string;
113-  body: string;
114-  createdAt: string;
115-  issueUri: string | null;
116-  indexedAt: string;
117-}
118-
119-export function normalizeIssueCommentView(raw: Partial<IssueCommentView>): IssueCommentView {
120-  return {
121-    did: raw.did ?? '',
122-    rkey: raw.rkey ?? '',
123-    body: raw.body ?? '',
124-    createdAt: raw.createdAt ?? '',
125-    issueUri: raw.issueUri ?? null,
126-    indexedAt: raw.indexedAt ?? '',
127-  };
128-}
129-
130-// dev.cospan.feed.reaction (via lens file)
131-export interface ReactionView {
132-  did: string;
133-  rkey: string;
134-  createdAt: string;
135-  emoji: string;
136-  subject: string;
137-  indexedAt: string;
138-}
139-
140-export function normalizeReactionView(raw: Partial<ReactionView>): ReactionView {
141-  return {
142-    did: raw.did ?? '',
143-    rkey: raw.rkey ?? '',
144-    createdAt: raw.createdAt ?? '',
145-    emoji: raw.emoji ?? '',
146-    subject: raw.subject ?? '',
147-    indexedAt: raw.indexedAt ?? '',
148-  };
149-}
150-
151-// dev.cospan.org (via lens file)
152-export interface OrgView {
153-  did: string;
154-  rkey: string;
155-  createdAt: string;
156-  description: string | null;
157-  name: string;
158-  avatarCid: string;
159-  indexedAt: string;
160-}
161-
162-export function normalizeOrgView(raw: Partial<OrgView>): OrgView {
163-  return {
164-    did: raw.did ?? '',
165-    rkey: raw.rkey ?? '',
166-    createdAt: raw.createdAt ?? '',
167-    description: raw.description ?? null,
168-    name: raw.name ?? '',
169-    avatarCid: raw.avatarCid ?? '',
170-    indexedAt: raw.indexedAt ?? '',
171-  };
172-}
173-
174-// dev.cospan.graph.follow (via lens file)
175-export interface FollowView {
176-  did: string;
177-  rkey: string;
178-  createdAt: string;
179-  subject: string;
180-  indexedAt: string;
181-}
182-
183-export function normalizeFollowView(raw: Partial<FollowView>): FollowView {
184-  return {
185-    did: raw.did ?? '',
186-    rkey: raw.rkey ?? '',
187-    createdAt: raw.createdAt ?? '',
188-    subject: raw.subject ?? '',
189-    indexedAt: raw.indexedAt ?? '',
190-  };
191-}
192-
193-// dev.cospan.feed.star (via lens file)
194-export interface StarView {
195-  did: string;
196-  rkey: string;
197-  createdAt: string;
198-  subject: string;
199-  indexedAt: string;
200-}
201-
202-export function normalizeStarView(raw: Partial<StarView>): StarView {
203-  return {
204-    did: raw.did ?? '',
205-    rkey: raw.rkey ?? '',
206-    createdAt: raw.createdAt ?? '',
207-    subject: raw.subject ?? '',
208-    indexedAt: raw.indexedAt ?? '',
209-  };
210-}
211-
212-// dev.cospan.repo (via lens file)
213-export interface RepoView {
214-  did: string;
215-  rkey: string;
216-  createdAt: string;
217-  defaultBranch: string | null;
218-  description: string | null;
219-  name: string;
220-  protocol: string;
221-  sourceRepo: string | null;
222-  visibility: string | null;
223-  forkCount: number;
224-  nodeDid: string;
225-  nodeUrl: string;
226-  openIssueCount: number;
227-  openMrCount: number;
228-  source: string;
229-  sourceUri: string;
230-  starCount: number;
231-  indexedAt: string;
232-}
233-
234-export function normalizeRepoView(raw: Partial<RepoView>): RepoView {
235-  return {
236-    did: raw.did ?? '',
237-    rkey: raw.rkey ?? '',
238-    createdAt: raw.createdAt ?? '',
239-    defaultBranch: raw.defaultBranch ?? null,
240-    description: raw.description ?? null,
241-    name: raw.name ?? '',
242-    protocol: raw.protocol ?? '',
243-    sourceRepo: raw.sourceRepo ?? null,
244-    visibility: raw.visibility ?? null,
245-    forkCount: raw.forkCount ?? 0,
246-    nodeDid: raw.nodeDid ?? '',
247-    nodeUrl: raw.nodeUrl ?? '',
248-    openIssueCount: raw.openIssueCount ?? 0,
249-    openMrCount: raw.openMrCount ?? 0,
250-    source: raw.source ?? '',
251-    sourceUri: raw.sourceUri ?? '',
252-    starCount: raw.starCount ?? 0,
253-    indexedAt: raw.indexedAt ?? '',
254-  };
255-}
256-
257-// dev.cospan.label.definition (via lens file)
258-export interface LabelView {
259-  did: string;
260-  rkey: string;
261-  color: string;
262-  createdAt: string;
263-  description: string | null;
264-  name: string;
265-  repoDid: string;
266-  repoName: string;
267-  indexedAt: string;
268-}
269-
270-export function normalizeLabelView(raw: Partial<LabelView>): LabelView {
271-  return {
272-    did: raw.did ?? '',
273-    rkey: raw.rkey ?? '',
274-    color: raw.color ?? '',
275-    createdAt: raw.createdAt ?? '',
276-    description: raw.description ?? null,
277-    name: raw.name ?? '',
278-    repoDid: raw.repoDid ?? '',
279-    repoName: raw.repoName ?? '',
280-    indexedAt: raw.indexedAt ?? '',
281-  };
282-}
283-
284-// dev.cospan.org.member (via lens file)
285-export interface OrgMemberView {
286-  did: string;
287-  rkey: string;
288-  createdAt: string;
289-  memberDid: string | null;
290-  orgUri: string | null;
291-  role: string;
292-  indexedAt: string;
293-}
294-
295-export function normalizeOrgMemberView(raw: Partial<OrgMemberView>): OrgMemberView {
296-  return {
297-    did: raw.did ?? '',
298-    rkey: raw.rkey ?? '',
299-    createdAt: raw.createdAt ?? '',
300-    memberDid: raw.memberDid ?? null,
301-    orgUri: raw.orgUri ?? null,
302-    role: raw.role ?? '',
303-    indexedAt: raw.indexedAt ?? '',
304-  };
305-}
306-
307-// dev.cospan.actor.profile (via lens file)
308-export interface ActorProfileView {
309-  did: string;
310-  bluesky: string;
311-  description: string | null;
312-  displayName: string | null;
313-  avatarCid: string;
314-  indexedAt: string;
315-}
316-
317-export function normalizeActorProfileView(raw: Partial<ActorProfileView>): ActorProfileView {
318-  return {
319-    did: raw.did ?? '',
320-    bluesky: raw.bluesky ?? '',
321-    description: raw.description ?? null,
322-    displayName: raw.displayName ?? null,
323-    avatarCid: raw.avatarCid ?? '',
324-    indexedAt: raw.indexedAt ?? '',
325-  };
326-}
327-
328-// dev.cospan.repo.collaborator (via lens file)
329-export interface CollaboratorView {
330-  did: string;
331-  rkey: string;
332-  createdAt: string;
333-  memberDid: string | null;
334-  role: string;
335-  repoDid: string;
336-  repoName: string;
337-  indexedAt: string;
338-}
339-
340-export function normalizeCollaboratorView(raw: Partial<CollaboratorView>): CollaboratorView {
341-  return {
342-    did: raw.did ?? '',
343-    rkey: raw.rkey ?? '',
344-    createdAt: raw.createdAt ?? '',
345-    memberDid: raw.memberDid ?? null,
346-    role: raw.role ?? '',
347-    repoDid: raw.repoDid ?? '',
348-    repoName: raw.repoName ?? '',
349-    indexedAt: raw.indexedAt ?? '',
350-  };
351-}
352-
353-// dev.cospan.repo.dependency (via lens file)
354-export interface DependencyView {
355-  did: string;
356-  rkey: string;
357-  createdAt: string;
358-  description: string | null;
359-  morphismId: string;
360-  sourceProtocol: string | null;
361-  targetProtocol: string | null;
362-  sourceRepoDid: string;
363-  sourceRepoName: string;
364-  targetRepoDid: string;
365-  targetRepoName: string;
366-  indexedAt: string;
367-}
368-
369-export function normalizeDependencyView(raw: Partial<DependencyView>): DependencyView {
370-  return {
371-    did: raw.did ?? '',
372-    rkey: raw.rkey ?? '',
373-    createdAt: raw.createdAt ?? '',
374-    description: raw.description ?? null,
375-    morphismId: raw.morphismId ?? '',
376-    sourceProtocol: raw.sourceProtocol ?? null,
377-    targetProtocol: raw.targetProtocol ?? null,
378-    sourceRepoDid: raw.sourceRepoDid ?? '',
379-    sourceRepoName: raw.sourceRepoName ?? '',
380-    targetRepoDid: raw.targetRepoDid ?? '',
381-    targetRepoName: raw.targetRepoName ?? '',
382-    indexedAt: raw.indexedAt ?? '',
383-  };
384-}
385-
386-// dev.cospan.vcs.refUpdate (via lens file)
387-export interface RefUpdateView {
388-  rkey: string;
389-  commitCount: number | null;
390-  committerDid: string;
391-  createdAt: string;
392-  lensId: string | null;
393-  lensQuality: Record<string, unknown> | null;
394-  migrationId: string | null;
395-  newTarget: string;
396-  oldTarget: string | null;
397-  protocol: string;
398-  ref: string;
399-  breakingChangeCount: number;
400-  repoDid: string;
401-  repoName: string;
402-  indexedAt: string;
403-}
404-
405-export function normalizeRefUpdateView(raw: Partial<RefUpdateView>): RefUpdateView {
406-  return {
407-    rkey: raw.rkey ?? '',
408-    commitCount: raw.commitCount ?? null,
409-    committerDid: raw.committerDid ?? '',
410-    createdAt: raw.createdAt ?? '',
411-    lensId: raw.lensId ?? null,
412-    lensQuality: raw.lensQuality ?? null,
413-    migrationId: raw.migrationId ?? null,
414-    newTarget: raw.newTarget ?? '',
415-    oldTarget: raw.oldTarget ?? null,
416-    protocol: raw.protocol ?? '',
417-    ref: raw.ref ?? '',
418-    breakingChangeCount: raw.breakingChangeCount ?? 0,
419-    repoDid: raw.repoDid ?? '',
420-    repoName: raw.repoName ?? '',
421-    indexedAt: raw.indexedAt ?? '',
422-  };
423-}
424-
425-// dev.cospan.repo.pull.state (via lens file)
426-export interface PullStateView {
427-  did: string;
428-  rkey: string;
429-  createdAt: string;
430-  mergeCommitId: string | null;
431-  pullUri: string | null;
432-  state: string;
433-  indexedAt: string;
434-}
435-
436-export function normalizePullStateView(raw: Partial<PullStateView>): PullStateView {
437-  return {
438-    did: raw.did ?? '',
439-    rkey: raw.rkey ?? '',
440-    createdAt: raw.createdAt ?? '',
441-    mergeCommitId: raw.mergeCommitId ?? null,
442-    pullUri: raw.pullUri ?? null,
443-    state: raw.state ?? '',
444-    indexedAt: raw.indexedAt ?? '',
445-  };
446-}
447-
448-// dev.cospan.repo.pull.comment (via lens file)
449-export interface PullCommentView {
450-  did: string;
451-  rkey: string;
452-  body: string;
453-  createdAt: string;
454-  pullUri: string | null;
455-  reviewDecision: string | null;
456-  indexedAt: string;
457-}
458-
459-export function normalizePullCommentView(raw: Partial<PullCommentView>): PullCommentView {
460-  return {
461-    did: raw.did ?? '',
462-    rkey: raw.rkey ?? '',
463-    body: raw.body ?? '',
464-    createdAt: raw.createdAt ?? '',
465-    pullUri: raw.pullUri ?? null,
466-    reviewDecision: raw.reviewDecision ?? null,
467-    indexedAt: raw.indexedAt ?? '',
468-  };
469-}
470-
471-// dev.cospan.pipeline (via lens file)
472-export interface PipelineView {
473-  did: string;
474-  rkey: string;
475-  commitId: string;
476-  completedAt: string | null;
477-  createdAt: string;
478-  ref: string | null;
479-  status: string;
480-  workflows: unknown[] | null;
481-  breakingChangeCheck: string;
482-  equationVerification: string;
483-  gatTypeCheck: string;
484-  lensLawCheck: string;
485-  repoDid: string;
486-  repoName: string;
487-  indexedAt: string;
488-}
489-
490-export function normalizePipelineView(raw: Partial<PipelineView>): PipelineView {
491-  return {
492-    did: raw.did ?? '',
493-    rkey: raw.rkey ?? '',
494-    commitId: raw.commitId ?? '',
495-    completedAt: raw.completedAt ?? null,
496-    createdAt: raw.createdAt ?? '',
497-    ref: raw.ref ?? null,
498-    status: raw.status ?? 'pending',
499-    workflows: raw.workflows ?? null,
500-    breakingChangeCheck: raw.breakingChangeCheck ?? '',
501-    equationVerification: raw.equationVerification ?? '',
502-    gatTypeCheck: raw.gatTypeCheck ?? '',
503-    lensLawCheck: raw.lensLawCheck ?? '',
504-    repoDid: raw.repoDid ?? '',
505-    repoName: raw.repoName ?? '',
506-    indexedAt: raw.indexedAt ?? '',
507-  };
508-}
509-
510-export interface RepoListResponse {
511-  repos: RepoView[];
512-  cursor: string | null;
513-}
514-
515-export interface IssueListResponse {
516-  issues: IssueView[];
517-  cursor: string | null;
518-}
519-
520-export interface IssueCommentListResponse {
521-  comments: IssueCommentView[];
522-  cursor: string | null;
523-}
524-
525-export interface PullListResponse {
526-  pulls: PullView[];
527-  cursor: string | null;
528-}
529-
530-export interface PullCommentListResponse {
531-  comments: PullCommentView[];
532-  cursor: string | null;
533-}
534-
535-export interface StarListResponse {
536-  stars: StarView[];
537-  cursor: string | null;
538-}
539-
540-export interface FollowListResponse {
541-  follows: FollowView[];
542-  cursor: string | null;
543-}
544-
545-export interface NodeListResponse {
546-  nodes: NodeView[];
547-  cursor: string | null;
548-}
549-
550-export interface OrgListResponse {
551-  orgs: OrgView[];
552-  cursor: string | null;
553-}
554-
555-export interface OrgMemberListResponse {
556-  members: OrgMemberView[];
557-  cursor: string | null;
558-}
559-
560-export interface CollaboratorListResponse {
561-  collaborators: CollaboratorView[];
562-  cursor: string | null;
563-}
564-
565-export interface RefUpdateListResponse {
566-  refUpdates: RefUpdateView[];
567-  cursor: string | null;
568-}
569-
570-export interface LabelListResponse {
571-  labels: LabelView[];
572-  cursor: string | null;
573-}
574-
575-export interface PipelineListResponse {
576-  pipelines: PipelineView[];
577-  cursor: string | null;
578-}
579-
580-export interface ReactionListResponse {
581-  reactions: ReactionView[];
582-  cursor: string | null;
583-}
584-
cospan · schematic version control on atproto built on AT Protocol