Skip to content

Capture shared codegen timestamp instead of empty run_started_at - #102

Merged
ptr727 merged 1 commit into
developfrom
fix/codegen-shared-runtime
Jun 3, 2026
Merged

Capture shared codegen timestamp instead of empty run_started_at#102
ptr727 merged 1 commit into
developfrom
fix/codegen-shared-runtime

Conversation

@ptr727

Copy link
Copy Markdown
Owner

Problem

The dual-target codegen "byte-identical output" mechanism (#92) was silently broken. run-codegen-pull-request-task.yml passed --runtime "${{ github.run_started_at }}" to both matrix legs, but github.run_started_at resolves to an empty string in this reusable-workflow context. CodeGenBuilder falls back to DateTime.UtcNow when --runtime is empty, so each leg stamped its own wall-clock time — the main and develop legs diverged (observed ~5s apart), and CodeGen.cs differed between branches, reintroducing the exact develop → main release conflict the mechanism was meant to prevent.

Fix

Capture one UTC timestamp in a new get-runtime job and feed it to both matrix legs via needs.get-runtime.outputs.runtime. Both legs now receive an identical, non-empty value, so CodeGen.cs is byte-identical across branches again.

Discovered while resolving the CodeGen.cs conflict on the develop→main release PR (#99). AGENTS.md updated to match.

🤖 Generated with Claude Code

CopilotAI review requested due to automatic review settings June 3, 2026 23:42

CopilotAI left a comment

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.

Pull request overview

This PR restores deterministic, shared timestamps for the dual-target codegen workflow so the main and develop matrix legs generate byte-identical CodeGen/CodeGen.cs output, preventing recurring develop → main release merge conflicts.

Changes:

  • Adds a get-runtime job to capture a single UTC timestamp once per workflow invocation and exposes it as a job output.
  • Updates the codegen matrix job to use the shared timestamp via needs.get-runtime.outputs.runtime (instead of github.run_started_at, which is empty in this reusable-workflow context).
  • Updates AGENTS.md documentation to reflect the new mechanism and the reusable-workflow github.run_started_at pitfall.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
AGENTS.mdUpdates the branching/codegen guidance to document the shared runtime capture approach and why github.run_started_at cannot be used here.
.github/workflows/run-codegen-pull-request-task.ymlIntroduces get-runtime and wires its output into both matrix legs so --runtime is always non-empty and identical across legs.

@ptr727
ptr727 merged commit d3918ba into developJun 3, 2026
8 checks passed
@ptr727
ptr727 deleted the fix/codegen-shared-runtime branch July 7, 2026 21:05
Sign up for freeto 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.

2 participants

@ptr727