Skip to content

Commit 6047070

Browse files
committed
Update trust store test for approvals without idle expiry (#13)
Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
1 parent d892c0c commit 6047070

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎Tests/AgentCatalogTests.swift‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,9 @@ enum CodeExplanation { static let noChange = "변경 없음" }
360360
precondition(store.autoReceive && store.lookup(keyID: keyID, host: "h") == .trusted(client))
361361
precondition(store.lookup(keyID: keyID, host: "elsewhere") == .hostChanged)
362362
precondition(store.lookup(keyID: AgentPairingProof.keyID(other.publicKey.x963Representation)!, host: "h") == .unknown)
363-
clock += AgentTrustStore.idleLimit - 60
364-
store.touch(client.id)
365-
clock += AgentTrustStore.idleLimit - 60 // sliding: counted from the last reconnect
366-
precondition(open().lookup(keyID: keyID, host: "h") != .expired)
367-
clock += 120
368-
precondition(open().lookup(keyID: keyID, host: "h") == .expired)
363+
// An approval does not expire with idle time.
364+
clock += 365 * 24 * 3600
365+
precondition(open().lookup(keyID: keyID, host: "h") == .trusted(client))
369366
let renewed = try store.trust(publicKey: publicKey, label: "claude", host: "h")
370367
precondition(renewed.id == client.id && store.clients.count == 1)
371368

0 commit comments

Comments
 (0)