Skip to content

test(engine): add determinism, logging hygiene, and importability tests#442

Open
borjamoskv wants to merge 1 commit into
mainfrom
borjamoskv-patch-8
Open

test(engine): add determinism, logging hygiene, and importability tests#442
borjamoskv wants to merge 1 commit into
mainfrom
borjamoskv-patch-8

Conversation

@borjamoskv

Copy link
Copy Markdown
Owner

Adds tests/engine/test_engine_determinism.py covering:

  • Parametric importability check for every cortex/engine module
  • AST-based bare print() detection per engine file (logging hygiene)
  • Root logger suppression guard (engine must not set level to CRITICAL)
  • Sanity guard: engine directory must contain at least one module

Closes #397

▀▄ CORTEX-PERSIST PULL REQUEST

█ EPISTEMIC HUMILITY CHECKLIST

All generative AI code is treated as conjecture until deterministic validation is proven. You MUST check all boxes before this PR can be merged.

  • Determinism: I have not introduced any stochastic behaviour in the core runtime without deterministic guards.
  • Hash Continuity: I have verified that changes to persistence do not break existing SHA-256 Merkle chain validation.
  • C5-REAL Validation: I have executed the test suite locally and the output is deterministically successful.
  • Industrial Noir 2026: If UI/CLI changes are present, they adhere to the #0A0A0A (Black), #2B3BE5 (Blue), and Humanist Sans brutalist aesthetic.

█ ARCHITECTURAL IMPACT

(Provide a concise explanation of the causal effect of this PR. Zero decorative prose. Every sentence must change behavior.)

Context:
Changes:
Telemetry / Performance Delta (if any):

█ VERIFICATION EVIDENCE

(Paste relevant CLI output, test success logs, or C5-REAL cryptographic proofs demonstrating the change functions as claimed)

# Paste verification logs here

Adds tests/engine/test_engine_determinism.py covering:

- Parametric importability check for every cortex/engine module
- AST-based bare print() detection per engine file (logging hygiene)
- Root logger suppression guard (engine must not set level to CRITICAL)
- Sanity guard: engine directory must contain at least one module

Closes #397
@github-actions github-actions Bot added the tests label Jun 6, 2026
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

∞ MÖBIUS — PR Analysis

Metric Value
Files changed 1
Total changes 129 (+/-)
Complexity medium
Est. review time 15 min
Has tests?
Has Rust changes? No

Labels applied: tests


Generated by MÖBIUS (Clojure/Babashka) — where code IS data

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.

test(engine): add unit tests for high-complexity core modules

1 participant