test(lint): add AST-based bare print() detection test for engine/memo…#440
Open
borjamoskv wants to merge 10 commits into
Open
test(lint): add AST-based bare print() detection test for engine/memo…#440borjamoskv wants to merge 10 commits into
borjamoskv wants to merge 10 commits into
Conversation
…ry/guards/core This test ensures that there are no bare print() calls in production code across specified directories, enforcing the use of logging instead.
Contributor
∞ MÖBIUS — PR Analysis
Labels applied: Generated by MÖBIUS (Clojure/Babashka) — where code IS data |
Contributor
∞ MÖBIUS — PR Analysis
Labels applied: Generated by MÖBIUS (Clojure/Babashka) — where code IS data |
- SystemStateVector: event-sourced causal state with SHA-256 hash chain - Orchestrator: rule-based controller connecting EventBus → State → Supervisor - HealthMonitorAgent (daemon) + TaskWorkerAgent (reactive) - 24/24 integration tests passing (E2E boot→submit→error→recovery→shutdown) - Fixed handler dispatch: class-level unbound → instance-level bound methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
tests/test_no_bare_print.py— an AST-based parametric lint test that enforces zero bareprint()calls in production Python code.What it does
.pyfiles undercortex/engine/,cortex/memory/,cortex/guards/,cortex/core/,cortex/agents/,cortex/database/Expr(Call(Name('print')))nodes (bare call statements only — not those inside strings/docstrings)test_no_bare_print_in_production_codeis parametrized per file and fails with exact line numberstest_audit_covers_at_least_one_fileis a sanity guard to prevent the audit from silently covering zero filescortex/cli/) and__pycache__/.venvare exemptCloses #394