Repository navigation
Conversation
|
🤖 docx-cli triage CI note: Integration Tests (LibreOffice) failed on 93ec3a5, but it never reached a test. The The routine never re-runs workflow runs, so I haven't re-run it. The PR summary (what Action needed: approve/merge — re-run the failed "Integration Tests (LibreOffice)" job on #50 once. If it goes green, review and merge, and answer the decision checklist in the PR description. If the install step keeps timing out, the 5-minute cap added in e830c0c may be too tight for a cold cache. 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>
Add `docx move FILE --at SRC (--after|--before) DEST [--subtree] [--batch]`, a pure splice of the live source nodes, so comment ranges, note references, bookmarks, fields, drawings and text boxes ride along instead of being lost in the read -> insert-a-copy -> delete workaround. - core/move: Move lens (plan resolves + validates as read; apply splices by live indexOf, per-anchor offsets, one CellInsertionCursor per bare cell) - refusals (nonzero, nothing written): destination inside source, no-op, section-break carrier, straddling comment/bookmark/perm/move ranges, body <-> text-box, overlapping batch sources, anchors on moved blocks, and any move while track changes is on (tracked moves not yet written) - --subtree shares headingLevel with outline; Body.locatorsOf reports the moved blocks' new locators - footnotes-mutations fixture dogfoods move; docs + skill updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkctENj7B2nTmUttTgfBhs Triage-Routine: true
93ec3a5 to
76faa2c
Compare
🤖 docx-cli triage
What was wrong
There was no way to move content. The only route was read →
inserta copy →deletethe original, and that loses things. Running the issue's repro onmain(docx move m.docx --at p3 --after p4) givesUnknown command: move. The workaround leaves the comment with no anchor and turns[^fn1]into literal text.What changed
This is the first slice of #38: untracked
docx move.docx move FILE --at SRC (--after|--before) DEST [--subtree]and--batch moves.jsonl({at, after|before, subtree?}). The command moves the live XML nodes themselves, so comment ranges, footnote references, bookmarks, fields, images and text boxes go with them unchanged. It prints the moved blocks' new locators.pN,pN-pM(any tables in between come along),tN, a cell paragraphtN:rRcC:pK, and a text-box paragraphtbxN:pK. With--subtree, a heading moves together with everything under it.insert. Moving into an empty cell fills Word's blank paragraph. A cell left with nothing gets one.src/core/move/(theMovelens:planthenapply) andsrc/cli/move/(the thin parser).headingLevelis now shared withoutline.Body.locatorsOfis also used byinsert.src/cli/CLAUDE.md, root CLAUDE.md, the skill (SKILL.mdregenerated) andreferences/commands.md. Thefootnotes-mutationsfixture now builds its endnote paragraph usingdocx move.Not in this PR (still open on #38): tracked moves (
w:moveFrom/w:moveTo), pairing moveFrom/moveTo intrack-changes list/accept/reject,tables move-row, and the[^fn1]copy-back bug. The tracked shape is supposed to be captured from the Word oracle (scripts/word-redlines.sh, macOS + Word), and that isn't available here. So this usesRefs, notFixes, and #38 stays open.Verification
docx move m.docx --at p3 --after p4→p4. The paragraph's XML is byte-identical,comments listanchors c0 on p4,readshows…Delaware[^fn1].with its definition, andvalidateis clean.tests/cli/move.test.ts: the repro, range, subtree, table, into/out of a cell, a text-box story (Choice and Fallback both reordered), every refusal leaving the file unchanged, dry-run, and batch ordering and refusals.bun run check✅bun run test:unit✅ (2140 tests)findDescendant, onedestinationInsidehelper, aBATCH_KEYSconstant). /code-review xhigh: the forked run reviewed the wrong scope (main...HEADin the shared checkout). I discarded its edits and reviewed this diff by hand instead. That found one bug, fixed with a regression test: a batch that moves an empty cell's paragraph out and also moves content into that cell tried to reuse the detached paragraph.Decisions for you
moveat all?numPr, as Word does (issue question 2), and doesn't join the list next to its new spot.--trackflag yet. It would only ever error, so I left it out.Refs #38
Generated by Claude Code