Export output shape: sections.tsv/pages.tsv split + human-readable keys (#106)#109
Conversation
…ys (#106) Post-#103 per-TSV review. Pure output-shape refinement of `rosetta export` — no schema change, no re-extraction, no MCP/TUI change; the export still reads the DB alone and rebuilds byte-identically. - Rename so each file matches its source table like every other dataset: the per-section file `pages.tsv` -> `sections.tsv` (source `sections`, incl. the B-0023 `_lead` fragment), the per-page rollup `pages_summary.tsv` -> `pages.tsv` (source `pages`). Grouping sections.tsv by page_id pivots up to ~98% of the pages.tsv word_count; the residual is heading-text lines (disclosed in the manifest). No section-sum column on pages.tsv — the pivot is the rollup. - callouts.tsv gains `rosetta_id` (page) + resolved `section_anchor` so a reader names the owning page/section without joining back to the DB (the pairing properties.tsv already emits); long `content` moved last. - changelog.tsv moves `sort_order` before `description` (long column last). - Stale prerelease-ordering disclosure re-pointed #104 -> #107. Verified on the local schema-v10 corpus (365 pages): headers, resolved callout names, and the sections->pages pivot (98.2%, 365 lead fragments). Part of #95. Closes #106. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
🧰 Additional context used📓 Path-based instructions (6)*📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
CHANGELOG.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
{README.md,src/setup.ts,MANUAL.md}📄 CodeRabbit inference engine (AGENTS.md)
Files:
MANUAL.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🔇 Additional comments (4)
📝 WalkthroughWalkthroughThe export contract now emits revised changelog and callout columns, adds ChangesExport dataset contract
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
Refines the rosetta export TSV output shape (no schema/ETL changes) to make datasets more readable and table-aligned: renames the page/section exports so filenames match their source tables, reorders long-text columns to the end, and adds human-readable page/section keys to callouts.tsv. Updates the export contract tests and operator docs accordingly.
Changes:
- Renamed
pages.tsv→sections.tsv(per-section rows) andpages_summary.tsv→pages.tsv(per-page rows). - Updated
callouts.tsvto includerosetta_idand resolvedsection_anchor, withcontentlast; reorderedchangelog.tsvto putsort_orderbeforedescription. - Updated export tests and documentation to reflect the new filenames and column layouts.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/export.ts | Adjusts dataset readers: column order changes, callouts joins for human-readable keys, and renames pages/sections export outputs + new disclosure. |
| src/export.test.ts | Updates fixtures and assertions for new column orders and renamed TSV files. |
| MANUAL.md | Updates the export directory layout and describes the new pages.tsv vs sections.tsv split. |
| CHANGELOG.md | Adds an [Unreleased] bullet documenting the user-visible export output-shape changes and updates prior wording to match the new filenames. |
Post-#103 per-TSV review of
rosetta export. Pure output shape — no schema change, no re-extraction, no MCP/TUI change. The export still reads the DB alone and rebuilds byte-identically. Closes #106; part of #95 / B-0022.What changed
pages.tsv→sections.tsv(sourcesections, includes the B-0023_leadfragment), and the per-page rolluppages_summary.tsv→pages.tsv(sourcepages). This is the "two views of page content" split —pages.tsvis one whole-page row,sections.tsvis the pivot-able per-section detail. Groupingsections.tsvbypage_idrolls up to (near-)thepages.tsvword count, so nosection_word_countrollup column is needed — the pivot is the rollup. The residual (~2%, heading-text lines in no fragment) is disclosed in the manifest.callouts.tsvgainsrosetta_id+ resolvedsection_anchorso a reader identifies the owning page/section by name without joining back to the DB — the same pairingproperties.tsvalready emits. Longcontentfield moved last.changelog.tsvmovessort_orderbeforedescription(long free-text column last).Verification
bun testfull suite 877 pass / 0 fail; typecheck, biome, markdownlint, cspell all clean. Live export against the local schema-v10 corpus (365 pages) confirms:…/certificates+ sectioncertificate-properties);sections.tsv→pages.tsvpivot reconciles at 98.2% of page words, 365_leadfragments (one per page), worst per-page residual 251 words — exactly the disclosed heading-line gap.Notes
Export is
[Unreleased](only in rc builds), so the renames carry no back-compat cost.MANUAL.mdandCHANGELOG.mdupdated. The deferred#104chunks (E3/E4) and the#108safe-replacement scheme are untouched — this is only the output-shape cleanup.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
sections.tsvto exports, providing one row per page section for easier grouping and analysis.pages.tsvto provide authoritative whole-page records, including rollup counts.callouts.tsvwith page identifiers and resolved section context.Updates
pages_summary.tsvfrom the exported dataset.