Commit 8818bb5
docs(planning): record config.py typed-Config decision against Rust reference
Investigated the cleanup-2026-04 P0.4 "config.py legacy/namespace
unification" item against apcore-rust/src/config.rs. Recorded
findings:
- Rust avoids the dual-layout problem entirely by using a strongly-
typed Config struct (executor/observability fields + user_namespaces
HashMap) deserialized via serde. Mode is just a marker; storage is
always one canonical typed layout.
- Adopting Rust's pattern in python = converting Config._data: dict
to a Pydantic v2 model with typed fields. ~500-800 LOC, breaking
public API, ~10 test files affected, design-doc + multi-day work.
- Shallow normalization (auto-wrap legacy yaml in {"apcore": ...} at
load) was also rejected: same 10 test files break via config.data
shape contract, and wouldn't actually unify validate/env-override.
- Marginal _run_constraints_check helper saves 0 LOC (premature
abstraction per CLAUDE.md).
Bottom line: deferred to a future round with proper design upfront.
This round explicitly chose NOT to attempt the refactor under "all
must be solved" pressure because the risk-to-value ratio was wrong.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4ff66a6 commit 8818bb5
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
0 commit comments