Skip to content

docs: add AUDIT_LANDSCAPE.md — full repository landscape audit - #90

Closed
THOClabs wants to merge 5 commits into
mainfrom
claude/repo-landscape-audit-mdpb4f
Closed

docs: add AUDIT_LANDSCAPE.md — full repository landscape audit#90
THOClabs wants to merge 5 commits into
mainfrom
claude/repo-landscape-audit-mdpb4f

Conversation

@THOClabs

@THOClabs THOClabs commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a single read-only audit report, AUDIT_LANDSCAPE.md, at the repo root. It maps what this repository is, how it works, its dependencies and security surface, test/documentation coverage, git history and dead weight, and where it could realistically grow. No product code is changed.

The report was produced in two passes: an initial pass over the hot runtime paths, then a deepen pass covering the ~13 service subsystems the first pass only characterized, plus a dedicated async-correctness bug-class hunt, a broken-wiring sweep, and a full (not sampled) test-integrity grade. 121 verified findings total.

Related Issues

None.

Type of Change

  • Documentation update
  • Bug fix / New feature / Breaking change / Refactoring / Test change (none — read-only audit)

Changes Made

  • New file AUDIT_LANDSCAPE.md (~8k words, 8 sections + 2 appendices): system map; dependencies/supply chain; security surface (file:line for every claim, incl. §3.7 async correctness and §3.8 driver correctness/data-integrity/injection); test/verification coverage; documentation/onboarding; history/dead weight; three-tier expansion opportunities (quick wins / substantial builds / reimaginings); open questions.
  • Every claim carries a citation (file/line/commit) and a confidence tag (confirmed/inferred/suspected); security findings additionally carry a reachability tag.

Safety Checklist

Not applicable — this PR adds a documentation file only and modifies no telescope/enclosure/safety code. The audit reports on the safety subsystem (§3.3, §3.7, §4.1) but changes nothing. Safety interlocks, weather checks, emergency stop, graceful shutdown, and confirmation prompts are untouched.

Testing

No code changed, so no test run applies. As a report-quality gate, all 162 file:line citations in the document were mechanically verified to resolve to real files and in-range lines; the underlying findings were snippet-verified against source and cross-read for high-severity items (see the report's Appendix A).

Voice Commands

Not applicable — no voice commands added or modified.

Documentation

  • New documentation added (AUDIT_LANDSCAPE.md)
  • The report flags stale/incorrect existing docs (e.g. the broken quickstart command, 2024 release dates) as findings; it does not modify them.

Additional Notes

Headline: the system's components are individually real and tested, but the production entry point never assembles them (nightwatch/main.py:247 starts an empty service registry; nightwatch/voice_pipeline.py:2086 imports a non-existent module). The deepen pass added a layer of driver-correctness bugs (declination sign loss near the equator, Alpaca constructor misuse, fabricated coordinates on error, a mislabeled catalog star, non-atomic history writes) and an async event-loop-blocking class, and corrected a first-pass over-claim: the "safety-critical modules have strong behavioral tests" statement holds only at the unit layer — the entire e2e tier and two of three safety-integration suites import zero production code. The single biggest opportunity remains a config→registry service-assembly factory that turns the existing, tested drivers into a runnable system. Section 8 lists open questions that need a human answer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SKZMQ755R7q38SKqJsCQsg

claude added 5 commits July 2, 2026 04:41
Adds a single read-only audit report at the repo root mapping the system,
dependencies/supply chain, security surface (with file:line evidence),
test/verification coverage, documentation/onboarding, git history/dead
weight, three-tier expansion opportunities, and open questions.

Every claim carries a file/line/commit citation and a confidence tag
(confirmed/inferred/suspected). Findings were gathered by parallel research
agents, mechanically snippet-verified against source, and high-severity
security findings independently cross-read. No product code is modified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKZMQ755R7q38SKqJsCQsg
…est-integrity pass

Second audit pass adding 52 verified findings covering the ~13 service
subsystems the first pass only characterized, plus dedicated bug-class
hunts:

- §3.7 Async & event-loop correctness: async drivers doing blocking
  serial/socket/inference I/O on the loop; a fire-and-forget capture task.
- §3.8 Driver correctness & data integrity: declination sign loss near the
  equator, Alpaca constructor arg-shape misuse, fabricated coordinates on
  error, a mislabeled catalog star, non-atomic history writes, HTML-email
  injection, LX200 command-injection surface.
- §4 correction: the "safety-critical modules have strong behavioral tests"
  claim holds only at the unit layer — the entire e2e tier and two of three
  safety-integration suites import zero production code, and the only base
  SafetyMonitor evaluation test is dead on checkout. Folds in the CI
  service-container startup-failure refinement.
- §5/§6: broader install.sh config-schema divergence; function-level dead
  code and a phantom tool symbol.

Every new citation mechanically snippet-verified; new highs independently
cross-read. No product code modified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKZMQ755R7q38SKqJsCQsg
Executes the repo in a throwaway uv-sync venv to upgrade the audit's
load-bearing claims from static reads to observed behavior, and records
one defect static analysis missed: the entry point crashes on startup.

- NEW: python -m nightwatch.main aborts on every mode but --version with
  TypeError from setup_logging(level=...) vs the log_level parameter
  (main.py:308/:325 vs logging_config.py:185) — the process never reaches
  the orchestrator.
- Observed-by-execution: phantom nightwatch.telescope_tools import fails;
  the four undeclared deps (llama_cpp/anthropic/openai/RPi) absent even
  with all extras; uv.lock resolves numpy 2.4.6 (breaks astropy →
  test_plate_solver collection); the /workspaces safety test fails
  collection; safety unit tests pass 23/23; ruff 2675 / mypy 160 errors
  all swallowed by CI.

Report file only; no product code changed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKZMQ755R7q38SKqJsCQsg
Reconciles the two independent full-repo reviews (AUDIT_LANDSCAPE.md at
eebdbac and the docs/review corpus at cc61aa2) into a single prioritized
Stage 0-5 resumption backlog, plus a two-month activity inventory and a
stale-branch triage table.

- Cross-confirmed findings (both reviews) treated as ground truth: broken
  emergency roof-close, startup crash, CI-can't-fail, assembly gap, dormant
  watchdog, phantom tool import, unauth network surface, PDU creds.
- Harvests #90's ~10 unique data-integrity / driver / deploy bugs.
- Adopts #93's aiohttp CVEs, test-pollution root cause, weather fail-open,
  and its re-runnable review organization.
- Spot-re-verified the startup crash (main.py:308/325 vs logging_config.py:185)
  and the roof _gpio init-absence against live source before publishing.

Orientation doc only; no product code changed. Leaves the merge/close
decisions on PRs #90 and #93 to the active session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKZMQ755R7q38SKqJsCQsg
…ranches (S5)

Completes the S5 line item from REVIEW_RECONCILIATION.md. Buckets all 82
non-main remote branches: 11 merged-this-session fix/* (content in main,
safe delete), 59 orphan March-2026 NEO/meteor scanner re-rolls (never PR'd,
39 behind — reference-spec only, not mergeable), 6 superseded cursor/* review
orphans, and 2 legacy/misc (master, review-codebase). Names 7 reference
branches worth skimming before pruning the March cluster; keeps the 4 branches
backing open PRs (#89/#90/#92/#93). Ships ready-to-run per-bucket delete
commands. No branches deleted, merged, or force-pushed — all removals left to
the maintainer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKZMQ755R7q38SKqJsCQsg
THOClabs added a commit that referenced this pull request Aug 7, 2026
#112)

Preserves the durable content of three open-PR branches before the v0.1.1
branch purge closes them:

- .claude/agents/ (7 review subagents) + .claude/commands/full-review.md
  from PR #93's branch — repo-state-independent review tooling; the stale
  July review reports on that branch are intentionally NOT taken.
- docs/design/ Claude Design frontend prompt pack (3 files) from PR #92's
  branch — targets the v0.2 frontend; NEO data-model sections predate
  #108/#109 and need a refresh before use (noted in its provenance table).
- docs/audits/ archive of AUDIT_LANDSCAPE.md + REVIEW_RECONCILIATION.md
  from PR #90's branch, with HISTORICAL SNAPSHOT headers — findings were
  fixed by #94-#110; preserved as engineering history. Its
  STALE_BRANCH_TRIAGE.md is dropped (superseded by #110).

Part 1/Step 2 of the v0.1.1 main-only consolidation.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@THOClabs

THOClabs commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Closing as part of the v0.1.1 single-branch consolidation. AUDIT_LANDSCAPE.md and REVIEW_RECONCILIATION.md WERE archived to main in #112 (commit 5d84e66) under docs/audits/ with HISTORICAL SNAPSHOT headers — the audit's headline findings were verified fixed by #94#110, and its branch-triage doc was superseded by #110. Branch will be deleted with the stale-branch purge.

@THOClabs THOClabs closed this Aug 7, 2026
@THOClabs
THOClabs deleted the claude/repo-landscape-audit-mdpb4f branch August 7, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants