mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-12 05:29:57 +02:00
feat(core): add event revisions and saved-device local labels
Platform contract harnesses need monotonic event revisions for at-least-once dedup and a typed rename API that survives listing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -70,7 +70,7 @@ final class ProgressDerivationTests: XCTestCase {
|
||||
|
||||
private func event(phase: String, kind: String, json: String) -> CoreEventModel {
|
||||
CoreEventModel(
|
||||
id: UUID().uuidString, timestamp: 0, scope: "transfer", transferId: 1,
|
||||
id: UUID().uuidString, revision: 1, timestamp: 0, scope: "transfer", transferId: 1,
|
||||
direction: "send", phase: phase, kind: kind, dataJson: json
|
||||
)
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ struct CoreStatus: Equatable, Sendable {
|
||||
|
||||
struct CoreEventModel: Equatable, Identifiable, Sendable {
|
||||
let id: String
|
||||
let revision: UInt64
|
||||
let timestamp: Int64
|
||||
let scope: String
|
||||
let transferId: UInt64?
|
||||
|
||||
@@ -521,7 +521,7 @@ private func withSecurityScopedAccess<T>(pathOrUrl: String, _ body: () throws ->
|
||||
private extension CoreEvent {
|
||||
func toModel() -> CoreEventModel {
|
||||
CoreEventModel(
|
||||
id: id, timestamp: timestamp, scope: scope, transferId: transferId,
|
||||
id: id, revision: revision, timestamp: timestamp, scope: scope, transferId: transferId,
|
||||
direction: direction, phase: phase, kind: kind, dataJson: dataJson
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user