Skip to content

feat: distinguish dataset-exists vs stale-branch conflicts in proposals - #395

Merged
eu-lee merged 1 commit into
feat/proposal-github-cleanupfrom
feat/proposal-override-logic
Aug 9, 2026
Merged

feat: distinguish dataset-exists vs stale-branch conflicts in proposals#395
eu-lee merged 1 commit into
feat/proposal-github-cleanupfrom
feat/proposal-override-logic

Conversation

@Scr4tch587

Copy link
Copy Markdown
Collaborator

`propose_dataset()` gains an `override: bool = False` parameter and a new `StaleProposalConflictError`.

Why: right now any existing `add-dataset/-` branch is treated identically whether the dataset is genuinely already registered or the branch is just a leftover from an earlier, closed/abandoned proposal for the same name+version. That permanently blocks re-proposing a name after a test PR gets closed without its branch being deleted.

What changed:

  • dataset genuinely already registered → still `ProposalConflictError`, hard block, no override possible
  • branch exists but the dataset was never registered → now `StaleProposalConflictError` (carries `branch` and `open_pr_url`), which is recoverable
  • `override=True` closes the stale PR (if one is still open) and deletes the branch before retrying the proposal once; a second conflict after that (e.g. a race) falls back to a hard `ProposalConflictError`

Benefit: unblocks re-testing/re-proposing a dataset name whose earlier proposal PR was closed without deleting the branch, once the API/UI layers (next PRs in the stack) let a caller confirm and pass `override=True`.

propose_dataset() gains an override flag. dataset-already-registered
stays a hard, non-overridable ProposalConflictError. a branch-exists
conflict now raises StaleProposalConflictError instead (carries the
open PR url if one exists) -- with override=True, the stale PR is
closed and the branch deleted before retrying the proposal once.
@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.

2 participants