Skip to content

fix: remove ghost references to nonexistent gradata_cloud namespace#170

Merged
Gradata merged 1 commit into
mainfrom
fix/delete-cloud-ghost-refs
May 4, 2026
Merged

fix: remove ghost references to nonexistent gradata_cloud namespace#170
Gradata merged 1 commit into
mainfrom
fix/delete-cloud-ghost-refs

Conversation

@Gradata

@Gradata Gradata commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

Removes ghost references in source comments + docs that claim features
as "proprietary cloud-side", "requires Gradata Cloud", or live in the
nonexistent gradata_cloud.* / gradata_cloud_backup/ namespace.
None of those modules exist on disk or in the Gradata GitHub org —
they were aspirational copy that became a diligence trap.

Council verdict: 5/7 lenses agreed in
council_2026-05-04T15-53-40.md that these references must be
deleted.

Changes

File Change
src/gradata/enhancements/contradiction_detector.py Drop docstring claim that semantic similarity is "proprietary cloud-side"
src/gradata/enhancements/rule_integrity.py Drop docstring claim that key management / multi-tenant signing are "proprietary cloud-side"
src/gradata/enhancements/self_improvement/__init__.py Drop reference to gradata_cloud.graduation.self_improvement
src/gradata/enhancements/meta_rules.py Rewrite "requires Gradata Cloud" docstring + log line to factual "not implemented in open-source build; cloud sync optional"
tests/test_severity_weighting.py Drop comment line listing gradata_cloud.graduation.self_improvement as a test target
docs/architecture/multi-tenant-future-proofing.md Replace claim about proprietary dashboard in gradata_cloud_backup/ with a TODO comment (per task: delete-only, no new claims)

Flagged but NOT modified

These are real runtime guards (try / except ImportError with OSS
fallback). Per task spec they are left in place — they are not bugs:

  • src/gradata/cli.py:286from gradata_cloud.scoring.reports import ... inside try/except ImportError
  • src/gradata/cli.py:309 — same pattern
  • src/gradata/enhancements/reporting.py:170 — same pattern
  • tests/test_brain_events.py — explicitly parametrizes the absence of gradata_cloud modules via monkeypatch.setitem(sys.modules, "gradata_cloud", None)
  • tests/test_severity_weighting.py:42 — same try/except fallback

These are functionally safe (no install break) but do leak the
proprietary module layout in import statements. Deciding whether to
strip them belongs in a separate PR (touches code paths, not just
comments) — flagged here for follow-up.

Test plan

  • pytest -x --tb=short tests/test_severity_weighting.py tests/test_brain_events.py tests/test_pattern_extractor.py — 99 passed
  • Full suite: 4158 passed, 6 skipped, 2 pre-existing failures in tests/test_dualwrite_atomicity.py confirmed present on main before my changes (unrelated, fs-race in test fixture)
  • Changes are docstring/comment/log-string only — no behavioral diff

Layering check

No imports added or moved. Comment-only edits to Layer 1 + tests + docs.

Risk

None — pure copy edits. The single log-line change in meta_rules.py
is a string-literal swap inside an _log.info(...) call.

Council 5/7 lenses (council_2026-05-04T15-53-40.md) flagged source
comments/docstrings claiming 'proprietary cloud-side', 'requires Gradata
Cloud', or referencing the nonexistent gradata_cloud.* namespace as a
diligence trap. The gradata_cloud package does not exist on disk or in
the Gradata GitHub org.

Removed:
- contradiction_detector.py: 'similarity is proprietary cloud-side'
- rule_integrity.py: 'multi-tenant signing are proprietary cloud-side'
- self_improvement/__init__.py: gradata_cloud.graduation reference
- meta_rules.py: 'requires Gradata Cloud' (docstring + log line) ->
  rewrote to factual 'not implemented in open-source build'
- test_severity_weighting.py: comment listing gradata_cloud as a target
- docs/architecture/multi-tenant-future-proofing.md: gradata_cloud_backup
  proprietary dashboard claim -> TODO comment

Flagged but NOT touched (left as runtime guards per task spec):
- src/gradata/cli.py:286,309 - try/except ImportError gates with OSS fallback
- src/gradata/enhancements/reporting.py:170 - same pattern
- tests/test_brain_events.py - parametrizes ModuleNotFoundError absence
- tests/test_severity_weighting.py:42 - try/except ImportError fallback

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Gradata Gradata merged commit 360fdd3 into main May 4, 2026
6 of 9 checks passed
@Gradata Gradata deleted the fix/delete-cloud-ghost-refs branch May 4, 2026 23:58
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a5ec06a3-d04b-46be-b4a6-aebfae9c8532

📥 Commits

Reviewing files that changed from the base of the PR and between eded405 and 9830c4b.

📒 Files selected for processing (6)
  • Gradata/docs/architecture/multi-tenant-future-proofing.md
  • Gradata/src/gradata/enhancements/contradiction_detector.py
  • Gradata/src/gradata/enhancements/meta_rules.py
  • Gradata/src/gradata/enhancements/rule_integrity.py
  • Gradata/src/gradata/enhancements/self_improvement/__init__.py
  • Gradata/tests/test_severity_weighting.py

📝 Walkthrough
  • Removes false docstring claims that semantic similarity detection and key management are "proprietary cloud-side" features
  • Updates refresh_meta_rules() documentation to clarify that meta-rule discovery is unimplemented in open-source builds (cloud sync is optional)
  • Removes comment referencing nonexistent gradata_cloud.graduation.self_improvement namespace from test file
  • Updates architecture documentation to note that claimed proprietary dashboard in gradata_cloud_backup/ does not exist, adds TODO for future re-documentation
  • Adds explicit __all__ export list to self_improvement/__init__.py defining the public API surface
  • Adds backward-compatible __getattr__() for legacy symbol routing to rule_pipeline, causal_chains, and clustering submodules
  • No breaking changes, no security fixes, no new behavioral functionality
  • Comment-only and documentation-only edits; no code logic modifications
  • Retains existing runtime guards and OSS fallbacks for optional cloud imports

Walkthrough

This PR updates documentation and comments across the codebase to clarify the open-source/proprietary boundary of Gradata, removes outdated claims about proprietary cloud features, and reorganizes the public API surface of the self_improvement module by adding explicit exports via __all__ and backward-compatible lazy re-exports via __getattr__.

Changes

Documentation and Public API Reorganization

Layer / File(s) Summary
Documentation Clarification
Gradata/docs/architecture/multi-tenant-future-proofing.md, Gradata/src/gradata/enhancements/contradiction_detector.py, Gradata/src/gradata/enhancements/rule_integrity.py, Gradata/tests/test_severity_weighting.py
Removed incorrect claims and comments mentioning proprietary dashboard code in gradata_cloud_backup/ and removed "OPEN SOURCE" / proprietary feature designations from docstrings to reflect accurate open-source boundaries.
Function Documentation Updates
Gradata/src/gradata/enhancements/meta_rules.py
Updated docstring and log message in refresh_meta_rules to clarify that meta-rule discovery is not implemented locally in the open-source build; only validation of existing meta-rules occurs.
Public API Surface Definition
Gradata/src/gradata/enhancements/self_improvement/__init__.py
Added explicit __all__ list enumerating exported constants, types, and functions; implemented __getattr__ for backward-compatible lazy re-exports of legacy symbols (pipeline, causal, clustering) from their corresponding submodules.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Gradata/gradata#101: Related — modifies _passes_beta_lb_gate and graduate implementations in _graduation.py, which are now explicitly re-exported from self_improvement/__init__.py in this PR.

Suggested labels

docs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/delete-cloud-ghost-refs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.20.0)

OpenGrep fatal error (exit code 2):
┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m
[00.23][ERROR]: Error: exception Glob.Lexer.Syntax_error("malformed glob pattern: missing ']'")
Raised at Glob__Lexer.syntax_error in file "libs/glob/Lexer.mll", line 8, characters 2-26
Called from Glob__Lexer.__ocaml_lex_token_rec in file "libs/glob/Lexer.mll", line 29, characters 26-53
Cal


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the docs label May 4, 2026
Gradata added a commit that referenced this pull request May 6, 2026
Codex audit identified:
- 6 confirmed redundancies (graduation spines, scoring metrics, synthesizer modules,
  behavioral registries, session histories, deprecated integrations namespace)
- Brain god-object split proposal
- 5 files >500 lines flagged
- 4 dead-code candidates with verification grep
- Top 10 cleanups ranked by ROI/risk
- 4 conflict-free PR roadmap (naming → integrations → graduation → brain split)

Source: /tmp/gradata-autonomous-run/bloat-audit.md (26KB)
Triggered: PR #170 (ghost refs) + #169 (tree ranking) revealed surface bloat

Co-authored-by: Oliver Le <oliver@spritesai.com>
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.

2 participants