1.4 KiB
1.4 KiB
Context
The stability of account injection and detection differs across platforms, with risks concentrated in:
- DB lock conflicts causing unstable writes.
- Version-detection failures causing incorrect injection-path routing.
- Compatibility boundaries introduced by OS behavior differences.
Goals / Non-Goals
- Goals:
- Improve cross-platform write and switching stability.
- Define clear priority between version detection and capability probing.
- Improve observability and troubleshooting efficiency.
- Non-Goals:
- Extend support to non-default runtime configuration path parsing.
- Introduce new business strategies.
Decisions
- Decision: Transactionalize the write flow to reduce partial-success risk.
- Decision: Add DB busy retry and
busy_timeout. - Decision: On version-detection failure, use
package.jsonas Windows fallback source. - Decision: Give capability probing higher priority than version detection; prefer new format when a new-format key is detected.
Risks / Trade-offs
- A stricter write flow may add minor latency.
- Running capability probing and version detection together increases implementation complexity.
Migration Plan
- Complete transactional writes and retry mechanisms.
- Add version-detection cache and fallback.
- Introduce strategy-based injection and capability probing.
- Add corresponding tests and regression verification.