Capture shared codegen timestamp instead of empty run_started_at - #102
Merged
Conversation
Contributor
There was a problem hiding this comment.
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-runtimejob 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 ofgithub.run_started_at, which is empty in this reusable-workflow context). - Updates
AGENTS.mddocumentation to reflect the new mechanism and the reusable-workflowgithub.run_started_atpitfall.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| AGENTS.md | Updates 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.yml | Introduces get-runtime and wires its output into both matrix legs so --runtime is always non-empty and identical across legs. |
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Problem
The dual-target codegen "byte-identical output" mechanism (#92) was silently broken.
run-codegen-pull-request-task.ymlpassed--runtime "${{ github.run_started_at }}"to both matrix legs, butgithub.run_started_atresolves to an empty string in this reusable-workflow context.CodeGenBuilderfalls back toDateTime.UtcNowwhen--runtimeis empty, so each leg stamped its own wall-clock time — themainanddeveloplegs diverged (observed ~5s apart), andCodeGen.csdiffered between branches, reintroducing the exactdevelop → mainrelease conflict the mechanism was meant to prevent.Fix
Capture one UTC timestamp in a new
get-runtimejob and feed it to both matrix legs vianeeds.get-runtime.outputs.runtime. Both legs now receive an identical, non-empty value, soCodeGen.csis byte-identical across branches again.Discovered while resolving the
CodeGen.csconflict on the develop→main release PR (#99). AGENTS.md updated to match.🤖 Generated with Claude Code