~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

createCommit holds linear branches, and backfill reads redirects

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/small-fixes

What changes

createCommit now refuses what pushRefs refuses for a linear rule: a new branch under it, committed from a base with merge commits in its history, gets 403 protected branch: no merge commits; squash or rebase. Backfill now reads redirect records. The serve module comment says what serve holds. knotless-run refuses --batch above 64.

Why

Fixes createCommit can start a linear-protected branch with merge commits

Part of knotless-serve: quirks in backfill, labels and caches (its first item, and the stale comment), and of Merge queue: quirks in batching and landing (the --batch cap). Neither is fully fixed.

How it was checked

The gateway test commits to a new linear release branch from a base with a merge and sees the refusal. The runner's argument test covers 64 and 65. CI runs the rest.

Shortcomings

knotless-run: a container or overlay that fails to start says "see the log", but no log is uploaded is not touched: a log for a failed container start needs a docker stand-in through a whole run to be covered.

Changeset: none

Approved

This does four things. createCommit now runs the same gateway::refusal check as pushRefs before it pushes. A new branch under a linear rule is refused with 403 protected branch: no merge commits; squash or rebase when its base has merge commits in its history. Backfill now lists the redirect collection. The serve module comment says what serve holds. --batch above 64 is refused.

I found nothing that must change:

  • On an existing branch the commit has one parent and descends from the tip, so the new check passes it. refusal also repeats the queue check the gateway already makes, with the same outcome.
  • The check runs in each rebuild round, so a branch that moved between rounds is checked again.
  • index.rs already handles REDIRECT records, so adding the collection to indexed_collections is enough for backfill to read them.
  • The gateway test covers the new refusal. The runner's argument test covers 64 and 65.
  • The pull changes the gateway design page and the CLI reference with the code. Changeset: none fits, since it changes nothing in crates/knotless/src.

I didn't read the check results. The redirect backfill has no test of its own, which I think is acceptable for a one-line change to a list. The hard-coded 64 in the --batch error message duplicates MAX_BATCH, which is minor.

Merged as 1161a90
Merging this pull closed these issues