Skip to content

feat: get plan bulk with cache#10

Open
tomerqodo wants to merge 4 commits intocodex_full_base_feat_get_plan_bulk_with_cache_pr10from
codex_full_head_feat_get_plan_bulk_with_cache_pr10
Open

feat: get plan bulk with cache#10
tomerqodo wants to merge 4 commits intocodex_full_base_feat_get_plan_bulk_with_cache_pr10from
codex_full_head_feat_get_plan_bulk_with_cache_pr10

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#10

Copy link
Copy Markdown

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

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: 70fe873c2a

ℹ️ 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 on lines +288 to +292
except Exception:
logger.exception(
"get_plan_bulk: failed to validate subscription plan for tenant(%s)", tenant_id
)
results[tenant_id] = None
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 Skip invalid tenant plans instead of returning None

When TypeAdapter.validate_python fails, the code logs and still inserts None into results. That violates the dict[str, SubscriptionPlan] contract and will surface as runtime errors for callers that do plan["plan"] or similar. It also means get_plan_bulk_with_cache will cache null for those tenants, so subsequent cache hits still fail validation and trigger repeated API calls. This happens whenever the billing API returns malformed data (e.g., missing expiration_date). Consider omitting the tenant from results (as the new unit test expects) or filtering out None before returning/caching.

Useful? React with 👍 / 👎.

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.

3 participants