Skip to content

fix: add rural demand fairness guard#557

Open
saurabhhhcodes wants to merge 1 commit into
Shruti070107:mainfrom
saurabhhhcodes:fix/rural-demand-fairness-302
Open

fix: add rural demand fairness guard#557
saurabhhhcodes wants to merge 1 commit into
Shruti070107:mainfrom
saurabhhhcodes:fix/rural-demand-fairness-302

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Summary

  • add a rural fairness floor to Intelligence.getHighDemandZones
  • detect geographically isolated providers so low-history rural zones are not filtered out by urban demand volume alone
  • surface the fairness reason and equity safeguard note in the existing rider map popup
  • replace the hardcoded demand threshold/order count with named constants

Why

The demand-zone model only used historical order count, then filtered out zones below the demand threshold. That can hide isolated rural providers that naturally have lower dispatch density, making the AI map over-prioritize urban/provider-dense areas.

Closes #302

Validation

  • node --check src/intelligence.js
  • node --check src/app.js
  • targeted Node smoke for isolated rural provider fairness floor
  • npm test
  • npm run build
  • npm run lint
  • git diff --check
  • local server smoke: PORT=4175 npm run serve, curl /, curl /src/intelligence.js, curl /healthz

@saurabhhhcodes

Copy link
Copy Markdown
Author

Validation is complete and the branch is clean/mergeable from my side.

Could you please add the GSSoC tracking labels when reviewing? Suggested from the issue scope: gssoc:approved, level:intermediate or level:advanced, type:feature/type:enhancement, and quality:clean if it matches your rubric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI models may prioritize urban areas while neglecting rural waste management needs

1 participant