From e240cd551335e7a3ae087e78dd41fa4a1f6be2fc Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 11 Nov 2026 03:54:31 -0500 Subject: [PATCH 1/2] Keep Activity log Kind callers compatible with quota history The issue-1994 merge into main added base_ci_skipped alongside the quota History selector. Preserve the Kind-based activity_write interface so that clean textual merge compiles, while named Process quota waits still select their own history. Fixes #2012. --- src/logs/recording.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/logs/recording.rs b/src/logs/recording.rs index 42eeb431..3e7e6b26 100644 --- a/src/logs/recording.rs +++ b/src/logs/recording.rs @@ -195,7 +195,7 @@ impl Record { self.activity_write( root, &format!("{} warning: {warning}", Kind::UserConfig), - Some(History::Kind(Kind::UserConfig)), + Some(Kind::UserConfig), ); } } @@ -393,7 +393,7 @@ impl Record { self.activity_write( &self.root(repo), &format!("{kind} skipped: {reason}"), - Some(History::Kind(kind)), + Some(kind), ); } @@ -416,7 +416,7 @@ impl Record { } else { History::Kind(Kind::Process) }; - self.activity_write( + self.activity_write_with_history( &root, &format!("Process {name} skipped: {reason}"), Some(history), @@ -822,7 +822,16 @@ impl Record { } } - fn activity_write(&mut self, root: &Path, line: &str, unless_last_of: Option>) { + fn activity_write(&mut self, root: &Path, line: &str, unless_last_of: Option) { + self.activity_write_with_history(root, line, unless_last_of.map(History::Kind)); + } + + fn activity_write_with_history( + &mut self, + root: &Path, + line: &str, + unless_last_of: Option>, + ) { let appended = self.activity_append(&root.join(activity::FILE), line, unless_last_of); if let Err(error) = appended && !self.activity_warned From e953947b6910b39884c502a4ad7a9b7ee1118c10 Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 11 Nov 2026 04:14:31 -0500 Subject: [PATCH 2/2] Wait for observed GitHub state after quota reset Quota warnings expire with the clock before the background read necessarily completes. The CI regression raced that expiry against the GraphQL call-count assertion. Change the fake pull request to merged and wait for its Console row to reach Resolved, keeping the pre-reset no-read check and resumed-read assertion intact. --- tests/console/github.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/console/github.rs b/tests/console/github.rs index 046812c5..1239ed01 100644 --- a/tests/console/github.rs +++ b/tests/console/github.rs @@ -611,13 +611,12 @@ fn console_and_status_share_both_quota_reserves_and_resume_at_reset() { ); gh["rate_limits"][resource]["remaining"] = json!(5000); scenario.write_gh_state(&gh); + pr_is(&scenario, "MERGED"); let mut stream = events(&console); - loop { - assert!(sse_event(&mut stream).contains("event: commands")); - if !console.get("/").text().unwrap().contains(description) { - break; - } - } + // The warning expires with the clock; the row moves only after the + // background read resumes and observes the merged pull request. + wait_for(&console, &mut stream, "resolved"); + assert!(!console.get("/").text().unwrap().contains(description)); assert!(scenario.gh_calls_of("api", "graphql").len() >= 2); drop(stream); drop(console);