feat: v0.4.0 — Scope 3 embodied carbon, water tracking, binary build#10
Merged
Conversation
## Scope 3 Embodied Carbon (engine.ts, factors.json v1.3.0) - Added embodied_co2e_grams_per_month to all 40 instances in factors.json - Formula: (1,200,000g / 35,040h / 48 vCPUs) × vcpus × 730h - ARM (Graviton) applies 20% discount — smaller die, lower manufacturing TDP - Source: Cloud Carbon Footprint DELL R740 baseline (v3) - Returns embodiedCo2eGramsPerMonth and totalLifecycleCo2eGramsPerMonth per resource ## Water Consumption (engine.ts, factors.json v1.3.0) - Added water_intensity_litres_per_kwh to all 14 regions in factors.json - Formula: (W × 730h / 1000) × WUE_litres_per_kwh - WUE applied to IT load (before PUE), matching AWS definition - Source: AWS 2023 Sustainability Report - Returns waterLitresPerMonth per resource - eu-north-1 (0.10 L/kWh) and us-west-2 (0.18 L/kWh) are lowest - ap-south-1 (Mumbai, 0.72 L/kWh) is highest ## Updated Types (types.ts) - EmissionAndCostEstimate: embodiedCo2eGramsPerMonth, totalLifecycleCo2eGramsPerMonth, waterLitresPerMonth - scope changed from SCOPE_2_OPERATIONAL to SCOPE_2_AND_3 - assumptionsApplied: embodiedCo2ePerVcpuPerMonthApplied, waterIntensityLitresPerKwhApplied - PlanAnalysisResult.totals: currentEmbodiedCo2eGramsPerMonth, currentLifecycleCo2eGramsPerMonth, currentWaterLitresPerMonth ## Updated Formatters - markdown.ts: headline table with all 4 dimensions (Scope 2, Scope 3, lifecycle, water, cost) resource breakdown adds Scope 3 CO2e and Water columns footer updated to reflect full Scope 2 + 3 coverage - table.ts: Scope 2, Scope 3, Water columns in terminal output totals line shows Scope 2 / Scope 3 / Lifecycle / Water / Cost ## Binary Build Workflow (.github/workflows/release-binaries.yml) - Triggers on v* tags and workflow_dispatch - Builds 5 platform binaries via Bun compile: linux-x64, linux-arm64, darwin-arm64, darwin-x64, windows-x64 - Smoke tests each binary (--version, --coverage) - Attaches all binaries to GitHub Release via softprops/action-gh-release@v2 ## Documentation - METHODOLOGY.md: full rewrite with Scope 2/3 formulas, water formulas, worked examples, WUE table, recommendation scoring, data sources, known limitations - README.md: full rewrite with real live output (Scope 2/3/water columns), quickstart, suggestions, policy, coverage matrix, maths section ## Tests - 63 tests, 63 passing - json.test.ts now uses real engine output — no mock data - formatter tests updated with full totals shape - engine.test.ts: scope assertion updated to SCOPE_2_AND_3
🌱 GreenOps Infrastructure Impact
Resource Breakdown
Recommendations
|
omrdev1
added a commit
that referenced
this pull request
May 19, 2026
…10) ## Scope 3 Embodied Carbon (engine.ts, factors.json v1.3.0) - Added embodied_co2e_grams_per_month to all 40 instances in factors.json - Formula: (1,200,000g / 35,040h / 48 vCPUs) × vcpus × 730h - ARM (Graviton) applies 20% discount — smaller die, lower manufacturing TDP - Source: Cloud Carbon Footprint DELL R740 baseline (v3) - Returns embodiedCo2eGramsPerMonth and totalLifecycleCo2eGramsPerMonth per resource ## Water Consumption (engine.ts, factors.json v1.3.0) - Added water_intensity_litres_per_kwh to all 14 regions in factors.json - Formula: (W × 730h / 1000) × WUE_litres_per_kwh - WUE applied to IT load (before PUE), matching AWS definition - Source: AWS 2023 Sustainability Report - Returns waterLitresPerMonth per resource - eu-north-1 (0.10 L/kWh) and us-west-2 (0.18 L/kWh) are lowest - ap-south-1 (Mumbai, 0.72 L/kWh) is highest ## Updated Types (types.ts) - EmissionAndCostEstimate: embodiedCo2eGramsPerMonth, totalLifecycleCo2eGramsPerMonth, waterLitresPerMonth - scope changed from SCOPE_2_OPERATIONAL to SCOPE_2_AND_3 - assumptionsApplied: embodiedCo2ePerVcpuPerMonthApplied, waterIntensityLitresPerKwhApplied - PlanAnalysisResult.totals: currentEmbodiedCo2eGramsPerMonth, currentLifecycleCo2eGramsPerMonth, currentWaterLitresPerMonth ## Updated Formatters - markdown.ts: headline table with all 4 dimensions (Scope 2, Scope 3, lifecycle, water, cost) resource breakdown adds Scope 3 CO2e and Water columns footer updated to reflect full Scope 2 + 3 coverage - table.ts: Scope 2, Scope 3, Water columns in terminal output totals line shows Scope 2 / Scope 3 / Lifecycle / Water / Cost ## Binary Build Workflow (.github/workflows/release-binaries.yml) - Triggers on v* tags and workflow_dispatch - Builds 5 platform binaries via Bun compile: linux-x64, linux-arm64, darwin-arm64, darwin-x64, windows-x64 - Smoke tests each binary (--version, --coverage) - Attaches all binaries to GitHub Release via softprops/action-gh-release@v2 ## Documentation - METHODOLOGY.md: full rewrite with Scope 2/3 formulas, water formulas, worked examples, WUE table, recommendation scoring, data sources, known limitations - README.md: full rewrite with real live output (Scope 2/3/water columns), quickstart, suggestions, policy, coverage matrix, maths section ## Tests - 63 tests, 63 passing - json.test.ts now uses real engine output — no mock data - formatter tests updated with full totals shape - engine.test.ts: scope assertion updated to SCOPE_2_AND_3 Co-authored-by: GreenOps E2E <greenops-e2e@test.local>
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.
What this closes
The two outstanding items from the original roadmap: embodied carbon (Scope 3) and water consumption tracking. Plus the binary build workflow. Nothing removed, everything additive.
1. Scope 3 Embodied Carbon
Every resource now reports manufacturing lifecycle carbon alongside operational carbon:
factors.jsonupdated withembodied_co2e_grams_per_month2. Water Consumption
water_intensity_litres_per_kwh3. Updated PR Comment Output
The live PR comment now shows all four dimensions:
Resource breakdown table adds Scope 3 and Water columns.
4. Binary Build Workflow
.github/workflows/release-binaries.yml— triggers onv*tags:--version,--coverage)softprops/action-gh-release@v2linux-x64,linux-arm64,darwin-arm64,darwin-x64,windows-x645. Documentation
METHODOLOGY.md: full rewrite with Scope 2/3 formulas, water formulas, worked examples, WUE table per region, recommendation scoring formula, full data sources table, known limitationsREADME.md: full rewrite with real live terminal output showing all dimensions, binary install section, quickstart, policy, coverage matrixTests
63 tests, 63 passing.
json.test.tsnow uses the real engine — no mock data.