Repository navigation
fix(pdf): compute overdue tasks from one export timestamp - #334
Merged
Merged
Conversation
DeepDiver1975
force-pushed
the
fix/pdf-export-timestamp
branch
from
September 15, 2026 20:17
698fa1b to
f08bfdd
Compare
TasksSection.Compose read DateTimeOffset.Now to decide which Aufgaben render as "FÄLLIG", so the same closed Einsatz exported twice could disagree -- and the section could not be tested at all, because its output depended on when the suite happened to run. It was the only .Now in LageBuch.Documents; every other section is a pure function of the incident. Thread an explicit asOf through the export chain instead. It is sourced in LocalIncidentSession.ExportPdfAsync, which already holds an IClock, so the view model is untouched: ExportPdfAsync -> IIncidentPdfExporter.Generate -> IncidentPdf.Generate -> IncidentReportDocument -> TasksSection.Compose asOf sits immediately after incident on the public signatures, which is what moves the test call sites; nothing else about them changed. TasksSectionTests grew from one smoke assertion to four that actually pin the behaviour: an open task renders differently either side of its due date, the same timestamp renders the same both times, and a completed task is never overdue however late the export is. Part of #302. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YavFrkz1GFaMNXbHQKsMyf Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
force-pushed
the
fix/pdf-export-timestamp
branch
from
September 15, 2026 21:01
f08bfdd to
a4b1e41
Compare
DeepDiver1975
added a commit
that referenced
this pull request
Sep 15, 2026
Every pull request inserted its bullet at the top of the same list under `## [Unreleased]`, so the insertion anchor was byte-identical across branches. Git saw two independent inserts at one position, could not order them, and conflicted — and merging any one PR invalidated every other open PR's hunk. `git merge-tree` reproduces it: #334 and #335 conflicted on CHANGELOG.md and nothing else, while two PRs writing to different sections merged clean. Each change now carries its entry as its own file in changelog.d/, which towncrier folds into CHANGELOG.md when a release is cut. Different PRs create different files, so there are no shared lines left to conflict over. Fragments use towncrier's orphan naming (+<slug>.<type>.md) rather than the default <issue>.<type>.md: several entries cite the same ticket (#302), and issue-numbered filenames would have reintroduced the same collision as an add/add conflict. A `merge=union` driver in .gitattributes was tried first and rejected. It does resolve these merges correctly on the client, but GitHub does not run merge drivers server-side when computing pull request mergeability, so the PRs would still have shown as conflicting. The changelog-check job now runs `towncrier check` instead of requiring a CHANGELOG.md edit. Its job id and display name are unchanged, so an existing required status check keeps matching. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
8 of 16 tasks
DeepDiver1975
added a commit
that referenced
this pull request
Sep 16, 2026
Every pull request inserted its bullet at the top of the same list under `## [Unreleased]`, so the insertion anchor was byte-identical across branches. Git saw two independent inserts at one position, could not order them, and conflicted — and merging any one PR invalidated every other open PR's hunk. `git merge-tree` reproduces it: #334 and #335 conflicted on CHANGELOG.md and nothing else, while two PRs writing to different sections merged clean. Each change now carries its entry as its own file in changelog.d/, which towncrier folds into CHANGELOG.md when a release is cut. Different PRs create different files, so there are no shared lines left to conflict over. Fragments use towncrier's orphan naming (+<slug>.<type>.md) rather than the default <issue>.<type>.md: several entries cite the same ticket (#302), and issue-numbered filenames would have reintroduced the same collision as an add/add conflict. A `merge=union` driver in .gitattributes was tried first and rejected. It does resolve these merges correctly on the client, but GitHub does not run merge drivers server-side when computing pull request mergeability, so the PRs would still have shown as conflicting. The changelog-check job now runs `towncrier check` instead of requiring a CHANGELOG.md edit. Its job id and display name are unchanged, so an existing required status check keeps matching. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
added a commit
that referenced
this pull request
Sep 16, 2026
Every pull request inserted its bullet at the top of the same list under `## [Unreleased]`, so the insertion anchor was byte-identical across branches. Git saw two independent inserts at one position, could not order them, and conflicted — and merging any one PR invalidated every other open PR's hunk. `git merge-tree` reproduces it: #334 and #335 conflicted on CHANGELOG.md and nothing else, while two PRs writing to different sections merged clean. Each change now carries its entry as its own file in changelog.d/, which towncrier folds into CHANGELOG.md when a release is cut. Different PRs create different files, so there are no shared lines left to conflict over. Fragments use towncrier's orphan naming (+<slug>.<type>.md) rather than the default <issue>.<type>.md: several entries cite the same ticket (#302), and issue-numbered filenames would have reintroduced the same collision as an add/add conflict. A `merge=union` driver in .gitattributes was tried first and rejected. It does resolve these merges correctly on the client, but GitHub does not run merge drivers server-side when computing pull request mergeability, so the PRs would still have shown as conflicting. The changelog-check job now runs `towncrier check` instead of requiring a CHANGELOG.md edit. Its job id and display name are unchanged, so an existing required status check keeps matching. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
7 tasks done
DeepDiver1975
added a commit
that referenced
this pull request
Sep 20, 2026
Every pull request inserted its bullet at the top of the same list under `## [Unreleased]`, so the insertion anchor was byte-identical across branches. Git saw two independent inserts at one position, could not order them, and conflicted — and merging any one PR invalidated every other open PR's hunk. `git merge-tree` reproduces it: #334 and #335 conflicted on CHANGELOG.md and nothing else, while two PRs writing to different sections merged clean. Each change now carries its entry as its own file in changelog.d/, which towncrier folds into CHANGELOG.md when a release is cut. Different PRs create different files, so there are no shared lines left to conflict over. Fragments use towncrier's orphan naming (+<slug>.<type>.md) rather than the default <issue>.<type>.md: several entries cite the same ticket (#302), and issue-numbered filenames would have reintroduced the same collision as an add/add conflict. A `merge=union` driver in .gitattributes was tried first and rejected. It does resolve these merges correctly on the client, but GitHub does not run merge drivers server-side when computing pull request mergeability, so the PRs would still have shown as conflicting. The changelog-check job now runs `towncrier check` instead of requiring a CHANGELOG.md edit. Its job id and display name are unchanged, so an existing required status check keeps matching. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
added a commit
that referenced
this pull request
Sep 20, 2026
* build(changelog): assemble CHANGELOG.md from per-PR fragments Every pull request inserted its bullet at the top of the same list under `## [Unreleased]`, so the insertion anchor was byte-identical across branches. Git saw two independent inserts at one position, could not order them, and conflicted — and merging any one PR invalidated every other open PR's hunk. `git merge-tree` reproduces it: #334 and #335 conflicted on CHANGELOG.md and nothing else, while two PRs writing to different sections merged clean. Each change now carries its entry as its own file in changelog.d/, which towncrier folds into CHANGELOG.md when a release is cut. Different PRs create different files, so there are no shared lines left to conflict over. Fragments use towncrier's orphan naming (+<slug>.<type>.md) rather than the default <issue>.<type>.md: several entries cite the same ticket (#302), and issue-numbered filenames would have reintroduced the same collision as an add/add conflict. A `merge=union` driver in .gitattributes was tried first and rejected. It does resolve these merges correctly on the client, but GitHub does not run merge drivers server-side when computing pull request mergeability, so the PRs would still have shown as conflicting. The changelog-check job now runs `towncrier check` instead of requiring a CHANGELOG.md edit. Its job id and display name are unchanged, so an existing required status check keeps matching. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> * docs(releasing): fold the changelog with towncrier, not by hand The release runbook still told the maintainer to "move the [Unreleased] entries under a new version heading before tagging" — the one step this branch removes. Following it after this merges produces no section at all, and with the guard from #369 in place the tag is refused outright. Replace that with the towncrier build, keeping the three things it does not do for you: the summary paragraph, the link definitions at the bottom of CHANGELOG.md, and the milestone. The tag command moves below the assembly, which is the order it now has to happen in. CONTRIBUTING.md's Hacktoberfest bullet still listed "a CHANGELOG.md entry" among the unchanged rules, contradicting the section below it that says never to edit that file; and its "Cutting a release" section now duplicated the runbook, so it points at docs/releasing.md instead of maintaining the same steps twice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --------- Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Another item off the #302 checklist.
TasksSection.ComposereadDateTimeOffset.Nowto decide which Aufgaben render as "FÄLLIG", sothe same closed Einsatz exported twice could disagree — and the section could not be tested at
all, because its output depended on when the suite happened to run. It was the only
.NowinLageBuch.Documents; every other section is already a pure function of the incident.An explicit
asOfis now threaded through the export chain, sourced inLocalIncidentSession.ExportPdfAsync, which already holds anIClock. The view model isuntouched:
asOfsits immediately afterincidenton the public signatures (required parameters mustprecede optional ones), which is what moves the test call sites — nothing else about them changed.
Changes
TasksSection.ComposetakesDateTimeOffset asOfand compares against itIncidentReportDocument,IncidentPdf.Generate,IIncidentPdfExporter.Generatethread itthrough;
QuestPdfIncidentExporter,NoopIncidentPdfExporterand the three test doubles followLocalIncidentSession.ExportPdfAsyncreads_clock.Nowonce per exportTasksSectionTestsgrows from one smoke assertion to four that pin the behaviour: an open taskrenders differently either side of its due date, the same timestamp renders the same both times,
and a completed task is never overdue however late the export is
asOfargument added at theIncidentPdf.Generatecall sites inIncidentPdfTests,CoMessprotokollSectionTestsandPdfAttachmentMergerTestsChecklist
git commit -s)dotnet buildanddotnet testpass locally (make ci, all eight projects)Part of #302.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YavFrkz1GFaMNXbHQKsMyf