v0.47.0 — reward: weight dominates payoff (REWARD_PER_KG 0.5→2.0) (#90) #94

Merged
kamilkrzywda merged 1 commits from feat/reward-weight into master 2026-09-22 01:36:13 +02:00
Owner

Closes #90

Change

lib/game/seed.ts: REWARD_PER_KG 0.5 → 2.0. The weight term was small vs base+distance, so per-kg rate fell as jobs got heavier (€4.59/kg at 500 kg → €1.01/kg at 4,000 kg) and heavy jobs barely paid more — "no sense to get heavier jobs". With the retune the weight term dominates:

1000 km leg before after
500 kg €3,250 €4,000
4,000 kg €5,000 €11,000

Fuel burn (lib/sim/movement.ts) is weight-independent, so this only raises income — starter plane stays viable; heavier jobs are now clearly worth taking. Linear form kept (no tiers), one-constant diff.

Tests

  • seed.test.ts: stale "0.5 * weightKg" test name → generic; added literal pins rewardFor(1000, 4000) === 11_000 and rewardFor(1000, 500) === 4_000 so future retunes are deliberate. All other assertions recompute through the exported constants (pass unchanged).
  • Grep confirmed no usages of REWARD_PER_KG/rewardFor outside seed.ts/seed.test.ts; generic "per-kg payout" prose in state.ts/schema.ts/openapi.ts has no literal rates — untouched.

Verification

Local: tsc clean · vitest 373/373 · playwright --list 58 tests. Full e2e runs in CI per AGENTS.md.

Closes #90 ## Change `lib/game/seed.ts`: `REWARD_PER_KG` **0.5 → 2.0**. The weight term was small vs base+distance, so per-kg rate *fell* as jobs got heavier (€4.59/kg at 500 kg → €1.01/kg at 4,000 kg) and heavy jobs barely paid more — "no sense to get heavier jobs". With the retune the weight term dominates: | 1000 km leg | before | after | |---|---|---| | 500 kg | €3,250 | **€4,000** | | 4,000 kg | €5,000 | **€11,000** | Fuel burn (lib/sim/movement.ts) is weight-independent, so this only raises income — starter plane stays viable; heavier jobs are now clearly worth taking. Linear form kept (no tiers), one-constant diff. ## Tests - `seed.test.ts`: stale "0.5 * weightKg" test name → generic; added literal pins `rewardFor(1000, 4000) === 11_000` and `rewardFor(1000, 500) === 4_000` so future retunes are deliberate. All other assertions recompute through the exported constants (pass unchanged). - Grep confirmed no usages of `REWARD_PER_KG`/`rewardFor` outside seed.ts/seed.test.ts; generic "per-kg payout" prose in state.ts/schema.ts/openapi.ts has no literal rates — untouched. ## Verification Local: tsc clean · vitest 373/373 · playwright --list 58 tests. Full e2e runs in CI per AGENTS.md.
kamilkrzywda added 1 commit 2026-09-22 01:27:15 +02:00
Job reward retuned so weight dominates payoff (ISS-090, v0.47.0)
CI / build + unit + e2e (pull_request) Successful in 8m59s
9ce8660fd2
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-22 01:27:23 +02:00
kamilkrzywda merged commit bf6f1b3c95 into master 2026-09-22 01:36:13 +02:00
Sign in to join this conversation.