test(ci): restore backend unit and legacy ratchet checks - #12339
test(ci): restore backend unit and legacy ratchet checks#12339aryanorastar wants to merge 1 commit into
Conversation
Stub the temporal helper added to app integrations so the two hermetic test harnesses collect without importing production database paths. Reword the macOS parity comment so the legacy-memory inventory does not mistake documentation for a new legacy assistant surface. Verified with the exact backend/test.sh file-isolated runner: 35 passed. Legacy memory surface ratchet: PASS, 892 findings across 82 path counters.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
tianmind-studio
left a comment
There was a problem hiding this comment.
Reviewed current head 6ff2a78382; I did not find a blocking issue.
The two harnesses replace utils.llm with an in-memory module, so registering utils.llm.temporal before importing utils.app_integrations is the necessary isolation repair. The fixed YYYY-MM-DD return value matches current_date_for_uid's production contract and avoids pulling the lazy timezone/database path into these tests. The Windows diff is comment-only and removes a false legacy-surface inventory hit without changing the prompt string or runtime behavior.
Independent verification on Windows:
- both changed backend test files: 25 passed
legacy_memory_surface_inventory.py --check-ratchet --base-ref origin/main: PASS (892 findings / 82 path counters)check_module_stub_pollution.py: 0 violations across 1038 test filesgit diff --check origin/main...HEAD: clean
Leaving this as a contributor comment rather than maintainer approval, but the change is merge-shaped from this pass.
Summary
utils.app_integrationstest harnesses after the temporal grounding import added in fix(desktop/llm): cache-efficient datetime injector; stop 2026-is-wrong Insight/Focus cards #12236mainand downstream PRs such as feat(backend): split X connector sync into its own Cloud Run Job (#9298) #11183Root cause
utils.app_integrationsnow importscurrent_date_for_uidfromutils.llm.temporal. The two isolated harnesses replaceutils.llmwith an in-memory module but did not register that new child module, so pytest stopped during collection with:The same upstream change also added
InsightAssistantto a Windows source comment. The Gate F inventory intentionally scans that token family, so the comment alone moved the counter from 4 to 5 even though no legacy assistant surface was added.Changes
utils.llm.temporalstub in both app-integration harnessescurrent_date_for_uidso the tests remain hermetic and never load the production timezone/database pathThere is no production behavior change.
Verification
Product invariants
None.