Skip to content

feat: accept override flag on POST /datasets, shape conflict responses - #396

Open
Scr4tch587 wants to merge 1 commit into
feat/proposal-override-logicfrom
feat/proposal-override-api
Open

feat: accept override flag on POST /datasets, shape conflict responses#396
Scr4tch587 wants to merge 1 commit into
feat/proposal-override-logicfrom
feat/proposal-override-api

Conversation

@Scr4tch587

Copy link
Copy Markdown
Collaborator

Wires the `override` param from the previous PR through the API layer.

What changed:

  • `DatasetProposalIn` gains an `override: bool = False` field, passed through to `propose_dataset(..., override=payload.override)`
  • `StaleProposalConflictError` now maps to a 409 with a structured body: `{"detail": "...", "conflict_type": "stale_branch", "open_pr_url": "..." | null}`
  • the existing dataset-already-registered `ProposalConflictError` also gets `conflict_type: "dataset_exists"` for consistency, but no `open_pr_url` (nothing to show — it's a hard block)

Why: the frontend (next PR) needs a way to tell "this name is permanently taken" apart from "this name is blocked by a leftover branch you can clear," so it only offers a confirm-and-override dialog on the recoverable case.

Benefit: the API surface is ready for the frontend confirm dialog. No user-facing behavior change yet — `override` defaults to `false`, so existing callers see identical responses except for the new `conflict_type`/`open_pr_url` fields alongside the existing `detail`.

wires the propose_dataset override param through the api and gives the
409 body a conflict_type field ("dataset_exists" vs "stale_branch")
plus open_pr_url on the stale case, so the frontend can tell a hard
block apart from a recoverable conflict it can offer to clear.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

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.

1 participant