You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(docs): archive plan 16 - dynamic typing hardening
All 6 tasks across 3 phases completed successfully.
All 1075 tests pass with zero linting or type errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-`_request()` method parameter narrowed to `Literal["GET", "POST"]`
285
+
- Centralized `display_name()` overrides eliminate duplicate dicts in cli.py and tui/widgets.py
286
+
- 2 module-level asserts validate field-name strings at import time
287
+
- Fragile B2C string matching replaced with proper JSON parsing
288
+
289
+
All 1075 tests pass. `ruff check`, `mypy src/`, and `pytest` produce zero issues.
290
+
291
+
### Noteworthy Events
292
+
- Task 02 discovered that `dict[IntEnum, str]` does not work correctly for `_DISPLAY_OVERRIDES` because IntEnum members with the same integer value hash-collide (e.g., `FireMode.MANUAL == FlameEffect.ON` since both are `1`). The fix uses `(type, int)` tuple keys to disambiguate.
293
+
- Ruff formatter required re-staging after some commits due to formatting adjustments on NamedTuple definitions.
294
+
295
+
### Recommendations
296
+
- Consider adding a `__init_subclass__` or metaclass hook to automatically validate enum-to-string mappings if more enums are added in the future.
297
+
- The `_request() -> Any` return type remains loosely typed. If endpoint-specific response shapes become important, consider per-endpoint TypedDicts or Pydantic models.
Copy file name to clipboardExpand all lines: .ai/task-manager/archive/16--dynamic-typing-hardening/tasks/05--display-name-consolidation-and-field-asserts.md
0 commit comments