# DKDPulse — QA Log

Run date: 2026-04-26
Build: MVP (offline, stdlib-only)
Result: **7 / 7 checks passed**

| # | Check | Command | Result |
|---|---|---|---|
| 1 | `main.py` syntax | `python3 -c "import ast; ast.parse(open('main.py').read())"` | PASS — `main.py OK` |
| 2 | All `.py` files parse | `ast.parse` over `**/*.py` (7 files) | PASS — all 7 OK, FAILS=[] |
| 3 | `--help` usage | `python3 main.py --help` | PASS — argparse usage printed (--offline, --since, --top, --format md\|html, --data-dir, --output-dir, --no-update-seen) |
| 4 | Markdown digest | `python3 main.py --offline --top 10 --format md --since 2026-04-26 --no-update-seen` | PASS — exit 0; wrote `output/dkdpulse_digest_2026-04-26.md` (10 of 21 ranked) |
| 5 | HTML digest with `<html>`/`<body>`/`<table>` | `python3 main.py --offline --top 10 --format html --since 2026-04-26 --no-update-seen` | PASS — exit 0; HTML structure tags all present |
| 6 | mock JSON loads | `json.load` on every file in `data/` | PASS — `mock_pubmed_*.json` (10), `mock_ctg_*.json` (5), `mock_medrxiv_*.json` (6), `seen_pmids.json` (0) |
| 7 | Disclaimer in README + digests | string match on `본 도구는 연구·교육 목적의 참고용이며` | PASS — present in README.md, digest .md, digest .html |

## Spot-check tagging

Sample of top-ranked records (verified by inspection):

- `MOCK_PM_90000001` (Empagliflozin macroalbuminuric T2DM) → drug=SGLT2i; outcomes=MAKE/UACR/eGFR_slope/hyperkalemia; phenotype=T2DM_DKD/macroalbuminuric_DKD. Correct.
- `MOCK_PM_90000008` (combination SGLT2i + finerenone advanced CKD) → drug=MRA/SGLT2i; outcomes=all_cause_death/hyperkalemia; phenotype=T2DM_DKD/advanced_CKD. Correct, KDIGO boost applied.
- `MOCK_PM_90000003` (tirzepatide eGFR<30) → drug=dual-GIP-GLP1; phenotype=advanced_CKD. Correct.

## Output artifacts

- `output/dkdpulse_digest_2026-04-26.md` — Markdown digest, drug-class-grouped sections.
- `output/dkdpulse_digest_2026-04-26.html` — HTML digest with table layout, embedded CSS, top + bottom disclaimer.

## Notes

- `--no-update-seen` was used in QA runs to keep `seen_pmids.json` empty for repeatability.
- All record IDs in mock data (`MOCK_PM_*`, `NCT_MOCK_*`, `10.5555/mock.*`) are clearly synthetic — no real records cited.
- Live PubMed / CTG / medRxiv calls deliberately raise `NotImplementedError` to satisfy the no-network constraint.
