Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
139a887c24 |
No files matched your search
@@ -26,8 +26,7 @@ use rhema_autonomous_agent::{Source, SourceError, async_trait};
|
|||||||
use rhema_forge_integration::forge_key_fn;
|
use rhema_forge_integration::forge_key_fn;
|
||||||
use rhema_forge_integration::triage::{self, Triage};
|
use rhema_forge_integration::triage::{self, Triage};
|
||||||
use rhema_forge_integration::{
|
use rhema_forge_integration::{
|
||||||
Forge, GitHubForge, GitLabForge, GiteaForge, Notification, RepoRef, Timestamp, Watcher,
|
Forge, GitHubForge, GitLabForge, GiteaForge, Notification, Watcher, register_forge,
|
||||||
register_forge,
|
|
||||||
};
|
};
|
||||||
use rhema_identity::{IdentityStore, SecretKind};
|
use rhema_identity::{IdentityStore, SecretKind};
|
||||||
use rhema_rsd::{Clock, Dispatcher, Event, KeyFn, SystemClock};
|
use rhema_rsd::{Clock, Dispatcher, Event, KeyFn, SystemClock};
|
||||||
@@ -316,14 +315,7 @@ impl Source for ForgeSource {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
let client = self.client_for(&record);
|
let client = self.client_for(&record);
|
||||||
let since = self.cursor_for(&record)?;
|
let polled = self.watcher.poll(client.as_ref(), &repo).await;
|
||||||
let polled = self
|
|
||||||
.watcher
|
|
||||||
.poll_since(client.as_ref(), &repo, Some(&since))
|
|
||||||
.await;
|
|
||||||
if polled.is_ok() {
|
|
||||||
self.persist_cursor(&record, &repo)?;
|
|
||||||
}
|
|
||||||
// Health first, whatever the outcome: a watch that has been
|
// Health first, whatever the outcome: a watch that has been
|
||||||
// failing since it was created must be able to say so.
|
// failing since it was created must be able to say so.
|
||||||
self.record_poll(
|
self.record_poll(
|
||||||
@@ -374,44 +366,6 @@ impl Source for ForgeSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ForgeSource {
|
impl ForgeSource {
|
||||||
/// The cursor one repo watch polls from: the durable one when it has
|
|
||||||
/// one, and otherwise a seed at *now*, written before the poll so a
|
|
||||||
/// forge that is down cannot walk the start line forward on every pass
|
|
||||||
/// and lose the news arriving in between.
|
|
||||||
///
|
|
||||||
/// A watch reports news, and a repository's history is not news.
|
|
||||||
/// Replaying it meant one dispatch per old thread — and, from the
|
|
||||||
/// handler, one comment posted on each. An unreadable cursor reads as
|
|
||||||
/// absent: a corrupted row must not fire a backlog either.
|
|
||||||
fn cursor_for(&self, record: &WatchRecord) -> Result<Timestamp, SourceError> {
|
|
||||||
let stored = self
|
|
||||||
.store
|
|
||||||
.cursor(SCOPE_REPO, &record.forge, &record.repo)
|
|
||||||
.map_err(|err| SourceError::Backend(format!("watch store: {err}")))?;
|
|
||||||
if let Some(since) = stored.as_deref().and_then(Timestamp::parse) {
|
|
||||||
return Ok(since);
|
|
||||||
}
|
|
||||||
let now = Timestamp::from_epoch_millis(SystemClock.now_millis() as i64)
|
|
||||||
.ok_or_else(|| SourceError::Backend("cannot spell this instant".to_owned()))?;
|
|
||||||
self.store
|
|
||||||
.set_cursor(SCOPE_REPO, &record.forge, &record.repo, now.raw())
|
|
||||||
.map_err(|err| SourceError::Backend(format!("watch store: {err}")))?;
|
|
||||||
Ok(now)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Advances a watch's durable cursor to wherever the poll got to. The
|
|
||||||
/// watcher's own map is per-process: a restart that lost it replayed
|
|
||||||
/// the repository's history, the backlog [`Self::cursor_for`] exists to
|
|
||||||
/// keep out.
|
|
||||||
fn persist_cursor(&self, record: &WatchRecord, repo: &RepoRef) -> Result<(), SourceError> {
|
|
||||||
let Some(cursor) = self.watcher.cursor(repo) else {
|
|
||||||
return Ok(());
|
|
||||||
};
|
|
||||||
self.store
|
|
||||||
.set_cursor(SCOPE_REPO, &record.forge, &record.repo, cursor.raw())
|
|
||||||
.map_err(|err| SourceError::Backend(format!("watch store: {err}")))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Records one poll's outcome, and says something the first time a
|
/// Records one poll's outcome, and says something the first time a
|
||||||
/// streak begins: a watch refused on every tick looks exactly like a
|
/// streak begins: a watch refused on every tick looks exactly like a
|
||||||
/// quiet repository from the outside, and only the failing tick knows
|
/// quiet repository from the outside, and only the failing tick knows
|
||||||
@@ -593,83 +547,6 @@ fn surface_body(notification: &Notification) -> String {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use wiremock::matchers::{method, path};
|
|
||||||
use wiremock::{Mock, MockServer, ResponseTemplate};
|
|
||||||
|
|
||||||
/// A watch installed on a repository full of history must not replay
|
|
||||||
/// it: the first pass seeds its cursor to *now* and feeds nothing, and
|
|
||||||
/// the poll that follows asks from that instant rather than from the
|
|
||||||
/// beginning. Every replayed event used to be a dispatch, and every
|
|
||||||
/// dispatch a comment posted on a thread nobody had just touched.
|
|
||||||
#[tokio::test]
|
|
||||||
async fn a_new_watch_starts_now_instead_of_replaying_history() {
|
|
||||||
let server = MockServer::start().await;
|
|
||||||
for endpoint in [
|
|
||||||
"/api/v1/repos/acme/barn/issues",
|
|
||||||
"/api/v1/repos/acme/barn/pulls",
|
|
||||||
"/api/v1/repos/acme/barn/issues/comments",
|
|
||||||
] {
|
|
||||||
Mock::given(method("GET"))
|
|
||||||
.and(path(endpoint))
|
|
||||||
.respond_with(ResponseTemplate::new(200).set_body_json(serde_json::json!([])))
|
|
||||||
.mount(&server)
|
|
||||||
.await;
|
|
||||||
}
|
|
||||||
let store = Arc::new(ClawStore::in_memory().expect("store opens"));
|
|
||||||
store
|
|
||||||
.add("gitea", "acme/barn", Some(&server.uri()), "tok")
|
|
||||||
.expect("add");
|
|
||||||
let (dispatcher, accounts, notifications) = test_parts(store.clone());
|
|
||||||
let source = ForgeSource::new(&dispatcher, "gitea", store.clone(), accounts, notifications);
|
|
||||||
|
|
||||||
assert_eq!(
|
|
||||||
source.detect().await.expect("the pass runs"),
|
|
||||||
0,
|
|
||||||
"a watch's first pass feeds no history"
|
|
||||||
);
|
|
||||||
let cursor = store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("cursor reads")
|
|
||||||
.expect("the first pass seeded a cursor");
|
|
||||||
assert!(
|
|
||||||
Timestamp::parse(&cursor).is_some(),
|
|
||||||
"the seed is spelled like a forge instant: {cursor}"
|
|
||||||
);
|
|
||||||
|
|
||||||
// The poll asked from the seed: one request per feed, each
|
|
||||||
// `since`-filtered where the feed takes one.
|
|
||||||
let requests = server.received_requests().await.expect("recording is on");
|
|
||||||
let issue_polls: Vec<_> = requests
|
|
||||||
.iter()
|
|
||||||
.filter(|request| request.url.path() == "/api/v1/repos/acme/barn/issues")
|
|
||||||
.collect();
|
|
||||||
assert_eq!(issue_polls.len(), 1, "one issues poll");
|
|
||||||
let since = issue_polls[0].url.query_pairs().find_map(|(key, value)| {
|
|
||||||
if key.as_ref() == "since" {
|
|
||||||
Some(value.into_owned())
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
});
|
|
||||||
assert_eq!(since.as_deref(), Some(cursor.as_str()));
|
|
||||||
|
|
||||||
// A second pass resumes from the same place, not from history.
|
|
||||||
assert_eq!(source.detect().await.expect("the second pass runs"), 0);
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("cursor reads"),
|
|
||||||
Some(cursor)
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.health(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("health reads")
|
|
||||||
.map(|health| health.consecutive_failures),
|
|
||||||
Some(0),
|
|
||||||
"the watch polled cleanly"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The parts a test source polls through, all in memory.
|
/// The parts a test source polls through, all in memory.
|
||||||
fn test_parts(
|
fn test_parts(
|
||||||
|
|||||||
@@ -857,11 +857,7 @@ mod tests {
|
|||||||
"@Kosmos, this one is yours",
|
"@Kosmos, this one is yours",
|
||||||
"I think @kosmos should decide",
|
"I think @kosmos should decide",
|
||||||
] {
|
] {
|
||||||
let news = [InboxNews::Event(event(
|
let news = [InboxNews::Event(event(EventKind::Comment, "dave", Some(body)))];
|
||||||
EventKind::Comment,
|
|
||||||
"dave",
|
|
||||||
Some(body),
|
|
||||||
))];
|
|
||||||
assert!(addressed(&news, Some("kosmos")), "body: {body}");
|
assert!(addressed(&news, Some("kosmos")), "body: {body}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -877,11 +873,7 @@ mod tests {
|
|||||||
))];
|
))];
|
||||||
assert!(!addressed(&news, Some("kosmos")));
|
assert!(!addressed(&news, Some("kosmos")));
|
||||||
// Case is the forge's, not the body's: the actor check folds it.
|
// Case is the forge's, not the body's: the actor check folds it.
|
||||||
let news = [InboxNews::Event(event(
|
let news = [InboxNews::Event(event(EventKind::Comment, "Kosmos", Some("@kosmos on it")))];
|
||||||
EventKind::Comment,
|
|
||||||
"Kosmos",
|
|
||||||
Some("@kosmos on it"),
|
|
||||||
))];
|
|
||||||
assert!(!addressed(&news, Some("kosmos")));
|
assert!(!addressed(&news, Some("kosmos")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,4 @@ pub use settings::SettingsStore;
|
|||||||
pub use task_source::{TASKS_SOURCE, TaskScheduler};
|
pub use task_source::{TASKS_SOURCE, TaskScheduler};
|
||||||
pub use task_store::{TaskKind, TaskRecord, TaskStore, TaskStoreError};
|
pub use task_store::{TaskKind, TaskRecord, TaskStore, TaskStoreError};
|
||||||
pub use turn_store::{TurnStore, TurnStoreError};
|
pub use turn_store::{TurnStore, TurnStoreError};
|
||||||
pub use watch_store::{
|
pub use watch_store::{ClawStore, Watch, WatchRecord, WatchShapeError, WatchStoreError};
|
||||||
ClawStore, SCOPE_ACCOUNT, SCOPE_REPO, Watch, WatchRecord, WatchShapeError, WatchStoreError,
|
|
||||||
};
|
|
||||||
@@ -114,13 +114,6 @@ CREATE TABLE IF NOT EXISTS watch_health (
|
|||||||
consecutive_failures INTEGER NOT NULL DEFAULT 0,
|
consecutive_failures INTEGER NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY (scope, forge, subject)
|
PRIMARY KEY (scope, forge, subject)
|
||||||
);
|
);
|
||||||
CREATE TABLE IF NOT EXISTS watch_cursors (
|
|
||||||
scope TEXT NOT NULL,
|
|
||||||
forge TEXT NOT NULL,
|
|
||||||
subject TEXT NOT NULL,
|
|
||||||
cursor TEXT NOT NULL,
|
|
||||||
PRIMARY KEY (scope, forge, subject)
|
|
||||||
);
|
|
||||||
";
|
";
|
||||||
|
|
||||||
/// Why a watch-table operation failed.
|
/// Why a watch-table operation failed.
|
||||||
@@ -322,14 +315,6 @@ impl ClawStore {
|
|||||||
"DELETE FROM watches WHERE forge = ?1 AND repo = ?2",
|
"DELETE FROM watches WHERE forge = ?1 AND repo = ?2",
|
||||||
params![forge.trim(), repo.trim()],
|
params![forge.trim(), repo.trim()],
|
||||||
)?;
|
)?;
|
||||||
// The cursor goes with the watch: a re-add is a new watch, and it
|
|
||||||
// starts at *now* like any other rather than resuming where the
|
|
||||||
// old one stopped (which would replay everything that happened in
|
|
||||||
// between as fresh news).
|
|
||||||
conn.execute(
|
|
||||||
"DELETE FROM watch_cursors WHERE scope = ?1 AND forge = ?2 AND subject = ?3",
|
|
||||||
params![SCOPE_REPO, forge.trim(), repo.trim()],
|
|
||||||
)?;
|
|
||||||
Ok(removed == 1)
|
Ok(removed == 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,51 +419,6 @@ impl ClawStore {
|
|||||||
.map_err(WatchStoreError::from)?;
|
.map_err(WatchStoreError::from)?;
|
||||||
Ok(rows)
|
Ok(rows)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The cursor one watch polls from: the last position it reported to
|
|
||||||
/// the dispatcher, in the forge's own spelling. `None` before the
|
|
||||||
/// watch has ever polled.
|
|
||||||
pub fn cursor(
|
|
||||||
&self,
|
|
||||||
scope: &str,
|
|
||||||
forge: &str,
|
|
||||||
subject: &str,
|
|
||||||
) -> Result<Option<String>, WatchStoreError> {
|
|
||||||
let conn = self.conn.lock().unwrap_or_else(PoisonError::into_inner);
|
|
||||||
let mut statement = conn
|
|
||||||
.prepare(
|
|
||||||
"SELECT cursor FROM watch_cursors WHERE scope = ?1 AND forge = ?2 AND subject = ?3",
|
|
||||||
)
|
|
||||||
.map_err(WatchStoreError::from)?;
|
|
||||||
let mut rows = statement
|
|
||||||
.query_map(params![scope, forge, subject], |row| row.get(0))
|
|
||||||
.map_err(WatchStoreError::from)?;
|
|
||||||
match rows.next() {
|
|
||||||
Some(row) => Ok(Some(row.map_err(WatchStoreError::from)?)),
|
|
||||||
None => Ok(None),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Advances one watch's cursor. Last write wins: the cursor only ever
|
|
||||||
/// moves forward, and a stale write is one poll's worth of replay that
|
|
||||||
/// the dispatcher's dedup lane already covers.
|
|
||||||
pub fn set_cursor(
|
|
||||||
&self,
|
|
||||||
scope: &str,
|
|
||||||
forge: &str,
|
|
||||||
subject: &str,
|
|
||||||
cursor: &str,
|
|
||||||
) -> Result<(), WatchStoreError> {
|
|
||||||
let conn = self.conn.lock().unwrap_or_else(PoisonError::into_inner);
|
|
||||||
conn.execute(
|
|
||||||
"INSERT INTO watch_cursors (scope, forge, subject, cursor) VALUES (?1, ?2, ?3, ?4)
|
|
||||||
ON CONFLICT(scope, forge, subject) DO UPDATE SET cursor = excluded.cursor",
|
|
||||||
params![scope, forge, subject, cursor],
|
|
||||||
)
|
|
||||||
.map_err(WatchStoreError::from)?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Records a successful poll: the streak resets, and the row stops
|
/// Records a successful poll: the streak resets, and the row stops
|
||||||
/// reading as broken.
|
/// reading as broken.
|
||||||
pub fn record_poll_ok(
|
pub fn record_poll_ok(
|
||||||
@@ -697,60 +637,6 @@ mod tests {
|
|||||||
assert_eq!(store.list_health().expect("list reads").len(), 1);
|
assert_eq!(store.list_health().expect("list reads").len(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A watch remembers where it was: the cursor is a row, so a daemon
|
|
||||||
/// restart resumes instead of replaying the repository's history.
|
|
||||||
#[test]
|
|
||||||
fn a_cursor_is_kept_per_watch_and_moves_forward() {
|
|
||||||
let store = ClawStore::in_memory().expect("store opens");
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("read"),
|
|
||||||
None,
|
|
||||||
"a watch that never polled has no cursor"
|
|
||||||
);
|
|
||||||
|
|
||||||
store
|
|
||||||
.set_cursor(SCOPE_REPO, "gitea", "acme/barn", "2026-10-08T00:00:00Z")
|
|
||||||
.expect("cursor lands");
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("read"),
|
|
||||||
Some("2026-10-08T00:00:00Z".to_owned())
|
|
||||||
);
|
|
||||||
// Another watch of the same forge is another cursor.
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/quarry")
|
|
||||||
.expect("read"),
|
|
||||||
None
|
|
||||||
);
|
|
||||||
|
|
||||||
store
|
|
||||||
.set_cursor(SCOPE_REPO, "gitea", "acme/barn", "2026-10-09T00:00:00Z")
|
|
||||||
.expect("the cursor advances");
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("read"),
|
|
||||||
Some("2026-10-09T00:00:00Z".to_owned())
|
|
||||||
);
|
|
||||||
|
|
||||||
// Removing the watch forgets its place: a re-add starts over from
|
|
||||||
// now instead of resuming into a backlog.
|
|
||||||
store
|
|
||||||
.add("gitea", "acme/barn", Some("https://git.example"), "tok")
|
|
||||||
.expect("add");
|
|
||||||
store.remove("gitea", "acme/barn").expect("remove");
|
|
||||||
assert_eq!(
|
|
||||||
store
|
|
||||||
.cursor(SCOPE_REPO, "gitea", "acme/barn")
|
|
||||||
.expect("read"),
|
|
||||||
None
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn validation_fails_a_watch_loudly_and_specificly() {
|
fn validation_fails_a_watch_loudly_and_specificly() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
@@ -13,22 +13,10 @@ use rhema_claw::{ClawConfig, run_once};
|
|||||||
/// carrying watches, and the test speaks to the daemon the way an
|
/// carrying watches, and the test speaks to the daemon the way an
|
||||||
/// integration would: through the store the routes share.
|
/// integration would: through the store the routes share.
|
||||||
fn seed_watch(dir: &tempfile::TempDir, host: &str) {
|
fn seed_watch(dir: &tempfile::TempDir, host: &str) {
|
||||||
let store =
|
rhema_claw::ClawStore::open(dir.path().join("dispatch.db"))
|
||||||
rhema_claw::ClawStore::open(dir.path().join("dispatch.db")).expect("the watch table opens");
|
.expect("the watch table opens")
|
||||||
store
|
|
||||||
.add("github", "acme/widgets", Some(host), "tok")
|
.add("github", "acme/widgets", Some(host), "tok")
|
||||||
.expect("the seed row lands");
|
.expect("the seed row lands");
|
||||||
// An established watch: it already has a cursor, so the pass reads
|
|
||||||
// the feed from there instead of seeding one at *now* (which a
|
|
||||||
// never-polled watch does, and which feeds nothing).
|
|
||||||
store
|
|
||||||
.set_cursor(
|
|
||||||
rhema_claw::SCOPE_REPO,
|
|
||||||
"github",
|
|
||||||
"acme/widgets",
|
|
||||||
"2026-10-01T00:00:00Z",
|
|
||||||
)
|
|
||||||
.expect("the cursor seeds");
|
|
||||||
}
|
}
|
||||||
use rhema_core::{Message, MockProvider, ModelOutput, Role, Session, StopReason, Usage};
|
use rhema_core::{Message, MockProvider, ModelOutput, Role, Session, StopReason, Usage};
|
||||||
use rhema_rsd::{KeyState, Outcome, ResourceKey, SqliteStore, Store};
|
use rhema_rsd::{KeyState, Outcome, ResourceKey, SqliteStore, Store};
|
||||||
|
|||||||
@@ -67,22 +67,10 @@ fn config(dir: &tempfile::TempDir) -> ClawConfig {
|
|||||||
/// carrying watches, and the test speaks to the daemon the way an
|
/// carrying watches, and the test speaks to the daemon the way an
|
||||||
/// integration would: through the store the routes share.
|
/// integration would: through the store the routes share.
|
||||||
fn seed_watch(dir: &tempfile::TempDir, host: &str) {
|
fn seed_watch(dir: &tempfile::TempDir, host: &str) {
|
||||||
let store =
|
rhema_claw::ClawStore::open(dir.path().join("dispatch.db"))
|
||||||
rhema_claw::ClawStore::open(dir.path().join("dispatch.db")).expect("the watch table opens");
|
.expect("the watch table opens")
|
||||||
store
|
|
||||||
.add("github", "acme/widgets", Some(host), "tok")
|
.add("github", "acme/widgets", Some(host), "tok")
|
||||||
.expect("the seed row lands");
|
.expect("the seed row lands");
|
||||||
// An established watch: it already has a cursor, so the pass reads
|
|
||||||
// the feed from there instead of seeding one at *now* (which a
|
|
||||||
// never-polled watch does, and which feeds nothing).
|
|
||||||
store
|
|
||||||
.set_cursor(
|
|
||||||
rhema_claw::SCOPE_REPO,
|
|
||||||
"github",
|
|
||||||
"acme/widgets",
|
|
||||||
"2026-10-01T00:00:00Z",
|
|
||||||
)
|
|
||||||
.expect("the cursor seeds");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use rhema_core::{Content, Message, MockProvider, ModelOutput, Role, Session, Sto
|
|||||||
use rhema_rsd::{ResourceKey, SqliteStore, Store};
|
use rhema_rsd::{ResourceKey, SqliteStore, Store};
|
||||||
use serde_json::{Value, json};
|
use serde_json::{Value, json};
|
||||||
use tokio_stream::StreamExt;
|
use tokio_stream::StreamExt;
|
||||||
use wiremock::matchers::{method, path, query_param};
|
use wiremock::matchers::{method, path};
|
||||||
use wiremock::{Mock, MockServer, ResponseTemplate};
|
use wiremock::{Mock, MockServer, ResponseTemplate};
|
||||||
|
|
||||||
/// The scripted assistant turn: one text reply, nothing else.
|
/// The scripted assistant turn: one text reply, nothing else.
|
||||||
@@ -232,11 +232,9 @@ impl rhema_core::ModelProvider for RecordingProvider {
|
|||||||
/// One quiet GitHub repo, for the watches test: an issues list with a
|
/// One quiet GitHub repo, for the watches test: an issues list with a
|
||||||
/// single closed issue and a quiet comments feed.
|
/// single closed issue and a quiet comments feed.
|
||||||
async fn mount_github(server: &MockServer) {
|
async fn mount_github(server: &MockServer) {
|
||||||
// The issues feed filters by `since` server-side, as GitHub does: a
|
Mock::given(method("GET"))
|
||||||
// watch seeded at *now* sees nothing, and one rewound to before the
|
.and(path("/repos/acme/widgets/issues"))
|
||||||
// row sees it. Without the filter a fresh watch would replay whatever
|
.respond_with(ResponseTemplate::new(200).set_body_json(json!([{
|
||||||
// the mock always answers.
|
|
||||||
let row = json!([{
|
|
||||||
"id": 1007,
|
"id": 1007,
|
||||||
"number": 7,
|
"number": 7,
|
||||||
"state": "closed",
|
"state": "closed",
|
||||||
@@ -248,18 +246,7 @@ async fn mount_github(server: &MockServer) {
|
|||||||
"updated_at": "2026-10-02T10:00:00Z",
|
"updated_at": "2026-10-02T10:00:00Z",
|
||||||
"closed_at": "2026-10-02T10:00:00Z",
|
"closed_at": "2026-10-02T10:00:00Z",
|
||||||
"html_url": "https://github.com/acme/widgets/issues/7"
|
"html_url": "https://github.com/acme/widgets/issues/7"
|
||||||
}]);
|
}])))
|
||||||
Mock::given(method("GET"))
|
|
||||||
.and(path("/repos/acme/widgets/issues"))
|
|
||||||
.and(query_param("since", "2026-10-01T00:00:00Z"))
|
|
||||||
.respond_with(ResponseTemplate::new(200).set_body_json(row))
|
|
||||||
.with_priority(1)
|
|
||||||
.mount(server)
|
|
||||||
.await;
|
|
||||||
Mock::given(method("GET"))
|
|
||||||
.and(path("/repos/acme/widgets/issues"))
|
|
||||||
.respond_with(ResponseTemplate::new(200).set_body_json(json!([])))
|
|
||||||
.with_priority(2)
|
|
||||||
.mount(server)
|
.mount(server)
|
||||||
.await;
|
.await;
|
||||||
Mock::given(method("GET"))
|
Mock::given(method("GET"))
|
||||||
@@ -1122,23 +1109,7 @@ async fn watches_added_over_http_feed_the_next_detect_pass() {
|
|||||||
"the token is not serialized: {listed}"
|
"the token is not serialized: {listed}"
|
||||||
);
|
);
|
||||||
|
|
||||||
// The next pass reads the new watch — no restart. Its first pass only
|
// The next pass detects through the new watch — no restart.
|
||||||
// seeds a cursor: a watch starts at *now* and reports news, so the
|
|
||||||
// repository's existing history is not replayed as a burst of
|
|
||||||
// dispatches (and, from the handler, a burst of comments).
|
|
||||||
let report = daemon.tick().await.expect("the pass runs");
|
|
||||||
assert_eq!(report.detected, 0, "a fresh watch seeds its cursor");
|
|
||||||
|
|
||||||
// Rewound to before the feed's rows — an established watch — the same
|
|
||||||
// pass detects the feed's event.
|
|
||||||
Arc::new(rhema_claw::ClawStore::open(dir.path().join("dispatch.db")).expect("reopens"))
|
|
||||||
.set_cursor(
|
|
||||||
rhema_claw::SCOPE_REPO,
|
|
||||||
"github",
|
|
||||||
"acme/widgets",
|
|
||||||
"2026-10-01T00:00:00Z",
|
|
||||||
)
|
|
||||||
.expect("the cursor rewinds");
|
|
||||||
let report = daemon.tick().await.expect("the pass runs");
|
let report = daemon.tick().await.expect("the pass runs");
|
||||||
assert_eq!(report.detected, 1, "the new watch's feed event was fed");
|
assert_eq!(report.detected, 1, "the new watch's feed event was fed");
|
||||||
|
|
||||||
|
|||||||
@@ -73,18 +73,13 @@ fn config(dir: &tempfile::TempDir) -> ClawConfig {
|
|||||||
/// An established watch: the cursor is what makes the pass read the feed
|
/// An established watch: the cursor is what makes the pass read the feed
|
||||||
/// as news rather than seeding a start line at *now*.
|
/// as news rather than seeding a start line at *now*.
|
||||||
fn seed_watch(dir: &tempfile::TempDir, host: &str) {
|
fn seed_watch(dir: &tempfile::TempDir, host: &str) {
|
||||||
let store =
|
let store = rhema_claw::ClawStore::open(dir.path().join("dispatch.db"))
|
||||||
rhema_claw::ClawStore::open(dir.path().join("dispatch.db")).expect("the watch table opens");
|
.expect("the watch table opens");
|
||||||
store
|
store
|
||||||
.add("github", "acme/widgets", Some(host), "tok")
|
.add("github", "acme/widgets", Some(host), "tok")
|
||||||
.expect("the seed row lands");
|
.expect("the seed row lands");
|
||||||
store
|
store
|
||||||
.set_cursor(
|
.set_cursor(rhema_claw::SCOPE_REPO, "github", "acme/widgets", "2026-10-01T00:00:00Z")
|
||||||
rhema_claw::SCOPE_REPO,
|
|
||||||
"github",
|
|
||||||
"acme/widgets",
|
|
||||||
"2026-10-01T00:00:00Z",
|
|
||||||
)
|
|
||||||
.expect("the cursor seeds");
|
.expect("the cursor seeds");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -380,46 +380,6 @@ impl Timestamp {
|
|||||||
pub fn epoch_secs(&self) -> i64 {
|
pub fn epoch_secs(&self) -> i64 {
|
||||||
self.secs
|
self.secs
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The instant `millis` milliseconds past the Unix epoch, in the
|
|
||||||
/// canonical `YYYY-MM-DDThh:mm:ss[.mmm]Z` spelling.
|
|
||||||
///
|
|
||||||
/// This is how a cursor is born without a forge: a subsystem that
|
|
||||||
/// starts watching *now* (rather than replaying a feed's history)
|
|
||||||
/// needs a `since` spelled the way the forges spell theirs, and this
|
|
||||||
/// is the one place that conversion lives.
|
|
||||||
pub fn from_epoch_millis(millis: i64) -> Option<Self> {
|
|
||||||
let secs = millis.div_euclid(1000);
|
|
||||||
let sub_millis = millis.rem_euclid(1000);
|
|
||||||
let (days, of_day) = (secs.div_euclid(86_400), secs.rem_euclid(86_400));
|
|
||||||
let (year, month, day) = civil_from_days(days);
|
|
||||||
let (hour, minute, second) = (of_day / 3_600, (of_day / 60) % 60, of_day % 60);
|
|
||||||
let raw = if sub_millis == 0 {
|
|
||||||
format!("{year:04}-{month:02}-{day:02}T{hour:02}:{minute:02}:{second:02}Z")
|
|
||||||
} else {
|
|
||||||
format!(
|
|
||||||
"{year:04}-{month:02}-{day:02}T{hour:02}:{minute:02}:{second:02}.{sub_millis:03}Z"
|
|
||||||
)
|
|
||||||
};
|
|
||||||
Self::parse(&raw)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The civil date `days` days past 1970-01-01, as `(year, month, day)` —
|
|
||||||
/// the inverse of [`days_from_civil`] (Howard Hinnant's algorithm).
|
|
||||||
fn civil_from_days(days: i64) -> (i64, u32, u32) {
|
|
||||||
let z = days + 719_468;
|
|
||||||
let era = if z >= 0 { z } else { z - 146_096 } / 146_097;
|
|
||||||
let day_of_era = z - era * 146_097;
|
|
||||||
let year_of_era =
|
|
||||||
(day_of_era - day_of_era / 1_460 + day_of_era / 36_524 - day_of_era / 146_096) / 365;
|
|
||||||
let year = year_of_era + era * 400;
|
|
||||||
let day_of_year = day_of_era - (365 * year_of_era + year_of_era / 4 - year_of_era / 100);
|
|
||||||
let mp = (5 * day_of_year + 2) / 153;
|
|
||||||
let day = day_of_year - (153 * mp + 2) / 5 + 1;
|
|
||||||
let month = if mp < 10 { mp + 3 } else { mp - 9 };
|
|
||||||
let year = if month <= 2 { year + 1 } else { year };
|
|
||||||
(year, month as u32, day as u32)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A run of ASCII digits at `range`, as its number.
|
/// A run of ASCII digits at `range`, as its number.
|
||||||
@@ -564,32 +524,4 @@ mod tests {
|
|||||||
.expect("deserializes");
|
.expect("deserializes");
|
||||||
assert_eq!(round, event);
|
assert_eq!(round, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn a_timestamp_is_born_from_epoch_millis() {
|
|
||||||
// The whole-second spelling the forges send, and the fractional
|
|
||||||
// one GitLab sends: both round-trip back to the same instant.
|
|
||||||
let whole =
|
|
||||||
Timestamp::from_epoch_millis(1_791_417_600_000).expect("a millis instant parses");
|
|
||||||
assert_eq!(whole.raw(), "2026-10-08T00:00:00Z");
|
|
||||||
assert_eq!(whole.epoch_secs(), 1_791_417_600);
|
|
||||||
|
|
||||||
let fractional =
|
|
||||||
Timestamp::from_epoch_millis(1_791_417_600_081).expect("a millis instant parses");
|
|
||||||
assert_eq!(fractional.raw(), "2026-10-08T00:00:00.081Z");
|
|
||||||
assert_eq!(fractional.epoch_secs(), whole.epoch_secs());
|
|
||||||
|
|
||||||
// The epoch itself, and a leap day, so the civil-date inverse is
|
|
||||||
// exercised somewhere other than "today".
|
|
||||||
assert_eq!(
|
|
||||||
Timestamp::from_epoch_millis(0).expect("parses").raw(),
|
|
||||||
"1970-01-01T00:00:00Z"
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
Timestamp::from_epoch_millis(1_709_164_800_000)
|
|
||||||
.expect("parses")
|
|
||||||
.raw(),
|
|
||||||
"2024-02-29T00:00:00Z"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -477,17 +477,20 @@ fn review_event(
|
|||||||
/// The comment event a repo-wide comments row carries.
|
/// The comment event a repo-wide comments row carries.
|
||||||
fn comment_event(row: &WireComment, repo: &RepoRef) -> Result<Option<ForgeEvent>, ForgeError> {
|
fn comment_event(row: &WireComment, repo: &RepoRef) -> Result<Option<ForgeEvent>, ForgeError> {
|
||||||
let id = required(row.id, "comment id")?;
|
let id = required(row.id, "comment id")?;
|
||||||
let number = comment_parent(row).ok_or_else(|| {
|
let issue_url = required(row.issue_url.clone(), "comment issue_url")?;
|
||||||
|
let number = parent_number(&issue_url).ok_or_else(|| {
|
||||||
ForgeError::Parse(format!(
|
ForgeError::Parse(format!(
|
||||||
"comment {id} names no thread: issue_url {:?}, pull_request_url {:?}, html_url {:?}",
|
"comment issue_url without a thread number: {issue_url}"
|
||||||
row.issue_url, row.pull_request_url, row.html_url
|
|
||||||
))
|
))
|
||||||
})?;
|
})?;
|
||||||
let timestamp = required(
|
let timestamp = required(
|
||||||
row.updated_at.clone().or_else(|| row.created_at.clone()),
|
row.updated_at.clone().or_else(|| row.created_at.clone()),
|
||||||
"comment timestamp",
|
"comment timestamp",
|
||||||
)?;
|
)?;
|
||||||
let is_pr = comment_is_pr(row);
|
let is_pr = row
|
||||||
|
.pull_request_url
|
||||||
|
.as_deref()
|
||||||
|
.is_some_and(|url| !url.is_empty());
|
||||||
Ok(Some(ForgeEvent {
|
Ok(Some(ForgeEvent {
|
||||||
id: format!("gitea:comment:{id}"),
|
id: format!("gitea:comment:{id}"),
|
||||||
kind: EventKind::Comment,
|
kind: EventKind::Comment,
|
||||||
@@ -502,48 +505,9 @@ fn comment_event(row: &WireComment, repo: &RepoRef) -> Result<Option<ForgeEvent>
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Every URL a comment row carries, most specific first.
|
/// The parent thread number: a forge thread URL's trailing segment.
|
||||||
fn comment_urls(row: &WireComment) -> [Option<&str>; 3] {
|
|
||||||
[
|
|
||||||
row.issue_url.as_deref(),
|
|
||||||
row.pull_request_url.as_deref(),
|
|
||||||
row.html_url.as_deref(),
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The thread number a comment row names.
|
|
||||||
///
|
|
||||||
/// `issue_url` is the field the API documents for it, but it is not
|
|
||||||
/// reliable: the instance behind `git.vhaudiquet.fr` (28.3.0) sends it
|
|
||||||
/// as an empty string on every row of the repo-wide `/issues/comments`
|
|
||||||
/// feed, while `pull_request_url` and `html_url` stay populated. The
|
|
||||||
/// number is therefore read from the first URL that carries one, in
|
|
||||||
/// order of directness.
|
|
||||||
fn comment_parent(row: &WireComment) -> Option<u64> {
|
|
||||||
comment_urls(row)
|
|
||||||
.into_iter()
|
|
||||||
.flatten()
|
|
||||||
.find_map(parent_number)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// [`comment_parent`]'s "is it a pull request" half: `pull_request_url`
|
|
||||||
/// is set exactly on PR conversation comments, and stays set on the
|
|
||||||
/// instances whose `issue_url` is blank — but a row that lost both still
|
|
||||||
/// says so in its `html_url` path.
|
|
||||||
fn comment_is_pr(row: &WireComment) -> bool {
|
|
||||||
comment_urls(row)
|
|
||||||
.into_iter()
|
|
||||||
.flatten()
|
|
||||||
.any(|url| url.contains("/pulls/") || url.contains("/pull/"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The parent thread number: a forge thread URL's trailing segment,
|
|
||||||
/// with any fragment dropped first — a comment's `html_url` points at
|
|
||||||
/// the comment (`…/pulls/1#issuecomment-164`), and its fragment is not
|
|
||||||
/// a number at all.
|
|
||||||
fn parent_number(url: &str) -> Option<u64> {
|
fn parent_number(url: &str) -> Option<u64> {
|
||||||
let path = url.split('#').next()?;
|
url.trim_end_matches('/').rsplit('/').next()?.parse().ok()
|
||||||
path.trim_end_matches('/').rsplit('/').next()?.parse().ok()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The fixed [`NotificationReason::Other`] spelling every reason-less
|
/// The fixed [`NotificationReason::Other`] spelling every reason-less
|
||||||
@@ -936,57 +900,4 @@ mod tests {
|
|||||||
.expect("comment carries an event");
|
.expect("comment carries an event");
|
||||||
assert!(!event.is_pr);
|
assert!(!event.is_pr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn a_comment_with_a_blank_issue_url_still_names_its_thread() {
|
|
||||||
// git.vhaudiquet.fr (28.3.0) sends `issue_url: ""` on every row
|
|
||||||
// of the repo-wide comments feed. The poll used to fail on the
|
|
||||||
// first such row, which is why that watch never reported a single
|
|
||||||
// event: a PR comment must still resolve to its pull request.
|
|
||||||
let comment: WireComment = serde_json::from_str(
|
|
||||||
r#"{"id": 164, "user": {"login": "alice"}, "body": "thanks",
|
|
||||||
"created_at": "2026-10-19T08:14:39Z",
|
|
||||||
"updated_at": "2026-10-19T08:14:39Z",
|
|
||||||
"issue_url": "",
|
|
||||||
"pull_request_url": "https://forge.example/acme/widgets/pulls/3",
|
|
||||||
"html_url": "https://forge.example/acme/widgets/pulls/3#issuecomment-164"}"#,
|
|
||||||
)
|
|
||||||
.expect("comment fixture parses");
|
|
||||||
let event = comment_event(&comment, &repo())
|
|
||||||
.expect("a blank issue_url is not a parse failure")
|
|
||||||
.expect("comment carries an event");
|
|
||||||
assert_eq!(event.number, 3);
|
|
||||||
assert!(event.is_pr);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn a_comment_with_only_an_html_url_reads_the_thread_off_its_path() {
|
|
||||||
// The last resort: no issue_url and no pull_request_url. The
|
|
||||||
// html_url points at the comment, so the fragment has to go
|
|
||||||
// before the trailing segment means anything.
|
|
||||||
let comment: WireComment = serde_json::from_str(
|
|
||||||
r#"{"id": 165, "created_at": "2026-10-19T09:00:00Z",
|
|
||||||
"updated_at": "2026-10-19T09:00:00Z",
|
|
||||||
"html_url": "https://forge.example/acme/widgets/issues/7#issuecomment-165"}"#,
|
|
||||||
)
|
|
||||||
.expect("comment fixture parses");
|
|
||||||
let event = comment_event(&comment, &repo())
|
|
||||||
.expect("maps")
|
|
||||||
.expect("comment carries an event");
|
|
||||||
assert_eq!(event.number, 7);
|
|
||||||
assert!(!event.is_pr);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn a_comment_whose_urls_name_no_thread_is_still_loud() {
|
|
||||||
// The fallbacks must not degrade into a silent skip: a row with
|
|
||||||
// no number anywhere is a vocabulary gap, and the poll says so.
|
|
||||||
let comment: WireComment = serde_json::from_str(
|
|
||||||
r#"{"id": 166, "created_at": "2026-10-19T09:00:00Z",
|
|
||||||
"issue_url": "", "html_url": "https://forge.example/acme/widgets/issues/"}"#,
|
|
||||||
)
|
|
||||||
.expect("comment fixture parses");
|
|
||||||
let err = comment_event(&comment, &repo()).expect_err("no thread number names a thread");
|
|
||||||
assert!(matches!(err, ForgeError::Parse(_)), "got {err:?}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -177,24 +177,12 @@ impl Watcher {
|
|||||||
.cloned()
|
.cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// One poll of `repo` from the watcher's own cursor.
|
/// One poll of `repo`: the page's events are ingested in feed order
|
||||||
|
/// and the cursor advances to the page's. Returns how many events were
|
||||||
|
/// fed to the dispatcher — replayed ids included, they dedup there.
|
||||||
pub async fn poll(&self, forge: &dyn Forge, repo: &RepoRef) -> Result<usize, WatchError> {
|
pub async fn poll(&self, forge: &dyn Forge, repo: &RepoRef) -> Result<usize, WatchError> {
|
||||||
let since = self.cursor(repo);
|
let since = self.cursor(repo);
|
||||||
self.poll_since(forge, repo, since.as_ref()).await
|
let page = forge.poll(repo, since.as_ref()).await?;
|
||||||
}
|
|
||||||
|
|
||||||
/// One poll of `repo` from an explicit `since`, for the embedder that
|
|
||||||
/// keeps the cursor somewhere durable: the page's events are ingested
|
|
||||||
/// in feed order and the watcher's cursor advances to the page's.
|
|
||||||
/// Returns how many events were fed to the dispatcher — replayed ids
|
|
||||||
/// included, they dedup there while they sit in an inbox.
|
|
||||||
pub async fn poll_since(
|
|
||||||
&self,
|
|
||||||
forge: &dyn Forge,
|
|
||||||
repo: &RepoRef,
|
|
||||||
since: Option<&Timestamp>,
|
|
||||||
) -> Result<usize, WatchError> {
|
|
||||||
let page = forge.poll(repo, since).await?;
|
|
||||||
let now = SystemClock.now_millis();
|
let now = SystemClock.now_millis();
|
||||||
let mut fed = 0;
|
let mut fed = 0;
|
||||||
for event in &page.events {
|
for event in &page.events {
|
||||||
|
|||||||
@@ -558,61 +558,6 @@ async fn notifications_poll_maps_the_subject_feed() {
|
|||||||
assert_eq!(note.title.as_deref(), Some("Fix the gate"));
|
assert_eq!(note.title.as_deref(), Some("Fix the gate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The instance behind `git.vhaudiquet.fr` sends `issue_url: ""` on every
|
|
||||||
/// row of the repo-wide comments feed. A poll with one such row used to
|
|
||||||
/// fail outright, so the watch it fed never reported anything at all.
|
|
||||||
#[tokio::test]
|
|
||||||
async fn poll_survives_a_comments_feed_with_blank_issue_urls() {
|
|
||||||
let server = MockServer::start().await;
|
|
||||||
for (endpoint, body) in [
|
|
||||||
("/api/v1/repos/acme/widgets/issues", json!([])),
|
|
||||||
("/api/v1/repos/acme/widgets/pulls", json!([])),
|
|
||||||
] {
|
|
||||||
Mock::given(method("GET"))
|
|
||||||
.and(path(endpoint))
|
|
||||||
.respond_with(ResponseTemplate::new(200).set_body_json(body))
|
|
||||||
.mount(&server)
|
|
||||||
.await;
|
|
||||||
}
|
|
||||||
Mock::given(method("GET"))
|
|
||||||
.and(path("/api/v1/repos/acme/widgets/issues/comments"))
|
|
||||||
.respond_with(ResponseTemplate::new(200).set_body_json(json!([
|
|
||||||
{ "id": 164, "user": { "login": "alice" }, "body": "thanks",
|
|
||||||
"created_at": "2026-10-19T08:14:39Z",
|
|
||||||
"updated_at": "2026-10-19T08:14:39Z",
|
|
||||||
"issue_url": "",
|
|
||||||
"pull_request_url": "https://forge.example/acme/widgets/pulls/1",
|
|
||||||
"html_url": "https://forge.example/acme/widgets/pulls/1#issuecomment-164" },
|
|
||||||
{ "id": 165, "user": { "login": "bob" }, "body": "still broken",
|
|
||||||
"created_at": "2026-10-19T09:00:00Z",
|
|
||||||
"updated_at": "2026-10-19T09:00:00Z",
|
|
||||||
"issue_url": "",
|
|
||||||
"pull_request_url": Value::Null,
|
|
||||||
"html_url": "https://forge.example/acme/widgets/issues/2#issuecomment-165" }
|
|
||||||
])))
|
|
||||||
.mount(&server)
|
|
||||||
.await;
|
|
||||||
|
|
||||||
let since = Timestamp::parse(SINCE).expect("cursor parses");
|
|
||||||
let page = forge(&server)
|
|
||||||
.poll(&RepoRef::new("acme", "widgets"), Some(&since))
|
|
||||||
.await
|
|
||||||
.expect("a blank issue_url is not a poll failure");
|
|
||||||
|
|
||||||
let summary: Vec<(EventKind, u64, bool)> = page
|
|
||||||
.events
|
|
||||||
.iter()
|
|
||||||
.map(|event| (event.kind, event.number, event.is_pr))
|
|
||||||
.collect();
|
|
||||||
assert_eq!(
|
|
||||||
summary,
|
|
||||||
vec![
|
|
||||||
(EventKind::Comment, 1, true),
|
|
||||||
(EventKind::Comment, 2, false)
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The mention gate asks the forge who the credential is, because a token
|
/// The mention gate asks the forge who the credential is, because a token
|
||||||
/// read from a watch row names nobody.
|
/// read from a watch row names nobody.
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|||||||
Reference in new issue
Block a user