chadtmiller.com/knotless
git that lives in your Atmosphere account
The feed leaves out what a repository's bots say and push
MergedThis pull filters the accounts in KNOTLESS_BOT_DIDS out of getFeed (everyone's and followed) in the SQL for recent and pushes. Accounts that KNOTLESS_ADMIN_DIDS also names are not treated as bots. A bot's own actor= feed is unfiltered. A bot's merged state is shown as whoever's queued record stands for the pull. The deploy list gains the reviewer and the runner host, and the docs, lexicon description and changeset are updated.
I found no bugs. Filtering in the queries keeps pages full, and the cursor paging is unaffected. Because quiet is empty when by is set, a bot's own feed still holds everything. shown_by falls back to the bot when nothing is queued, and the unit tests cover that.
Two things to know, neither blocking:
- The
recentfilter keeps onlydev.knotless.staterecords from a bot, so pulls and issues a bot opens are hidden too, not just comments. That fits the docs ("only the pulls they merged"), but the PR body says "comments and pushes". eventsnow buildsassembled(...)for every repository in the page, where it used to callforge(...). Ifassembledisn't cached, that adds cost per feed request. I didn't check how heavy it is.
I didn't run CI.
This round moves "bot" from the operator's KNOTLESS_BOT_DIDS list to what each repository's record names. A bot is a runner or triager that is neither the owner nor a collaborator. The SQL uses a new bot_on helper, and shown_by uses the repo record. I like the direction and found no logic bug in bot_on.
The change does not compile, though. The &[] → false rewrite was applied to calls where &[] was not the quiet argument:
keep_profile(did, records: &[(String, String, Value)])now getsfalse.heard(&index, "did:c", false)is passed where the third argument is the orgs slice. The same helper is called with&orgsa few lines above.said("2026-02-01T00:00:00Z", None, false)is a similar case.- In
tests/forge.rs,branch("g2", false)is passed where the closure takesfiles: &[&str].
Please revert those to &[] and change only the recent and pushes calls. CI had not finished when I looked, so a local cargo test would show any others.
Smaller points:
- The deploy README and
cli.mdno longer say thatKNOTLESS_BOT_DIDSaffects the feed, which is right. But the PR body still describes the old behaviour: the env var, the reviewer joining the list, and the admin exemption. The reviewer and the runner host will now leave the front page only if a repository names them as runners or triagers, and the body doesn't say so. Please update the body. - The
bot_onSQL runsjson_eachover the repo's JSON for every candidate row, and again forpushes. That should be fine at theLIMITsizes in use, but it's worth a glance at the query plan.
crates/knotless-serve/tests/forge.rsline 981Outdated
branch("g", &["g"]); | |
let add_g = pull("main", "g", "Add g"); | |
ok(&owner, &["merge", &url, &add_g]); | |
branch("g2", false); |
branch takes files: &[&str], so false won't compile. This should stay &[].
crates/knotless-serve/src/index.rsline 4452Outdated
let kept = [(nsid::BSKY_LINK.to_string(), "l".to_string(), link)]; | |
assert_eq!(index.profile("did:a").unwrap(), Some(kept.to_vec())); | |
// Read again, it is all there is. | |
index.keep_profile("did:a", false).unwrap(); |
keep_profile takes &[(String, String, Value)], not a bool. This should stay &[].
crates/knotless-serve/src/index.rsline 3797Outdated
index.put("did:b", nsid::PULL, "1", &pull).unwrap(); | |
index.put("did:b", nsid::ISSUE, "2", &issue).unwrap(); | |
// A collaborator, of the one repository and not the other. | |
assert_eq!(heard(&index, "did:c", false), [("pull".into(), true)]); |
The third argument of heard is the orgs slice (see heard(&index, "did:m", &orgs) below). false doesn't compile here. The same applies to the other heard(..., false) calls and to the said(..., None, false) call further down, so those should be &[].
This pull keeps a repository's runners and triagers out of the everyone and following feeds. It filters in the SQL for recent and pushes through the new bot_on helper, so pages stay full. Owners and collaborators are never treated as bots. A runner's merged state is shown as whoever queued the pull, through shown_by. A bot's own actor= feed is unfiltered, because quiet is off when by is set.
The compile errors from my last round are fixed. Only the recent and pushes calls take the new quiet argument, and calls such as keep_profile(..., &[]) keep their slices.
I read the SQL, the parameter binding, shown_by and the new tests and found no bugs. The tests cover an owner and a collaborator that are also named as runners. They also cover a merge shown as whoever queued it, and the cases where nothing was queued or the pull left the queue.
CI was still running when I looked: test, web and shots were queued and docs had passed. I did not see the Rust tests run, so wait for test before landing.
8 passed, 1 skipped
What changes
The feed leaves out a repository's bots.
getFeedfor everyone, and for whom one follows, no longer holds what a repository's bots said or pushed on it: the runners and triagers its record names, but its owner and collaborators, who are people a bot may act as. That holds for anyone's runners, read from their repositories' records, with nothing for an operator to set. A bot's own feed (actor=) still holds everything it did.A merge the queue landed is shown as whoever queued it. A runner's
mergedstate is kept, credited to the account whosequeuedrecord stands for the pull; with none, it stays the runner's.Why
Of the last 60 events on knotless.dev, 17 were review.knotless.dev restating pulls already in the feed as opened, and the runner's batch landing added a push to main, a deleted branch and a merge under its own name. What a bot says belongs on the pull and in notifications. The filter is in the index's queries, so a page stays full.
An operator's list (
KNOTLESS_BOT_DIDS) was tried first, but it covers only knotless.dev's bots, and on prod it names the owner, as the queue runner's account.How it was checked
Index tests for
recentandpushesquiet, with an owner and a collaborator named as runners kept; a unit test for who a merge is shown as. The rest is left to CI.Shortcomings
A reviewer is named in no repository's record, so review.knotless.dev's reviews still show: a
botfield an account sets on itsdev.knotless.profileis the next pull. A runner that is a public member of the owner's organization, but no collaborator, counts as a bot.