Conversation
Issue #1324: [Audit][R4] Add 13F amendment (/A) reconciliation as an explicit tested stageAutomated Status SummaryScope13F filings are amended ( Tasks
Acceptance Criteria
Full Issue TextWhy13F filings are amended ( ScopeAdd an explicit, tested amendment-reconciliation stage that resolves to one authoritative holdings set per (manager, quarter) before diffing/alerting. Non-Goals
Tasks
Acceptance Criteria
Implementation NotesAudit baseline Part of epic #1320. |
|
@gemini start Please create commits on this branch, run tests, and keep the PR updated. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 43 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Keepalive: OFF
Source Issue #1324: [Audit][R4] Add 13F amendment (/A) reconciliation as an explicit tested stage
Base: main
Head: gemini/issue-1324
Source: #1324
Automated Status Summary
Scope
13F filings are amended (
13F-HR/A), and the field standard is to reconcile them — keep the most recent filing per manager-quarter and supersede13F-HRwith its13F-HR/A— so diffs and large-delta alerts don't double-count. MDB ingests amendments (adapters/edgar.py: THIRTEEN_F_FORMS = {"13F-HR", "13F-HR/A", "13-F"}) but there is no reconciliation logic (verified: no latest-per-quarter/supersede handling ate5764a5). So raw filings — including amendments — flow into the diff, which both noises the alerts and compounds the duplicate-holdings idempotency bug #1298.Tasks
13F-HR/Aas superseding the matching13F-HR; mark superseded filings so downstream diff/alerts use only the authoritative set.Acceptance Criteria
13F-HRthen a13F-HR/Afor the same manager-quarter with changed holdings; assert the diff/alerts reflect the amended holdings once (not both filings double-counted). Current code double-counts.Full Issue Text
Why
13F filings are amended (
13F-HR/A), and the field standard is to reconcile them — keep the most recent filing per manager-quarter and supersede13F-HRwith its13F-HR/A— so diffs and large-delta alerts don't double-count. MDB ingests amendments (adapters/edgar.py: THIRTEEN_F_FORMS = {"13F-HR", "13F-HR/A", "13-F"}) but there is no reconciliation logic (verified: no latest-per-quarter/supersede handling ate5764a5). So raw filings — including amendments — flow into the diff, which both noises the alerts and compounds the duplicate-holdings idempotency bug #1298.Scope
Add an explicit, tested amendment-reconciliation stage that resolves to one authoritative holdings set per (manager, quarter) before diffing/alerting.
Non-Goals
Tasks
13F-HR/Aas superseding the matching13F-HR; mark superseded filings so downstream diff/alerts use only the authoritative set.Acceptance Criteria
13F-HRthen a13F-HR/Afor the same manager-quarter with changed holdings; assert the diff/alerts reflect the amended holdings once (not both filings double-counted). Current code double-counts.Implementation Notes
Audit baseline
e5764a5. Verified:adapters/edgar.py:22form set includes13F-HR/Abut no reconciliation exists. Refs: WhaleWisdom amendment/split handling. Part of the expansion roadmap (R4); best done after R3 (edgartools) and alongside #1298. dim-5/6 "amendment reconciliation" gap.Part of epic #1320.
—
PR created automatically to engage Gemini.