Utils-vs-Docs Konsistenz-Analyse
Stand: 2025-01-18 | Analysiert: 40+ Python-Dateien in toolboxv2/utils/
Executive Summary
| Metrik |
Wert |
| Analysierte Dateien |
40+ |
| Vollständig dokumentiert |
~30% |
| Teilweise dokumentiert |
~15% |
| Komplett ohne Doku |
~55% |
| Größte Lücke |
system/types.py (3235 Zeilen, zentrale AppType-Klasse) |
1. Coverage Matrix — Alle Utils-Dateien
utils/system/ — Core System Layer
| Datei |
Zeilen |
Wichtigste Klassen |
Doc-Status |
Doc-Datei |
types.py |
3235 |
AppType, Result, Request, WebSocketContext, AppArgs |
❌ KEINE |
— |
tb_logger.py |
1184 |
LogSyncManager, AuditLogger |
✅ Vollständig |
docs/reference/logs.md |
file_handler.py |
999 |
FileHandlerV2, LocalStorageBackend, UserDataAPIBackend, UserContext |
❌ KEINE |
— |
session.py |
605 |
(Worker-Sessions, nicht Auth) |
⚠️ Verwechslung |
docs/runtime/session.md dokumentiert workers/session.py NICHT system/session.py |
state_system.py |
422 |
— (download_executable, detect_os_and_arch) |
❌ KEINE |
— |
all_functions_enums.py |
500+ |
30+ Enum-Klassen für Mod-Dispatch |
❌ KEINE |
— |
getting_and_closing_app.py |
119 |
get_app, a_save_closing_app |
⚠️ Erwähnt |
docs/foundations/onboarding.md (Code-Snippet) |
observability_adapter.py |
88 |
ObservabilityAdapter (ABC) |
✅ Teilweise |
docs/reference/logs.md |
openobserve_setup.py |
459 |
OpenObserveManager |
✅ Vollständig |
docs/reference/logs.md |
cache.py |
59 |
FileCache, MemoryCache |
❌ KEINE |
— |
main_tool.py |
38 |
get_version_from_pyproject |
❌ KEINE |
— |
ipy_completer.py |
51 |
nested_dict_autocomplete |
❌ KEINE |
— |
utils/workers/ — HTTP/WS Worker Layer
| Datei |
Zeilen |
Wichtigste Klassen |
Doc-Status |
Doc-Datei |
server_worker.py |
3389 |
HTTPWorker, UploadedFile |
✅ Vollständig |
docs/runtime/server_worker.md |
event_manager.py |
1510 |
Event, ZMQEventManager, EventHandlerRegistry |
✅ Vollständig |
docs/runtime/event_manager.md |
ws_worker.py |
909 |
WSWorker |
❌ KEINE |
— |
session.py |
979 |
SessionManager, SignedCookieSession, SessionMiddleware |
✅ Vollständig |
docs/runtime/session.md |
session_custom.py |
374 |
CustomSessionVerifier, SessionData (auth) |
✅ Vollständig |
docs/runtime/session_custom.md |
fast_tb.py |
781 |
FastTB |
✅ Vollständig |
docs/runtime/fasttb.md |
fast_tb_handler.py |
600+ |
FastTBHandler |
✅ Vollständig |
docs/runtime/fast_tb_handler.md |
config.py |
632 |
AuthConfig, Environment |
✅ Vollständig |
docs/runtime/config.md |
debug_runner.py |
110 |
DebugASGIDispatcher |
✅ Vollständig |
docs/runtime/debug_runner.md |
toolbox_integration.py |
516 |
AccessController, ModuleRouter, ZMQEventBridge |
❌ KEINE |
— |
upload_manager.py |
116+ |
UploadManager |
❌ KEINE |
— |
fast_tb_defaults.py |
194 |
_has_user_routes |
❌ KEINE |
— |
| Datei |
Zeilen |
Wichtigste Klassen |
Doc-Status |
Doc-Datei |
mkdocs.py |
3718 |
DocsSystem, IndexManager, CodeAnalyzer, DocParser |
✅ Korrigiert |
docs/devdocs/docs_toolchain.md |
registry_client.py |
1904 |
RegistryClient, PackageDetail, VersionDetail |
❌ KEINE |
— |
blobs.py |
1525 |
BlobStorage, CryptoLayer, WatchManager |
✅ Vollständig |
docs/storage/blob_sharing_api.md |
Style.py |
667 |
Style, SpinnerManager, JSONExtractor |
❌ KEINE |
— |
notification.py |
1016 |
(10+ Notification-Funktionen) |
❌ KEINE |
— |
gateway_live_client.py |
112+ |
LLMConfig, WakeWordConfig |
❌ KEINE |
— |
reqbuilder.py |
36 |
run_pipeline, generate_requirements |
❌ KEINE |
— |
live_debugger.py |
138 |
dump_project_threads |
❌ KEINE |
— |
pt_spinner_patch.py |
110 |
apply_prompt_toolkit_patch_safe |
❌ KEINE |
— |
fallback_tray.py |
129 |
run_fallback_tray, create_gear_icon |
❌ KEINE |
— |
base_widget.py |
78 |
get_current_user_from_request |
❌ KEINE |
— |
db/mobile_db.py |
748 |
MobileDB |
✅ Neu erstellt |
docs/storage/ref_blobdb.md |
utils/security/
| Datei |
Zeilen |
Wichtigste Klassen |
Doc-Status |
Doc-Datei |
cryp.py |
unbekannt |
Code (AES), encode_code, pem_to_public_key |
❌ KEINE |
— |
| Datei |
Zeilen |
Wichtigste Klassen |
Doc-Status |
Doc-Datei |
tcm_p2p_cli.py |
1683 |
InteractiveP2PCLI, VoiceChatManager, FileTransferManager |
❌ KEINE |
— |
cli_worker_manager.py |
1598 |
WorkerManager, NginxManager, HealthChecker |
❌ KEINE |
— |
db_cli_manager.py |
1080 |
MinIOCLIManager |
❌ KEINE |
— |
cli_registry.py |
1256 |
registry_info, _get_auth_token |
❌ KEINE |
— |
service_manager.py |
785 |
(Service Config) |
❌ KEINE |
— |
config_wizard.py |
676 |
run_config_wizard |
⚠️ Teilweise |
docs/foundations/first_run.md |
user_dashboard.py |
627+ |
DashboardManager |
❌ KEINE |
— |
user_manager.py |
304 |
UnifiedUserManager, MinIOAdminClient |
❌ KEINE |
— |
venv_runner.py |
441+ |
UVManager, BasePackageManager |
❌ KEINE |
— |
tauri_cli.py |
119 |
get_installed_version |
❌ KEINE |
— |
cli_jsx_server.py |
543 |
JSXHandler |
❌ KEINE |
— |
cli_input.py |
71 |
_read_key_posix |
❌ KEINE |
— |
manifest_cli.py |
910+ |
_coerce |
⚠️ Teilweise |
docs/services/cli.md |
observability_helper.py |
55+ |
_ensure_password |
✅ Teilweise |
docs/reference/logs.md |
utils/manifest/ — Manifest System
| Datei |
Zeilen |
Wichtigste Klassen |
Doc-Status |
Doc-Datei |
schema.py |
663 |
DatabaseMode, AuthProvider, FeatureSpec, ZMQConfig |
✅ Über Tools |
manifest_show/manifest_get |
loader.py |
299 |
ManifestLoader |
✅ Über Tools |
manifest_show/manifest_validate |
converter.py |
473 |
ConfigConverter |
✅ Über Tools |
manifest_apply |
service_manager.py |
262 |
ManifestServiceManager |
❌ KEINE |
— |
2. Konsistenz-Probleme
2.1 Session-Verwechslung ⚠️
docs/runtime/session.md dokumentiert utils/workers/session.py (SessionManager, SignedCookie)
utils/system/session.py (605 Zeilen, get_local_ip, _test_session_login) hat KEINE Doku
- Problem: Zwei Dateien gleichen Namens in verschiedenen Ordnern → Verwirrung
2.2 Dangling Doc-References 🔗
Docs die auf undokumentierte Module verweisen:
| Doc-Datei |
Referenziert |
Ziel-Doku |
session.md |
utils/security/cryp.py (pem_to_public_key) |
❌ Fehlt |
session.md |
utils/system/file_handler.py (_encode) |
❌ Fehlt |
session_custom.md |
utils/system/types.py (user_id) |
❌ Fehlt |
- Klassennamen: MarkdownDocsSystem → DocsSystem (fixed in P5)
- Datum: 2024-01-15 → 2025-01-18 (fixed in P5)
3. Priorisierte Empfehlungen
P1 — Critical Core (zentrale Infrastruktur, nicht funktionsfähig ohne Verständnis)
| # |
Datei |
Zeilen |
Warum P1 |
| 1 |
system/types.py |
3235 |
AppType = Haupt-App-Klasse, wird von ALLEM verwendet |
| 2 |
system/file_handler.py |
999 |
Storage-Backbone, wird von CloudM + ISAA verwendet |
| 3 |
security/cryp.py |
— |
Verschlüsselung, von session/auth/blobs verwendet |
| 4 |
system/all_functions_enums.py |
500+ |
Dispatch-Grundlage, definiert alle Mod-APIs |
P2 Infrastructure — ABGESCHLOSSEN ✅ (2025-01-18)
P3 User-Facing — ABGESCHLOSSEN ✅ (2025-01-18)
P1 Critical Core — ABGESCHLOSSEN ✅ (2025-01-18)
P4 Nice-to-Have — ABGESCHLOSSEN ✅ (2025-01-18)
6. Vollständige Abdeckung
Alle P1–P4 Items sind abgearbeitet. Gesamt: 21 DevDocs für toolboxv2/utils/.
5. Loose Ends — Dangling Doc-References
Folgende Doc-Referenzen zeigen auf Module, die (vorher) keine eigene Doku hatten:
| Source Doc |
Referenziert |
Problem |
Status |
runtime/session.md |
utils/security/cryp.py (pem_to_public_key) |
Keine Doku für cryp.py |
✅ Gelöst → cryp.md |
runtime/session.md |
utils/system/file_handler.py (_encode) |
Keine Doku für file_handler.py |
✅ Gelöst → file_handler.md |
runtime/session_custom.md |
utils/system/types.py (user_id) |
Keine Doku für types.py |
✅ Gelöst → types.md |
runtime/config.md |
Verschlüsselte Config-Dateien |
Keine Doku für FileHandler-Verschlüsselung |
✅ Gelöst → file_handler.md + cryp.md |
reference/logs.md |
utils/security/cryp.py (Signaturen) |
Crypto-Signaturen undokumentiert |
✅ Gelöst → cryp.md |
foundations/first_run.md |
Config-Erstellung via FileHandler |
FileHandler undokumentiert |
✅ Gelöst → file_handler.md |
Alle Loose Ends gelöst ✅ (2025-01-18)
| Source Doc |
Referenziert |
Problem |
Status |
runtime/session.md |
workers/toolbox_integration.py (AccessController) |
Keine Doku |
✅ → toolbox_integration.md |
mods/CloudM/index.md |
extras/registry_client.py |
Registry-Client undokumentiert |
✅ → registry_client.md |
mods/CloudM/mod_manager.md |
extras/registry_client.py |
Mod-Manager nutzt Registry-Client |
✅ → registry_client.md |
services/cli.md |
clis/cli_worker_manager.py |
Worker/Nginx Management CLI undokumentiert |
✅ → cli_worker_manager.md |
runtime/event_manager.md |
workers/ws_worker.py |
WSWorker undokumentiert |
✅ → ws_worker.md |
4. Doc-Qualität der bestehenden Docs
| Bewertung |
Doc-Datei |
Bemerkung |
| ✅ Hervorragend |
logs.md |
Vollständige API + Beispiele + Deployment |
| ✅ Hervorragend |
server_worker.md |
Vollständige API + Integration |
| ✅ Hervorragend |
fasttb.md |
API + 3 Integration-Modi + Testing |
| ✅ Gut |
event_manager.md |
Vollständige API + Mermaid |
| ✅ Gut |
session.md |
Vollständig, aber referenziert undokumentierte Abhängigkeiten |
| ✅ Gut |
config.md |
API + CLI + Beispiele |
| ⚠️ Dünn |
session_custom.md |
Hat Scope-Note (P4 fix), aber Dependencies unvollständig |
| ⚠️ Dünn |
debug_runner.md |
Vorhanden aber minimal |