Skip to content

Overseer: wire durable GitHub-side open-issue dedup on the gap-filing path (#4687 P2) #4717

Description

@rysweet

Summary

The Overseer gap-scan documentation (PR #4710) originally described a restart-safe, GitHub-side open-issue dedup on the workstream-gap filing path:

WhisperGate.peek(sig) → gh.search_issues(repo, sig) → find_existing → reuse/skip/create

That flow is not yet implemented. The shipped code path (act_flag_workstream_gaps, src/overseer/mod.rs) uses only the in-process WhisperGate (gap_gate, 900 s window) + a consolidated operator notification (email + Signal). It never queries GitHub and never calls create_issue on the gap path, so its dedup guarantee is within a single running daemon and is wiped on restart.

PR #4710's docs were corrected (Step 18b) to describe the actual in-process behavior and to mark the GitHub-side durable check as future work. This issue tracks implementing it.

What already exists (the foundation this builds on)

  • Bounded GapCategory taxonomy (GoalUncovered/IssueUncovered/AnomalyUnaddressed) — src/overseer/signal.rs.
  • Stable, content-addressed dedup key GapItem::dedup_key() = workstream-gap:<signature> — restart-stable as a key.
  • Injection-safe slug validation is_bounded_signature_slug / has_valid_dedup_signature (IV-1).
  • The sibling stewardship::process_orchestrator_run + find_existing flow this should mirror.

Scope (P2 of #4687)

Wire the durable GitHub-side dedup into act_flag_workstream_gaps:

  1. After the WhisperGate pre-filter, call gh.search_issues(repo, dedup_key) for an already-open equivalent issue.
  2. find_existing on the stewardship-signature: body marker → reuse/skip if present.
  3. Otherwise create_issue embedding stewardship-signature: <dedup_key>.
  4. Fail-loud: a gh search error propagates and files nothing (never a blind create).
  5. Add hermetic tests mirroring src/stewardship/tests_extra.rs.

Acceptance

  • A daemon restart does not re-file an already-open gap issue (cross-process guarantee).
  • overseer::gap_scan emits reused_existing when an open issue is matched.
  • gh search failure files nothing and surfaces a first-class error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions