chadtmiller.com/knotless

Git hosted in your atproto account, on any stock PDS, fast enough for agents.

git clone knotless://chadtmiller.com/knotless

needs the knotless git helper. set it up

Tests: agents edit a pull and take a comment back

chadtmiller.com committed on Oct 22, 2026 parent 9a16a61 commit 257d1a8
Showing 1 changed file with 46 additions and 0 deletions
crates/knotless-mcp/tests/mcp.rs+46−0
@@ -522,6 +522,45 @@ fn agents_fork_review_and_merge() {
);
assert!(err, "{text}");
// Its author changes what a pull or a comment says, and takes a
// comment back.
let edited = c.json(
"edit_item",
json!({"repo": repo, "uri": pull, "title": "Add b, please", "body": "smaller"}),
);
assert_eq!(edited["edited"], pull);
let said = c.json(
"comment",
json!({"repo": repo, "uri": pull, "body": "one more"}),
)["uri"]
.as_str()
.unwrap()
.to_string();
c.json(
"edit_item",
json!({"repo": repo, "uri": said, "body": "one more thing"}),
);
wait_until(|| {
let shown = o.json("show_item", json!({"repo": repo, "uri": pull}));
let comments = shown["comments"].as_array().unwrap().clone();
shown["item"]["title"] == "Add b, please"
&& shown["item"]["body"] == "smaller"
&& comments
.iter()
.any(|x| x["body"] == "one more thing" && x["updatedAt"].is_string())
});
assert_eq!(
c.json("delete_comment", json!({"repo": repo, "uri": said}))["deleted"],
said
);
wait_until(|| {
o.json("show_item", json!({"repo": repo, "uri": pull}))["comments"]
.as_array()
.unwrap()
.len()
== 1
});
// Before merging: what it brings in, that it merges, and the review.
let shown = o.json("show_item", json!({"repo": repo, "uri": pull}));
assert_eq!(shown["compare"]["mergeable"], "fast-forward");
@@ -637,6 +676,13 @@ fn agents_fork_review_and_merge() {
"show_item",
json!({"repo": repo, "uri": "at://did:plc:nobody/dev.knotless.issue/x"}),
),
// Only its author changes what a pull says, and a pull is closed,
// not deleted.
(
"edit_item",
json!({"repo": repo, "uri": pull, "title": "x"}),
),
("delete_comment", json!({"repo": repo, "uri": issue})),
] {
let (text, err) = o.call(tool, args.clone());
assert!(err, "{tool} {args}: {text}");