Skip to content

fix(tests): clean up Sprites-side tests from Gradata/tests/#122

Merged
Gradata merged 1 commit into
mainfrom
fix/post-reorg-tests
Apr 20, 2026
Merged

fix(tests): clean up Sprites-side tests from Gradata/tests/#122
Gradata merged 1 commit into
mainfrom
fix/post-reorg-tests

Conversation

@Gradata

@Gradata Gradata commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Summary

Post Phase B (#121), three tests in Gradata/tests/ were sys.path-hacking to reach scripts that now live in Sprites/brain/scripts/ (private). Also one hook test was failing because it inherited GRADATA_CONTEXT_INJECT=0 from the global kill-switch.

  • Delete test_mirofish_sim.py, test_brain_benchmark.py, test_ablation_beta_lb_gate.py — they test private Sprites scripts, don't belong in the public SDK test suite. Copies live untracked in Sprites/tests/ for local dogfooding.
  • Patch test_context_inject_returns_context to set GRADATA_CONTEXT_INJECT=1 in its env patch (formatter also reflowed some whitespace).

Result: pytest Gradata/tests/ -q runs clean against the public SDK surface only.

Test plan

  • pytest Gradata/tests/test_hooks_intelligence.py -q — 34 passed
  • Full suite post-merge — expect 0 failures from the above 4 sources

Generated with Gradata

After Phase B, mirofish_sim/brain_benchmark/ablation_beta_lb_gate
scripts live under Sprites/brain/scripts/ (private). Their tests
were sys.path-hacking to find the scripts relative to the repo
root — now broken since the public SDK no longer contains them.

- Remove the three Sprites-side tests from the public test suite;
  they live on in Sprites/tests/ (gitignored) for local dogfooding.
- Fix test_context_inject_returns_context: patch GRADATA_CONTEXT_INJECT=1
  so the test isn't silenced by the kill-switch env var set globally.

Gradata/tests now runs clean against the public SDK surface only.

Co-Authored-By: Gradata <noreply@gradata.ai>

@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.

@coderabbitai

coderabbitai Bot commented Apr 20, 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: 176a5dc0-1ae3-4037-9b57-dadc87e8d8a6

📥 Commits

Reviewing files that changed from the base of the PR and between decce7c and e59f6e3.

📒 Files selected for processing (4)
  • Gradata/tests/test_ablation_beta_lb_gate.py
  • Gradata/tests/test_brain_benchmark.py
  • Gradata/tests/test_hooks_intelligence.py
  • Gradata/tests/test_mirofish_sim.py

📝 Walkthrough
  • Removed three test files from Gradata/tests/ that targeted private Sprites scripts now located in Sprites/brain/scripts/:
    • test_mirofish_sim.py (142 lines)
    • test_brain_benchmark.py (89 lines)
    • test_ablation_beta_lb_gate.py (273 lines)
  • Modified test_hooks_intelligence.py to patch GRADATA_CONTEXT_INJECT=1 environment variable in test_context_inject_returns_context to isolate test from global kill-switch
  • Reformatted whitespace and context managers in test_hooks_intelligence.py (133 lines added, 82 removed)
  • Result: pytest Gradata/tests/ now exercises only public SDK surface with no failures from removed/modified tests

Walkthrough

This PR removes three complete test modules (test_ablation_beta_lb_gate.py, test_brain_benchmark.py, test_mirofish_sim.py) and reformats test_hooks_intelligence.py with multiline function call syntax and modernized context manager blocks.

Changes

Cohort / File(s) Summary
Deleted Test Modules
Gradata/tests/test_ablation_beta_lb_gate.py, Gradata/tests/test_brain_benchmark.py, Gradata/tests/test_mirofish_sim.py
Complete removal of test suites covering the Beta LB gate harness, brain benchmarking, and Mirofish forum simulation.
Reformatted Tests
Gradata/tests/test_hooks_intelligence.py
Converted hook function calls to multiline formatting, replaced backslash-continued context managers with parenthesized blocks, and added GRADATA_CONTEXT_INJECT="1" environment variable to test_context_inject_returns_context setup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

refactor

✨ 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/post-reorg-tests

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

@Gradata Gradata merged commit 30238e9 into main Apr 20, 2026
1 check was pending
@Gradata Gradata deleted the fix/post-reorg-tests branch April 20, 2026 07:16
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