Skip to content

Make more-licenses.md deterministic by removing generated timestamp noise - #4802

Merged
rajkumar-rangaraj merged 8 commits into
mainfrom
copilot/fix-license-report-merge-conflicts
Jul 31, 2026
Merged

Make more-licenses.md deterministic by removing generated timestamp noise#4802
rajkumar-rangaraj merged 8 commits into
mainfrom
copilot/fix-license-report-merge-conflicts

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Context

Merging PRs such as #4781 causes other pending PRs to almost certainly have a conflict in

Copilot

licenses/more-licenses.md was non-deterministic because generateLicenseReport injected a per-run timestamp, creating guaranteed merge conflicts across concurrent dependency PRs with no semantic content differences. This change removes that source of churn and simplifies the PR-helper logic that previously special-cased it.

  • Deterministic license report output

    • Added a generateLicenseReport post-processing step in agent/agent/build.gradle.kts that removes only the timestamp line matching _YYYY-MM-DD HH:MM:SS UTC_ immediately after ## Dependency License Report.
    • Match is pattern-based (not line-number-based) and idempotent.
  • Workflow cleanup

    • Simplified .github/workflows/pull-request-helper.yml (“Update license report” step) by removing the --shortstat timestamp heuristic.
    • Uses the standard staged-diff check already used elsewhere in the workflow:
      • generate report
      • git add licenses
      • git diff --cached --quiet → no-op if unchanged, commit otherwise
  • Regenerated committed artifact

    • Updated licenses/more-licenses.md to reflect deterministic output (timestamp line removed, dependency/license content unchanged).
named("generateLicenseReport").configure {
  doLast {
    val normalized = reportContents.replace(
      Regex("""(?m)(^## Dependency License Report\r?\n)_\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC_\r?\n"""),
      "$1",
    )
  }
}

Copilot AI and others added 2 commits July 30, 2026 20:05
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix license report generation to avoid merge conflicts Make more-licenses.md deterministic by removing generated timestamp noise Jul 30, 2026
Copilot AI requested a review from xiang17 July 30, 2026 20:09
@rajkumar-rangaraj
rajkumar-rangaraj merged commit 80d3ffc into main Jul 31, 2026
146 checks passed
@rajkumar-rangaraj
rajkumar-rangaraj deleted the copilot/fix-license-report-merge-conflicts branch July 31, 2026 00:17
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