docs(seed): clarify passenger-km and round-trip in business travel transport - #605
Merged
Merged
Conversation
mrivas00
force-pushed
the
docs/mati/business-travel-transport-explanation
branch
3 times, most recently
from
August 25, 2026 19:45
16bb1f8 to
c0857ea
Compare
…ansport User feedback on the business travel — transport subcategory: the help panel did not say whether to enter one person's kilometres or people × kilometres, nor whether a trip counts one leg or both. The DEFRA 2025 factors seeded for this subcategory use two different bases: air, bus and rail are per passenger-km, while car and taxi are per vehicle-km. Make that distinction explicit, state that both legs of a round trip count, and add the formula that builds the quantity (km per leg × legs × people × trips). Also align the page with the seeded data, which it contradicted: - replace the invented factor table with the 10 real Transporte options and their DEFRA 2025 values - drop the manual cabin-class multiplier (class is part of the option) - use flight-duration bands (short/medium/long haul) instead of km bands - remove "moneda local" as a unit (only m, km and mi are allowed) - rework the worked example to show how each quantity is derived - fix the rideshare note, which advised splitting vehicle kilometres between passengers and so led to under-reporting
…bases The seed data commit rewrote the "Viajes de negocios - Traslado" markdown, but a running deployment keeps serving the text it was first seeded with: seed.ts aborts the whole run when the database already has data (the country-count gate), so seedExplanations never re-inlines a markdown file that changed after the initial seed. Write the current file content onto the row so the (i) panel matches the repository and a later reseed is a no-op. Same shape as the guide updates in 20260825140000_add_machinery_catalog_and_otro_values: the row is matched through the demo country's base methodology, so a country deployment that maintains its own methodology decides for itself, and the write is guarded by IS DISTINCT FROM, so re-running the migration touches zero rows. The later timestamp is deliberate — that migration rewrites this same row with the previous revision of the guide, so it has to run first. Guide text only: no factor, captured inventory line or computed total is touched. Verified against the seeded local database inside a rolled-back transaction, replaying both migrations in order: after 20260825140000 the row still holds the previous revision, the first apply of this one reports UPDATE 1 and the second UPDATE 0, and the stored guide is byte-identical to the markdown file (md5 15ee0cb2).
mrivas00
force-pushed
the
docs/mati/business-travel-transport-explanation
branch
from
August 25, 2026 20:46
0ab1511 to
ee90dda
Compare
nivek0o0
approved these changes
Aug 25, 2026
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
km per leg × legs × people × trips, dropping the people term for car/taxi).tools/seed/src/data/base/methodologies.json, the page turned out to contradict the seeded data in several places, so it is now aligned with what the calculator actually offers.Linked issues
None — reported as direct user feedback.
Type of change
checklist below)
(must include a deprecation path or migration note)
What was contradicting the seed
Transporteoptions with their DEFRA 2025 values (0,1257 / 0,117 / 0,1091 / 0,1038 / 0,0354 / 0,148 / 0,173 …)… Economy/… Business), so no manual multiplier — Business is already ~1,5× (short haul) to ~2,9× (medium/long haul)Short haul (<3hrs)/Medium haul (3-6hrs)/Long haul (>6hrs))Unidad: km, moneda localallowedMeasurementUnitsAbbreviations: m, km, mi— no currency unit existsCountry-agnosticism checklist
or system parameters.
deployments, or a deprecation path and migration note are
documented in this PR.
DPG checklist
docs/was updated where relevant.open-source alternative path documented.
against
docs/security/sensitive-data.mdandPRIVACY.md.project's user-facing language).
Security checklist
Mandatory local checks
Screenshots / evidence
The rewritten worked example, recomputed against the seeded factors:
Total ≈ 9.581 kg CO₂e (~9,6 t). The example closes by explaining the two effects that caused the original confusion: the international conference is 65% of the total because of passenger-km (3 people × 2 legs), not because its factor is high — it is in fact the lowest air factor — and shared taxis contribute little precisely because occupants are not multiplied.
Reviewer notes
tools/seed/src/scripts/seedExplanations.ts, so an existing deployment keeps serving the stored copy until explanations are seeded again.pnpm testwas not run: the diff is a single seed markdown file with no code path, and no test asserts on explanation content. Happy to run the suite if you would rather have it on the record.AuditandTrivy Image Scan (api)both fail on the same transitive dependency,deepmerge-ts7.1.5 pulled in by@prisma/client → prisma → @prisma/config(CVE-2026-40345 / GHSA-ggr8-5vv4-36mx). Reproduced locally on this branch, and already tracked in fix(deps): force deepmerge-ts to 8.x to patch CVE-2026-40345 #602. Everything else passes, includingSeed Unit Tests,Format Check,Lint,Type Checkand the full test matrix.