Skip to content

feat: add discussion-janitor to close stale AI report discussions#43377

Closed
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/deep-report-lock-archive-old-discussions
Closed

feat: add discussion-janitor to close stale AI report discussions#43377
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/deep-report-lock-archive-old-discussions

Conversation

Copilot AI commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

The discussions corpus is dominated by ephemeral daily/weekly AI-generated reports (audits, daily news, per-agent status) that accumulate indefinitely, diluting signal and increasing corpus size for downstream agents like DeepReport.

New workflow: discussion-janitor

  • Schedule: runs daily; also supports workflow_dispatch
  • Pre-step: queries GitHub GraphQL for open discussions, filters to those that are all of:
    • older than 14 days
    • in an ephemeral category (audits, reports, daily-news)
    • body contains > AI generated by / > Generated by …actions/runs… marker
  • Agent: reads pre-filtered JSON, emits close_discussion JSONL (reason: OUTDATED) for each; calls noop when corpus is already clean
  • Safe output: close-discussion with target: "*", capped at 50 per run

Protected categories (never touched): Q&A, General, Dev, Announcements, Ideas.

safe-outputs:
  close-discussion:
    target: "*"
    max: 50
  noop:

The jq filter requires both the AI body marker and an ephemeral category — neither alone is sufficient — preventing accidental closure of human-authored content in targeted categories.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jul 4, 2026
Copilot AI and others added 2 commits July 4, 2026 11:24
…sions

Adds a new lightweight scheduled workflow that closes ephemeral
AI-generated daily/weekly report discussions older than 14 days.

- Targets categories: audits, reports, daily-news
- Identifies AI-generated content via "> AI generated by" / "> Generated by" body markers
- Closes up to 50 discussions per run with OUTDATED resolution
- Protects durable categories (Q&A, General, Dev, Announcements, Ideas)
- Runs daily via schedule; also supports workflow_dispatch

Closes #43220

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…anitor

- Remove redundant OR clause in the jq select filter; require both the
  AI body marker AND an ephemeral category (audits/reports/daily-news)
- Remove the contradictory step 4 noop instruction; step 2 already
  covers the empty-file case unambiguously

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to lock/archive discussions older than 14 days feat: add discussion-janitor to close stale AI report discussions Jul 4, 2026
Copilot AI requested a review from pelikhan July 4, 2026 11:27
@pelikhan pelikhan closed this Jul 4, 2026
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.

[deep-report] Lock/archive daily-report GitHub Discussions older than 14 days

2 participants