Skip to content

release: note packages extraction + word-builder-swift wiring + #77 bump (#71 #77 #78) - #82

Merged
kiki830621 merged 3 commits into
mainfrom
refactor/extract-note-packages-78
Apr 18, 2026
Merged

kiki830621 merged 3 commits into
mainfrom
refactor/extract-note-packages-78

Conversation

@kiki830621

Copy link
Copy Markdown
Member

Squashes three closed issues' macdoc-side changes into main.

Scope

Commit Issue Content
565f4c2 #78 Extract 3 note packages (note-core-swift, note-to-pdf-swift, note-to-html-swift) to independent PsychQuant/* repos; swap macdoc Package.swift from path: → url: deps
60b3bb6 #77 Bump note-core-swift → v0.1.3 + note-to-pdf-swift → v0.1.2 to consume the logicalPageHeight fix released independently after #78
04f16cf #71 Wire word-builder-swift 0.9.0 (new package — fluent Swift API for .docx, 1:1 mirror of docx.js); land Spectra archive + specs; re-pin note-to-pdf-swift back to 0.1.2 (regression fix from #78 verify)

Release artifacts

Verification

  • ooxml-swift: 205/205 tests pass (+3 new for writeData)
  • word-builder-swift: 24/24 tests pass
  • macdoc: swift build clean (6.80s) after all three commits applied
  • 6-AI ensemble verify on refactor: extract NoteCore / NoteToPDF as separate PsychQuant repos (packages 應該要是獨立套件) #78: 5 Claude reviewers + Codex — PASS WITH NOTES, declared scope FULLY done; Devil's Advocate counter-evidence accepted (silent dep bumps in Package.resolved, "26 tests passed" doesn't exercise note-* paths)
  • Latent regression caught + fixed: note-to-pdf-swift 0.1.2 → 0.1.0 silent downgrade in Package.resolved (caused by adding word-builder-swift dep) reversed via swift package update

Carved-out workstreams (NOT in this PR)

  • ocr-backend-refactor branch — default OCR model swap (GLM-OCR → Qwen3-VL-4B) + OCRCore backend abstraction in Sources/MacDocCLI/PageOCRRunner.swift. No issue yet; open one and resume that branch when ready.

Follow-up issues filed during #78 verify

Closes #71, #77, #78.

macdoc-infra and others added 3 commits April 17, 2026 12:58
…t repos (#78)

Three local path packages graduated to independent PsychQuant repos,
aligning with existing convention (common-converter-swift, word-to-md-swift).

Changes:
- Package.swift: path: → url:, from: "0.1.0" for three note packages
- Package.swift: product(package:) lowercase-hyphenated to match package identity
- Package.resolved: new working copies for the three remote repos

New repos (all public, v0.1.0):
- https://github.com/PsychQuant/note-core-swift
- https://github.com/PsychQuant/note-to-pdf-swift
- https://github.com/PsychQuant/note-to-html-swift

Verification:
- swift build: OK (macdoc binary links from remote packages)
- swift test: 26 tests passed
- Smoke test: macdoc convert --to pdf reproduces expected output (same size,
  same Producer, #77 bug still present as expected)

Unblocks #77 — logicalPageHeight fix can now commit to PsychQuant/note-core-swift.

Refs #78
Pulls in:
- note-core-swift v0.1.3: pageYOffset field + heuristicPageBounds
- note-to-pdf-swift v0.1.2: separated xScale/yScale + fixed letter output

Refs #77
Consume the new PsychQuant/word-builder-swift package shipped in #71:

- Package.swift: add .package(url: word-builder-swift.git, from: 0.9.0)
- Package.resolved: auto-updated by SPM; re-pinned note-to-pdf-swift
  back to 0.1.2 after #71-wiring caused silent downgrade to 0.1.0
  (regression fix caught in #78 verify — would have reverted #77's
  logicalPageHeight fix)
- CLAUDE.md: add Layer 4 architecture diagram entry + Sub-Repositories
  table row pointing at github.com/PsychQuant/word-builder-swift

Also lands the Spectra change artifacts for #71:

- openspec/changes/archive/2026-04-18-word-builder-swift/: full
  proposal + design + specs + tasks with all 46 tasks marked complete
- openspec/specs/word-builder-swift/: new capability spec synced from
  change delta on archive (11 Requirements, 20+ WHEN/THEN scenarios)

Refs #71
@kiki830621
kiki830621 merged commit d771589 into main Apr 18, 2026
1 check passed
@kiki830621
kiki830621 deleted the refactor/extract-note-packages-78 branch April 18, 2026 07:27
kiki830621 added a commit that referenced this pull request Jun 1, 2026
39/42 tasks complete; remaining 3 are PHASED items intentionally
not shipped:
- §2.2 EditError.pathNotFound early validation (PHASED — Reducer-wrap
  via operationLogFailure documented in spec.md as eventual contract)
- §2.3 EditError.preserveViolation defensive c14n check (PHASED —
  same)
- §5.2 Upfront atomicity pre-validation (DEFERRED — Reducer-layer
  atomicity via deterministic rId allocation works correctly without
  pre-validation; pre-validation would be a UX improvement)

Spec ooxml-edit-algebra-runtime moved to openspec/specs/ (8 Requirements
with SHALL/MUST + Scenarios + SBE Examples).

Implementation shipped across 8 PRs over the macdoc#105 lifecycle:
- macdoc PR #109 — Spectra docs (proposal+design+tasks+spec+yaml)
- macdoc PR #111 — CD diagrams (8 total: 5 OOXMLEdit + 3 WordEdit)
- ooxml-swift PR #72 — Phase 2c reducer critical-path (4 cases)
- ooxml-swift PR #74 — multi-part scoping + opID-determinism
- ooxml-swift PR #75 — FullyFaithfulFunctorTests (property-based)
- ooxml-swift PR #76 — WordEdit.lower() per-case
- ooxml-swift PR #77 — NaturalityTests (composition functor)
- ooxml-swift PR #78 — Performance benchmark + single-part fast path
- ooxml-swift PR #79 — Typed-views resync (opt-in)
- ooxml-swift PR #80 — §5 insertHyperlink + wrapWithHyperlink emission
- ooxml-swift PR #81 — Phase 2c hyperlink reducer (slice 1)
- ooxml-swift PR #82 — Phase 2c wrapWithHyperlink reducer (slice 2)

Refs #105
Refs #110
Refs PsychQuant/ooxml-swift#71
kiki830621 added a commit that referenced this pull request Jul 3, 2026
…/73 -> 36/73 + che-word-mcp submodule bump

- Retroactive sync: 19 tasks (2.1-2.4, 2.12, 3.1-3.14) verified complete
  against ooxml-swift git history (v0.31.0-v0.31.4, landed via
  ooxml-edit-isomorphism-foundation IDD flow refs ooxml-swift#71-#82)
- Implemented this session (ooxml-swift v0.31.5): 2.5 tree-backed
  settings.xml serialization, 2.6 all-parts xmlTrees sweep,
  2.7-2.10 preservation contract pins, 2.11 che-word-mcp 297-test gate

Refs #127
kiki830621 added a commit that referenced this pull request Sep 29, 2026
39/42 tasks complete; remaining 3 are PHASED items intentionally
not shipped:
- §2.2 EditError.pathNotFound early validation (PHASED — Reducer-wrap
  via operationLogFailure documented in spec.md as eventual contract)
- §2.3 EditError.preserveViolation defensive c14n check (PHASED —
  same)
- §5.2 Upfront atomicity pre-validation (DEFERRED — Reducer-layer
  atomicity via deterministic rId allocation works correctly without
  pre-validation; pre-validation would be a UX improvement)

Spec ooxml-edit-algebra-runtime moved to openspec/specs/ (8 Requirements
with SHALL/MUST + Scenarios + SBE Examples).

Implementation shipped across 8 PRs over the macdoc#105 lifecycle:
- macdoc PR #109 — Spectra docs (proposal+design+tasks+spec+yaml)
- macdoc PR #111 — CD diagrams (8 total: 5 OOXMLEdit + 3 WordEdit)
- ooxml-swift PR #72 — Phase 2c reducer critical-path (4 cases)
- ooxml-swift PR #74 — multi-part scoping + opID-determinism
- ooxml-swift PR #75 — FullyFaithfulFunctorTests (property-based)
- ooxml-swift PR #76 — WordEdit.lower() per-case
- ooxml-swift PR #77 — NaturalityTests (composition functor)
- ooxml-swift PR #78 — Performance benchmark + single-part fast path
- ooxml-swift PR #79 — Typed-views resync (opt-in)
- ooxml-swift PR #80 — §5 insertHyperlink + wrapWithHyperlink emission
- ooxml-swift PR #81 — Phase 2c hyperlink reducer (slice 1)
- ooxml-swift PR #82 — Phase 2c wrapWithHyperlink reducer (slice 2)

Refs #105
Refs #110
Refs PsychQuant/ooxml-swift#71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 新增 word-builder-swift — Swift fluent API 直接寫 .docx(類 docx.js)

1 participant