PolicyEngine / PolicyEngine/policyengine-api
Some database entries are corrupt
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18
- Forks
- 33
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 22
Description
Due to a front-end bug, malformed policies were created. These policies still reside in the policy database; for example:
https://api.policyengine.org/us/policy/47728
Since attempts were made to analyze the economic impact of these malformed policies, the economy database may also contain incorrect entries.
We will encounter bugs in the front and back ends during development and after deployment. Are there any existing provisions to ensure that
- tests during development don't touch production databases?
- once a bug is found in production, e.g., malformed policies, then entries related to the bug or, in the worst case, all entries since the introduction of the bug can be deleted from the databases?
Ideally, the second case should be rare, but bugs in development are unavoidable. The first case is also important because dummy policies are often created on the front end to test UI features, which should not affect the production databases.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start with the linked malformed-policy discussion and the example policy at the supplied API URL, then trace how development tests and production database entries are handled. Done should be defined as concrete safeguards for test isolation and a dependable process for removing affected records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100