@team-agent/installer 0.5.54 → 0.5.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
|
@@ -771,7 +771,7 @@ fn requeue_after_claim_leader_skips_already_notified() {
|
|
|
771
771
|
// watchers, one already notified (notified_message_id set), one un-notified.
|
|
772
772
|
// requeue must return ONLY the un-notified watcher; the notified one is NOT
|
|
773
773
|
// requeued and its notified_message_id SURVIVES (clearing it would cause a
|
|
774
|
-
// second injection). Probed golden: requeued == [w_un] (result_id
|
|
774
|
+
// second injection). Probed golden: requeued == [w_un] (result_id present,
|
|
775
775
|
// prior_state "pending"); notified watcher keeps notified_message_id.
|
|
776
776
|
let ws = tmp_ws("requeue");
|
|
777
777
|
let store = store_for(&ws);
|
|
@@ -786,7 +786,7 @@ fn requeue_after_claim_leader_skips_already_notified() {
|
|
|
786
786
|
"t1",
|
|
787
787
|
"alice",
|
|
788
788
|
"pending",
|
|
789
|
-
|
|
789
|
+
Some("res_retryable"),
|
|
790
790
|
None,
|
|
791
791
|
);
|
|
792
792
|
let w_notified = seed_watcher(
|
|
@@ -3208,6 +3208,79 @@ fn gate054_rebind_replay_requeues_failed_leader_message_on_attach() {
|
|
|
3208
3208
|
);
|
|
3209
3209
|
}
|
|
3210
3210
|
|
|
3211
|
+
#[test]
|
|
3212
|
+
fn claim_preserves_pending_acceptance_for_all_recipients() {
|
|
3213
|
+
let ws = tmp_ws("claim-pending-acceptance");
|
|
3214
|
+
let store = store_for(&ws);
|
|
3215
|
+
let log = EventLog::new(&ws);
|
|
3216
|
+
let team_id = "mailbox-team";
|
|
3217
|
+
let leader_message = store
|
|
3218
|
+
.create_message(
|
|
3219
|
+
None,
|
|
3220
|
+
"worker",
|
|
3221
|
+
"leader",
|
|
3222
|
+
"leader canary",
|
|
3223
|
+
None,
|
|
3224
|
+
false,
|
|
3225
|
+
Some(team_id),
|
|
3226
|
+
)
|
|
3227
|
+
.unwrap();
|
|
3228
|
+
let worker_message = store
|
|
3229
|
+
.create_message(
|
|
3230
|
+
None,
|
|
3231
|
+
"worker",
|
|
3232
|
+
"worker-b",
|
|
3233
|
+
"worker canary",
|
|
3234
|
+
None,
|
|
3235
|
+
false,
|
|
3236
|
+
Some(team_id),
|
|
3237
|
+
)
|
|
3238
|
+
.unwrap();
|
|
3239
|
+
let conn = crate::db::schema::open_db(store.db_path()).unwrap();
|
|
3240
|
+
for message_id in [&leader_message, &worker_message] {
|
|
3241
|
+
conn.execute(
|
|
3242
|
+
"update messages set status = 'submitted_pending_acceptance' where message_id = ?1",
|
|
3243
|
+
[message_id],
|
|
3244
|
+
)
|
|
3245
|
+
.unwrap();
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
let team = TeamKey::new(team_id);
|
|
3249
|
+
let pane = PaneId::new("%leader");
|
|
3250
|
+
requeue_after_claim_leader(&ws, &store, &log, &team, &pane, None).unwrap();
|
|
3251
|
+
|
|
3252
|
+
let row = |message_id: &str| {
|
|
3253
|
+
conn.query_row(
|
|
3254
|
+
"select status, delivered_at, error from messages where message_id = ?1",
|
|
3255
|
+
[message_id],
|
|
3256
|
+
|row| {
|
|
3257
|
+
Ok((
|
|
3258
|
+
row.get::<_, String>(0)?,
|
|
3259
|
+
row.get::<_, Option<String>>(1)?,
|
|
3260
|
+
row.get::<_, Option<String>>(2)?,
|
|
3261
|
+
))
|
|
3262
|
+
},
|
|
3263
|
+
)
|
|
3264
|
+
.unwrap()
|
|
3265
|
+
};
|
|
3266
|
+
assert_eq!(
|
|
3267
|
+
row(&leader_message),
|
|
3268
|
+
(
|
|
3269
|
+
"submitted_pending_acceptance".to_string(),
|
|
3270
|
+
None,
|
|
3271
|
+
None
|
|
3272
|
+
)
|
|
3273
|
+
);
|
|
3274
|
+
assert_eq!(
|
|
3275
|
+
row(&worker_message),
|
|
3276
|
+
(
|
|
3277
|
+
"submitted_pending_acceptance".to_string(),
|
|
3278
|
+
None,
|
|
3279
|
+
None
|
|
3280
|
+
)
|
|
3281
|
+
);
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3211
3284
|
#[test]
|
|
3212
3285
|
fn gate054_status_surfaces_pending_leader_notifications() {
|
|
3213
3286
|
// Round-2: user-facing visibility — status must show the blocked leader
|
|
@@ -415,7 +415,7 @@ pub fn requeue_after_claim_leader(
|
|
|
415
415
|
let conn = crate::db::schema::open_db(store.db_path())?;
|
|
416
416
|
let mut stmt = conn.prepare(
|
|
417
417
|
"select watcher_id, result_id, status, coalesce(completed_at, created_at) from result_watchers
|
|
418
|
-
where owner_team_id = ?1 and notified_message_id is null
|
|
418
|
+
where owner_team_id = ?1 and result_id is not null and notified_message_id is null
|
|
419
419
|
order by created_at, watcher_id",
|
|
420
420
|
)?;
|
|
421
421
|
let rows = stmt.query_map(params![owner_team_id.as_str()], |row| {
|
|
@@ -470,12 +470,12 @@ pub fn requeue_after_claim_leader(
|
|
|
470
470
|
/// 0.5.5 gate054 round-2: attach-leader (and claim-leader) requeue for leader messages
|
|
471
471
|
/// that were refused with `rebind_required` while no leader pane was attached.
|
|
472
472
|
///
|
|
473
|
-
/// #231 C-5 semantics: same row, same message_id — flip
|
|
474
|
-
///
|
|
475
|
-
///
|
|
476
|
-
///
|
|
477
|
-
///
|
|
478
|
-
///
|
|
473
|
+
/// #231 C-5 semantics: same row, same message_id — flip an eligible status back
|
|
474
|
+
/// to `accepted` so `deliver_pending_messages` replays it through the SAME
|
|
475
|
+
/// pipeline. The `leader_notification_log` PK prevents a second notification
|
|
476
|
+
/// row for watcher-backed messages. A `submitted_pending_acceptance` row has
|
|
477
|
+
/// already crossed the transport boundary and is claim-immutable. Any future
|
|
478
|
+
/// retry belongs to a separate typed recovery arm, not attach/claim convergence.
|
|
479
479
|
pub(crate) fn requeue_blocked_leader_messages(
|
|
480
480
|
conn: &rusqlite::Connection,
|
|
481
481
|
event_log: &EventLog,
|
|
@@ -490,6 +490,8 @@ pub(crate) fn requeue_blocked_leader_messages(
|
|
|
490
490
|
// exactly once. status `queued_until_leader_attach` is deliberately NOT
|
|
491
491
|
// in the `claim_for_delivery` eligible set (see message_store.rs) so it
|
|
492
492
|
// could not have churned while the leader was unattached.
|
|
493
|
+
// `submitted_pending_acceptance` remains parked and claim-immutable; a
|
|
494
|
+
// future typed recovery arm must own any deliberate retry.
|
|
493
495
|
let requeued = conn.execute(
|
|
494
496
|
"update messages
|
|
495
497
|
set status = 'accepted',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-agent/installer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.56",
|
|
4
4
|
"description": "npx installer for Team Agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codex",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"team-agent-installer": "npm/install.mjs"
|
|
21
21
|
},
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@team-agent/cli-darwin-arm64": "0.5.
|
|
24
|
-
"@team-agent/cli-darwin-x64": "0.5.
|
|
25
|
-
"@team-agent/cli-linux-x64": "0.5.
|
|
23
|
+
"@team-agent/cli-darwin-arm64": "0.5.56",
|
|
24
|
+
"@team-agent/cli-darwin-x64": "0.5.56",
|
|
25
|
+
"@team-agent/cli-linux-x64": "0.5.56"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postinstall": "node npm/bincheck.mjs",
|