Skip to content

feat(proto): add examples to remaining schema fields#29

Merged
cooper (czxtm) merged 1 commit intomainfrom
claude/add-protonix-schema-examples-9xeiz
May 2, 2026
Merged

feat(proto): add examples to remaining schema fields#29
cooper (czxtm) merged 1 commit intomainfrom
claude/add-protonix-schema-examples-9xeiz

Conversation

@czxtm
Copy link
Copy Markdown
Contributor

Summary

Brings every scalar field across the .proto.nix schemas up to full example coverage so the demo agent (and the planned proto-driven MSW handler generator) has enough material to synthesize mock data that feels like a real environment.

Coverage check after this change — every scalar field in every non-template schema now resolves to a withExample (or mkField { example = ... }):

$ for f in nix/stackpanel/db/schemas/*.proto.nix; do …; done
apps.proto.nix: 0 missing
aws.proto.nix: 0 missing
… (every schema)
users.proto.nix: 0 missing
variables.proto.nix: 0 missing

Files touched

  • dns.proto.nix — TTLs, zones, records, proxied flags
  • users.proto.nix — names, GitHub handles, emails, AGE keys
  • secrets.proto.nix — legacy SecretsGroup SOPS/SSM/vals refs
  • external/github-collaborators.proto.nix — login, id, role, SSH keys

The remaining 18 schemas (apps, aws, config, databases, deployment, extensions, files, healthchecks, modules, onboarding, scripts, services, shells, sst, step-ca, tasks, theme, variables) already had examples on every scalar field — verified by inspection.

Why this helps the demo

Examples flow through nix/stackpanel/db/lib/proto.nix → generated .proto // (example: …) comments → protobuf-ts JSDoc on TS types. The demo agent's MSW handler layer (apps/web/src/demo/handlers.ts) is on a path to be generated from these descriptors per apps/web/src/demo/README.md; once that lands, every field already has a sensible default mock value rather than "" / 0 / false.

Test plan

  • ./packages/proto/generate.sh regenerates .proto files cleanly
  • vp check (Nix eval + lint) passes
  • Spot-check a generated .proto (e.g. dns.proto) to confirm // (example: …) comments appear on every scalar field
  • Demo route (/demo) still boots without console errors

https://claude.ai/code/session_01HYhEk7cpz8hRS32Yo1TV9e


Generated by Claude Code

Ensures every scalar field across the .proto.nix schemas carries a
realistic example so the demo agent (and future generated MSW handler
stubs) can synthesize mock data that mirrors real environments. Fills
in the four schemas where fields were still bare:

- dns: zones, records, TTLs, proxied flags
- users: names, GitHub handles, emails, AGE keys
- secrets (deprecated SecretsGroup): legacy SOPS/SSM/vals refs
- github-collaborators: login, id, role, public keys

https://claude.ai/code/session_01HYhEk7cpz8hRS32Yo1TV9e
@czxtm cooper (czxtm) marked this pull request as ready for review May 2, 2026 15:46
@czxtm cooper (czxtm) merged commit 8aba4ac into main May 2, 2026
1 of 2 checks passed
@cursor
Copy link
Copy Markdown

cursor Bot commented May 2, 2026

PR Summary

Low Risk
Low risk: changes only annotate schema fields with example metadata and should not affect wire format or runtime behavior aside from generated comments/docs.

Overview
Adds missing proto.withExample annotations to remaining scalar fields in several Nix-backed protobuf schemas, including DNS (dns.proto.nix), users (users.proto.nix), legacy secrets group metadata (secrets.proto.nix), and generated GitHub collaborator metadata (external/github-collaborators.proto.nix).

These examples flow into generated .proto comments/JSDoc, improving mock/demo data generation without changing field numbers, types, or message structure.

Reviewed by Cursor Bugbot for commit f6e63a2. Configure here.

@czxtm cooper (czxtm) deleted the claude/add-protonix-schema-examples-9xeiz branch May 2, 2026 15:46
cooper (czxtm) added a commit that referenced this pull request May 2, 2026
…mples-9xeiz

feat(proto): add examples to remaining schema fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants