Repo activity: the test mind answers a quiet forge; public surface and ages follow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
323522a3d6
commit
befb2174aa
3 changed files with 10 additions and 4 deletions
|
|
@ -4674,7 +4674,7 @@ fn polls_inside_the_interval_ask_nothing() {
|
|||
/// A read that fails keeps the cursor: the next one asks the same `after`, and nothing is lost or told twice. Her chat goes on.
|
||||
#[test]
|
||||
fn a_failed_activity_read_keeps_the_cursor() {
|
||||
let rig = stewarding_rig(4);
|
||||
let rig = stewarding_rig(8);
|
||||
let push = event(150, "GameCult/Huginn", "nibu", RepoChange::Pushed { commits: 1 });
|
||||
let forged = Forged::over(&rig.mind, vec![activity(100, vec![]), None, activity(150, vec![push])]);
|
||||
let lines = live_session(&rig, &forged, PAST_THE_REPO_READ_MS, true, 4);
|
||||
|
|
@ -4689,7 +4689,7 @@ fn a_failed_activity_read_keeps_the_cursor() {
|
|||
/// by a later read that tells nothing of what it finds (that passed unread, and shows on the next first line).
|
||||
#[test]
|
||||
fn a_failed_first_read_does_not_fail_the_session() {
|
||||
let rig = stewarding_rig(3);
|
||||
let rig = stewarding_rig(8);
|
||||
let passed = vec![event(60, "GameCult/Huginn", "nibu", RepoChange::Pushed { commits: 4 })];
|
||||
let forged = Forged::over(&rig.mind, vec![None, activity(70, passed), activity(80, vec![event(80, "GameCult/Huginn", "void", RepoChange::Pushed { commits: 1 })])]);
|
||||
let lines = live_session(&rig, &forged, PAST_THE_REPO_READ_MS, true, 4);
|
||||
|
|
@ -4705,7 +4705,7 @@ fn a_failed_first_read_does_not_fail_the_session() {
|
|||
#[test]
|
||||
fn a_first_line_shows_wear_after_her_responsibilities() {
|
||||
let rig = stewarding_rig(2);
|
||||
let now = 1_700_000_000_000_u64;
|
||||
let now = unix_ms(at(0));
|
||||
let pr = |number, author: &str, hours: u64| huginn_mind::OpenPr { repo: "GameCult/Huginn".into(), number, author: Short(author.into()), updated_at: now - hours * 3_600_000 };
|
||||
let read = RepoActivity {
|
||||
head: 100,
|
||||
|
|
|
|||
|
|
@ -202,6 +202,11 @@ impl MindPort for TestMind {
|
|||
Ok(page)
|
||||
}
|
||||
|
||||
/// A forge with nothing new in it: the daemon with a healthy forge and a quiet org.
|
||||
fn stewarded_activity(&self, _repos: &[huginn_mind::eureka_pipeline::OrgRepo], after: Option<u64>) -> Result<huginn_mind::RepoActivity> {
|
||||
Ok(huginn_mind::RepoActivity { head: after.unwrap_or(0), events: vec![], more: false, open_prs: vec![], unseen: vec![] })
|
||||
}
|
||||
|
||||
fn admit(&self, agent: &str, session: &str, documents: Vec<PipelineDocument>) -> Result<PipelineAdmissionOutcome> {
|
||||
self.now.set(self.now.get() + Duration::seconds(1));
|
||||
let batch = PipelineAdmissionBatch {
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ mind_body::persona: impl Sender
|
|||
mind_body::persona: impl Shown
|
||||
mind_body::persona: impl Trace for FileTrace
|
||||
mind_body::persona: impl Trace for Noted < '_ >
|
||||
mind_body::persona: impl WearFact
|
||||
mind_body::persona: impl fmt :: Display for Failure
|
||||
mind_body::persona: impl fmt :: Display for Outcome
|
||||
mind_body::persona: impl< C : ControlSource , S : ControlSource > PersonaInbox < '_ , C , S >
|
||||
|
|
@ -209,7 +210,7 @@ mind_body::queue: impl HuginnMind < 'static >
|
|||
mind_body::queue: impl HuginnMind < 'static >: fn new (client : HuginnClient) -> Self
|
||||
mind_body::queue: impl MindPort for HuginnMind < '_ >
|
||||
mind_body::queue: impl< 'a > HuginnMind < 'a >
|
||||
mind_body::queue: pub trait MindPort { fn instance (& self) -> & Slug ; fn query (& self , selection : & Selection) -> Result < PipelineSelectionPage > ; fn query_near (& self , _selection : & Selection , _text : & str , _top_k : u32) -> Result < PipelineSelectionPage > { bail ! ("this mind port has no semantic index") } fn admit (& self , agent : & str , session : & str , documents : Vec < PipelineDocument >) -> Result < PipelineAdmissionOutcome > ; }
|
||||
mind_body::queue: pub trait MindPort { fn instance (& self) -> & Slug ; fn query (& self , selection : & Selection) -> Result < PipelineSelectionPage > ; fn query_near (& self , _selection : & Selection , _text : & str , _top_k : u32) -> Result < PipelineSelectionPage > { bail ! ("this mind port has no semantic index") } fn stewarded_activity (& self , _repos : & [OrgRepo] , _after : Option < u64 >) -> Result < RepoActivity > { bail ! ("this mind port has no forge to read") } fn admit (& self , agent : & str , session : & str , documents : Vec < PipelineDocument >) -> Result < PipelineAdmissionOutcome > ; }
|
||||
mind_body::queue: struct Held # [derive (Clone , Debug , PartialEq , Eq)] pub-fields[]
|
||||
mind_body::queue: struct HuginnMind< 'a > pub-fields[]
|
||||
mind_body::recall: impl Lane
|
||||
|
|
|
|||
Loading…
Reference in a new issue