Skip to content

RAG-4: Automated doc refresh via scheduled CI #69

Description

@nonogv

Context

Depends on #66 (RAG-1). Part of the v2 RAG milestone.

What

Add a scheduled GitHub Actions workflow that keeps data/live-docs.json current without manual intervention.

File: .github/workflows/refresh-live-docs.yml

```yaml
on:
schedule:
- cron: '0 4 * * 1' # every Monday 04:00 UTC
workflow_dispatch: # manual trigger from Actions tab
```

Workflow steps:

  1. Checkout repo
  2. npm ci
  3. npm run scrape-docs
  4. If data/live-docs.json or data/live-docs-diff.json changed:
    • Open a PR: title chore: refresh Live docs index (YYYY-MM-DD)
    • PR body: populated from data/live-docs-diff.json (added/removed/updated/unchanged)
    • Auto-assign repo owner as reviewer
  5. If nothing changed: exit cleanly — no PR, no noise
  6. If scraper exits non-zero: mark workflow as failed (GitHub sends default failure notification)

Stale index fallback (for fork builds):

src/agent/docs-index.ts already exports isDocIndexStale() (from RAG-2). The UI shows a dismissible diagnostic message when it returns true and data/live-docs.json exists. This only affects developers running from a stale fork; packaged .vsix builds always ship with the index current at release time.

Resilience note

The scraper should keep old chunks rather than deleting them when a page returns 404 — log a warning instead. A single ableton.com restructure should not silently wipe the index on a Monday.

Acceptance criteria

  • Workflow runs on schedule and on workflow_dispatch
  • A PR is opened only when content has changed
  • PR body shows the diff summary from data/live-docs-diff.json
  • A scraper failure marks the workflow run as failed
  • Old chunks are preserved (not deleted) when their source page returns 404

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper experience / toolingenhancementNew feature or requestv2v2 power features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions