Clarify earnings interval bounds and cover grid edge cases

Open
#56 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, python

Research direction

Start by reviewing the follow-up in PR #53 and tracing the Python interval handling, response metadata, and tests, then compare those rules with the test-only JavaScript axis builder and client regression tests. The issue does not name file paths, so locate those entry points from the repository. Done means the exact-bound and error cases, grid edge cases, metadata, and legacy 202-point rounding behavior are covered by tests.

Written by the indexing model from the issue text.

Description

The review of #53 found follow-up work on the earnings interval contract and its tests.

  • Document how an explicit lower bound, including zero, requests an exact interval. Return a client error for reversed or empty bounds.
  • Add a client regression for a cliff at the first earnings point and for sub-cent secondary wages. The client checks measured gaps. A browser with the old bundle can still report the requested step until it reloads.
  • Align or retire the test-only JavaScript axis builder so its assertions exercise the current Python interval rules.
  • Distinguish an adjusted grid from a truncated interval in response metadata. Keep the legacy full-range behavior explicit in the tests, including its 202-point rounding edge.

The exact intervals used by the current frontend already measure their maximum gap. The example catalog uses 201-point primary curves. Refinement fix

Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
1d 14h
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/cliff-watch

All issues in PolicyEngine/cliff-watch

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.