Skip to content

build: enable deterministic builds and pin CI to a reproducible build - #321

Merged
DeepDiver1975 merged 1 commit into
mainfrom
build/deterministic-ci-builds-301
Sep 15, 2026
Merged

DeepDiver1975 merged 1 commit into
mainfrom
build/deterministic-ci-builds-301

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Summary

  • Directory.Build.props had neither <Deterministic> nor <ContinuousIntegrationBuild> set, so release binaries weren't reproducible and Source Link paths weren't mapped.
  • Added <Deterministic>true</Deterministic> (applies everywhere) and <ContinuousIntegrationBuild> gated on $(GITHUB_ACTIONS) == 'true' so local dev builds keep their normal (non-CI) PDB behavior.
  • Part of build/ci: coverage, deterministic builds, AnalysisLevel pin, changelog enforcement #301.

Test plan

  • dotnet build LageBuch.Desktop.slnf --configuration Release — succeeds, 0 warnings/0 errors
  • Same build repeated with GITHUB_ACTIONS=true set — succeeds, 0 warnings/0 errors (confirms the conditional property doesn't break the build when active)
  • dotnet test LageBuch.Desktop.slnf --configuration Release --no-build — 167 passed, 1 skipped, 0 failed

🤖 Generated with Claude Code

https://claude.ai/code/session_01R9oidCyJ6YmhtCxu9WxGKo

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

Both legs failed on the same pre-existing flaky test, `LageBuch.Sync.Hosting.Tests.WorkspaceCollaborationTests.Host_header_reflects_einsatzdaten_saved_in_a_clients_dialog` — unrelated to this PR (which only adds two MSBuild properties, no test/runtime code touched). This test has now flaked across three unrelated PRs today (see also #323's history and a failure on `main` itself in run 34901698127), so it looks like a real, recurring race rather than a one-off. Re-running the failed jobs here; flagging the test itself as worth a separate look.

Directory.Build.props had neither <Deterministic> nor
<ContinuousIntegrationBuild> set, so release binaries weren't reproducible
and Source Link paths weren't mapped. ContinuousIntegrationBuild is gated on
GITHUB_ACTIONS so local dev builds are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R9oidCyJ6YmhtCxu9WxGKo
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 force-pushed the build/deterministic-ci-builds-301 branch from ff9042c to c31cef6 Compare September 15, 2026 08:38
@DeepDiver1975
DeepDiver1975 merged commit 3e7540c into main Sep 15, 2026
3 checks passed
@DeepDiver1975
DeepDiver1975 deleted the build/deterministic-ci-builds-301 branch September 15, 2026 08:43
DeepDiver1975 added a commit that referenced this pull request Sep 15, 2026
…n test (#327)

Host_header_reflects_einsatzdaten_saved_in_a_clients_dialog was flaky (#326):
it failed on main, on #321 and twice on #323, always at the same assertion --
the client's HeroText still reading "Unbenannter Einsatz".

Saving the dialog fans out into two commands (Einsatznummer, Adresse), and
RemoteIncidentSession.Send is fire-and-forget: the two travel as separate,
concurrent POSTs that race each other to the host, which then broadcasts a
fresh snapshot per command it applies. The test waited for exactly one
broadcast and then decided whether to wait for a second by inspecting *host*
state, even though the assertion that wait protects reads *client* state.

When the address POST won the race, broadcast #1 carried the street but no
number. The client applied it, so the single wait completed; hostSession.Street
was then non-null, so the second wait was skipped. The host went on to apply the
number -- making all four host assertions pass -- but its broadcast had not
reached the client yet, so the client's header still showed the placeholder.

Replace the broadcast counting with WaitForClient, which re-checks a predicate
over the client's cached incident on every broadcast. That is sound regardless
of the order the commands land in or how they get batched into snapshots, and
it settles the host too: IncidentHost broadcasts from inside the session's
Changed raise, which the host's own workspace has already handled.

Verified against the original race: 12 spinning cores, 30 runs of the test ->
10 failures, all at the client HeroText assertion. Same load, 40 runs of the
fixed test -> 0 failures. Full suite green.


Claude-Session: https://claude.ai/code/session_01R9oidCyJ6YmhtCxu9WxGKo

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

build/ci: coverage, deterministic builds, AnalysisLevel pin, changelog enforcement

1 participant