Repository navigation
Add interpretation dispatch and findings store - #11439
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17ee001e6b
ℹ️ 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".
| existing = rest(key, "GET", "/findings?select=source_ref&limit=5000") or [] | ||
| seen = {r.get("source_ref") for r in existing} | ||
| fresh = [r for r in rows if r["source_ref"] not in seen] |
There was a problem hiding this comment.
Paginate existing finding identities before importing
Once ainventory.findings contains more than 5,000 rows, this lookup cannot include every existing identity. Re-importing a file whose entries fall outside the returned window therefore inserts those findings again instead of skipping them. The new migration has no uniqueness constraint on source_ref, so these duplicate writes succeed, and the append-only enforcement prevents ordinary cleanup. Paginate the relevant identities or query the identities being imported directly before computing fresh.
Useful? React with 👍 / 👎.
| if status == "not_filed" and not entry.get("reason"): | ||
| raise SystemExit( | ||
| f"followups[{i}] is not_filed without a reason; an unfiled " | ||
| "follow-up is recorded with why" | ||
| ) | ||
| out.append(entry) |
There was a problem hiding this comment.
Require a destination for filed follow-ups
When a follow-up contains only {"model":"x","status":"filed"}, this validation accepts it without any task_id or issue_url, despite the research-trail shape declared in the CLI help and migration. cmd_record then persists it as part of a completed interpretation run, removing the batch from the awaiting view even though the recorded follow-up has no traceable destination. Require a task or issue reference for filed entries before performing any writes, just as not_filed entries require a reason.
Useful? React with 👍 / 👎.
Summary
Verification
The live database schema migration was already applied during task execution. The CLI's multiple PostgREST inserts are append-only but not transactional; it documents operator review before retry after partial failure.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.