Add appconfig design doc

Summary

Add docs/design/appconfig.md, a design document for how application configuration works in bench-generated assemblies. Records the decisions reached while working on #106:

  • Proto-first schema (LabKit mandates it; Artifact Registry is the reference)
  • ChassisConfig (bench.config.v1) is defined in the bench repo, with Go and Rust types pregenerated in the chassis libraries
  • The root Config is written by bench build into .bench/ and compiled with the adopter's schema via buf generate; bench pins buf, protoc, and the plugins
  • The adopter owns only config/app/config/v1/app.proto (app.config.v1), created empty from the copier template under _skip_if_exists
  • One AppConfig shared by every assembly, one field per domain; each assembly has its own config file, and startup fails if a mounted domain's field is unset
  • Auth is a oneof of issuer (url, keys_url), static_token, or none; dev_mode must agree with the mode or the binary exits, and dev mode logs a warning. Release builds keep the dev-mode stub (#111)
  • Config file discovery through LabKit in both runtimes: $CONFIG_DIR/config.yaml, then $CONFIG_PATH, then config/local.yaml (Go via gitlab-org/labkit!805 (merged))
  • bench.yaml declares nothing about appconfig (one spec, every environment)
  • Open question: local config files for benches with several assemblies

Reviewer checklist

  • Reviewed the changes.
  • Change matches the described intent and stays in scope.
  • Milestone and labels are applied.
  • CI is green.

Relates to #106

Depends on !196 (merged)

Edited by Lucas Charles

Merge request reports

Loading
Loading