From 6f0a23a6159e86312884818225a994afdd7ee8cd Mon Sep 17 00:00:00 2001 From: "Zavartkay Tibor (ETAS/PJ-SC-XPC-Fe2)" Date: Fri, 10 Jul 2026 13:15:08 +0200 Subject: [PATCH 1/8] Rework of component requirements related to snapshots --- score/kvs/docs/requirements/index.rst | 79 ++++++++++++++++++--------- 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 4c6042c63..51e9243c2 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -291,29 +291,56 @@ Component Requirements application to implement versioning, including upgrade and downgrade paths, as needed. -.. comp_req:: Snapshot Creation - :id: comp_req__kvs__snapshot_creation +.. comp_req:: Snapshot maximum number + :id: comp_req__kvs__snapshot_max_num :reqtype: Functional :security: NO :safety: ASIL_B - :satisfies: feat_req__persistency__snapshot_create + :satisfies: feat_req__persistency__cfg :status: valid :belongs_to: comp__persistency_kvs - The component shall create a snapshot each time data is stored. + The component shall maintain a configurable maximum number of snapshots. The maximum number shall be in the range <0..3>. + A value of zero means that snapshot operations are disabled, while a non-zero value specifies the maximum number of snapshots. -.. comp_req:: Snapshot Maximum Number - :id: comp_req__kvs__snapshot_max_num +.. comp_req:: Snapshot lifecycle APIs + :id: comp_req__kvs__snapshot_lifecycle_apis :reqtype: Functional :security: NO :safety: ASIL_B - :satisfies: feat_req__persistency__cfg :status: valid - :belongs_to: comp__persistency_kvs + :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__snapshot_restore, feat_req__persistency__snapshot_remove + :belongs_to: comp__persistency_snapshot + + The component shall provide APIs to create, restore, and delete snapshots. - The component shall maintain a configurable maximum number of snapshots. + .. note:: + + A snapshot is a point-in-time, frozen view of all values in a key-value storage. + +.. comp_req:: Explicit snapshot operations + :id: comp_req__kvs__explicit_snapshot_operations + :reqtype: Functional + :security: NO + :safety: ASIL_B + :status: valid + :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__snapshot_restore, feat_req__persistency__snapshot_remove + :belongs_to: comp__persistency_snapshot -.. comp_req:: Snapshot IDs + The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding snapshot API. + +.. comp_req:: Snapshot slot selection + :id: comp_req__kvs__snapshot_slot_selection + :reqtype: Functional + :security: NO + :safety: ASIL_B + :status: valid + :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__cfg + :belongs_to: comp__persistency_snapshot + + The component shall provide the snapshot lifecycle APIs with an argument that selects a dedicated snapshot slot by snapshot index. + +.. comp_req:: Snapshot slot indexing :id: comp_req__kvs__snapshot_id :reqtype: Functional :security: NO @@ -322,40 +349,40 @@ Component Requirements :status: valid :belongs_to: comp__persistency_kvs - The component shall assign the ID 1 to the newest snapshot and shall increment the IDs of older snapshots accordingly. + The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. -.. comp_req:: Snapshot Rotation - :id: comp_req__kvs__snapshot_rotate +.. comp_req:: Snapshot create or overwrite + :id: comp_req__kvs__snapshot_create_or_overwrite :reqtype: Functional :security: NO :safety: ASIL_B - :satisfies: feat_req__persistency__snapshot_remove, feat_req__persistency__snapshot_restore :status: valid - :belongs_to: comp__persistency_kvs + :satisfies: feat_req__persistency__snapshot_create + :belongs_to: comp__persistency_snapshot - The component shall rotate and delete the oldest snapshot when the maximum number is reached. + The component shall create a new snapshot in the selected snapshot slot when the slot is empty, or overwrite the existing snapshot when the slot is occupied. -.. comp_req:: Snapshot Restore - :id: comp_req__kvs__snapshot_restore +.. comp_req:: Snapshot data source + :id: comp_req__kvs__snapshot_source :reqtype: Functional :security: NO :safety: ASIL_B - :satisfies: feat_req__persistency__snapshot_restore :status: valid - :belongs_to: comp__persistency_kvs + :satisfies: feat_req__persistency__snapshot_create + :belongs_to: comp__persistency_snapshot - The component shall allow restoration of a snapshot by its ID. + The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. -.. comp_req:: Snapshot Deletion - :id: comp_req__kvs__snapshot_delete +.. comp_req:: Snapshot slot occupancy query + :id: comp_req__kvs__snapshot_slot_occupancy_query :reqtype: Functional :security: NO :safety: ASIL_B - :satisfies: feat_req__persistency__snapshot_remove :status: valid - :belongs_to: comp__persistency_kvs + :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__snapshot_remove, feat_req__persistency__cfg + :belongs_to: comp__persistency_snapshot - The component shall allow deletion of individual snapshots. + The component shall provide an API to check whether a slot identified by a snapshot index is occupied. .. comp_req:: Engineering Mode :id: comp_req__kvs__eng_mode From 1d92ade2436429a09e4e670082212f159c97bae0 Mon Sep 17 00:00:00 2001 From: Tibor Zavartkay Date: Tue, 28 Jul 2026 13:10:48 +0200 Subject: [PATCH 2/8] Review findings --- score/kvs/docs/requirements/index.rst | 31 +++++++++++++++++++-------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 51e9243c2..289ecc3ea 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -310,7 +310,7 @@ Component Requirements :safety: ASIL_B :status: valid :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__snapshot_restore, feat_req__persistency__snapshot_remove - :belongs_to: comp__persistency_snapshot + :belongs_to: comp__persistency_kvs The component shall provide APIs to create, restore, and delete snapshots. @@ -325,7 +325,7 @@ Component Requirements :safety: ASIL_B :status: valid :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__snapshot_restore, feat_req__persistency__snapshot_remove - :belongs_to: comp__persistency_snapshot + :belongs_to: comp__persistency_kvs The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding snapshot API. @@ -336,7 +336,7 @@ Component Requirements :safety: ASIL_B :status: valid :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__cfg - :belongs_to: comp__persistency_snapshot + :belongs_to: comp__persistency_kvs The component shall provide the snapshot lifecycle APIs with an argument that selects a dedicated snapshot slot by snapshot index. @@ -351,16 +351,29 @@ Component Requirements The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. -.. comp_req:: Snapshot create or overwrite - :id: comp_req__kvs__snapshot_create_or_overwrite +.. comp_req:: Snapshot create + :id: comp_req__kvs__snapshot_create + :reqtype: Functional + :security: NO + :safety: ASIL_B + :status: valid + :satisfies: feat_req__persistency__snapshot_create + :belongs_to: comp__persistency_kvs + + The component shall create a new snapshot in the selected snapshot slot when the slot is empty. + +.. comp_req:: Snapshot overwrite + :id: comp_req__kvs__snapshot_overwrite :reqtype: Functional :security: NO :safety: ASIL_B :status: valid :satisfies: feat_req__persistency__snapshot_create - :belongs_to: comp__persistency_snapshot + :belongs_to: comp__persistency_kvs + + The component shall overwrite the selected snapshot slot when the slot is occupied. + - The component shall create a new snapshot in the selected snapshot slot when the slot is empty, or overwrite the existing snapshot when the slot is occupied. .. comp_req:: Snapshot data source :id: comp_req__kvs__snapshot_source @@ -369,7 +382,7 @@ Component Requirements :safety: ASIL_B :status: valid :satisfies: feat_req__persistency__snapshot_create - :belongs_to: comp__persistency_snapshot + :belongs_to: comp__persistency_kvs The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. @@ -380,7 +393,7 @@ Component Requirements :safety: ASIL_B :status: valid :satisfies: feat_req__persistency__snapshot_create, feat_req__persistency__snapshot_remove, feat_req__persistency__cfg - :belongs_to: comp__persistency_snapshot + :belongs_to: comp__persistency_kvs The component shall provide an API to check whether a slot identified by a snapshot index is occupied. From fe263048e0c505860150d90ea68b50adb389d16a Mon Sep 17 00:00:00 2001 From: Tibor Zavartkay Date: Tue, 28 Jul 2026 13:22:42 +0200 Subject: [PATCH 3/8] Add required attributes --- score/kvs/docs/requirements/index.rst | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 22091c450..0eb275c3a 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -345,7 +345,9 @@ Component Requirements :safety: ASIL_B :derived_from: feat_req__persistency__cfg[version==1] :status: valid + :version: 1 :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall maintain a configurable maximum number of snapshots. The maximum number shall be in the range <0..3>. A value of zero means that snapshot operations are disabled, while a non-zero value specifies the maximum number of snapshots. @@ -356,14 +358,16 @@ Component Requirements :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_restore[version==1], feat_req__persistency__snapshot_remove[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall provide APIs to create, restore, and delete snapshots. .. note:: - A snapshot is a point-in-time, frozen view of all values in a key-value storage. + A snapshot is a point-in-time, frozen view on all values in a key-value storage. .. comp_req:: Explicit snapshot operations :id: comp_req__kvs__explicit_snapshot_operations @@ -371,8 +375,10 @@ Component Requirements :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_restore[version==1], feat_req__persistency__snapshot_remove[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding snapshot API. @@ -382,8 +388,10 @@ Component Requirements :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__cfg[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall provide the snapshot lifecycle APIs with an argument that selects a dedicated snapshot slot by snapshot index. @@ -394,7 +402,9 @@ Component Requirements :safety: ASIL_B :derived_from: feat_req__persistency__snapshot_create[version==1] :status: valid + :version: 1 :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. @@ -404,8 +414,10 @@ Component Requirements :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall create a new snapshot in the selected snapshot slot when the slot is empty. @@ -415,21 +427,23 @@ Component Requirements :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall overwrite the selected snapshot slot when the slot is occupied. - - .. comp_req:: Snapshot data source :id: comp_req__kvs__snapshot_source :reqtype: Functional :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. @@ -439,8 +453,10 @@ Component Requirements :security: NO :safety: ASIL_B :status: valid + :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_remove[version==1], feat_req__persistency__cfg[version==1] :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected The component shall provide an API to check whether a slot identified by a snapshot index is occupied. From cedb55d48d4f6606291eef5cbe70c4a664f5fc45 Mon Sep 17 00:00:00 2001 From: Tibor Zavartkay Date: Tue, 28 Jul 2026 13:55:33 +0200 Subject: [PATCH 4/8] Make the API requirements atomic --- score/kvs/docs/requirements/index.rst | 63 ++++++++++++++++----------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 0eb275c3a..63336cd52 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -352,87 +352,100 @@ Component Requirements The component shall maintain a configurable maximum number of snapshots. The maximum number shall be in the range <0..3>. A value of zero means that snapshot operations are disabled, while a non-zero value specifies the maximum number of snapshots. -.. comp_req:: Snapshot lifecycle APIs - :id: comp_req__kvs__snapshot_lifecycle_apis +.. comp_req:: Snapshot create API + :id: comp_req__kvs__snapshot_create_api :reqtype: Functional :security: NO :safety: ASIL_B :status: valid :version: 1 - :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_restore[version==1], feat_req__persistency__snapshot_remove[version==1] + :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall provide APIs to create, restore, and delete snapshots. + The component shall provide API for creation of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. .. note:: A snapshot is a point-in-time, frozen view on all values in a key-value storage. -.. comp_req:: Explicit snapshot operations - :id: comp_req__kvs__explicit_snapshot_operations +.. comp_req:: Snapshot create + :id: comp_req__kvs__snapshot_create :reqtype: Functional :security: NO :safety: ASIL_B :status: valid :version: 1 - :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_restore[version==1], feat_req__persistency__snapshot_remove[version==1] + :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding snapshot API. + The component shall create a new snapshot in the selected snapshot slot when the slot is empty. -.. comp_req:: Snapshot slot selection - :id: comp_req__kvs__snapshot_slot_selection +.. comp_req:: Snapshot overwrite + :id: comp_req__kvs__snapshot_overwrite :reqtype: Functional :security: NO :safety: ASIL_B :status: valid :version: 1 - :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__cfg[version==1] + :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall provide the snapshot lifecycle APIs with an argument that selects a dedicated snapshot slot by snapshot index. + The component shall overwrite the selected snapshot slot when the slot is occupied. -.. comp_req:: Snapshot slot indexing - :id: comp_req__kvs__snapshot_id +.. comp_req:: Snapshot restore API + :id: comp_req__kvs__snapshot_restore_api :reqtype: Functional :security: NO :safety: ASIL_B - :derived_from: feat_req__persistency__snapshot_create[version==1] :status: valid :version: 1 + :derived_from: feat_req__persistency__snapshot_restore[version==1] :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. + The component shall provide API for restoration of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. -.. comp_req:: Snapshot create - :id: comp_req__kvs__snapshot_create +.. comp_req:: Snapshot remove API + :id: comp_req__kvs__snapshot_remove_api :reqtype: Functional :security: NO :safety: ASIL_B :status: valid :version: 1 - :derived_from: feat_req__persistency__snapshot_create[version==1] + :derived_from: feat_req__persistency__snapshot_remove[version==1] :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall create a new snapshot in the selected snapshot slot when the slot is empty. + The component shall provide API for removing of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. -.. comp_req:: Snapshot overwrite - :id: comp_req__kvs__snapshot_overwrite +.. comp_req:: Explicit snapshot operations + :id: comp_req__kvs__explicit_snapshot_operations :reqtype: Functional :security: NO :safety: ASIL_B :status: valid :version: 1 + :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_restore[version==1], feat_req__persistency__snapshot_remove[version==1] + :belongs_to: comp__persistency_kvs[version==1] + :tags: inspected + + The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding APIs. + +.. comp_req:: Snapshot slot indexing + :id: comp_req__kvs__snapshot_id + :reqtype: Functional + :security: NO + :safety: ASIL_B :derived_from: feat_req__persistency__snapshot_create[version==1] + :status: valid + :version: 1 :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall overwrite the selected snapshot slot when the slot is occupied. + The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. .. comp_req:: Snapshot data source :id: comp_req__kvs__snapshot_source @@ -447,8 +460,8 @@ Component Requirements The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. -.. comp_req:: Snapshot slot occupancy query - :id: comp_req__kvs__snapshot_slot_occupancy_query +.. comp_req:: Snapshot slot occupancy query API + :id: comp_req__kvs__snapshot_slot_occupancy_query_api :reqtype: Functional :security: NO :safety: ASIL_B From 57ead8dd1644550f8d5b3d21eb4ab3f605f759ec Mon Sep 17 00:00:00 2001 From: Tibor Zavartkay Date: Tue, 28 Jul 2026 16:27:57 +0200 Subject: [PATCH 5/8] Fix problem with long requirement name --- score/kvs/docs/requirements/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 63336cd52..8555f62ad 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -460,8 +460,8 @@ Component Requirements The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. -.. comp_req:: Snapshot slot occupancy query API - :id: comp_req__kvs__snapshot_slot_occupancy_query_api +.. comp_req:: Snapshot slot free query API + :id: comp_req__kvs__snapshot_slot_free_api :reqtype: Functional :security: NO :safety: ASIL_B @@ -471,7 +471,7 @@ Component Requirements :belongs_to: comp__persistency_kvs[version==1] :tags: inspected - The component shall provide an API to check whether a slot identified by a snapshot index is occupied. + The component shall provide an API to check whether a slot identified by a snapshot index is free or occupied. .. comp_req:: Engineering Mode :id: comp_req__kvs__eng_mode From 68b6f988eb5327403b31126adb6201fe95be178d Mon Sep 17 00:00:00 2001 From: Tibor Zavartkay Date: Fri, 31 Jul 2026 15:37:27 +0200 Subject: [PATCH 6/8] Review findings. Reset "inspected` tag and add error handling for APIs --- score/kvs/docs/requirements/index.rst | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 8555f62ad..08d27d064 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -347,7 +347,7 @@ Component Requirements :status: valid :version: 1 :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall maintain a configurable maximum number of snapshots. The maximum number shall be in the range <0..3>. A value of zero means that snapshot operations are disabled, while a non-zero value specifies the maximum number of snapshots. @@ -361,7 +361,7 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall provide API for creation of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. @@ -378,7 +378,7 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall create a new snapshot in the selected snapshot slot when the slot is empty. @@ -391,7 +391,7 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall overwrite the selected snapshot slot when the slot is occupied. @@ -404,9 +404,10 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_restore[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall provide API for restoration of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. + The function shall return an error, when referenced snapshot slot is free. .. comp_req:: Snapshot remove API :id: comp_req__kvs__snapshot_remove_api @@ -417,9 +418,10 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_remove[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall provide API for removing of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. + The function shall return an error, when referenced slot is free. .. comp_req:: Explicit snapshot operations :id: comp_req__kvs__explicit_snapshot_operations @@ -430,7 +432,7 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_restore[version==1], feat_req__persistency__snapshot_remove[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding APIs. @@ -443,7 +445,7 @@ Component Requirements :status: valid :version: 1 :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. @@ -456,7 +458,7 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. @@ -469,7 +471,7 @@ Component Requirements :version: 1 :derived_from: feat_req__persistency__snapshot_create[version==1], feat_req__persistency__snapshot_remove[version==1], feat_req__persistency__cfg[version==1] :belongs_to: comp__persistency_kvs[version==1] - :tags: inspected + :tags: valid The component shall provide an API to check whether a slot identified by a snapshot index is free or occupied. From 485cd836a00b942dd0182a14432b574887670556 Mon Sep 17 00:00:00 2001 From: Anna Paola Musio Date: Thu, 6 Aug 2026 15:50:41 +0200 Subject: [PATCH 7/8] fixed comment --- score/kvs/docs/requirements/index.rst | 106 +++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 08d27d064..2a9cd896d 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -339,7 +339,7 @@ Component Requirements as needed. .. comp_req:: Snapshot maximum number - :id: comp_req__kvs__snapshot_max_num + :id: comp_req__kvs__snapshot_max_num_api :reqtype: Functional :security: NO :safety: ASIL_B @@ -437,7 +437,7 @@ Component Requirements The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding APIs. .. comp_req:: Snapshot slot indexing - :id: comp_req__kvs__snapshot_id + :id: comp_req__kvs__snapshot_id_api :reqtype: Functional :security: NO :safety: ASIL_B @@ -475,6 +475,108 @@ Component Requirements The component shall provide an API to check whether a slot identified by a snapshot index is free or occupied. +.. comp_req:: Snapshot Creation +:id: comp_req__kvs__snapshot_creation +:reqtype: Functional +:security: NO +:safety: ASIL_B +:derived_from: feat_req__persistency__snapshot_create[version==1] +:status: invalid +:version: 1 +:belongs_to: comp__persistency_kvs[version==1] +:tags: inspected + + The component shall create a snapshot each time data is stored. + + .. note:: + + This requirement is invalid after change of snapshot handling (see ) + +.. comp_req:: Snapshot Maximum Number +:id: comp_req__kvs__snapshot_max_num +:reqtype: Functional +:security: NO +:safety: ASIL_B +:derived_from: feat_req__persistency__cfg[version==1] +:status: invalid +:version: 1 +:belongs_to: comp__persistency_kvs[version==1] +:tags: inspected + + The component shall maintain a configurable maximum number of snapshots. + + .. note:: + + This requirement is invalid after change of snapshot handling (see ) + +.. comp_req:: Snapshot IDs +:id: comp_req__kvs__snapshot_id +:reqtype: Functional +:security: NO +:safety: ASIL_B +:derived_from: feat_req__persistency__snapshot_create[version==1] +:status: invalid +:version: 1 +:belongs_to: comp__persistency_kvs[version==1] +:tags: inspected + + The component shall assign the ID 1 to the newest snapshot and shall increment the IDs of older snapshots accordingly. + + .. note:: + + This requirement is invalid after change of snapshot handling (see ) + +.. comp_req:: Snapshot Rotation +:id: comp_req__kvs__snapshot_rotate +:reqtype: Functional +:security: NO +:safety: ASIL_B +:derived_from: feat_req__persistency__snapshot_remove[version==1],feat_req__persistency__snapshot_restore[version==1] +:status: invalid +:version: 1 +:belongs_to: comp__persistency_kvs[version==1] +:tags: inspected + + The component shall rotate and delete the oldest snapshot when the maximum number is reached. + + .. note:: + + This requirement is invalid after change of snapshot handling (see ) + +.. comp_req:: Snapshot Restore +:id: comp_req__kvs__snapshot_restore +:reqtype: Functional +:security: NO +:safety: ASIL_B +:derived_from: feat_req__persistency__snapshot_restore[version==1] +:status: invalid +:version: 1 +:belongs_to: comp__persistency_kvs[version==1] +:tags: inspected + + The component shall allow restoration of a snapshot by its ID. + + .. note:: + + This requirement is invalid after change of snapshot handling (see ) + +.. comp_req:: Snapshot Deletion +:id: comp_req__kvs__snapshot_delete +:reqtype: Functional +:security: NO +:safety: ASIL_B +:derived_from: feat_req__persistency__snapshot_remove[version==1] +:status: invalid +:version: 1 +:belongs_to: comp__persistency_kvs[version==1] +:tags: inspected + + The component shall allow deletion of individual snapshots. + + .. note:: + + This requirement is invalid after change of snapshot handling (see ) + .. comp_req:: Engineering Mode :id: comp_req__kvs__eng_mode :reqtype: Functional From 4411cef3ce29e1be5c757d36166619847795da3f Mon Sep 17 00:00:00 2001 From: Tibor Zavartkay Date: Wed, 23 Sep 2026 13:44:59 +0200 Subject: [PATCH 8/8] Review findings --- score/kvs/docs/requirements/index.rst | 64 ++++++++++++++++----------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/score/kvs/docs/requirements/index.rst b/score/kvs/docs/requirements/index.rst index 65369d2e1..33983481d 100644 --- a/score/kvs/docs/requirements/index.rst +++ b/score/kvs/docs/requirements/index.rst @@ -338,8 +338,8 @@ Component Requirements application to implement versioning, including upgrade and downgrade paths, as needed. -.. comp_req:: Snapshot maximum number - :id: comp_req__kvs__snapshot_max_num_api +.. comp_req:: Maximum Number of Snapshots + :id: comp_req__kvs__snapshot_max_num_cfg :reqtype: Functional :security: NO :safety: ASIL_B @@ -349,10 +349,13 @@ Component Requirements :satisfied_by: comp__persistency_kvs[version==1] :tags: valid - The component shall maintain a configurable maximum number of snapshots. The maximum number shall be in the range <0..3>. - A value of zero means that snapshot operations are disabled, while a non-zero value specifies the maximum number of snapshots. + The component shall maintain a configurable maximum number of snapshots. + The maximum number shall be in the range ``<0..3>``. + A value of zero shall disable snapshot operations. + A non-zero value shall specify the maximum number of snapshots. + Default value shall be: ``3``. -.. comp_req:: Snapshot create API +.. comp_req:: Snapshot Create API :id: comp_req__kvs__snapshot_create_api :reqtype: Functional :security: NO @@ -363,13 +366,15 @@ Component Requirements :satisfied_by: comp__persistency_kvs[version==1] :tags: valid - The component shall provide API for creation of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. + The component shall provide an API for creating snapshots. + The API shall accept an argument that selects a snapshot slot by index. + The API should return an error when provided slot index is out of range. See :need:`comp_req__kvs__snapshot_max_num`. .. note:: - A snapshot is a point-in-time, frozen view on all values in a key-value storage. + A snapshot is a point-in-time, frozen view of all values in a key-value storage. -.. comp_req:: Snapshot create +.. comp_req:: Snapshot Create :id: comp_req__kvs__snapshot_create :reqtype: Functional :security: NO @@ -382,7 +387,7 @@ Component Requirements The component shall create a new snapshot in the selected snapshot slot when the slot is empty. -.. comp_req:: Snapshot overwrite +.. comp_req:: Snapshot Overwrite :id: comp_req__kvs__snapshot_overwrite :reqtype: Functional :security: NO @@ -395,7 +400,7 @@ Component Requirements The component shall overwrite the selected snapshot slot when the slot is occupied. -.. comp_req:: Snapshot restore API +.. comp_req:: Snapshot Restore API :id: comp_req__kvs__snapshot_restore_api :reqtype: Functional :security: NO @@ -406,10 +411,12 @@ Component Requirements :satisfied_by: comp__persistency_kvs[version==1] :tags: valid - The component shall provide API for restoration of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. - The function shall return an error, when referenced snapshot slot is free. + The component shall provide an API for restoring snapshots. + The API shall accept an argument that selects a snapshot slot by index. + The function shall return an error when the referenced snapshot slot is free. + The API should return an error when provided slot index is out of range. See :need:`comp_req__kvs__snapshot_max_num`. -.. comp_req:: Snapshot remove API +.. comp_req:: Snapshot Remove API :id: comp_req__kvs__snapshot_remove_api :reqtype: Functional :security: NO @@ -420,10 +427,12 @@ Component Requirements :satisfied_by: comp__persistency_kvs[version==1] :tags: valid - The component shall provide API for removing of snapshots with an argument that selects a dedicated snapshot slot by snapshot index. - The function shall return an error, when referenced slot is free. + The component shall provide an API for removing snapshots. + The API shall accept an argument that selects a snapshot slot by index. + The function shall return an error when the referenced slot is free. + The API should return an error when provided slot index is out of range. See :need:`comp_req__kvs__snapshot_max_num`. -.. comp_req:: Explicit snapshot operations +.. comp_req:: Explicit Snapshot Operations :id: comp_req__kvs__explicit_snapshot_operations :reqtype: Functional :security: NO @@ -436,7 +445,7 @@ Component Requirements The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding APIs. -.. comp_req:: Snapshot slot indexing +.. comp_req:: Snapshot Slot Indexing :id: comp_req__kvs__snapshot_id_api :reqtype: Functional :security: NO @@ -449,7 +458,7 @@ Component Requirements The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on. -.. comp_req:: Snapshot data source +.. comp_req:: Snapshot Data Source :id: comp_req__kvs__snapshot_source :reqtype: Functional :security: NO @@ -460,9 +469,10 @@ Component Requirements :satisfied_by: comp__persistency_kvs[version==1] :tags: valid - The component shall use the live values that were set by the user, regardless of whether the values were flushed to disk. + The component shall use the live values set by the user, regardless of whether the values + have been flushed to disk. -.. comp_req:: Snapshot slot free query API +.. comp_req:: Snapshot Slot Free Query API :id: comp_req__kvs__snapshot_slot_free_api :reqtype: Functional :security: NO @@ -474,6 +484,8 @@ Component Requirements :tags: valid The component shall provide an API to check whether a slot identified by a snapshot index is free or occupied. + The API should return an error when provided slot index is out of range. See :need:`comp_req__kvs__snapshot_max_num`. + .. comp_req:: Snapshot Creation :id: comp_req__kvs__snapshot_creation @@ -490,7 +502,7 @@ Component Requirements .. note:: - This requirement is invalid after change of snapshot handling (see ) + This requirement is invalid after change of snapshot handling (see #436) .. comp_req:: Snapshot Maximum Number :id: comp_req__kvs__snapshot_max_num @@ -507,7 +519,7 @@ Component Requirements .. note:: - This requirement is invalid after change of snapshot handling (see ) + This requirement is invalid after change of snapshot handling (see #436) .. comp_req:: Snapshot IDs :id: comp_req__kvs__snapshot_id @@ -524,7 +536,7 @@ Component Requirements .. note:: - This requirement is invalid after change of snapshot handling (see ) + This requirement is invalid after change of snapshot handling (see #436) .. comp_req:: Snapshot Rotation :id: comp_req__kvs__snapshot_rotate @@ -541,7 +553,7 @@ Component Requirements .. note:: - This requirement is invalid after change of snapshot handling (see ) + This requirement is invalid after change of snapshot handling (see #436) .. comp_req:: Snapshot Restore :id: comp_req__kvs__snapshot_restore @@ -558,7 +570,7 @@ Component Requirements .. note:: - This requirement is invalid after change of snapshot handling (see ) + This requirement is invalid after change of snapshot handling (see #436) .. comp_req:: Snapshot Deletion :id: comp_req__kvs__snapshot_delete @@ -575,7 +587,7 @@ Component Requirements .. note:: - This requirement is invalid after change of snapshot handling (see ) + This requirement is invalid after change of snapshot handling (see #436) .. comp_req:: Engineering Mode :id: comp_req__kvs__eng_mode