What you’ll build in this exercise:
- Create a comprehensive test dataset representing one month of Mangrove Biochar operations
- Run the full calculation pipeline and validate every batch output
- Verify all ledger balances reconcile
- Document and fix any integration issues discovered during testing
Part 1: Design (30 min)
1. Define test scenarios
Plan your test dataset to cover all three scenario types:Happy Path
Normal operations:
- 4 typical deliveries (2-6 t)
- 5 feedstock receipts
- 3 lab analyses
- Standard moisture (10-20%)
- Typical H:C ratio (0.2-0.5)
Edge Cases
Boundary values:
- 1 high-moisture receipt (50%)
- 1 high H:C ratio analysis (0.75)
- 1 very small delivery (0.5 t)
- 1 zero-distance transport
Error Cases
Invalid data:
- Missing a required datapoint
- Event outside accounting period
- Duplicate tracking IDs
2. Calculate expected outputs
Before running the pipeline, calculate the expected output for every batch in a spreadsheet. Include:- Gross carbon for each delivery
- Proportional emission allocation (by mass)
- Direct transport emissions per delivery
- Net carbon per batch
- Ledger totals and balances
3. Identify potential failure points
List what might go wrong:- Slug mismatches between new event types and model nodes
- Date range issues with edge case events
- Allocation denominators including edge case batches
- Missing aggregation for energy consumption events
Part 2: Build in Mangrove (1.5 hrs)
Step 1: Create the January 2024 test dataset
Create the following events using Add Data or Bulk Import : 5 Feedstock Receipt events:
3 Lab Analysis events:
4 Biochar Delivery events:
1 Energy Consumption event (January):
- Electricity: 12,000 kWh
- Propane: 600 gallons
- Period: Jan 1 – Jan 31
Step 2: Run the full pipeline
- Go to Production Accounting and generate batches for January 2024.
- Resolve any validation messages — these indicate missing or problematic data.
- Submit to generate batches.
Step 3: Validate batch outputs
For each of the 4 delivery batches, compare the pipeline output against your expected values:1
Check gross carbon
Does the gross tCO2e for each batch match your spreadsheet? If not, check the production model nodes (dry mass → carbon → CO2 conversion).
2
Check emission allocation
Are electricity and propane emissions allocated proportionally by mass? Do the allocations across all batches sum to the total period emissions?
3
Check transport emissions
Is DEL-003’s transport emission zero (on-site delivery)? Are other deliveries’ transport emissions correct?
4
Check net carbon
Does net = gross - (allocated electricity + allocated propane + transport) for each batch?
5
Check edge case batches
DEL-004 (0.5 t): Is the net carbon very small or potentially negative? If negative, flag this — the methodology may require a minimum batch size or different handling.
Step 4: Verify ledger reconciliation
Check each ledger’s balance:If a ledger balance goes negative, it means you’re claiming more output than input at that stage — a mass balance violation that must be resolved before reporting.
Step 5: Document and fix issues
For every issue found:- Describe the symptom — what output was wrong?
- Identify the root cause — which pitfall from Lesson 5.3?
- Apply the fix — update the configuration
- Re-run and verify — confirm the fix resolves the issue
Success criteria
You have completed the Module 5 exercise when:- Test dataset created — 17 events across 5 event types covering happy path and edge cases
- Pipeline executed — Generate Batches runs for January 2024 without unresolved validation errors
- 4 batches generated — one per delivery, with correct gross and net carbon values
- Batch outputs match — all values within 1% of your pre-calculated expected outputs
- Emissions correctly allocated — proportional allocations sum to period totals, direct allocations are batch-specific
- Ledger balances reconcile — no negative balances, inputs ≥ outputs at each stage
- Edge cases handled — high moisture, high H:C, small delivery, and zero-distance transport produce correct results
- Issues documented — any problems found during testing are documented with root cause and fix