diff --git a/plan/module-layout.md b/plan/module-layout.md index 0649c63..24c99c7 100644 --- a/plan/module-layout.md +++ b/plan/module-layout.md @@ -40,22 +40,23 @@ call sites are named wrappers whose doc comments say what each one's nested argues it. If the pull half ever merges a second account's statuses it needs the instant compare, and that is the change to make, not the sharing -- [ ] Two doc comments in the read half are attached to the wrong item, both - found by the split and both deliberately moved as they were rather than - fixed inside a move. `append_backfilled`'s paragraph — "Splice scraped - pulls into a merged listing", which describes an append and says why - `indexed` stays false — sits on top of `apply_backfill_states`, whose - own doc runs on underneath it in the same block, so the function it - describes has none. And in the tests, "The observation this whole - change is built on, as it stood on" is a half-sentence stranded above - `builds_a_repo_url_from_the_label_it_already_had`, which it says - nothing about; it is a fragment of the `-- the staleness evidence --` - section's opening, and the separator now sits in `sources.rs` with the - tests it heads while the fragment went to `labels.rs` with the test it - is stuck to ## Done +- [x] Two doc comments in the read half were attached to the wrong item, + both found by the split that moved them and both moved as they were + rather than fixed inside a move. `append_backfilled`'s paragraph — the + one describing an append and saying why `indexed` stays false — sat on + top of `apply_backfill_states`, whose own doc ran on underneath it in + the same block, so the function it described had none. Each is over + its own function now. The other was a half-sentence, "The observation + this whole change is built on, as it stood on", stranded above + `builds_a_repo_url_from_the_label_it_already_had` in `labels.rs`: a + fragment of the `-- the staleness evidence --` section's opening, whose + separator went to `sources.rs` with the tests it heads and reads + completely without it. Deleted rather than reunited, since there is + nothing left for it to open + - [x] One backwards walk over a subject's records, not two. `cmd/issue/read.rs`'s `state_events_for` and `cmd/pr/write.rs`'s `list_statuses` were the same function — page `listRecords` diff --git a/src/cmd/pr/read/labels.rs b/src/cmd/pr/read/labels.rs index 39607ef..9c5d26c 100644 --- a/src/cmd/pr/read/labels.rs +++ b/src/cmd/pr/read/labels.rs @@ -383,7 +383,6 @@ mod tests { assert_eq!(owner_and_name(bad), None, "input: {bad}"); } } - /// The observation this whole change is built on, as it stood on /// The label both repo lookups produce, turned into the root the pull /// listings hang off. The `@` is for a reader and is not in the path. #[test] diff --git a/src/cmd/pr/read/sources.rs b/src/cmd/pr/read/sources.rs index d48fd87..ed3fde5 100644 --- a/src/cmd/pr/read/sources.rs +++ b/src/cmd/pr/read/sources.rs @@ -1158,13 +1158,6 @@ async fn backfill_web_url(repo_did: &str) -> Option { Some(appview_url(&label)) } -/// Splice scraped pulls into a merged listing. -/// -/// The mirror of [`merge`]'s Bobbin arm, minus the join: [`crate::clients::tangled::web::backfill`] -/// only returns pulls the listing does not already have, so every one is an -/// append. `indexed` stays false — these rows are exactly the ones Bobbin -/// does not know, and saying otherwise would corrupt the staleness evidence -/// if anything ever read the flag after the merge. /// Fill `?` states with what the backfill walk learned in passing. /// /// The walk proves a probed pull is already known by resolving its at-uri, @@ -1181,6 +1174,13 @@ fn apply_backfill_states(items: &mut [Listed], states: &HashMap, extra: Vec) { for item in extra { let Some(uri) = item["uri"].as_str().map(String::from) else {