feat(agent-team): durable GitHub-issue intake de-dup + intake hardening #32
No reviewers
Labels
No labels
app
bug
ci
compliance
content
dependencies
docs
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
infra
invalid
javascript
needs-triage
python
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adam/orchestrator#32
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feature/agent-team-github-intake-durable-dedup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Phase-1 of wiring all three intake channels into the live agent-team pipeline (Claude Code / GitHub issue / Slack). This PR makes GitHub-issue intake safe to run on a scheduled timer.
The intake poller de-duped ingested issues in an in-memory set that does not survive a process restart. A scheduled/cron intake (each run a fresh process) would therefore re-ingest every still-open labeled issue on every run and spawn duplicate pipeline tasks. The box is read-only (no write token to remove the intake label), so durable de-dup is the only correct guard.
Changes
ingested_issues(source, issue_id, ingested_at)table +issue_already_ingested/record_issue_ingested/delete_issue_ingestedhelpers.migrate()adds the table to a legacy v1 DB and restamps;init_dbcreates it.connect()/WAL unchanged.github_intake— pluggableIngestStoreseam. In-memory default preserved for tests/one-off runs; durablebuild_ledger_ingest_storefor production. Claim-then-do discipline (claim reserves the id before the non-idempotentstart_task; release on failure keeps transient failures retryable).run-team.py intake-github— wires the ledger store keyed bygithub:owner/repo, making a scheduled timer idempotent across runs.Security review (
/sh-security-review) — fixes folded inDetector fan-out (injection / logic / authz) + proof-or-kill verifier. Findings fixed:
build_default_issue_client: dropped the caller-overridableapi_root(hardcodedGITHUB_API_ROOT) and validateowner/repobefore URL construction — mirrors the siblingci_fetcherBLOCK-3/FIX-3.Tests
982 pass, ruff clean. New tests: cross-process duplicate prevention, release-on-failure retry, schema v1→v2 migration, owner/repo + api_root rejection.
Deploy
Inert until the box-side intake timer is installed. Deploy-before-merge: rsync to
secrev+ coordinator restart (schema v2 table created on nextsetup) before merge.