Skip to content

feat(chat): add mobile date, time, and city context across AI routes#10618

Open
undivisible wants to merge 5 commits into
mainfrom
codex/mobile-prompt-metadata
Open

feat(chat): add mobile date, time, and city context across AI routes#10618
undivisible wants to merge 5 commits into
mainfrom
codex/mobile-prompt-metadata

Conversation

@undivisible

@undivisible undivisible commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds live date, time, timezone, and consented recent city context to mobile agentic, persona, and file chat turns.
  • Keeps dynamic metadata out of cached system prefixes; realtime Gemini/OpenAI relay traffic remains provider-native.
  • Validates coordinate bounds, escapes city text, and updates the public OpenAPI contract.

Verification

  • backend/.venv/bin/python -m pytest -q tests/unit/test_chat_async_offload.py tests/unit/test_prompt_metadata_safety.py tests/unit/test_city_prompt_context.py tests/unit/test_geocoding_cache.py
  • backend/scripts/typecheck.sh
  • OpenAPI contract regenerated with scripts/openapi_runner.sh scripts/export_openapi.py --surface public --write ../docs/api-reference/openapi.json

Failure class

Failure-Class: none

@cursor

cursor Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@undivisible undivisible changed the title feat(chat): add mobile city context feat(chat): add mobile date, time, and city context Jul 26, 2026
@undivisible

Copy link
Copy Markdown
Collaborator Author

Updated the title and description to explicitly cover live date, time, timezone, and city-level context. Focused backend tests pass: prompt cache (32), async offload (14), and geocoding cache (16).

Verification: backend prompt-cache, async-offload, and geocoding unit tests; backend typecheck.
@undivisible
undivisible force-pushed the codex/mobile-prompt-metadata branch from 8a93ba7 to dedb29d Compare July 26, 2026 01:30
Failure-Class: none

Verification: BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-backend-unit-failures.txt bash backend/test.sh; python3 .github/scripts/check-release-process-guards.py.
@undivisible

Copy link
Copy Markdown
Collaborator Author

Fixed the stale qualification-checkout guard; the release-script test (30 passed) and release guard now pass locally.

@axAilotl
axAilotl self-requested a review July 26, 2026 02:11
@undivisible undivisible changed the title feat(chat): add mobile date, time, and city context feat(chat): add mobile date, time, and city context across AI routes Jul 26, 2026
@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 26, 2026, 2:39 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟡 Building Jul 26, 2026, 2:38 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@Git-on-my-level Git-on-my-level added needs-tests PR introduces logic that should be covered by tests workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior labels Jul 26, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tightening this up — the direction of keeping time/city metadata out of the cached system prompt and passing only city-level location looks sensible.

I found one blocking issue before this can merge:

  • backend/tests/unit/test_prompt_cache_integration.py::test_current_datetime_block_includes_city_without_coordinates currently expects Current city-level location: New York, New York, United States, but get_current_datetime_block() emits Recent city-level location: .... That mismatch explains the failing Backend unit suite on this head; please align the implementation/test wording and rerun the focused backend tests.

I also left workflow-review on this because the PR touches the desktop release guard expectations in addition to the chat prompt path. Human maintainer review is still needed before merge for the product/privacy implications of adding live city context to chat prompts and for the workflow-sensitive release guard change.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

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

Labels

needs-tests PR introduces logic that should be covered by tests workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants