Skip to content

feat(export): emit schema-validated JSONL atomically - #820

Draft
seonghobae wants to merge 20 commits into
developfrom
feature/add-export-jsonl-4506681705681529659
Draft

feat(export): emit schema-validated JSONL atomically#820
seonghobae wants to merge 20 commits into
developfrom
feature/add-export-jsonl-4506681705681529659

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

NewsDOM JSON을 article/body-block 단위 JSONL로 내보내는 CLI입니다. 입력 권위는 ad-hoc dict 규칙이 아니라 newsdom_api.schemas.ParseResponse이며 완료 산출물은 같은 디렉터리의 temporary sibling을 통해 atomic publish합니다.

RED → causal repair

  • Schema admission: RED 22631eef6e918b3ec53031a6f412899e016a92ff가 non-object page/article와 string-valued body_blocks를 거부하도록 고정했고 GREEN 165b0a0b1678fbb29732ccc15bc77bf9dd5c7e07은 JSON parse 뒤 ParseResponse.model_validate(data)로 invalid DOM을 output open 전에 fail closed합니다.
  • Partial publication: RED c411b095c2302d22e320a46b67bacac7f0e99006가 후반 UTF-8 write failure에서도 기존 published bytes 보존과 no-temp-artifact를 요구했고 GREEN 7c5a181bb37b1b10d49818a5c9381abedf3c746a은 same-directory temporary sibling을 완전히 기록한 뒤 Path.replace()합니다. d1424fdd05b6fc8a7acffbfe9593f67971e2b376은 missing output-parent edge를 고정했습니다.
  • CHANGELOG: 28d63d699abb2d777f988e56fac5d32486dc9f97에서 잘린 기존 release/security history와 Unreleased JSONL entry를 복구했습니다.
  • Coverage authority: [tool.coverage.run].source = ["src/newsdom_api", "tools"]와 CI가 어긋나던 결함을 RED 4a590b4b799c3ab08fdc5bec823468e37fbd4700 → GREEN a33a22e1284423203dccdb675b0d99183825cc95로 수리해 workflow가 bare --cov를 사용합니다.
  • Cancellation cleanup: RED 2ade2f762a192fdc4161fa007a034e8ca2c47d4dKeyboardInterrupt에서도 기존 output 보존과 .output.jsonl.*.tmp 0개를 요구했고 GREEN 86d602caa7d97fb0e1e30ad55cf87e7089449a13은 publication cleanup boundary를 BaseException까지 확장해 temp를 제거한 뒤 원래 cancellation을 그대로 re-raise합니다. CLI의 일반 오류 변환은 계속 Exception만 처리합니다.

Current exact state — 2026-09-07

  • protected/base: develop@e06b1f3fb10903569124af011da213951e6e2473
  • exact head: 86d602caa7d97fb0e1e30ad55cf87e7089449a13
  • lifecycle: Draft
  • current exact tests: run 34123363976, pytest job 101746261362 terminal SUCCESS; 494 passed, src/newsdom_api + tools 전체 1656 statements / 540 branches / 0 miss / 100.00%. tests/test_tools_export_jsonl_interrupt_cleanup.py도 같은 run에서 실제 실행·PASS했습니다.
  • same-head terminal GREEN: scorecards 34123363840, tests 34123363976, container-image 34123363908, repository CodeQL 34123363952, ClusterFuzzLite 34123363989.
  • same-head non-terminal: central CodeQL PR 34123363876, SAST 34123363974, Security Scan 34123363915.

Ready/merge는 unchanged 86d602c...에서 applicable Security/SAST/CodeQL까지 terminal GREEN, zero valid unresolved current-head findings, independent current-head review가 있어야 합니다. Previous-head evidence는 merge authority로 전용하지 않습니다.

Large NewsDOM whole-file parsing은 representative/right-cleared buyer workload에서 memory/latency 문제가 실제 측정될 때 streaming parser 또는 Rust hot path를 별도 검토합니다. No self-approval, gate weakening, scanner suppression, force push, destructive rebase, mutable sibling dependency, coverage suppression, or source-neutral CI retrigger.

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title ✨ 기능: JSONL 내보내기 도구 추가 feat(export): emit schema-validated NewsDOM JSONL Sep 6, 2026
@seonghobae
seonghobae marked this pull request as draft September 6, 2026 22:00
@seonghobae seonghobae added area: api API, protocol, event, or external contract enhancement New feature or request priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability labels Sep 6, 2026 — with ChatGPT Codex Connector
@seonghobae seonghobae changed the title feat(export): emit schema-validated NewsDOM JSONL feat(export): emit schema-validated JSONL atomically Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: api API, protocol, event, or external contract enhancement New feature or request priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant