This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Fix UK behavioral response calculations returning zero FTE impacts - #2740
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes a bug where UK behavioral response calculations were returning zero FTE impacts due to mismatched parameter names between the frontend and backend API. The fix updates the parameter names to use the correct UK API naming convention.
- Updated behavioral response parameter names for UK calculations to match backend API expectations
- Changed from old
gov.simulation.labor_supply_responses.*naming to correctgov.behavioral_responses.*naming - Added changelog entry documenting the fix
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/pages/policy/PolicyRightSidebar.jsx | Updated UK behavioral response parameter names to match API expectations |
| changelog_entry.yaml | Added changelog entry for the bug fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #2741
Problem
The behavioral response implementation for the UK was systematically returning zero FTE (Full-Time Equivalent) impacts despite valid policy reforms with significant income effects. This affected the accuracy of dynamic scoring for tax and benefit policy changes on the UK site.
Root Cause
The web application was using outdated parameter names that don't match what the UK backend API expects for behavioral response elasticities. While the US parameters were correctly configured, the UK parameters were using an old naming convention (gov.simulation.labor_supply_responses.*) instead of the correct API parameters.
Solution
Updated the behavioral response parameter names in PolicyRightSidebar.jsx to match the UK API expectations: