Skip to content

Rewrite CLAUDE.md against the real architecture; resolve the 3-way mocking-policy contradiction #125

Description

@jeremymanning

Part of #108 · Phase 5 · label: documentation

Problem

CLAUDE.md is the file every AI coding session loads as ground truth, so its inaccuracies propagate into work. Verified inaccuracies:

  • "Add new cluster type to ClusterType enum in config.py" — no such symbol exists. grep -rn ClusterType clustrix/ returns nothing; config.py:19 uses a plain cluster_type: str. Anyone following this instruction is looking for a thing that isn't there.
  • "ClusterExecutor (clustrix/executor.py): Central execution engine handling job submission, SSH connection management, file transfer, job monitoring..." — executor.py is a 39-line re-export shim (:1-38). The real logic lives in executor_core.py (466), executor_connections.py (389), executor_schedulers.py (378), executor_scheduler_status.py (651), executor_kubernetes.py (461), executor_cloud.py (470) — none of which CLAUDE.md mentions.
  • "Implement _submit_{type}_job method in ClusterExecutor" — these are back-compat wrappers (executor_core.py:430-448); real work is in SchedulerManager.submit_*_job / KubernetesJobManager.
  • The architecture section omits most of the package: the entire notebook stack (notebook_magic_{core,config,widget,mocks,enhanced,aws,azure,gcp,ssh}.py, modern_notebook_widget.py at 1,631 lines), plus cloud_providers/, cost_providers/, pricing_clients/, kubernetes/, credential_manager.py, auth_manager.py, function_flattening.py, gpu_utils.py.
  • "The project is in beta (v0.1.0)" — pyproject.toml and setup.py say 0.1.1.
  • Direct self-contradiction on mocking. CLAUDE.md says unit tests "Mock external dependencies"; .claude/CLAUDE.md says "Do not use mock services for anything ever"; README.md claims "Zero use of @patch, Mock()". Three files, three incompatible policies — which is a large part of how the suite ended up with 2,513 mock occurrences while claiming to have none.

Verified accurate, for the record (do not "fix" these): scripts/check_quality.py, scripts/pre_push_check.py, scripts/run_real_world_tests.py with its documented flags, both installed git hooks, and the entire filesystem-utilities section.

Stale project-management state

Path Verdict
notes/ One file, github_sub_issues_mapping_2025-09-04.md, ~11.5 months old, covers only #101/#103
.claude/epics/remove-1password/ Orphaned — has 97.md + 97-analysis.md but no epic.md, no status
.claude/epics/test-coverage-90-percent/ status: backlog for an epic with 30 unpushed commits claiming completion
Untracked WIP coverage_detailed_report.txt, 103-*.md, updates/103/

Acceptance criteria

  • CLAUDE.md architecture section regenerated from the actual module layout
  • The ClusterType enum instruction removed or the enum introduced
  • "Adding a new cluster type" rewritten against the real extension points (SchedulerManager, the provider ABC from the Phase 3 issue)
  • One mocking policy, stated once, consistent across CLAUDE.md, .claude/CLAUDE.md, and README.md
  • Version reference removed from prose, or sourced from a single location
  • notes/ and .claude/epics/ reconciled with reality or archived
  • A CI check that fails when CLAUDE.md references a symbol or path that does not exist — the same drift will otherwise recur

Activity

  1. jeremymanning commented on Aug 23, 2026

    @jeremymanning
    MemberAuthor

    **Status after the v0.2.0 merge campaign (2026-08-22) — six of seven acceptance criteria are met; this issue stays open deliberately for the seventh.

    Criterion Status
    Architecture section regenerated Done — CLAUDE.md now opens with the verified-vs-unsupported backend table and points at the real modules (executor_core.py and its split, not executor.py, which it correctly calls a 39-line shim).
    "Add a new cluster type" rewritten against real extension points Done — the section now says there is no ClusterType enum, names SUPPORTED_CLUSTER_TYPES as the single list, and states the real-hardware gate (#140-#146).
    Stale module references removed Done — cloud_providers/, cost_providers/, kubernetes/ references gone from prose (they survive only in the stale `build/lib/ output, which the file itself warns about).
    Mocking-policy contradiction resolved Done — "The mocking policy, stated once" supersedes the contradiction; five numbered rules; #117 named as the migration tracker with a recount command.
    Version reference corrected Done — no version number in prose anywhere in CLAUDE.md; the four-file version-sync rule is stated instead.
    notes/ and .claude/epics/ reconciled Done — .claude/epics/ no longer exists; notes/ carries dated session records including this campaign's.
    CI check: fail when CLAUDE.md references a symbol or path that does not exist Not done — the reason this stays open. No script in scripts/ performs the drift check; nothing in CI runs one.

    Everything else this issue asked for has landed and survived the merge train (2760 tests / 0 failed on the merged tree). The remaining criterion is a small, well-scoped guard script plus a workflow hook; it does not block the release, but the issue should not close until it exists.

  2. added a commit that references this issue on Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions