Repository navigation
Report conformance outcomes instead of Terraform version counts - #6
Merged
Merged
Conversation
The README summary charted fixtures by their minimum Terraform version, which says nothing about whether anything converts. Measure the pipeline instead: parse every fixture, run both emitters over every graph that parsed, and report how many reach the IR, how many produce AWS CDK and Pulumi TypeScript, and how many of those need no warnings at all. status.json gains an emit section (schema 2) holding per-target module, emitted, failed, clean and warning counts. The README block becomes an outcome table with percentage bars, and the version distribution stays in the JSON without a chart. An emitter that succeeds with no files counts as a failure, and the badge turns red when either emitter fails.
be-thomas
commented
Oct 26, 2026
be-thomas
commented
Oct 26, 2026
be-thomas
commented
Oct 26, 2026
be-thomas
commented
Oct 26, 2026
A stage that converted 852 of 853 modules rounded up to 100% and drew a full bar beside the failed module; one module of 853 rounded down to nothing. Percentages now clamp to 1-99 for a partial result. Failure messages quoted the path they were given, so an absolute -out put a checkout-specific path in the committed report and made the staleness check depend on where the tree lives. The fixtures root is now trimmed from the message as well as from the location. The emitter-failure branch of Compute had no test. A dependency cycle parses but fails in both emitters, which now covers the partitioning, the recorded failure and the red badge; the badge test also covers a Pulumi-only failure.
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
The README conformance block answered a question nobody was asking: how the 853 vendored modules split across minimum Terraform versions. It could not tell a reader how much of the corpus actually makes it through the pipeline. This replaces it with an outcome table, generated from the same status command as before.
The last two rows are the honest part: reaching an emitter is not the same as converting cleanly. An unmapped resource or an unsupported block is reported as a warning rather than dropped, so only 27 CDK and 31 Pulumi modules need no human review.
What changed
status.ReportgainsEmit(cdkandpulumi, each withmodules,emitted,failed,clean,warnings,failures).Computerunsengine.Convertfor both targets after parsing and treats a missing result or an empty file list as a failure. Schema bumps to 2.Outcomes()andMarkdown()render the five pipeline rows in order with a bar scaled to the corpus;headline()produces the 100% sentence or a partial one when a stage falls short.Badge()turns red when parsing or either emitter fails, so the badge still gates on the whole pipeline rather than parsing alone.min_versionsstays inconformance/status.jsonbut is no longer rendered in the README;docs/CONFORMANCE.mddocuments the three questions the outcome summary answers.Verification
go test ./internal/conformance/... ./cmd/...— new tests cover the emitted-vs-clean split, the emitted-vs-failed partition, the red badge on emitter failure, exact table rows, both headline forms and the marked-section round trip.go vet ./...andgofmt -l .are clean.make conformance-statusregenerated the committedstatus.jsonand README block from the full corpus.