Undocumented edge case for adding background knowledge
Summary
Adding two items with the same absolute path succeeds if some other property is distinct.
Steps to reproduce
Send a POST request to /bg
requesting to add two items with identical path but at least one distinct property.
Example cURL call:
curl --request POST 'http://localhost:4444/bg' \
--header 'Content-Type: application/json' \
--data-raw '[{
"type" : "directory",
"abs_path": "/A/B",
"creation_time": 1
},
{
"type" : "directory",
"abs_path": "/A/B",
"creation_time": 2
}
]'
Observed behavior
The server returns that both items have been added.
{
"added": 2,
"received": 2,
"skipped": 0
}
Expected behavior
Only the first addition should succeed. The second should fail as there is already an item known at this path.