Skip to content

Enforce backend type checking in CI#27

Merged
KostasCherv merged 2 commits into
mainfrom
codex/enforce-mypy-ci
Jul 14, 2026
Merged

Enforce backend type checking in CI#27
KostasCherv merged 2 commits into
mainfrom
codex/enforce-mypy-ci

Conversation

@KostasCherv

Copy link
Copy Markdown
Owner

What changed

  • clear all existing backend mypy errors across integration, observability, graph, cache, and API boundaries
  • validate Inngest event payload fields before dispatching typed handlers
  • make the backend mypy CI step blocking
  • document blocking type checks in the project quality tooling

Why

Backend type checking was non-blocking because of a pre-existing error backlog. That allowed new typing regressions to merge unnoticed and weakened the CI quality signal.

Impact

Future pull requests now fail CI when backend type errors are introduced. Runtime behavior remains unchanged except that malformed Inngest event payloads now fail early with explicit validation errors.

Validation

  • uv run ruff check src tests
  • uv run mypy src — zero errors across 67 source files
  • uv run bandit -q -c pyproject.toml -r src
  • uv run python -m pytest tests/ -q — 554 passed
  • git diff --check
  • graphify update .

@KostasCherv

Copy link
Copy Markdown
Owner Author

@codex

@KostasCherv
KostasCherv marked this pull request as ready for review July 14, 2026 08:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f98191b981

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/inngest_client.py
session_id=_required_string(data, "session_id"),
run_id=_required_string(data, "run_id"),
user_id=_required_string(data, "user_id"),
query=_required_string(data, "query"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not leave empty research runs stuck in progress

When the API receives {"query": ""}, ResearchRequest.query has no min_length (src/api/routers/sessions.py:64-65) and the enqueue path stores body.query directly in the research/run.requested event (src/api/routers/sessions.py:728-734). This new _required_string(..., "query") raises before _execute_research_run starts, so the pending SessionRun created just before enqueue never reaches the failure patch in _execute_research_run, leaving clients polling a run that remains running while Inngest retries. Either reject empty queries before creating the run or let the handler call _execute_research_run so it can persist a terminal failure.

Useful? React with 👍 / 👎.

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cortex Ready Ready Preview, Comment Jul 14, 2026 8:30am

@KostasCherv
KostasCherv merged commit a6e9cbd into main Jul 14, 2026
5 checks passed
@KostasCherv
KostasCherv deleted the codex/enforce-mypy-ci branch July 14, 2026 11:02
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.

1 participant