Skip to content

test(ci): restore backend unit and legacy ratchet checks - #12339

Open
aryanorastar wants to merge 1 commit into
BasedHardware:mainfrom
aryanorastar:codex/fix-main-ci-temporal-stubs
Open

test(ci): restore backend unit and legacy ratchet checks#12339
aryanorastar wants to merge 1 commit into
BasedHardware:mainfrom
aryanorastar:codex/fix-main-ci-temporal-stubs

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Root cause

utils.app_integrations now imports current_date_for_uid from utils.llm.temporal. The two isolated harnesses replace utils.llm with an in-memory module but did not register that new child module, so pytest stopped during collection with:

ModuleNotFoundError: No module named 'utils.llm.temporal'; 'utils.llm' is not a package

The same upstream change also added InsightAssistant to 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

  • register a deterministic utils.llm.temporal stub in both app-integration harnesses
  • return a fixed date from current_date_for_uid so the tests remain hermetic and never load the production timezone/database path
  • describe the macOS parity source without repeating the ratcheted legacy class name

There is no production behavior change.

Verification

PYTHON=backend/.venv/bin/python \
  BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-main-ci-failures.txt \
  BACKEND_PYTEST_WORKERS=3 bash backend/test.sh
# 35 passed across the exact three files reported by CI

python3 backend/scripts/legacy_memory_surface_inventory.py \
  --check-ratchet --base-ref origin/main
# PASS (892 findings across 82 path counters)

make preflight
# PASS (26 selected manifest checks)

Product invariants

None.

Review in cubic

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@tianmind-studio tianmind-studio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 files
  • git 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants