Skip to content

Reproducible Builds + GitHub Merge Queue Optimizations - #429

Open
wchilders-nvidia wants to merge 2 commits into
mainfrom
reproducible-builds
Open

wchilders-nvidia wants to merge 2 commits into
mainfrom
reproducible-builds

Conversation

@wchilders-nvidia

@wchilders-nvidia wchilders-nvidia commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

This PR:

  • introduces reproducible builds to the front end,
  • makes counter-based temporary names the norm,
  • updates the --version output for the open source project,
  • drops the Edison Design Group Inc-specific "DEMO_VERSION_ID" configuration macro,
  • and combines all of this to improve CI times (optimizing things for the new merge queue based workflow).

In terms of CI optimizations:

  • we no longer run push checks where merge_queue checks would make them redundant (all changes go through merge queue)
  • we now cache equivalent testing results meaning textual updates that don't make it into the binary no longer retrigger a full CI test run.

Summary by CodeRabbit

  • Build Improvements

    • Build and configuration details now use a consistent build stamp. You can provide a custom build identifier to replace the default date and time, including in precompiled-header compatibility information.
    • Linux runtime-library archives are created deterministically, and generated temporary names are more consistent across builds.
  • Version Information

    • Version output no longer includes the demonstration-version notice, and its copyright line now includes “and Contributors.”
  • Documentation

    • Build documentation explains how custom identifiers affect version output and precompiled headers.

…#426]

This commit also:
- updates the copyright notice in the version command to credit contributors
- and removes the Edison Design Group-specific DEMO_VERSION_ID configuration
  option.
@wchilders-nvidia
wchilders-nvidia requested a review from a team October 28, 2026 20:44
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53f534dc-0ac9-43fe-aeb5-160f34846d07
Commits

Reviewing files that changed from the base of the PR and between bc7c97b and 17c95ce.

Files selected for processing: 60
  • .github/workflows/build-and-test-ci.yml
  • .github/workflows/commit-messages.yml
  • .github/workflows/dev-tools-tests.yml
  • .github/workflows/strict-build-check.yml
  • .github/workflows/typecheck-python.yml
  • dev_tools/docker/ci-runner/setup-scripts/install-software.sh
  • doc/source/build.rst
  • lib_src/CMakeLists.txt
  • lib_src/cmake/lib_build_support.cmake
  • src/CMakeLists.txt
  • src/cmd_line.c
  • src/host_envir.h
  • src/il_to_str.c
  • src/pch.c
  • src/pending_changes/gh-426-build-identifier.txt
  • src/version.h
  • tests/tests/cwg/.cwg2845b.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/cwg/.cwg2845b.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/edg/ccs/coroutines/.gnats20948-paramcopy.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/edg/ccs/coroutines/.gnats20948-paramcopy.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/edg/cmeerw/.gnats-26621-run.rto/default.1.1.txt
  • tests/tests/edg/cmeerw/.gnats-26621-run.rto/edg_x86_32.1.1.txt
  • tests/tests/edg/cmeerw/.gnats-26621-run.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/edg/wcc/.gnats26516-ms-fp-call-conv-86_32.rto/default.1.1.txt
  • tests/tests/edg/wcc/.gnats26516-ms-fp-call-conv-86_32.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/edg/wcc/.gnats26516-ms-fp-call-conv-86_32.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/clang/cpp/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.decltype/.p1.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/imported/clang/cpp/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.decltype/.p1.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/c/analyzer/torture/.asm-x86-linux-wfx_get_ps_timeout-full.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/imported/gnu/c/analyzer/torture/.asm-x86-linux-wfx_get_ps_timeout-full.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/c/torture/.arm-fp16-ops-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/c/torture/.arm-fp16-ops-2.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/.pr94920-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/.pr94920-1.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/coroutines/.pr106188.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/coroutines/.pr106188.rto/edg_x86_32.1.1.txt
  • tests/tests/imported/gnu/cpp/coroutines/torture/.lambda-04-templ-parm.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/coroutines/torture/.lambda-04-templ-parm.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/coroutines/torture/.pr115905.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/coroutines/torture/.pr115905.rto/edg_x86_32.1.1.txt
  • tests/tests/imported/gnu/cpp/cpp2a/.nontype-class56.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/cpp2a/.nontype-class56.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/.va-arg-pack-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/.va-arg-pack-1.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/.va-arg-pack-len-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/.va-arg-pack-len-1.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/arm-fp16/.arm-fp16-ops-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/arm-fp16/.arm-fp16-ops-2.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/arm-fp16/.arm-fp16-ops-3.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/arm-fp16/.arm-fp16-ops-4.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/other/.sse2-pr85572-2.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/other/.sse2-pr85572-2.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/parse/.defarg5.rto/edg_x86_32_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/parse/.defarg5.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/torture/.pr116120-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/torture/.pr116120-1.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/torture/.pr116120-2.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/torture/.pr116120-2.rto/edg_x86_64_cp.1.1.txt
  • tests/tests/imported/gnu/cpp/torture/.vect-absu-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/torture/.vect-absu-1.rto/edg_x86_64_cp.1.1.txt
Files with no reviewable changes: 5
  • src/host_envir.h
  • tests/tests/edg/cmeerw/.gnats-26621-run.rto/edg_x86_32_cp.1.1.txt
  • .github/workflows/dev-tools-tests.yml
  • tests/tests/edg/cmeerw/.gnats-26621-run.rto/edg_x86_32.1.1.txt
  • .github/workflows/typecheck-python.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

This change adds build identifiers and deterministic build outputs, updates compiler diagnostic fixtures, and revises CI workflow triggers, runner images, and test-result caching.

Changes: Reproducible builds

Layer / File(s) Summary
Build identifier and reported version
src/CMakeLists.txt, src/version.h, src/cmd_line.c, src/pch.c, doc/source/build.rst, src/pending_changes/*, src/host_envir.h
CMake accepts EDG_BUILD_IDENTIFIER. Version and configuration output and PCH identification use build_stamp; the build documentation and release entry describe the identifier and related output changes.
Deterministic archives and generated names
lib_src/CMakeLists.txt, lib_src/cmake/lib_build_support.cmake, src/il_to_str.c
Linux archive commands use deterministic options. Runtime-library builds retain generated C files in the object directory. Backend temporary names use per-file sequential IDs.
Updated compiler diagnostic expectations
tests/tests/{cwg,edg,imported}/...
Expected-output fixtures use concrete generated temporary identifiers and updated diagnostic locations across C and C++ tests.

CI workflow updates

Layer / File(s) Summary
Workflow triggers and commit validation
.github/workflows/commit-messages.yml, .github/workflows/dev-tools-tests.yml, .github/workflows/strict-build-check.yml, .github/workflows/typecheck-python.yml, .github/workflows/build-and-test-ci.yml
Commit-message validation uses pull-request or merge-queue ranges. The affected workflows remove or broaden push triggers and filters.
CI inputs and runner environment
.github/workflows/build-and-test-ci.yml, .github/workflows/strict-build-check.yml, dev_tools/docker/ci-runner/setup-scripts/install-software.sh
The prepare job hashes test inputs. CI jobs use updated runner images, debug builds set EDG_BUILD_IDENTIFIER=ci, and the runner image installs zstd.
Test-result and coverage caching
.github/workflows/build-and-test-ci.yml
The GCC and i686 test jobs key cache records using configuration, test-input, and build-product hashes. Cache hits restore coverage and skip testing. Successful uncached runs save coverage and run metadata.

Priority: Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PrepareJob
  participant TestJob
  participant ActionsCache
  participant Edgy
  participant CoverageReport
  PrepareJob->>TestJob: provide test_inputs hash
  TestJob->>ActionsCache: look up test record
  ActionsCache-->>TestJob: restore coverage or report cache miss
  alt cache miss
    TestJob->>Edgy: run tests
    Edgy-->>TestJob: test result
    TestJob->>CoverageReport: generate coverage JSON
    TestJob->>ActionsCache: save coverage and run metadata
  else cache hit
    ActionsCache-->>TestJob: restore coverage JSON
  end
Loading

Possibly related issues

Possibly related PRs

  • edgcpp/compiler#394 — It adds CI workflows that this PR updates with merge-queue handling and revised push triggers.

Suggested labels: infrastructure

Suggested reviewers: nv-cmeerw, darkarc

Merge Risk: Minimal · up to 17c95

No concrete merge-blocking regression is established by the supplied evidence; the change is mergeable after normal checks.

Security architecture risk: Low · up to 17c95

The inspected changes do not establish an introduced security exploit or privilege expansion. Cache keys bind results to build products and test inputs, and normal cache creation requires successful tests. Residual uncertainty concerns cache-service isolation and enforcement of the merge-queue-only workflow.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new security-relevant shared state is repository CI pass records and coverage. Their integrity affects whether PR and merge-group test legs execute. The inspected workflow retains contents-read permission; it does not add a repository-write permission.

Trust Boundaries and Controls

  • observed — The reader treats an exact cache hit as sufficient to skip tests. It logs cached metadata without validating its schema and tolerates missing coverage copies. The normal writer supplies both metadata and coverage, so this asymmetry alone does not establish poisoning or an attacker-controlled bypass. Cross-ref authority isolation is delegated to the cache service.

Hardening Proposals

  • proposed — Validate restored record structure and configuration-specific coverage before skipping tests, falling back to execution if validation fails. If input identity is stored in the record, validate the digest rather than requiring the current commit SHA, preserving intentional reuse across equivalent commits.
Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the two main change areas: reproducible builds and GitHub merge queue CI optimizations.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 4 files. (51 skipped: 50 unsupported, 1 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

build date and time in the --version and --dump_configuration output and
in the precompiled header identification string, so rebuilding the same
sources produces identical executables. The runtime library is likewise
reproducible: its archives are deterministic, and its generated C files no

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should lib_src/pending_changes get a similar entry?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... if we want to note the changes to the build files maybe?

Comment thread src/il_to_str.c
@@ -8580,48 +8605,40 @@ STATIC_THREAD a_ptr_unique_id_map
*ptr_to_unique_id;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pre-existing, but:

  1. ptr_to_unique_id sounds like this is "a pointer to a unique id"; unique_id_map would be clearer, IMO.
  2. If we're going to use this in earnest (as opposed to just in DEBUG builds), maybe it should be part of an_il_to_str_output_control_block?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RE 1:

It still is a (map of) pointers to unique IDs ... so I think the existing name is fine (I prefer it personally to just unique_id_map). A counter-proposal would be perhaps calling it temporary_to_id?

That also removes the slight UUID implication/suggestion.

RE 2:

It's a good question ... that would surface it more visibly, but I'm not sure that buys us anything. I think I'd prefer to keep this an implementation detail unless anyone asks for that to be controllable by an_il_to_str_output_control_block.

WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Counter-counter-proposal ;-) : ptr_to_id_map ?

I suggested making it part of an_il_to_str_output_control_block to ensure that there is no interference between unrelated output streams. I'm fine delaying that to another issue/change though.

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 17c95ce0dbe0:

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 17c95ce0dbe0:

CI failure.

This branch has not been deployed

No deployments
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.

3 participants