Skip to content

Set structured state when closing a listing#106

Open
ChimdumebiNebolisa wants to merge 1 commit into
Hack-HQ:mainfrom
ChimdumebiNebolisa:fix/close-sets-structured-state
Open

Set structured state when closing a listing#106
ChimdumebiNebolisa wants to merge 1 commit into
Hack-HQ:mainfrom
ChimdumebiNebolisa:fix/close-sets-structured-state

Conversation

@ChimdumebiNebolisa

Copy link
Copy Markdown
Contributor

Summary

Set canonical state: closed when closing a listing and make resolve_state honor active: false.

Problem

handle_close_opportunity only set active: false. README generation uses resolve_state, which previously returned the stored state field first, so a listing closed via automation could still render as OPEN in the README while the website showed it closed.

Changes

  • Set state to closed in the close handler
  • Treat active is False as closed in resolve_state
  • Add regression tests for both paths

Validation

  • python -m unittest discover -s .github/scripts -p "test_*.py" - 54 tests OK

Scope

No README or listings.json churn; repairs future close operations and any inconsistent records where active is false but state is not closed.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant