# Traceability Report

Generated: 2026-04-12T21:20:26.299284

## Summary

| Metric                     | Count      |
| -------------------------- | ---------- |
| Total Requirements         | 105        |
| Implemented                | 105 (100%) |
| Requires Test Verification | 97         |
| Verified (in tests)        | 97 (100%)  |
| Untraced Requirements      | 0          |
| Orphan Tags                | 0          |

## Traceability Matrix

| Requirement | Verification  | Implementations | Verifications |
| ----------- | ------------- | --------------- | ------------- |
| API-0001    | test          | 1 location(s)   | 3 test(s)     |
| API-0002    | test          | 2 location(s)   | 2 test(s)     |
| API-0003    | test          | 1 location(s)   | 1 test(s)     |
| API-0004    | test          | 1 location(s)   | 1 test(s)     |
| API-0005    | test          | 1 location(s)   | 1 test(s)     |
| API-0006    | test          | 1 location(s)   | 1 test(s)     |
| API-0007    | test          | 1 location(s)   | 3 test(s)     |
| API-0008    | test          | 1 location(s)   | 1 test(s)     |
| API-0009    | test          | 1 location(s)   | 1 test(s)     |
| API-0010    | test          | 1 location(s)   | 2 test(s)     |
| API-0011    | analysis      | 1 location(s)   | ❌ None       |
| API-0012    | test          | 1 location(s)   | 5 test(s)     |
| API-0013    | test          | 3 location(s)   | 8 test(s)     |
| API-0014    | test          | 5 location(s)   | 9 test(s)     |
| DLV-0001    | test          | 1 location(s)   | 2 test(s)     |
| DLV-0002    | test          | 1 location(s)   | 2 test(s)     |
| DLV-0003    | test          | 1 location(s)   | 2 test(s)     |
| DLV-0004    | test          | 1 location(s)   | 3 test(s)     |
| DLV-0005    | test          | 1 location(s)   | 1 test(s)     |
| DLV-0006    | test          | 1 location(s)   | 1 test(s)     |
| DLV-0007    | test          | 1 location(s)   | 1 test(s)     |
| DLV-0008    | test          | 1 location(s)   | 1 test(s)     |
| DLV-0009    | inspection    | 1 location(s)   | 1 test(s)     |
| DLV-0010    | test          | 1 location(s)   | 2 test(s)     |
| DLV-0011    | test          | 1 location(s)   | 4 test(s)     |
| DLV-0012    | test          | 1 location(s)   | 7 test(s)     |
| DLV-0013    | test          | 2 location(s)   | 2 test(s)     |
| PER-0001    | test          | 1 location(s)   | 2 test(s)     |
| PER-0002    | test          | 1 location(s)   | 2 test(s)     |
| PER-0003    | test          | 1 location(s)   | 1 test(s)     |
| PER-0004    | test          | 1 location(s)   | 3 test(s)     |
| PER-0005    | test          | 2 location(s)   | 1 test(s)     |
| PER-0006    | test          | 1 location(s)   | 1 test(s)     |
| PER-0007    | test          | 1 location(s)   | 1 test(s)     |
| PER-0008    | test          | 1 location(s)   | 2 test(s)     |
| PER-0009    | test          | 1 location(s)   | 2 test(s)     |
| PER-0010    | test          | 1 location(s)   | 12 test(s)    |
| PER-0011    | test          | 1 location(s)   | 1 test(s)     |
| PER-0012    | test          | 1 location(s)   | 7 test(s)     |
| PER-0013    | test          | 1 location(s)   | 5 test(s)     |
| PER-0014    | test          | 2 location(s)   | 1 test(s)     |
| PER-0015    | test          | 1 location(s)   | 2 test(s)     |
| PER-0016    | test          | 3 location(s)   | 7 test(s)     |
| PER-0017    | test          | 2 location(s)   | 2 test(s)     |
| PER-0018    | test          | 2 location(s)   | 5 test(s)     |
| PER-0019    | test          | 3 location(s)   | 3 test(s)     |
| PER-0020    | test          | 1 location(s)   | 3 test(s)     |
| PER-0021    | test          | 1 location(s)   | 1 test(s)     |
| SCH-0001    | test          | 3 location(s)   | 3 test(s)     |
| SCH-0002    | test          | 2 location(s)   | 11 test(s)    |
| SCH-0003    | test          | 1 location(s)   | 1 test(s)     |
| SCH-0004    | test          | 2 location(s)   | 1 test(s)     |
| SYS-0001    | test          | 2 location(s)   | 1 test(s)     |
| SYS-0002    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0003    | demonstration | 1 location(s)   | 1 test(s)     |
| SYS-0004    | analysis      | 2 location(s)   | ❌ None       |
| SYS-0005    | analysis      | 2 location(s)   | ❌ None       |
| SYS-0006    | analysis      | 2 location(s)   | ❌ None       |
| SYS-0007    | inspection    | 1 location(s)   | ❌ None       |
| SYS-0008    | inspection    | 1 location(s)   | ❌ None       |
| SYS-0009    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0010    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0011    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0012    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0013    | test          | 3 location(s)   | 4 test(s)     |
| SYS-0014    | test          | 1 location(s)   | 2 test(s)     |
| SYS-0015    | test          | 1 location(s)   | 4 test(s)     |
| SYS-0016    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0017    | test          | 8 location(s)   | 7 test(s)     |
| SYS-0018    | test          | 5 location(s)   | 14 test(s)    |
| SYS-0019    | test          | 5 location(s)   | 2 test(s)     |
| SYS-0020    | test          | 2 location(s)   | 3 test(s)     |
| SYS-0021    | test          | 2 location(s)   | 1 test(s)     |
| SYS-0022    | test          | 1 location(s)   | 5 test(s)     |
| SYS-0023    | test          | 1 location(s)   | 1 test(s)     |
| SYS-0024    | test          | 1 location(s)   | 21 test(s)    |
| SYS-0025    | test          | 1 location(s)   | 6 test(s)     |
| WS-0001     | test          | 2 location(s)   | 1 test(s)     |
| WS-0002     | test          | 1 location(s)   | 2 test(s)     |
| WS-0003     | test          | 1 location(s)   | 2 test(s)     |
| WS-0004     | test          | 1 location(s)   | 2 test(s)     |
| WS-0005     | test          | 1 location(s)   | 2 test(s)     |
| WS-0006     | test          | 1 location(s)   | 4 test(s)     |
| WS-0007     | test          | 1 location(s)   | 6 test(s)     |
| WS-0008     | test          | 1 location(s)   | 1 test(s)     |
| WS-0009     | test          | 1 location(s)   | 1 test(s)     |
| WS-0010     | test          | 1 location(s)   | 1 test(s)     |
| WS-0011     | test          | 1 location(s)   | 1 test(s)     |
| WS-0012     | test          | 1 location(s)   | 1 test(s)     |
| WS-0013     | test          | 1 location(s)   | 1 test(s)     |
| WS-0014     | test          | 1 location(s)   | 1 test(s)     |
| WS-0015     | test          | 1 location(s)   | 1 test(s)     |
| WS-0016     | test          | 1 location(s)   | 1 test(s)     |
| WS-0017     | test          | 1 location(s)   | 1 test(s)     |
| WS-0018     | test          | 2 location(s)   | 2 test(s)     |
| WS-0019     | test          | 1 location(s)   | 1 test(s)     |
| WS-0020     | test          | 6 location(s)   | 3 test(s)     |
| WS-0021     | test          | 2 location(s)   | 1 test(s)     |
| WS-0022     | test          | 2 location(s)   | 3 test(s)     |
| WS-0023     | test          | 2 location(s)   | 4 test(s)     |
| WS-0024     | test          | 2 location(s)   | 2 test(s)     |
| WS-0025     | test          | 1 location(s)   | 1 test(s)     |
| WS-0026     | test          | 1 location(s)   | 2 test(s)     |
| WS-0027     | test          | 2 location(s)   | 1 test(s)     |
| WS-0028     | test          | 1 location(s)   | 3 test(s)     |

## Detailed Traces

### API-0001

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide an HTTP endpoint `POST /create-queue` to
> create a new queue by name ...

**Implementations:**

- (api) [api.rs:1177](src/api.rs#L1177)

**Verifications:**

- (tests) [api_tests.rs:669](tests/api_tests.rs#L669)
- (tests) [api_tests.rs:724](tests/api_tests.rs#L724)
- (tests) [api_tests.rs:779](tests/api_tests.rs#L779)

### API-0002

Layers: implementations=api+other; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to publish a message that
> accepts `queue`, `priorit...

**Implementations:**

- (api) [api.rs:1513](src/api.rs#L1513)
- (other) [traceability.py:9](scripts/traceability.py#L9)

**Verifications:**

- (tests) [api_tests.rs:158](tests/api_tests.rs#L158)
- (tests) [api_tests.rs:178](tests/api_tests.rs#L178)

### API-0003

Layers: implementations=storage; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to consume from a
> specified queue that returns eith...

**Implementations:**

- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [storage_tests.rs:59](tests/storage_tests.rs#L59)

### API-0004

Layers: implementations=storage; verifications=tests

> The Qrusty server shall provide an HTTP endpoint `POST /ack/{queue}/{id}` to
> acknowledge (`ack`) a m...

**Implementations:**

- (storage) [storage.rs:2050](src/storage.rs#L2050)

**Verifications:**

- (tests) [storage_tests.rs:236](tests/storage_tests.rs#L236)

### API-0005

Layers: implementations=storage; verifications=tests

> The Qrusty server shall provide an HTTP endpoint `POST /nack/{queue}/{id}` to
> negative-acknowledge (...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)

**Verifications:**

- (tests) [storage_tests.rs:277](tests/storage_tests.rs#L277)

### API-0006

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to return queue
> statistics including per-queue coun...

**Implementations:**

- (api) [api.rs:2089](src/api.rs#L2089)

**Verifications:**

- (tests) [api_tests.rs:87](tests/api_tests.rs#L87)

### API-0007

Layers: implementations=api; verifications=other+tests

> The Qrusty server shall provide an HTTP endpoint to return statistics for
> a specified queue includin...

**Implementations:**

- (api) [api.rs:1971](src/api.rs#L1971)

**Verifications:**

- (tests) [api_tests.rs:824](tests/api_tests.rs#L824)
- (tests) [api_tests.rs:865](tests/api_tests.rs#L865)
- (other) [smoke_test.py:11](scripts/smoke_test.py#L11)

### API-0008

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to list active queue
> names.

**Implementations:**

- (api) [api.rs:2030](src/api.rs#L2030)

**Verifications:**

- (tests) [api_tests.rs:1009](tests/api_tests.rs#L1009)

### API-0009

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to purge all messages
> from a specified queue while ...

**Implementations:**

- (api) [api.rs:1364](src/api.rs#L1364)

**Verifications:**

- (tests) [api_tests.rs:1248](tests/api_tests.rs#L1248)

### API-0010

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to delete a specified
> queue such that all messages ...

**Implementations:**

- (api) [api.rs:1315](src/api.rs#L1315)

**Verifications:**

- (tests) [api_tests.rs:1177](tests/api_tests.rs#L1177)
- (tests) [api_tests.rs:1793](tests/api_tests.rs#L1793)

### API-0011

Layers: implementations=api; verifications=-

> The Qrusty server shall provide an HTTP endpoint `GET /queues/{queue}/metrics`
> to return per-queue t...

**Implementations:**

- (api) [api.rs:2066](src/api.rs#L2066)

### API-0012

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide an HTTP endpoint to update a queue's
> configuration. The request body...

**Implementations:**

- (api) [api.rs:1243](src/api.rs#L1243)

**Verifications:**

- (tests) [api_tests.rs:1326](tests/api_tests.rs#L1326)
- (tests) [api_tests.rs:1380](tests/api_tests.rs#L1380)
- (tests) [api_tests.rs:1410](tests/api_tests.rs#L1410)
- (tests) [api_tests.rs:1471](tests/api_tests.rs#L1471)
- (tests) [api_tests.rs:1504](tests/api_tests.rs#L1504)

### API-0013

Layers: implementations=api+core; verifications=core+tests

> The Qrusty server shall expose an HTTP endpoint:

    GET /operation-timings?seconds=N

where `secon...

**Implementations:**

- (core) [operation_timing.rs:5](src/operation_timing.rs#L5)
- (api) [api.rs:402](src/api.rs#L402)
- (api) [api.rs:2049](src/api.rs#L2049)

**Verifications:**

- (core) [operation_timing.rs:244](src/operation_timing.rs#L244)
- (core) [operation_timing.rs:291](src/operation_timing.rs#L291)
- (core) [operation_timing.rs:303](src/operation_timing.rs#L303)
- (core) [operation_timing.rs:311](src/operation_timing.rs#L311)
- (tests) [api_tests.rs:2222](tests/api_tests.rs#L2222)
- (tests) [api_tests.rs:2231](tests/api_tests.rs#L2231)
- (tests) [api_tests.rs:2271](tests/api_tests.rs#L2271)
- (tests) [api_tests.rs:2404](tests/api_tests.rs#L2404)

### API-0014

Layers: implementations=api+core+storage; verifications=tests

> The Qrusty server shall provide an HTTP endpoint:

    POST /force-unlock/{queue}

that force-unlock...

**Implementations:**

- (core) [memory_storage.rs:1019](src/memory_storage.rs#L1019)
- (storage) [storage.rs:2823](src/storage.rs#L2823)
- (api) [api.rs:620](src/api.rs#L620)
- (api) [api.rs:1418](src/api.rs#L1418)
- (core) [client.rs:488](crates/qrusty_client/src/client.rs#L488)

**Verifications:**

- (tests) [api_error_tests.rs:248](tests/api_error_tests.rs#L248)
- (tests) [memory_storage_tests.rs:930](tests/memory_storage_tests.rs#L930)
- (tests) [memory_storage_tests.rs:967](tests/memory_storage_tests.rs#L967)
- (tests) [api_tests.rs:2427](tests/api_tests.rs#L2427)
- (tests) [api_tests.rs:2475](tests/api_tests.rs#L2475)
- (tests) [storage_tests.rs:3560](tests/storage_tests.rs#L3560)
- (tests) [storage_tests.rs:3597](tests/storage_tests.rs#L3597)
- (tests) [storage_tests.rs:3605](tests/storage_tests.rs#L3605)
- (tests) [storage_tests.rs:3632](tests/storage_tests.rs#L3632)

### DLV-0001

Layers: implementations=storage; verifications=tests

> When a message is consumed, the Qrusty server shall lock the message to
> the requesting consumer for ...

**Implementations:**

- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [storage_tests.rs:59](tests/storage_tests.rs#L59)
- (tests) [storage_tests.rs:218](tests/storage_tests.rs#L218)

### DLV-0002

Layers: implementations=storage; verifications=tests

> When a message is consumed, the Qrusty server shall increment the message
> retry counter (`retry_coun...

**Implementations:**

- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [storage_tests.rs:59](tests/storage_tests.rs#L59)
- (tests) [storage_tests.rs:218](tests/storage_tests.rs#L218)

### DLV-0003

Layers: implementations=storage; verifications=other+tests

> The Qrusty server shall only allow the consumer that currently holds a
> message lock to successfully ...

**Implementations:**

- (storage) [storage.rs:2050](src/storage.rs#L2050)

**Verifications:**

- (tests) [storage_tests.rs:236](tests/storage_tests.rs#L236)
- (other) [traceability.py:10](scripts/traceability.py#L10)

### DLV-0004

Layers: implementations=storage; verifications=tests

> The Qrusty server shall only allow the consumer that currently holds a
> message lock to successfully ...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)

**Verifications:**

- (tests) [storage_tests.rs:277](tests/storage_tests.rs#L277)
- (tests) [storage_tests.rs:1815](tests/storage_tests.rs#L1815)
- (tests) [storage_tests.rs:3093](tests/storage_tests.rs#L3093)

### DLV-0005

Layers: implementations=storage; verifications=tests

> The Qrusty server shall automatically unlock messages whose lock timeout
> has expired so they become ...

**Implementations:**

- (storage) [storage.rs:2512](src/storage.rs#L2512)

**Verifications:**

- (tests) [storage_tests.rs:764](tests/storage_tests.rs#L764)

### DLV-0006

Layers: implementations=storage; verifications=tests

> The Qrusty server shall support a configurable maximum retry count per
> message, defaulting to 3 retr...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)

**Verifications:**

- (tests) [storage_tests.rs:277](tests/storage_tests.rs#L277)

### DLV-0007

Layers: implementations=storage; verifications=tests

> When a message is negative-acknowledged and its retry count is less than
> its maximum retry count, th...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)

**Verifications:**

- (tests) [storage_tests.rs:277](tests/storage_tests.rs#L277)

### DLV-0008

Layers: implementations=storage; verifications=tests

> When a message is negative-acknowledged and its retry count equals or
> exceeds its maximum retry coun...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)

**Verifications:**

- (tests) [storage_tests.rs:304](tests/storage_tests.rs#L304)

### DLV-0009

Layers: implementations=storage; verifications=tests

> The Qrusty server shall store dead letter queue messages under a key
> pattern of `\_dlq/{original_queu...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)

**Verifications:**

- (tests) [storage_tests.rs:304](tests/storage_tests.rs#L304)

### DLV-0010

Layers: implementations=storage; verifications=tests

> When `allow_duplicates` is `false` for a queue, the Qrusty server shall
> reject a push request whose ...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [storage_tests.rs:2127](tests/storage_tests.rs#L2127)
- (tests) [storage_tests.rs:2249](tests/storage_tests.rs#L2249)

### DLV-0011

Layers: implementations=storage; verifications=tests

> The `pop()` operation shall be atomic with respect to concurrent callers on
> the same queue. At most...

**Implementations:**

- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [concurrency_tests.rs:5](tests/concurrency_tests.rs#L5)
- (tests) [concurrency_tests.rs:53](tests/concurrency_tests.rs#L53)
- (tests) [concurrency_tests.rs:106](tests/concurrency_tests.rs#L106)
- (tests) [concurrency_tests.rs:144](tests/concurrency_tests.rs#L144)

### DLV-0012

Layers: implementations=core; verifications=tests

> All storage backends shall be free of deadlocks under any combination of
> concurrent producer and con...

**Implementations:**

- (core) [memory_storage.rs:410](src/memory_storage.rs#L410)

**Verifications:**

- (tests) [concurrency_tests.rs:5](tests/concurrency_tests.rs#L5)
- (tests) [concurrency_tests.rs:192](tests/concurrency_tests.rs#L192)
- (tests) [concurrency_tests.rs:255](tests/concurrency_tests.rs#L255)
- (tests) [concurrency_tests.rs:310](tests/concurrency_tests.rs#L310)
- (tests) [concurrency_tests.rs:447](tests/concurrency_tests.rs#L447)
- (tests) [concurrency_tests.rs:485](tests/concurrency_tests.rs#L485)
- (tests) [concurrency_tests.rs:523](tests/concurrency_tests.rs#L523)

### DLV-0013

Layers: implementations=storage; verifications=tests

> Expired message locks shall be recovered by `unlock_expired_messages`
> even when the in-memory `locke...

**Implementations:**

- (storage) [storage.rs:233](src/storage.rs#L233)
- (storage) [storage.rs:2512](src/storage.rs#L2512)

**Verifications:**

- (tests) [storage_tests.rs:801](tests/storage_tests.rs#L801)
- (tests) [storage_tests.rs:849](tests/storage_tests.rs#L849)

### PER-0001

Layers: implementations=storage; verifications=tests

> The Qrusty server shall use a filesystem-backed persistent store
> configurable via the `DATA_PATH` en...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [storage_tests.rs:47](tests/storage_tests.rs#L47)
- (tests) [storage_tests.rs:408](tests/storage_tests.rs#L408)

### PER-0002

Layers: implementations=storage; verifications=tests

> The Qrusty server shall support multiple named queues and keep messages
> isolated such that consuming...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [storage_tests.rs:47](tests/storage_tests.rs#L47)
- (tests) [storage_tests.rs:408](tests/storage_tests.rs#L408)

### PER-0003

Layers: implementations=storage; verifications=tests

> The Qrusty server shall support a per-queue configuration flag
> `allow_duplicates` that controls whet...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [storage_tests.rs:919](tests/storage_tests.rs#L919)

### PER-0004

Layers: implementations=storage; verifications=tests

> When `allow_duplicates` is `false` for a queue and a message is published,
> the Qrusty server shall r...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [storage_tests.rs:933](tests/storage_tests.rs#L933)
- (tests) [storage_tests.rs:1753](tests/storage_tests.rs#L1753)
- (tests) [storage_tests.rs:1815](tests/storage_tests.rs#L1815)

### PER-0005

Layers: implementations=storage; verifications=tests

> When `allow_duplicates` is `false` for a queue and a locked message
> becomes unlocked (via timeout ex...

**Implementations:**

- (storage) [storage.rs:2142](src/storage.rs#L2142)
- (storage) [storage.rs:2512](src/storage.rs#L2512)

**Verifications:**

- (tests) [storage_tests.rs:764](tests/storage_tests.rs#L764)

### PER-0006

Layers: implementations=storage; verifications=tests

> When a queue's configuration is changed such that `allow_duplicates`
> transitions from `true` to `fal...

**Implementations:**

- (storage) [storage.rs:258](src/storage.rs#L258)

**Verifications:**

- (tests) [storage_tests.rs:1020](tests/storage_tests.rs#L1020)

### PER-0007

Layers: implementations=storage; verifications=tests

> When a queue's configuration is changed such that `allow_duplicates`
> transitions from `false` to `tr...

**Implementations:**

- (storage) [storage.rs:258](src/storage.rs#L258)

**Verifications:**

- (tests) [storage_tests.rs:1069](tests/storage_tests.rs#L1069)

### PER-0008

Layers: implementations=storage; verifications=tests

> The Qrusty server shall maintain, for each queue whose configuration has
> `allow_duplicates` set to `...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [storage_tests.rs:2127](tests/storage_tests.rs#L2127)
- (tests) [storage_tests.rs:3017](tests/storage_tests.rs#L3017)

### PER-0009

Layers: implementations=storage; verifications=tests

> On startup, for every queue whose stored configuration has
> `allow_duplicates` set to `false`, the Qr...

**Implementations:**

- (storage) [storage.rs:739](src/storage.rs#L739)

**Verifications:**

- (tests) [storage_tests.rs:2219](tests/storage_tests.rs#L2219)
- (tests) [storage_tests.rs:2249](tests/storage_tests.rs#L2249)

### PER-0010

Layers: implementations=storage; verifications=tests

> The Qrusty server shall keep the in-memory payload set for each
> `allow_duplicates = false` queue con...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [api_tests.rs:2122](tests/api_tests.rs#L2122)
- (tests) [storage_tests.rs:2150](tests/storage_tests.rs#L2150)
- (tests) [storage_tests.rs:2172](tests/storage_tests.rs#L2172)
- (tests) [storage_tests.rs:2196](tests/storage_tests.rs#L2196)
- (tests) [storage_tests.rs:2280](tests/storage_tests.rs#L2280)
- (tests) [storage_tests.rs:2307](tests/storage_tests.rs#L2307)
- (tests) [storage_tests.rs:2331](tests/storage_tests.rs#L2331)
- (tests) [storage_tests.rs:2355](tests/storage_tests.rs#L2355)
- (tests) [storage_tests.rs:2379](tests/storage_tests.rs#L2379)
- (tests) [storage_tests.rs:2410](tests/storage_tests.rs#L2410)
- (tests) [storage_tests.rs:2443](tests/storage_tests.rs#L2443)
- (tests) [storage_tests.rs:3043](tests/storage_tests.rs#L3043)

### PER-0011

Layers: implementations=core; verifications=tests

> When `STORAGE_MODE=memory`, the server shall log a warning at startup
> indicating that all data will ...

**Implementations:**

- (core) [memory_storage.rs:2](src/memory_storage.rs#L2)

**Verifications:**

- (tests) [memory_integration_tests.rs:2](tests/memory_integration_tests.rs#L2)

### PER-0012

Layers: implementations=storage; verifications=tests

> The `push()` operation on the RocksDB backend shall not hold any in-memory
> lock for the duration of ...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)

**Verifications:**

- (tests) [concurrency_tests.rs:5](tests/concurrency_tests.rs#L5)
- (tests) [concurrency_tests.rs:371](tests/concurrency_tests.rs#L371)
- (tests) [concurrency_tests.rs:409](tests/concurrency_tests.rs#L409)
- (tests) [concurrency_tests.rs:447](tests/concurrency_tests.rs#L447)
- (tests) [concurrency_tests.rs:485](tests/concurrency_tests.rs#L485)
- (tests) [concurrency_tests.rs:523](tests/concurrency_tests.rs#L523)
- (tests) [api_tests.rs:2164](tests/api_tests.rs#L2164)

### PER-0013

Layers: implementations=storage; verifications=tests

> When a queue is deleted (via `delete_queue`), the storage backend shall
> remove all dead-letter queue...

**Implementations:**

- (storage) [storage.rs:2934](src/storage.rs#L2934)

**Verifications:**

- (tests) [memory_storage_tests.rs:791](tests/memory_storage_tests.rs#L791)
- (tests) [api_tests.rs:1793](tests/api_tests.rs#L1793)
- (tests) [api_tests.rs:1851](tests/api_tests.rs#L1851)
- (tests) [storage_tests.rs:2804](tests/storage_tests.rs#L2804)
- (tests) [storage_tests.rs:2837](tests/storage_tests.rs#L2837)

### PER-0014

Layers: implementations=core+storage; verifications=tests

> The duplicate detection mechanism (PER-0008) shall use the xxh3_128 hash
> function to compute a 128-b...

**Implementations:**

- (core) [memory_storage.rs:37](src/memory_storage.rs#L37)
- (storage) [storage.rs:36](src/storage.rs#L36)

**Verifications:**

- (tests) [storage_tests.rs:3017](tests/storage_tests.rs#L3017)

### PER-0015

Layers: implementations=storage; verifications=storage

> The RocksDB block cache size shall be configurable via the
> `ROCKSDB_CACHE_MB` environment variable, ...

**Implementations:**

- (storage) [storage.rs:564](src/storage.rs#L564)

**Verifications:**

- (storage) [storage.rs:4062](src/storage.rs#L4062)
- (storage) [storage.rs:4080](src/storage.rs#L4080)

### PER-0016

Layers: implementations=core+storage; verifications=tests

> Message payloads shall be stored in append-only memory-mapped files
> managed by a PayloadStore. Rock...

**Implementations:**

- (core) [payload_store.rs:2](src/payload_store.rs#L2)
- (storage) [storage.rs:1624](src/storage.rs#L1624)
- (storage) [storage.rs:1746](src/storage.rs#L1746)

**Verifications:**

- (tests) [storage_tests.rs:2995](tests/storage_tests.rs#L2995)
- (tests) [storage_tests.rs:3017](tests/storage_tests.rs#L3017)
- (tests) [storage_tests.rs:3043](tests/storage_tests.rs#L3043)
- (tests) [storage_tests.rs:3093](tests/storage_tests.rs#L3093)
- (tests) [storage_tests.rs:3115](tests/storage_tests.rs#L3115)
- (tests) [storage_tests.rs:3218](tests/storage_tests.rs#L3218)
- (tests) [storage_tests.rs:3389](tests/storage_tests.rs#L3389)

### PER-0017

Layers: implementations=core+storage; verifications=tests

> A background compaction task shall periodically rewrite live payloads
> to a new segment file and atom...

**Implementations:**

- (core) [payload_store.rs:2](src/payload_store.rs#L2)
- (storage) [storage.rs:1152](src/storage.rs#L1152)

**Verifications:**

- (tests) [storage_tests.rs:3418](tests/storage_tests.rs#L3418)
- (tests) [storage_tests.rs:3497](tests/storage_tests.rs#L3497)

### PER-0018

Layers: implementations=core+storage; verifications=tests

> On crash recovery, the PayloadStore shall be reconstructable from
> the PayloadRefs stored in RocksDB....

**Implementations:**

- (core) [payload_store.rs:2](src/payload_store.rs#L2)
- (storage) [storage.rs:1624](src/storage.rs#L1624)

**Verifications:**

- (tests) [storage_tests.rs:2995](tests/storage_tests.rs#L2995)
- (tests) [storage_tests.rs:3069](tests/storage_tests.rs#L3069)
- (tests) [storage_tests.rs:3115](tests/storage_tests.rs#L3115)
- (tests) [storage_tests.rs:3155](tests/storage_tests.rs#L3155)
- (tests) [storage_tests.rs:3218](tests/storage_tests.rs#L3218)

### PER-0019

Layers: implementations=storage; verifications=tests

> Messages with unrecoverable payload references (missing or corrupted
> segment files) shall be automat...

**Implementations:**

- (storage) [storage.rs:830](src/storage.rs#L830)
- (storage) [storage.rs:1624](src/storage.rs#L1624)
- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [storage_tests.rs:3274](tests/storage_tests.rs#L3274)
- (tests) [storage_tests.rs:3318](tests/storage_tests.rs#L3318)
- (tests) [storage_tests.rs:3350](tests/storage_tests.rs#L3350)

### PER-0020

Layers: implementations=storage; verifications=tests

> Payload compaction shall invalidate the in-memory hot tier after updating
> RocksDB references, so tha...

**Implementations:**

- (storage) [storage.rs:1746](src/storage.rs#L1746)

**Verifications:**

- (tests) [storage_tests.rs:3418](tests/storage_tests.rs#L3418)
- (tests) [storage_tests.rs:3459](tests/storage_tests.rs#L3459)
- (tests) [storage_tests.rs:3478](tests/storage_tests.rs#L3478)

### PER-0021

Layers: implementations=core; verifications=tests

> Payload compaction with zero live references shall still clean up old
> segment files and their memory...

**Implementations:**

- (core) [payload_store.rs:308](src/payload_store.rs#L308)

**Verifications:**

- (tests) [storage_tests.rs:3497](tests/storage_tests.rs#L3497)

### SCH-0001

Layers: implementations=other+storage; verifications=tests

> The Qrusty server shall support configuring per-queue message ordering
> with at least the modes FIFO,...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)
- (storage) [storage.rs:1828](src/storage.rs#L1828)
- (other) [traceability.py:11](scripts/traceability.py#L11)

**Verifications:**

- (tests) [storage_tests.rs:82](tests/storage_tests.rs#L82)
- (tests) [storage_tests.rs:85](tests/storage_tests.rs#L85)
- (tests) [storage_tests.rs:478](tests/storage_tests.rs#L478)

### SCH-0002

Layers: implementations=storage; verifications=tests

> The Qrusty server shall support two priority kinds: numeric priorities in
> the full unsigned 64-bit i...

**Implementations:**

- (storage) [storage.rs:1660](src/storage.rs#L1660)
- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [memory_storage_tests.rs:827](tests/memory_storage_tests.rs#L827)
- (tests) [memory_storage_tests.rs:867](tests/memory_storage_tests.rs#L867)
- (tests) [memory_storage_tests.rs:898](tests/memory_storage_tests.rs#L898)
- (tests) [api_tests.rs:2063](tests/api_tests.rs#L2063)
- (tests) [storage_tests.rs:82](tests/storage_tests.rs#L82)
- (tests) [storage_tests.rs:85](tests/storage_tests.rs#L85)
- (tests) [storage_tests.rs:478](tests/storage_tests.rs#L478)
- (tests) [storage_tests.rs:2864](tests/storage_tests.rs#L2864)
- (tests) [storage_tests.rs:2903](tests/storage_tests.rs#L2903)
- (tests) [storage_tests.rs:2932](tests/storage_tests.rs#L2932)
- (tests) [storage_tests.rs:2968](tests/storage_tests.rs#L2968)

### SCH-0003

Layers: implementations=storage; verifications=tests

> When a queue is configured with FIFO ordering, the Qrusty server shall
> ignore message priority value...

**Implementations:**

- (storage) [storage.rs:1828](src/storage.rs#L1828)

**Verifications:**

- (tests) [storage_tests.rs:113](tests/storage_tests.rs#L113)

### SCH-0004

Layers: implementations=storage; verifications=tests

> When a locked message times out or is negative-acknowledged and made
> available for retry, the Qrusty...

**Implementations:**

- (storage) [storage.rs:1828](src/storage.rs#L1828)
- (storage) [storage.rs:2512](src/storage.rs#L2512)

**Verifications:**

- (tests) [storage_tests.rs:143](tests/storage_tests.rs#L143)

### SYS-0001

Layers: implementations=core+other; verifications=tests

> The Qrusty server shall bind and listen for HTTP requests on a TCP address
> configurable via the `BIN...

**Implementations:**

- (core) [main.rs:90](src/main.rs#L90)
- (other) [traceability.py:9](scripts/traceability.py#L9)

**Verifications:**

- (tests) [storage_tests.rs:193](tests/storage_tests.rs#L193)

### SYS-0002

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide a `/health` endpoint that always responds
> with HTTP `200 OK` and a J...

**Implementations:**

- (api) [api.rs:1132](src/api.rs#L1132)

**Verifications:**

- (tests) [api_tests.rs:75](tests/api_tests.rs#L75)

### SYS-0003

Layers: implementations=api; verifications=tests

> The Qrusty server shall serve a browser-accessible web UI from a
> configurable directory and expose i...

**Implementations:**

- (api) [api.rs:1046](src/api.rs#L1046)

**Verifications:**

- (tests) [api_tests.rs:196](tests/api_tests.rs#L196)

### SYS-0004

Layers: implementations=api; verifications=-

> The Qrusty server shall maintain per-queue time-series metrics suitable for
> powering a UI statistics...

**Implementations:**

- (api) [api.rs:920](src/api.rs#L920)
- (api) [api.rs:2066](src/api.rs#L2066)

### SYS-0005

Layers: implementations=api; verifications=-

> The Qrusty server shall record, for each queue at a 1 second sampling
> interval, the queue's total me...

**Implementations:**

- (api) [api.rs:920](src/api.rs#L920)
- (api) [api.rs:2066](src/api.rs#L2066)

### SYS-0006

Layers: implementations=api; verifications=-

> The Qrusty server shall record, for each queue at a 1 second sampling
> interval, per-second event rat...

**Implementations:**

- (api) [api.rs:920](src/api.rs#L920)
- (api) [api.rs:2066](src/api.rs#L2066)

### SYS-0007

Layers: implementations=core; verifications=-

> The Qrusty web UI shall display multi-trace graphs using visual encodings
> beyond color alone (for ex...

**Implementations:**

- (core) [QueueDetailPage.tsx:55](web_ui/src/app/components/QueueDetailPage.tsx#L55)

### SYS-0008

Layers: implementations=core; verifications=-

> The Qrusty web UI shall allow an operator to edit a queue's name and
> `allow_duplicates` setting from...

**Implementations:**

- (core) [QueueDetailPage.tsx:56](web_ui/src/app/components/QueueDetailPage.tsx#L56)

### SYS-0009

Layers: implementations=core; verifications=tests

> The Qrusty web UI shall allow an operator to edit a queue's name and
> `allow_duplicates` setting from...

**Implementations:**

- (core) [AdministrationTab.tsx:7](web_ui/src/app/components/tabs/AdministrationTab.tsx#L7)

**Verifications:**

- (tests) [AdministrationTab.test.tsx:1](web_ui/src/tests/AdministrationTab.test.tsx#L1)

### SYS-0010

Layers: implementations=api; verifications=tests

> The Qrusty server shall provide a WebSocket endpoint at `GET /ws` on the
> same TCP address and port a...

**Implementations:**

- (api) [api.rs:1162](src/api.rs#L1162)

**Verifications:**

- (tests) [ws_tests.rs:106](tests/ws_tests.rs#L106)

### SYS-0011

Layers: implementations=other; verifications=other

> The Qrusty project shall provide a live smoke test script
> (`scripts/smoke_test.py`) that starts a re...

**Implementations:**

- (other) [smoke_test.py:10](scripts/smoke_test.py#L10)

**Verifications:**

- (other) [smoke_test.py:11](scripts/smoke_test.py#L11)

### SYS-0012

Layers: implementations=other; verifications=other

> The smoke test shall assert that `publish_rate_per_sec` and
> `ack_rate_per_sec` reported by the `/sta...

**Implementations:**

- (other) [smoke_test.py:10](scripts/smoke_test.py#L10)

**Verifications:**

- (other) [smoke_test.py:11](scripts/smoke_test.py#L11)

### SYS-0013

Layers: implementations=core; verifications=core+tests

> The server shall support an in-memory storage backend selectable via the
> `STORAGE_MODE` environment ...

**Implementations:**

- (core) [memory_storage.rs:2](src/memory_storage.rs#L2)
- (core) [main.rs:228](src/main.rs#L228)
- (core) [main.rs:243](src/main.rs#L243)

**Verifications:**

- (core) [main.rs:583](src/main.rs#L583)
- (core) [main.rs:656](src/main.rs#L656)
- (tests) [memory_integration_tests.rs:2](tests/memory_integration_tests.rs#L2)
- (tests) [memory_storage_tests.rs:2](tests/memory_storage_tests.rs#L2)

### SYS-0014

Layers: implementations=api; verifications=tests

> The metrics sampler background task shall retrieve statistics for all queues
> in a single `get_all_qu...

**Implementations:**

- (api) [api.rs:920](src/api.rs#L920)

**Verifications:**

- (tests) [concurrency_tests.rs:5](tests/concurrency_tests.rs#L5)
- (tests) [concurrency_tests.rs:576](tests/concurrency_tests.rs#L576)

### SYS-0015

Layers: implementations=core; verifications=core+tests

> The log capture layer (LogCaptureLayer) shall not spawn a new async task
> per log event. The `on_eve...

**Implementations:**

- (core) [log_buffer.rs:3](src/log_buffer.rs#L3)

**Verifications:**

- (core) [log_buffer.rs:239](src/log_buffer.rs#L239)
- (tests) [concurrency_tests.rs:5](tests/concurrency_tests.rs#L5)
- (tests) [concurrency_tests.rs:618](tests/concurrency_tests.rs#L618)
- (tests) [concurrency_tests.rs:641](tests/concurrency_tests.rs#L641)

### SYS-0016

Layers: implementations=api; verifications=tests

> All RocksDB storage operations (push, pop, ack, nack, batch_ack,
> batch_nack, get_queue_stats, get_al...

**Implementations:**

- (api) [api.rs:630](src/api.rs#L630)

**Verifications:**

- (tests) [api_tests.rs:12](tests/api_tests.rs#L12)

### SYS-0017

Layers: implementations=api+core; verifications=core+tests

> The Qrusty server shall maintain per-operation timing metrics for all
> key operations at two granular...

**Implementations:**

- (core) [operation_timing.rs:5](src/operation_timing.rs#L5)
- (api) [api.rs:1549](src/api.rs#L1549)
- (api) [api.rs:1653](src/api.rs#L1653)
- (api) [api.rs:1717](src/api.rs#L1717)
- (api) [api.rs:1790](src/api.rs#L1790)
- (api) [api.rs:1836](src/api.rs#L1836)
- (api) [api.rs:1880](src/api.rs#L1880)
- (api) [api.rs:1987](src/api.rs#L1987)

**Verifications:**

- (core) [operation_timing.rs:200](src/operation_timing.rs#L200)
- (core) [operation_timing.rs:216](src/operation_timing.rs#L216)
- (core) [operation_timing.rs:232](src/operation_timing.rs#L232)
- (core) [operation_timing.rs:272](src/operation_timing.rs#L272)
- (core) [operation_timing.rs:324](src/operation_timing.rs#L324)
- (core) [operation_timing.rs:356](src/operation_timing.rs#L356)
- (tests) [api_tests.rs:2299](tests/api_tests.rs#L2299)

### SYS-0018

Layers: implementations=storage; verifications=storage

> The Qrusty server shall maintain an in-memory cache of per-queue message
> counts (available and locke...

**Implementations:**

- (storage) [storage.rs:111](src/storage.rs#L111)
- (storage) [storage.rs:780](src/storage.rs#L780)
- (storage) [storage.rs:2698](src/storage.rs#L2698)
- (storage) [storage.rs:2750](src/storage.rs#L2750)
- (storage) [storage.rs:2792](src/storage.rs#L2792)

**Verifications:**

- (storage) [storage.rs:3499](src/storage.rs#L3499)
- (storage) [storage.rs:3514](src/storage.rs#L3514)
- (storage) [storage.rs:3530](src/storage.rs#L3530)
- (storage) [storage.rs:3546](src/storage.rs#L3546)
- (storage) [storage.rs:3562](src/storage.rs#L3562)
- (storage) [storage.rs:3581](src/storage.rs#L3581)
- (storage) [storage.rs:3600](src/storage.rs#L3600)
- (storage) [storage.rs:3625](src/storage.rs#L3625)
- (storage) [storage.rs:3638](src/storage.rs#L3638)
- (storage) [storage.rs:3656](src/storage.rs#L3656)
- (storage) [storage.rs:3675](src/storage.rs#L3675)
- (storage) [storage.rs:3705](src/storage.rs#L3705)
- (storage) [storage.rs:3729](src/storage.rs#L3729)
- (storage) [storage.rs:3742](src/storage.rs#L3742)

### SYS-0019

Layers: implementations=api+core+storage; verifications=core

> The Qrusty server shall become responsive to HTTP requests — including
> `/health` and all other endpo...

**Implementations:**

- (core) [main.rs:243](src/main.rs#L243)
- (storage) [storage.rs:524](src/storage.rs#L524)
- (storage) [storage.rs:689](src/storage.rs#L689)
- (api) [api.rs:815](src/api.rs#L815)
- (api) [api.rs:1132](src/api.rs#L1132)

**Verifications:**

- (core) [main.rs:780](src/main.rs#L780)
- (core) [main.rs:846](src/main.rs#L846)

### SYS-0020

Layers: implementations=storage; verifications=storage

> The storage layer shall maintain a per-queue hot tier of the
> highest-priority **available** (unlocke...

**Implementations:**

- (storage) [storage.rs:912](src/storage.rs#L912)
- (storage) [storage.rs:1763](src/storage.rs#L1763)

**Verifications:**

- (storage) [storage.rs:4161](src/storage.rs#L4161)
- (storage) [storage.rs:4212](src/storage.rs#L4212)
- (storage) [storage.rs:4258](src/storage.rs#L4258)

### SYS-0021

Layers: implementations=storage; verifications=storage

> Hot tier capacity and refill threshold shall be configurable via
> environment variables:

- `QRUSTY_H...

**Implementations:**

- (storage) [storage.rs:212](src/storage.rs#L212)
- (storage) [storage.rs:217](src/storage.rs#L217)

**Verifications:**

- (storage) [storage.rs:4258](src/storage.rs#L4258)

### SYS-0022

Layers: implementations=core; verifications=core+storage

> The server shall monitor memory usage via cgroup v2 (with v1 fallback)
> or the `QRUSTY_MEMORY_LIMIT_M...

**Implementations:**

- (core) [memory_monitor.rs:2](src/memory_monitor.rs#L2)

**Verifications:**

- (core) [memory_monitor.rs:530](src/memory_monitor.rs#L530)
- (core) [memory_monitor.rs:569](src/memory_monitor.rs#L569)
- (core) [memory_monitor.rs:588](src/memory_monitor.rs#L588)
- (storage) [storage.rs:4100](src/storage.rs#L4100)
- (storage) [storage.rs:4120](src/storage.rs#L4120)

### SYS-0023

Layers: implementations=api; verifications=tests

> The `/stats` endpoint shall include the following memory fields in
> its `summary` object:

- `memory\_...

**Implementations:**

- (api) [api.rs:2141](src/api.rs#L2141)

**Verifications:**

- (tests) [api_tests.rs:2504](tests/api_tests.rs#L2504)

### SYS-0024

Layers: implementations=api; verifications=core+tests

> While the Qrusty server is initialising (the `initializing` flag is
> `true`), \*\*all mutation operatio...

**Implementations:**

- (api) [api.rs:815](src/api.rs#L815)

**Verifications:**

- (core) [main.rs:780](src/main.rs#L780)
- (tests) [startup_gate_tests.rs:84](tests/startup_gate_tests.rs#L84)
- (tests) [startup_gate_tests.rs:98](tests/startup_gate_tests.rs#L98)
- (tests) [startup_gate_tests.rs:110](tests/startup_gate_tests.rs#L110)
- (tests) [startup_gate_tests.rs:122](tests/startup_gate_tests.rs#L122)
- (tests) [startup_gate_tests.rs:133](tests/startup_gate_tests.rs#L133)
- (tests) [startup_gate_tests.rs:144](tests/startup_gate_tests.rs#L144)
- (tests) [startup_gate_tests.rs:155](tests/startup_gate_tests.rs#L155)
- (tests) [startup_gate_tests.rs:169](tests/startup_gate_tests.rs#L169)
- (tests) [startup_gate_tests.rs:180](tests/startup_gate_tests.rs#L180)
- (tests) [startup_gate_tests.rs:193](tests/startup_gate_tests.rs#L193)
- (tests) [startup_gate_tests.rs:206](tests/startup_gate_tests.rs#L206)
- (tests) [startup_gate_tests.rs:219](tests/startup_gate_tests.rs#L219)
- (tests) [startup_gate_tests.rs:236](tests/startup_gate_tests.rs#L236)
- (tests) [startup_gate_tests.rs:246](tests/startup_gate_tests.rs#L246)
- (tests) [startup_gate_tests.rs:255](tests/startup_gate_tests.rs#L255)
- (tests) [startup_gate_tests.rs:264](tests/startup_gate_tests.rs#L264)
- (tests) [startup_gate_tests.rs:275](tests/startup_gate_tests.rs#L275)
- (tests) [startup_gate_tests.rs:288](tests/startup_gate_tests.rs#L288)
- (tests) [startup_gate_tests.rs:300](tests/startup_gate_tests.rs#L300)
- (tests) [startup_gate_tests.rs:311](tests/startup_gate_tests.rs#L311)

### SYS-0025

Layers: implementations=storage; verifications=storage

> The server shall aggressively reclaim memory from idle per-queue data
> structures when memory pressur...

**Implementations:**

- (storage) [storage.rs:1014](src/storage.rs#L1014)

**Verifications:**

- (storage) [storage.rs:3790](src/storage.rs#L3790)
- (storage) [storage.rs:3845](src/storage.rs#L3845)
- (storage) [storage.rs:3881](src/storage.rs#L3881)
- (storage) [storage.rs:3923](src/storage.rs#L3923)
- (storage) [storage.rs:3974](src/storage.rs#L3974)
- (storage) [storage.rs:4018](src/storage.rs#L4018)

### WS-0001

Layers: implementations=api+core; verifications=tests

> The Qrusty server shall accept WebSocket upgrade requests at the path
> `/ws`. The upgrade shall follo...

**Implementations:**

- (api) [api.rs:1162](src/api.rs#L1162)
- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:106](tests/ws_tests.rs#L106)

### WS-0002

Layers: implementations=core; verifications=tests

> All WebSocket frames exchanged between the server and a client shall be
> UTF-8 text frames containing...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:119](tests/ws_tests.rs#L119)
- (tests) [ws_tests.rs:150](tests/ws_tests.rs#L150)

### WS-0003

Layers: implementations=core; verifications=tests

> Every client-to-server frame (request frame) shall contain a `type` string
> field identifying the ope...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:181](tests/ws_tests.rs#L181)
- (tests) [ws_tests.rs:209](tests/ws_tests.rs#L209)

### WS-0004

Layers: implementations=core; verifications=tests

> Every server-to-client frame (response frame) shall contain a `type` string
> field. Server-initiated ...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:181](tests/ws_tests.rs#L181)
- (tests) [ws_tests.rs:209](tests/ws_tests.rs#L209)

### WS-0005

Layers: implementations=core; verifications=tests

> When the server encounters an application-level error processing a client
> request, it shall send an ...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:231](tests/ws_tests.rs#L231)
- (tests) [ws_tests.rs:716](tests/ws_tests.rs#L716)

### WS-0006

Layers: implementations=core; verifications=tests

> The WebSocket API shall support a publish operation with `"type":
"publish"`. The request frame shal...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:255](tests/ws_tests.rs#L255)
- (tests) [ws_tests.rs:277](tests/ws_tests.rs#L277)
- (tests) [ws_tests.rs:739](tests/ws_tests.rs#L739)
- (tests) [ws_tests.rs:1585](tests/ws_tests.rs#L1585)

### WS-0007

Layers: implementations=core; verifications=tests

> The WebSocket API shall support a subscribe operation with `"type":
"subscribe"`. The request frame ...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:304](tests/ws_tests.rs#L304)
- (tests) [ws_tests.rs:353](tests/ws_tests.rs#L353)
- (tests) [ws_tests.rs:1558](tests/ws_tests.rs#L1558)
- (tests) [ws_tests.rs:1602](tests/ws_tests.rs#L1602)
- (tests) [ws_tests.rs:1650](tests/ws_tests.rs#L1650)
- (tests) [ws_tests.rs:1799](tests/ws_tests.rs#L1799)

### WS-0008

Layers: implementations=core; verifications=tests

> A delivery frame is a server-initiated frame with `"type": "deliver"`. It
> shall include the followin...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:304](tests/ws_tests.rs#L304)

### WS-0009

Layers: implementations=core; verifications=tests

> The WebSocket API shall support an unsubscribe operation with `"type":
"unsubscribe"`. The request f...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:373](tests/ws_tests.rs#L373)

### WS-0010

Layers: implementations=core; verifications=tests

> A single WebSocket connection shall support simultaneous subscriptions to
> multiple queues. Each subs...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:407](tests/ws_tests.rs#L407)

### WS-0011

Layers: implementations=core; verifications=tests

> The WebSocket API shall support an acknowledge operation with `"type":
"ack"`. The request frame sha...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:452](tests/ws_tests.rs#L452)

### WS-0012

Layers: implementations=core; verifications=tests

> The WebSocket API shall support a negative-acknowledge operation with
> `"type": "nack"`. The request ...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:503](tests/ws_tests.rs#L503)

### WS-0013

Layers: implementations=core; verifications=tests

> The WebSocket API shall support a batch-acknowledge operation with `"type":
"batch-ack"`. The reques...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:581](tests/ws_tests.rs#L581)

### WS-0014

Layers: implementations=core; verifications=tests

> The WebSocket API shall support a batch-negative-acknowledge operation with
> `"type": "batch-nack"`. ...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:631](tests/ws_tests.rs#L631)

### WS-0015

Layers: implementations=core; verifications=tests

> The server shall send a WebSocket ping frame to each connected client at a
> configurable interval (de...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:1390](tests/ws_tests.rs#L1390)

### WS-0016

Layers: implementations=core; verifications=tests

> When a WebSocket connection is closed, whether by client-initiated close
> frame, server-initiated clo...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:686](tests/ws_tests.rs#L686)

### WS-0017

Layers: implementations=core; verifications=core

> The `qrusty_client` Rust crate (at `crates/qrusty_client/`) shall provide a
> `WsSession` type for int...

**Implementations:**

- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)

**Verifications:**

- (core) [ws.rs:749](crates/qrusty_client/src/ws.rs#L749)

### WS-0018

Layers: implementations=other; verifications=other+tests

> The Python client integration (at `integrations/pyclient/` and
> `integrations/python/`) shall provide...

**Implementations:**

- (other) [qrusty_pyclient.py:242](integrations/pyclient/qrusty_pyclient.py#L242)
- (other) [qrusty_ws.py:7](integrations/python/qrusty_ws.py#L7)

**Verifications:**

- (tests) [test_qrusty_pyclient.py:64](integrations/pyclient/tests/test_qrusty_pyclient.py#L64)
- (other) [test_qrusty_ws.py:26](integrations/python/test_qrusty_ws.py#L26)

### WS-0019

Layers: implementations=other; verifications=other

> The Node.js client integration (at `integrations/nodeclient/`) shall provide
> a `WsSession` class for...

**Implementations:**

- (other) [index.js:247](integrations/nodeclient/index.js#L247)

**Verifications:**

- (other) [test.js:43](integrations/nodeclient/test.js#L43)

### WS-0020

Layers: implementations=core+other+storage; verifications=tests

> The WebSocket API shall support a lock-renewal operation with `"type":
"renew"`. The request frame s...

**Implementations:**

- (storage) [storage.rs:2218](src/storage.rs#L2218)
- (core) [ws.rs:5](src/ws.rs#L5)
- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)
- (other) [qrusty_pyclient.py:470](integrations/pyclient/qrusty_pyclient.py#L470)
- (other) [qrusty_ws.py:210](integrations/python/qrusty_ws.py#L210)
- (other) [index.js:573](integrations/nodeclient/index.js#L573)

**Verifications:**

- (tests) [ws_tests.rs:756](tests/ws_tests.rs#L756)
- (tests) [ws_tests.rs:803](tests/ws_tests.rs#L803)
- (tests) [ws_tests.rs:1727](tests/ws_tests.rs#L1727)

### WS-0021

Layers: implementations=api+core; verifications=tests

> The WebSocket API shall update the same per-queue rate counters that the HTTP
> API updates. Specific...

**Implementations:**

- (api) [api.rs:1162](src/api.rs#L1162)
- (core) [ws.rs:251](src/ws.rs#L251)

**Verifications:**

- (tests) [ws_tests.rs:831](tests/ws_tests.rs#L831)

### WS-0022

Layers: implementations=core; verifications=core+tests

> The client router task shall not block on subscriber channel sends. When
> routing a delivery frame to...

**Implementations:**

- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)
- (core) [ws.rs:545](crates/qrusty_client/src/ws.rs#L545)

**Verifications:**

- (tests) [ws_tests.rs:1475](tests/ws_tests.rs#L1475)
- (tests) [ws_tests.rs:1523](tests/ws_tests.rs#L1523)
- (core) [ws.rs:797](crates/qrusty_client/src/ws.rs#L797)

### WS-0023

Layers: implementations=core; verifications=tests

> The WebSocket API shall support optional credit-based flow control for
> subscriptions. When a subscri...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)
- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:1013](tests/ws_tests.rs#L1013)
- (tests) [ws_tests.rs:1091](tests/ws_tests.rs#L1091)
- (tests) [ws_tests.rs:1122](tests/ws_tests.rs#L1122)
- (tests) [ws_tests.rs:1273](tests/ws_tests.rs#L1273)

### WS-0024

Layers: implementations=core; verifications=tests

> The WebSocket API shall support a "no_reply": true field on any client
> frame. When present, the serv...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)
- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:935](tests/ws_tests.rs#L935)
- (tests) [ws_tests.rs:1228](tests/ws_tests.rs#L1228)

### WS-0025

Layers: implementations=core; verifications=tests

> The WsSession type shall expose a public send_frame method that sends a raw
> JSON frame over the WebS...

**Implementations:**

- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:1142](tests/ws_tests.rs#L1142)

### WS-0026

Layers: implementations=core; verifications=core+tests

> The WsSession request method shall enforce a configurable timeout on every
> request-response round tr...

**Implementations:**

- (core) [ws.rs:5](crates/qrusty_client/src/ws.rs#L5)

**Verifications:**

- (tests) [ws_tests.rs:1188](tests/ws_tests.rs#L1188)
- (core) [ws.rs:863](crates/qrusty_client/src/ws.rs#L863)

### WS-0027

Layers: implementations=core; verifications=tests

> The WebSocket connection handler shall process incoming client frames,
> deliver queued messages, and ...

**Implementations:**

- (core) [ws.rs:5](src/ws.rs#L5)
- (core) [ws.rs:251](src/ws.rs#L251)

**Verifications:**

- (tests) [concurrency_tests.rs:5](tests/concurrency_tests.rs#L5)

### WS-0028

Layers: implementations=core; verifications=core

> The Rust WebSocket client (`qrusty_client::ws::WsSession`) shall keep
> idle connections alive by resp...

**Implementations:**

- (core) [ws.rs:545](crates/qrusty_client/src/ws.rs#L545)

**Verifications:**

- (core) [ws.rs:981](crates/qrusty_client/src/ws.rs#L981)
- (core) [ws.rs:1028](crates/qrusty_client/src/ws.rs#L1028)
- (core) [ws.rs:1075](crates/qrusty_client/src/ws.rs#L1075)
