mAi
f8067c2fe5
refactor(docforge): slice 2 — composer to pkg/docforge/docx + Carrier (t-paliad-349)
...
Move the full compose pipeline (anchor-pair splicing, append-before-sectPr,
hyperlink-rels patching, zip split/repack, final placeholder pass) into
pkg/docforge/docx/compose.go, decoupled from paliad's DB row types. The
engine now owns the entire .docx assembly.
New neutral types in docx:
- Carrier{Bytes, Stylemap} — the opaque base .docx, preserved
byte-for-byte outside the spliced regions (the lossless docforge
carrier for .docx).
- Section{Key, OrderIndex, Included, ContentMDDE, ContentMDEN} — the
format-neutral content input.
- Composer / NewComposer / ComposeOptions on those neutral types.
internal/services keeps SubmissionComposer + ComposeOptions as a thin
mapping wrapper (SubmissionSection -> docx.Section, Base.SectionSpec.Stylemap
+ BaseBytes -> docx.Carrier). handlers + the comprehensive compose_test are
unchanged; the test drives the wrapper end-to-end and its byte-exact OOXML
assertions pass = behaviour preserved.
Retired the slice-1 docx.XMLAttrEscape wrapper + its services forwarder:
compose now calls the local xmlAttrEscape inside the docx package.
Sequencing note: the paragraph-level neutral model (Document/Block/Slot the
PRD §3.2 sketches) is deferred to slice 6, where the authoring importer +
format exporters consume it. Building it now, ahead of any consumer, would
be speculative and risk the byte-identical guarantee for no gain (PRD §4 B3
principle). Carrier is the part of the model that earns its keep this cycle.
Verification: go build ./... clean, go vet clean, full module test green.
m/paliad#157
2026-05-29 14:57:34 +02:00
..
2026-05-06 16:05:00 +02:00
2026-05-22 15:17:24 +02:00
2026-05-26 19:24:41 +02:00
2026-05-21 21:21:32 +02:00
2026-05-22 15:17:24 +02:00
2026-05-20 13:05:27 +02:00
2026-05-20 14:46:36 +02:00
2026-05-20 14:46:36 +02:00
2026-05-25 15:49:39 +02:00
2026-04-30 16:46:31 +02:00
2026-05-19 12:51:52 +02:00
2026-05-26 18:19:55 +02:00
2026-05-26 18:17:21 +02:00
2026-05-25 15:28:37 +02:00
2026-05-20 13:05:27 +02:00
2026-05-07 20:58:57 +02:00
2026-05-07 20:58:57 +02:00
2026-05-07 20:58:57 +02:00
2026-05-20 13:26:23 +02:00
2026-04-17 11:59:49 +02:00
2026-05-13 00:11:14 +02:00
2026-05-13 00:11:14 +02:00
2026-05-20 13:26:23 +02:00
2026-04-30 16:46:31 +02:00
2026-05-07 22:41:18 +02:00
2026-05-07 22:41:18 +02:00
2026-05-20 15:50:21 +02:00
2026-05-20 15:50:21 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:38:30 +02:00
2026-05-20 15:50:21 +02:00
2026-05-27 15:22:53 +02:00
2026-05-27 15:22:53 +02:00
2026-05-06 12:47:12 +02:00
2026-05-20 13:55:56 +02:00
2026-05-20 19:15:32 +02:00
2026-05-22 15:53:19 +02:00
2026-05-22 15:53:19 +02:00
2026-05-20 13:55:56 +02:00
2026-05-20 19:15:32 +02:00
2026-05-04 12:03:56 +02:00
2026-05-25 16:06:35 +02:00
2026-05-25 16:06:35 +02:00
2026-05-15 17:53:44 +02:00
2026-05-26 20:07:48 +02:00
2026-05-25 15:36:08 +02:00
2026-05-27 20:34:54 +02:00
2026-04-30 16:46:31 +02:00
2026-05-28 00:47:08 +02:00
2026-05-06 17:16:17 +02:00
2026-05-22 15:48:47 +02:00
2026-05-29 14:57:34 +02:00
2026-05-26 19:53:24 +02:00
2026-05-26 19:53:24 +02:00
2026-05-19 13:05:54 +02:00
2026-05-20 15:19:48 +02:00
2026-04-29 22:09:39 +02:00
2026-05-20 15:19:48 +02:00
2026-05-20 15:19:48 +02:00
2026-05-05 13:29:47 +02:00
2026-05-18 12:13:24 +02:00
2026-05-25 16:45:07 +02:00
2026-05-25 16:45:07 +02:00
2026-05-16 01:17:23 +02:00
2026-05-26 17:59:58 +02:00
2026-05-04 19:49:37 +02:00
2026-05-25 14:54:51 +02:00
2026-05-15 01:09:31 +02:00
2026-05-18 15:06:04 +02:00
2026-04-30 16:46:31 +02:00
2026-05-20 13:03:57 +02:00
2026-05-20 13:03:57 +02:00
2026-05-26 18:17:21 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-20 19:15:32 +02:00
2026-05-20 19:15:32 +02:00
2026-05-26 22:01:10 +02:00
2026-05-27 15:07:01 +02:00
2026-05-27 10:14:37 +02:00
2026-05-27 15:07:01 +02:00
2026-05-26 11:21:29 +02:00
2026-05-26 11:19:01 +02:00
2026-05-28 09:48:32 +02:00
2026-05-06 12:47:12 +02:00
2026-05-26 13:01:07 +02:00
2026-04-20 12:34:38 +02:00
2026-04-29 22:09:39 +02:00
2026-05-07 22:41:18 +02:00
2026-05-07 22:41:18 +02:00
2026-04-30 03:18:03 +02:00
2026-05-27 15:11:48 +02:00
2026-05-20 15:19:48 +02:00
2026-05-07 20:58:57 +02:00
2026-05-07 20:58:57 +02:00
2026-05-03 18:39:06 +02:00
2026-05-15 03:03:12 +02:00
2026-05-08 12:42:57 +02:00
2026-05-08 21:48:08 +02:00
2026-05-22 15:17:24 +02:00
2026-05-08 21:48:08 +02:00
2026-05-08 21:48:08 +02:00
2026-05-06 16:41:41 +02:00
2026-05-26 09:41:07 +02:00
2026-05-07 22:29:39 +02:00
2026-05-07 22:21:45 +02:00
2026-05-18 12:13:24 +02:00
2026-05-20 14:53:22 +02:00
2026-05-26 13:01:07 +02:00
2026-05-20 14:55:55 +02:00
2026-05-21 14:52:50 +02:00
2026-05-07 22:58:44 +02:00
2026-05-04 19:30:37 +02:00
2026-05-27 10:09:33 +02:00
2026-05-27 10:09:33 +02:00
2026-05-22 23:43:15 +02:00
2026-05-26 09:56:15 +02:00
2026-05-18 12:13:24 +02:00
2026-05-09 18:52:01 +02:00
2026-05-18 15:06:04 +02:00
2026-05-20 14:55:55 +02:00
2026-05-28 00:47:08 +02:00
2026-04-30 16:46:31 +02:00
2026-05-07 21:50:31 +02:00
2026-05-15 00:06:37 +02:00
2026-05-25 15:49:39 +02:00
2026-05-26 19:53:24 +02:00
2026-05-18 15:06:04 +02:00
2026-05-27 15:22:53 +02:00
2026-05-28 10:44:33 +02:00
2026-05-28 10:44:33 +02:00
2026-05-27 15:02:01 +02:00
2026-05-26 17:48:56 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 20:04:40 +02:00
2026-05-26 20:04:40 +02:00
2026-05-18 16:52:38 +02:00
2026-05-26 20:21:12 +02:00
2026-05-29 14:57:34 +02:00
2026-05-25 17:03:34 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 19:23:40 +02:00
2026-05-26 20:26:53 +02:00
2026-05-26 20:26:53 +02:00
2026-05-25 16:03:03 +02:00
2026-05-25 16:51:35 +02:00
2026-05-29 14:51:59 +02:00
2026-05-26 19:53:24 +02:00
2026-05-20 15:19:48 +02:00
2026-05-20 15:19:48 +02:00
2026-05-20 15:24:06 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-20 13:05:27 +02:00
2026-05-20 14:46:36 +02:00
2026-04-30 16:46:31 +02:00
2026-05-20 15:19:48 +02:00
2026-05-07 12:51:37 +02:00
2026-05-07 12:51:37 +02:00
2026-05-25 15:37:00 +02:00
2026-05-25 17:46:58 +02:00
2026-05-25 17:46:58 +02:00
2026-05-04 12:03:56 +02:00
2026-05-04 18:57:06 +02:00
2026-05-21 09:54:23 +02:00