Skip to content

docs: align README and docs with runtime contracts (live payload, API, diagrams, config) - #157

Merged
AyushmanRaha merged 1 commit into
mainfrom
codex/perform-documentation-truth-audit
Jun 30, 2026
Merged

docs: align README and docs with runtime contracts (live payload, API, diagrams, config)#157
AyushmanRaha merged 1 commit into
mainfrom
codex/perform-documentation-truth-audit

Conversation

@AyushmanRaha

Copy link
Copy Markdown
Owner

Motivation

  • Perform a documentation truth-audit so README and docs match the actual FastAPI backend, runtime settings, and repository layout.
  • Fix known mismatches (the /live response shape, max_dim defaults/validation, architecture diagrams, and configuration environment variables) so user-facing docs are accurate and verifiable.
  • Keep wording conservative where behavior is implementation-dependent (runtime numeric fields, ONNX optionality, Redis fallback).
  • Make the diagrams and API reference explicitly reflect current public routes, aliases, and diagnostic endpoints.

Description

  • Updated README.md to document the actual /live payload (adds runtime-dependent pid, timestamp, and uptime_seconds) and to replace the lightweight testing snippet with the current docs/validation commands such as python scripts/validate_docs.py and scripts/ci.sh docs-contract.
  • Adjusted docs/api-reference.md to clarify that max_dim is optional at the route level (route default None) and that validation enforces 64 <= max_dim <= DEPTHLENS_MAX_DIM (configured default 1536).
  • Revised architecture artifacts: updated the Mermaid diagram in docs/system-architecture.md and the static SVG docs/architecture/depthlens-system-architecture.svg to include /live, /ready, /health, /compare aliases, /api/* aliases, detection endpoints, observability/metrics/cache routes, and the COCO detector node.
  • Expanded docs/configuration.md to surface route timeout/CORS variables, benchmark/ONNX diagnostic env vars, and clarified that DEPTHLENS_CACHE_BACKEND=memory is a CI/setup hint while the runtime attempts Redis then falls back to in-memory.
  • Fixed a grammatical sentence in docs/project-structure.md and added the resource-path-contract.md entry to the documented docs tree.

Testing

  • Ran python scripts/validate_docs.py which passed (documentation contract check succeeded).
  • Ran scripts/ci.sh docs-contract which executed the docs contract job and returned success in this environment.
  • Compiled key modules with python -m py_compile backend/api/live.py backend/api/routes.py backend/main.py backend/app.py scripts/validate_docs.py which completed without syntax errors.
  • Ran npm --prefix electron-app test which executed the Electron frontend contract tests and the included resource/security checks and they passed in this environment.
  • Attempted python -m pytest -q backend/tests/test_lightweight_live.py backend/tests/test_routes.py backend/tests/test_refactor_contract.py, but collection failed with ModuleNotFoundError: No module named 'fastapi' because backend test dependencies are not installed; per constraints no dependency installation was performed, so pytest was not executed to completion.

Codex Task

@AyushmanRaha
AyushmanRaha merged commit a9e0cd7 into main Jun 30, 2026
6 checks passed
@AyushmanRaha
AyushmanRaha deleted the codex/perform-documentation-truth-audit branch June 30, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant