Private
Public Access
feat(directives): scavenge sweep 2/5 batch 1 (startup+profiling): 2 directives
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# graceful_optional_dependency_degradation
|
||||
|
||||
## v1
|
||||
|
||||
**Why this iteration:** Lifted from `docs/superpowers/specs/2026-05-15-profiling-system-design.md` §"Graceful Degradation" (lines 138-143) + the `tracy_integration.py` reference implementation (lines 144-197). When an optional dependency (e.g., `pytracy` for Tracy profiling) is not installed or not connected, the app must continue normally. The pattern: wrap the import in `try/except Exception`, set a module-level `_tracy_available: bool = False` flag, gate every zone call on the flag, log a startup warning. No crash, no feature breakage.
|
||||
**Source:** `docs/superpowers/specs/2026-05-15-profiling-system-design.md:138-197`
|
||||
|
||||
---
|
||||
**Lifted:** 2026-07-03 (scavenge sweep batch 2/5: docs/superpowers/specs/)
|
||||
@@ -0,0 +1 @@
|
||||
# Optional dependencies must degrade gracefully via try/except import + module-level flag pattern
|
||||
Reference in New Issue
Block a user