Repository navigation
Commit a6e4d32
authored
* feat: collision-bumped w:date stamping at changeset granularity (ISSUES.md #53)
One changeset (a single edit call, or one whole batch_edit/batch_rewrite
call) stamps one whole-second w:date, bumped past the previous stamp when
the same author's changesets collide in one real second. Parse-time group
reconstruction (#46) therefore never merges two of our own changesets;
same-paragraph ops of one batch call share their date and merge by design.
- xml_editor: _next_changeset_timestamp() allocates collision-bumped
stamps (monotonic per author, also across clock regressions);
frozen_timestamp() becomes reentrant-by-reuse so nested per-op freezes
join the enclosing batch changeset.
- track_changes: batch_edit/batch_rewrite wrap the whole call in one
frozen_timestamp() scope — one date per batch call, one group per op.
- tests: TestChangesetDateStamping pins the contract (shared batch date
under a ticking clock, no bump when seconds differ, bounded drift,
distinct dates for two batches in one second, nested freeze reuse,
w16du:dateUtc parity); the former same-second over-merge relaxation
flips into test_same_paragraph_same_second_two_groups.
* docs+style: scope the never-share-a-second guarantee to one open session
Multi-review round 1: the collision counter is per-editor-instance and
not seeded from persisted dates, so the docs (api.md, SKILL.md,
Revision.group_source and RevisionManager docstrings) now state the
guarantee as per-session — own writes from a previous session merge like
foreign revisions on identical author + date. Also rename
_next_changeset_timestamp to _get_next_changeset_timestamp to match the
sibling allocators (_get_next_change_id, _get_next_comment_id) and
rewrap the api.md paragraph left with an orphan line.
Skipped per red-team triage: stamp-slot consumption by empty/failed
changesets (accepted bounded drift, in plan), per-author stamp dict
(author is immutable per editor — false positive), test docstring
issue-reference form (subjective).
* docs+test: round-2 review polish — session qualifier, helper reuse, regression test
- frozen_timestamp docstring and TestChangesetDateStamping class
docstring now carry the same per-session qualifier as every other
statement of the never-share-a-second guarantee (round 1 missed
these two spots).
- test_nested_frozen_timestamp_reuses_outer_stamp builds its editor via
the file's _make_manager helper instead of a raw DocxXMLEditor
construction.
- New test_clock_regression_keeps_dates_monotonic drives the settable
clock strictly backwards, pinning the documented NTP-step-back
behavior (dates never regress; previous+1 until the clock catches
up) — previously only the equality branch was exercised.
* fix: dedupe SKILL.md lines duplicated in rebase conflict resolution
1 parent 12ae649 commit a6e4d32
5 files changed
Lines changed: 284 additions & 44 deletions
File tree
- docs
- docx_editor
- skills/docx
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
660 | 666 | | |
661 | 667 | | |
662 | 668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
584 | 588 | | |
585 | 589 | | |
586 | 590 | | |
587 | | - | |
588 | | - | |
589 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
590 | 600 | | |
591 | 601 | | |
592 | 602 | | |
| |||
856 | 866 | | |
857 | 867 | | |
858 | 868 | | |
859 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
860 | 872 | | |
861 | 873 | | |
862 | 874 | | |
| |||
901 | 913 | | |
902 | 914 | | |
903 | 915 | | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
913 | 928 | | |
914 | 929 | | |
915 | 930 | | |
| |||
1053 | 1068 | | |
1054 | 1069 | | |
1055 | 1070 | | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1056 | 1074 | | |
1057 | 1075 | | |
1058 | 1076 | | |
| |||
1099 | 1117 | | |
1100 | 1118 | | |
1101 | 1119 | | |
1102 | | - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1103 | 1125 | | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1109 | 1132 | | |
1110 | 1133 | | |
1111 | 1134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1242 | 1245 | | |
1243 | 1246 | | |
1244 | 1247 | | |
| |||
1276 | 1279 | | |
1277 | 1280 | | |
1278 | 1281 | | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
1279 | 1304 | | |
1280 | 1305 | | |
1281 | 1306 | | |
| |||
1285 | 1310 | | |
1286 | 1311 | | |
1287 | 1312 | | |
1288 | | - | |
1289 | | - | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
1290 | 1322 | | |
1291 | 1323 | | |
1292 | | - | |
1293 | | - | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1294 | 1327 | | |
1295 | 1328 | | |
1296 | 1329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
509 | 512 | | |
510 | 513 | | |
511 | 514 | | |
| |||
0 commit comments