# SEC filing amended versus original mismatch, data missing

## TL;DR
When an amended filing disagrees with the original, the amendment wins: 10-K/A and 10-Q/A supersede the original filing, and the original's numbers are history, not current truth. The mismatch is not a data error; it is the restatement doing its job. Always resolve to the latest amendment for a period, diff the two to find exactly what changed, and record which accession you used so the briefing cites the right one.

## The error
```text
(data mismatch, no exception)
10-K figures do not match 10-K/A for the same period; briefing shows stale numbers / missing restated sections
```

## When this helps
- filing figures disagree between original and amended forms
- a briefing shows numbers that differ from the latest filing
- restated quarters need clean period data
- auditing which accession a pipeline consumed

## When it doesn't
- the forms differ by period, not amendment; 10-Q and 10-K for different quarters legitimately differ
- you need the original as-filed numbers for an audit trail; then cite both explicitly
- the amendment only adds exhibits; the financials are unchanged

## Works with
EDGAR browse and archives as of 2026; curl 7.x+, python 3.8+. Amendment semantics are SEC-defined.

## Steps
### 1. List every filing for the company and period including amendments
```bash
curl -s -A "IntelBriefingBot/1.0" "https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=[cik]&type=10-K&dateb=&owner=include&count=40" -o filings.html
 grep -o "10-K/A" filings.html | wc -l
```
Expected: The amendment count. Any /A form for the same period means the original is superseded; never analyze the original alone.

### 2. Pull the accession numbers in filing order
```python
import re
html = open("filings.html").read()
acc = re.findall(r"\d{10}-\d{2}-\d{6}", html)
print("accessions in page order:", acc[:6])
print("latest accession wins for each period")
```
Expected: Accession numbers newest first. The latest accession for a period is the current truth; earlier ones are superseded.

### 3. Diff the original against the amendment to isolate the restatement
```bash
curl -s -A "IntelBriefingBot/1.0" "https://www.sec.gov/Archives/edgar/data/[cik]/[orig-accession]/[doc]" -o orig.html
curl -s -A "IntelBriefingBot/1.0" "https://www.sec.gov/Archives/edgar/data/[cik]/[amended-accession]/[doc]" -o amended.html
diff orig.html amended.html | head -40
```
Expected: The changed lines. Amendments restate specific sections; the diff shows exactly which numbers moved and which sections were added.

### 4. Pin the briefing to the amended accession
```bash
import json
cite = {"ticker": "[ticker]", "period": "FY2026", "accession": "[amended-accession]", "form": "10-K/A"}
open("citation.json", "w").write(json.dumps(cite, indent=2))
print(open("citation.json").read())
```
Expected: A citation record naming the amendment. Briefings that cite the accession never silently show pre-restatement numbers.

## Other ways people phrase this
### 10-k/a vs 10-k data mismatch
The amendment supersedes. Resolve every period to its latest /A before comparing across companies.

### restated figures not matching prior filing
Restatements rewrite history by design. The prior filing is stale, not wrong.

### sec filing data missing after amendment
Amendments sometimes drop or restructure sections. Diff to find what moved versus what vanished.

## Why it happens
Companies amend filings to correct errors, and the SEC treats the latest amendment as the filing of record for that period. Pipelines that cache the original filing keep serving pre-correction numbers, which then mismatch any source that picked up the amendment. The data is not corrupt; the pipeline is pinned to a superseded accession.

## Edge cases
- Amendments can arrive months later; a period you analyzed in Q1 may restate in Q3, so re-check amendments on a schedule.
- Some amendments restate multiple prior periods at once; map each restated period to its new numbers.
- 8-K/A amendments work the same way for press-release-type disclosures.
- Inline XBRL viewers sometimes render the original when the amendment failed to index; verify the accession in the viewer header.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_OY-k2xk-wfi1KkIR6GwK2g
