Skip to content

test(reports): cover a hide whose entry left the list while queued - #200

Merged
jamesconwaydev merged 1 commit into
devstreamhq:mainfrom
foothillsdigital:test/report-entry-gone
Nov 6, 2026
Merged

jamesconwaydev merged 1 commit into
devstreamhq:mainfrom
foothillsdigital:test/report-entry-gone

Conversation

@foothillsdigital

Copy link
Copy Markdown
Collaborator

What and why

Closes #40. Two of its three parts were already on main when I picked it up, so this PR only adds the missing test.

  • Cancelled hide job. A hide job dropped from the list-writes queue before it starts runs no steps, so the report never gets needs-review. The sweeper already re-dispatches any open report without that label after 10 minutes (test_sweep_redispatches_undecided_report). A job cancelled mid-run is parked by the cancelled() step. Nothing to change here.
  • One health check per entry per day. Landed in 2526079 (RECHECK_AFTER, the "had a health check in the last day" reply, with tests).
  • "No longer on the list". This had no test, so I added one: when the entry is gone from fresh main, apply exits 1, prints the reason to stderr, prints no branch and leaves entries.json alone. I checked that it fails if that branch returns 0.

One gap I left alone: two dead reports on the same entry decided within a few seconds of each other can both queue a check, because the first dispatch hasn't appeared in the runs list yet. Closing that needs a lock or rot.py checking itself, which seemed too much for a rare duplicate check. Happy to do it if you want it.

Checks

  • The PR title follows Conventional Commits
  • python3 -m unittest discover -s scripts -t . passes
  • npm --prefix site test passes (if you touched site/)
  • npx prettier --check . passes
  • This doesn't edit data/entries.json by hand (submissions go through the form)

@jamesconwaydev jamesconwaydev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is the one path that had no test, and I like that it checks the file is untouched too. Leave the two-reports race alone: a duplicate health check costs a few API calls and fixes itself, so a lock isn't worth it.

@jamesconwaydev

Copy link
Copy Markdown
Collaborator

I've sent you a Triage invite for the repo. Once you accept it, CI will run on your PRs without me approving each one, and I'll merge #200, #201, #202, #204 and #205 as they go green. Thanks for all of these.

@jamesconwaydev

Copy link
Copy Markdown
Collaborator

Thanks for accepting. New PRs run CI straight away now, but #200, #201, #202, #204 and #205 are stuck on runs from before. Could you rebase each onto main and force-push? That starts fresh runs and picks up today's merges too. I'll merge them as they go green.

@jamesconwaydev
jamesconwaydev merged commit a5cae47 into devstreamhq:main Nov 6, 2026
9 checks passed
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.

Re-run hide jobs that were cancelled, and dedupe rot dispatches

2 participants