chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
private_repositories_indexed_here looks for its private repository alone
crates/knotless-serve/tests/gateway.rs+6−18
| @@ -3571,33 +3571,21 @@ fn private_repositories_indexed_here() { | ||
}; | ||
wait_until(named); | ||
let newcomer_in = session_cookie(&server, &newcomer.account); | ||
// Its private one, by owner and name: the test PDS's other accounts make | ||
// public repositories called kept too, which the search finds as well. | ||
let search = format!("{}/xrpc/dev.knotless.listRepos?q=kept", server.base); | ||
let finds = || { | ||
server.app.discovered.lock().unwrap().clear(); | ||
looked(&search, Some(&newcomer_in)).3.contains("\"kept\"") | ||
let said: Value = serde_json::from_str(&looked(&search, Some(&newcomer_in)).3).unwrap(); | ||
let mut repos = said["repos"].as_array().unwrap().iter(); | ||
repos.any(|r| r["did"] == did.as_str() && r["name"] == "kept" && r["private"] == true) | ||
}; | ||
wait_until(finds); | ||
run( | ||
&owner, | ||
&["repo", "share", &url, &newcomer.account.handle, "--undo"], | ||
); | ||
// Now and then this waits past its time on the runner, never here: so | ||
// as it gives up, what the space's authority says to them now, and | ||
// what this server still lists to them. | ||
let until = std::time::Instant::now() + Duration::from_secs(60); | ||
while finds() { | ||
if std::time::Instant::now() > until { | ||
let ctx = knotless_serve::login::ctx_for(&server.app, &newcomer.account.did); | ||
let asked = rt.block_on(knotless::space::joined(&ctx, &space)).map(drop); | ||
let reads = index.read_of(&newcomer.account.did); | ||
let session = rt.block_on(knotless::session::me(&ctx)).map(|me| me.did); | ||
panic!( | ||
"listed to the newcomer 60s after the share was undone: its authority says {asked:?}, \ | ||
they read {reads:?} here, and their session is {session:?}" | ||
); | ||
} | ||
std::thread::sleep(Duration::from_millis(100)); | ||
} | ||
wait_until(|| !finds()); | ||
| ||
let owner_in = session_cookie(&server, &owner.account); | ||
let listed = format!( | ||
harness/quarantine.json+0−6
| @@ -17,12 +17,6 @@ | ||
"test": "background_compaction_after_push", | ||
"until": "2026-11-14" | ||
}, | ||
{ | ||
"net": "spaces", | ||
"binary": "gateway (test)", | ||
"test": "private_repositories_indexed_here", | ||
"until": "2026-11-21" | ||
}, | ||
{ | ||
"net": "spaces", | ||
"binary": "gateway (test)", | ||