Commit f32966b
feat: ship every activity diagram, linked per sequence-diagram variant (#26)
* feat: ship every activity diagram, linked per SD variant
webapp_export looked for a process's activity diagram at the bare {pid}.svg
only. But p11 names them after the document's own AD headings, so a process
with several sequence-diagram variants has {pid}_{slug} files — note the SINGLE
underscore, where the sequence artifacts use {pid}__{slug}. On the v0.0.9
dataset that mismatch left 115 of 173 rendered diagrams unreachable: they were
generated, committed and then dropped here without a word.
Resolve each variant's diagram via {pid}_{slug} with the bare {pid} as
fallback, and record the result per diagram as activitySvg (None when that
variant has none, so the app never links a 404). Copy EVERY rendered diagram
into the webapp, not just the linked ones, and emit activity_diagrams.json
indexing all of them with a `linked` flag — the ones whose p11 names predate
the UC de-truncation still have no process to hang off, but they are at least
reachable now. Unlinked names print as a worklist, like unresolved refs.
On the v0.0.9 dataset: 173 diagrams copied (was 58), 82 linked, and processes
showing an activity diagram go from 58 to 68 of 194.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: keep an AD-only process, and report ambiguous activity-diagram names
Review findings on the per-variant resolution:
- `any(ad_for_slug)` is False for a process with no sequence diagram at all,
so a process whose Aktivitätsdiagramm exists without an SD would have lost
its diagram — reintroducing, in a new place, the silent drop this branch
removes. p11 renders ADs independently of p06, so fall back to the bare
artifact when the process has no SD variants.
- `{pid}_{slug}` is indistinguishable from a bare id ending in that slug
(`wechsel` + `lieferant` vs a process `wechsel_lieferant`). First claim wins,
which is deterministic because processes are walked in sorted order, but the
collision is now reported instead of silently absorbed. It does not occur on
the v0.0.9 dataset.
- build_detail emits activitySvg as None rather than a path it cannot verify;
run() attaches the real one, the same contract as `approval`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: state the naming trap without dataset-specific counts
Copilot review: the comments pinned counts from one dataset version, and
disagreed with each other about which count. Numbers that drift with every
regeneration do not belong in code comments — the measured figures live in the
PR description, stamped to the dataset tag they were measured on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: hf-kklein <konstantin.klein+claude@hochfrequenz.de>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 782b4c4 commit f32966b
3 files changed
Lines changed: 216 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
71 | 84 | | |
72 | 85 | | |
73 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| |||
314 | 318 | | |
315 | 319 | | |
316 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
317 | 327 | | |
318 | 328 | | |
319 | 329 | | |
| |||
352 | 362 | | |
353 | 363 | | |
354 | 364 | | |
355 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
356 | 383 | | |
357 | 384 | | |
358 | 385 | | |
| |||
393 | 420 | | |
394 | 421 | | |
395 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
396 | 427 | | |
397 | 428 | | |
398 | 429 | | |
| |||
413 | 444 | | |
414 | 445 | | |
415 | 446 | | |
416 | | - | |
417 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
418 | 473 | | |
419 | 474 | | |
420 | 475 | | |
| |||
431 | 486 | | |
432 | 487 | | |
433 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
434 | 496 | | |
435 | 497 | | |
436 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
0 commit comments