feat: scheduled deadline watcher for existing listings (#54)#65
Merged
Conversation
Closes #54. Adds a weekly (workflow_dispatch too) job that backfills MISSING deadlines as reviewable proposals — it never edits listings.json or pushes. - deadline_watcher.py: loads active + visible listings with no `deadline`, re-fetches each listing's stored URL via auto_extract's SSRF/TLS-hardened fetch, and asks the model for a hacker-facing application/registration deadline. Safety rules enforced in _accept(): only application/registration types, only high confidence, requires a quoted evidence snippet and a valid date; event dates, judge/mentor/sponsor deadlines, and prior-cycle dates are excluded by the prompt + filters. Writes a markdown report and a has_content output; degrades gracefully (no candidates / no OpenAI key -> nothing). - deadline_watch.yml: schedule + manual, permissions contents:read + issues: write (no push), SHA-pinned actions, opens an issue from the report for maintainer review. Never auto-merges. - Unit tests for the _accept safety rules; deadline_proposals.md gitignored. Verified: scripts compile; 19 Python unittests pass; a no-key run finds candidates, warns, and exits with has_content=false (no network); workflow YAML valid. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…vidence Review fixes for the scheduled deadline watcher: - Idempotent issue creation: the workflow opened a brand-new issue every weekly run, so unaddressed proposals piled up as duplicates. Now it reuses the existing open `deadline-proposal` issue (edit + comment) and only creates one when none is open. Added a `concurrency` group so an overlapping scheduled + manual run can't double-open. - Enforce the "no prior-cycle dates" rule in code, not just the prompt: _accept() now rejects any parsed deadline before today (PST). `today` is an injectable param so the check is deterministic in tests; main() computes it once per run. - Sanitize the model/page-derived evidence (and company/title) through util.sanitize_field before embedding in the issue markdown, so a multi-line or markup-bearing quote can't break the report or smuggle mentions/links. - Correct the cron comment (15:00 UTC is 07:00 PST / 08:00 PDT, not "~7am PT"). Tests: pinned the acceptance test's reference date (was a latent time-bomb once 2026-08-01 passed) and added a past-date rejection test. 20/20 pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Carry the lockfile fix onto this branch so its Web CI passes at `npm ci` instead of failing on the inherited out-of-sync lockfile. Regenerated with npm@11.16.0 (the CI runner version); verified `npm ci` and build pass and the scripts unittest suite is 20/20. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54. Top of the stack (base
chore/tech-debt-cleanup). Merge #60 → #61 → #62 → #63 → #64 → this.A weekly job (also
workflow_dispatch) that backfills missing deadlines as reviewable proposals — it never editslistings.jsonand never pushes.How it works
deadline.auto_extract's SSRF/TLS-hardened fetch._accept()enforces the safety rules; write a markdown report +has_contentoutput.Safety rules (from the issue) — all enforced
deadline_typefilter)permissions: contents:read, issues:writeonlyVerification
_acceptsafety rules)has_content=falsewith no network callsdeadline_proposals.mdgitignored🤖 Generated with Claude Code