feat: dataset proposal service and endpoint#384
Open
Scr4tch587 wants to merge 3 commits into
Open
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This was referenced Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
`POST /api/v1/datasets` — submit a dataset proposal; the server validates it and opens a GitHub PR adding `builders/scripts///` (config.toml, builder.py, optional requirements.txt / .env.template). Nothing is written to the server's own scripts dir; the dataset goes live only after review + merge + restart.
Validation before any PR opens (`core/service/proposals.py`):
PR shape: branch `add-dataset/-`, single commit, title `feat: add dataset /`, body with field table + review checklist (including the manual-`.env` step for `env-vars` datasets — secrets are never committed, only `.env.template`). Reviewers auto-requested from `GITHUB_REVIEWERS` (default `Blackgaurd,Scr4tch587`).
Error mapping: 400 invalid submission (message safe to show in the form) · 409 dataset exists or proposal already open · 502 GitHub unreachable/misconfigured.
Deps/config: `ruff` added as a server runtime dependency (for the lint step); `GITHUB_TOKEN` / `GITHUB_REPO` / `GITHUB_REVIEWERS` documented in `infra/.env.template`.
Why
Lead-approved design: dataset creation must go through code review, not direct server writes — uploading a builder script is uploading code that executes on the server. This endpoint automates everything up to the human gate.
Benefit
A submission that passes this endpoint cannot fail CI or break server startup: the committed config is byte-identical to what was validated, the script is pre-linted, and the CI gate (#380) re-verifies on the PR. E2E-tested against a fake GitHub server and the real API.
🤖 Generated with Claude Code