Repository navigation
Conversation
|
🤖 docx-cli triage CI note: Integration Tests (LibreOffice) failed on 19dde0d, and the failure isn't this PR's. The This routine doesn't re-run workflows, so the job hasn't been re-run. That matters here, because this check is the only place the new Action needed: approve/merge — re-run the "Integration Tests (LibreOffice)" job on PR #51 and confirm it's green before merging. Generated by Claude Code |
…ror (#55) Three PRs (#50, #51, #52) went red on the integration job's Install LibreOffice step, killed at its 5-minute cap. Not a code failure: the runner's azure.archive.ubuntu.com mirror served the ~100 MB of .debs at ~35 KB/s while metadata stayed fast. Acquire::Retries can't help, since a slow transfer never errors. - Resolve the exact package set after `apt-get update` and key an actions/cache entry on the .deb filenames (name_version_arch, not URIs, so a mirror switch doesn't change the key). restore-keys gives partial hits; apt fetches only what's missing and verifies every cached .deb against the signed index. - Download-only with a per-attempt timeout; a stalled first attempt rewrites the mirrorlist to archive.ubuntu.com and retries. Install then runs with --no-download, so a timeout never interrupts dpkg. - Save right after download (not post-job) so a red test run still warms the cache; autoclean before saving so old versions don't accumulate, and re-key from the lists actually downloaded against. - Job-level `shell: bash` for pipefail, so a failed --print-uris fails the step instead of keying on an empty list. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
First slice of #43 (Phase 1 visibility + Phase 2 read-only verbs). A native Word chart used to read as an anonymous `[chart]`; now each one gets a positional chartN id (body, table cells, text boxes) and a <!-- docx:chart chartN type=… title=… series=N points=N size=… --> hint, the AST NativeChartRun carries the cached series, data source and workbook part, and `docx charts list` / `charts extract --at chartN [--json]` expose the manifest and the data as CSV. Read-only: ChartsView has no writeTo, so chart parts and workbooks stay byte-identical across saves. Refs #43 Triage-Routine: true Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkctELRxzFrjMAGvfnY1BE
19dde0d to
52ca8b9
Compare
🤖 docx-cli triage
First slice of #43: Phase 1 (visibility) and Phase 2 (
charts list/charts extract). Both are read-only.What was wrong
A native Word chart read as
`[chart]`with no id, type, title or data. Before (main,tests/fixtures/strict-profile.docx):`[chart]` <!-- p1 -->. The only way to see the numbers wasraw part geton the chart XML.What changed
chartNlocator. Positional, in document order, across the body, table cells and text boxes. Only real charts get one; SmartArt and shapes keep their bare placeholder.AST.
ChartRunis now a union, andNativeChartRuncarries:idandchartTypes[](a combo lists several)title, plusseries[]read from the caches: name, categories and values (a gap isnull), the*Refformulas andformatCodedataSource(embedded|external|none) andworkbook(the part name)trackedChangeinfo schemais updated to match.Read hint. Output on the new fixture:
`[chart]` <!-- docx:chart chart0 type="column" title="Revenue by Quarter" series="2" points="4" size="6x3.5in" data="none" -->.dataonly appears when it isn'tembedded; float/wrap/align follow the image rules. The importer drops the hint, like every otherdocx:comment.docx charts list FILE. Prints[{id, at, type, title?, series, points, data, workbook?}].docx charts extract FILE --at chartN [--json]. Prints CSV with acategory,<series…>header row; a gap is an empty cell.--jsonprints the full series objects. An unknown id fails withCHART_NOT_FOUND(exit 3).Core.
src/core/chart/: the reader, theChartslens and the CSV writer.ChartsView(ast/document/charts.ts) preloads the chart parts, because the body walk is synchronous. It has nowriteTo, so a save never re-serializes a chart part.resolveRelationshipTarget(moved from raw) is now shared.Fixture.
tests/fixtures/charts.docx: a column chart in the body and a column+line combo in a table cell, both cache-only. The builder dogfoodscreate+raw part add+raw insert. It's added toCORE_FIXTURES.Docs. REFERENCE.md, top-level
--help,info locators, SKILL.md (regenerated) and its commands reference, CONTRIBUTING.md, the root/src/cli/src/core/astCLAUDE.md files, and a newsrc/core/chart/CLAUDE.md.Verification
strict-profile.docx:readprints`[chart]` <!-- docx:chart chart0 type="column" series="3" points="4" size="6x3.5in" -->.charts listgivesdata:"embedded"withworkbook:"word/embeddings/Microsoft_Excel_Worksheet.xlsx".charts extract --at chart0givescategory,Series 1,Series 2,Series 3followed by 4 rows.edit --at p2 "Revenue: "on the fixture keeps the chart, andword/charts/chart1.xmlcomes through byte-identical (there's a test for this).docx validate tests/fixtures/charts.docx: valid. The fixture rebuild is deterministic.bun run check✅bun run test:unit✅ (2111 tests)c:pt idx/ptCountso a corrupt chart can't make us allocate a huge array.Decisions for you
chartTypesuses friendly labels: an uprightbarChartreads ascolumn(andbar3DChartascolumn3D), matching Word's dialog and the plannedcharts add --type column. Everything else is the element name minusChart(pie3D,area). The alternative is to keep the raw element names in the AST.extractCSV ends lines with LF, not RFC 4180's CRLF, because it's friendlier in terminal pipelines. The plannedset-dataparser should accept both.find/replace/wcyet, so the title is visible in the hint butfind "Revenue by Quarter"won't match it.chartN)cx:chart) recognition plus areadonlyhintstaledetection against the workbookset-data(needs the xlsx patcher, the CSV parser and your calls on open questions 2–5) and Phase 4charts add/deleterawquarterly-reportweak-agent scenarioRefs #43
Generated by Claude Code