Commit e65f5ee
authored
Refactor config access around an Ecto schema
#### Context
The config layer had grown around NimbleOptions and a large getter surface. This branch moves parsing to an Ecto schema and simplifies callers to read typed nested settings directly.
#### TL;DR
*Replace the bespoke config access layer with an Ecto-backed schema and typed settings access.*
#### Summary
- Replace the old config extraction path with an Ecto embedded schema and defaults
- Collapse `Config` down to `settings/0`, `settings!/0`, and a small runtime helper surface
- Update callers and tests to read nested config structs directly instead of one-off getter wrappers
- Keep the repo green under format, lint, coverage, and dialyzer by adding the missing schema specs and tests
#### Alternatives
- Keep NimbleOptions and shrink the wrapper layer incrementally, but that would preserve the custom parser shape
- Keep the strict refactor without extra schema tests, but that left `make -C elixir all` red on coverage and dialyzer
#### Test Plan
- [x] `make -C elixir all`
- [x] `cd elixir && mix test test/symphony_elixir/workspace_and_config_test.exs --warnings-as-errors`1 parent b0e0ff0 commit e65f5ee
16 files changed
Lines changed: 823 additions & 995 deletions
File tree
- elixir
- lib
- symphony_elixir_web
- symphony_elixir
- codex
- config
- linear
- test/symphony_elixir
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| |||
820 | 827 | | |
821 | 828 | | |
822 | 829 | | |
823 | | - | |
| 830 | + | |
824 | 831 | | |
825 | 832 | | |
826 | 833 | | |
| |||
0 commit comments