Skip to content

Add central run-enrichment workflow #4

Closed

Description

@neuromechanist

Centralizes the per-repo llm-enrichment.yml (currently shipped to 123 dataset repos) into a single shared workflow on this repo. Pairs with Phase 1 of epic nemarOrg/nemar-cli#601 (sub-issue nemarOrg/nemar-cli#602).

Workflow

.github/workflows/run-enrichment.yml

  • Triggers
  • Inputs / client_payload: dataset_id (required), ref (default main), force (bool, default false)
  • Steps
    • Mint per-repo App installation token via actions/create-github-app-token@v1 with repositories: ${{ ...dataset_id }} so the token is least-scope per run
    • Check out the target dataset repo at the given ref (not .github itself)
    • POST https://api.nemar.org/webhooks/llm-enrich with the retry contract from feat(workflow): retry HTTP 5xx and fail loud in llm-enrichment.yml nemarOrg/nemar-cli#599: 3 attempts, 5s/10s/15s linear backoff, 4xx terminal (with 401 carved out for token rotation), exit 1 on persistent failure
    • If response client_commits: true: write .nemar/metadata.json + update .bidsignore, commit as nemar-publish-bot, push with git pull --rebase retry loop

Operator-facing semantics are identical to today's per-repo workflow; only the location and trigger source change.

Ship order

  1. (this PR) Land workflow — idle until the Worker dispatcher lands.
  2. (nemar-cli#602) Worker /webhooks/github + dispatcher.
  3. Configure App webhook URL to api.nemar.org/webhooks/github.
  4. Strip per-repo llm-enrichment.yml from all 123 dataset repos.

Test plan

After merge:

gh workflow run run-enrichment.yml --repo nemarDatasets/.github -f dataset_id=nm099999 -f force=true
gh run watch
curl https://api.nemar.org/datasets/nm099999 | jq .dataset.enrichment_json

Activity

  1. added a commit that references this issue on May 23, 2026
    eb302e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions