[TFgen] Added a report structure#3860
Open
Supam wants to merge 4 commits into
Open
Conversation
2 tasks
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jun 3, 2026
This comment has been minimized.
This comment has been minimized.
87082c5 to
5c7c167
Compare
2d270cd to
46b6a91
Compare
46b6a91 to
f304be8
Compare
Base automatically changed from
jason.tenczar/generator-v2/tracking-field-decode
to
generator-v2
June 4, 2026 15:32
f304be8 to
ea900d3
Compare
Added a report structure for after run reports. This will be used by CI and may be used by other tools downstream.
Set initial values for the run report in the generate command. The rest of the content should be filled by the actual generation.
cmd.Version is empty on the generate subcommand: cobra does not propagate Version from the root command, so the report's generator_version field was always "". Read it from cmd.Root().Version, where main.go stamps it. Also gofmt the RunReport and Spec struct literals (value alignment, stray blank lines) and fix a doc-comment typo in report.go.
ea900d3 to
9c27397
Compare
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 free
to 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.

Summary
Adds the run-report layer for the tfgen generator (FR-014). report.WriteJSON serializes a model.RunReport to JSON matching contracts/run-report.schema.json, deriving the per-status summary from the artifacts so the counts CI gates on can't drift from the artifact list. The report types (RunReport, ArtifactReportEntry, Diagnostic, SkippedOperation, RunSummary + status/severity/reason enums) live in internal/model.
The generate command now initializes a report with the fields it can populate up front — a fresh v4 run ID (google/uuid), the build-stamped generator version (main.Version), the spec SHA-256 (specHash in the parser), and start/finish timestamps. Per-artifact entries are filled in by the generation pipeline in a later change.
Test Plan
New report_test.go covers required fields, derived summary counts, nested artifact/skipped/diagnostic shape, omitempty behavior, determinism, and the nil/writer-error paths.