You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(api): replace_artifact omits HTTP 409 from OpenAPI #2551
PUT /v1/scopes/{scope_id}/artifacts/{family}/{artifact_id} (replace_artifact) can return HTTP 409 for an Atomic Memory lifecycle conflict, but its response list in the canonical OpenAPI contract does not declare 409.
Read an active Atomic Memory A and retain its content ETag, for example "revision:1".
Allow memory processing to merge A into a successor C. A's content revision remains 1, while its lifecycle becomes merged.
Submit a complete replacement to A's original replace_artifact URL with the retained If-Match value.
Compare the returned status with the operation's declared OpenAPI responses.
This sequence occurred during a real Codex integration run: a search returned A as active, and the subsequent replacement encountered the merged state. Reading the successor and updating it succeeded.
Expected behavior
The OpenAPI operation declares the existing HTTP 409 response and its error schema. The server continues rejecting edits to merged or retired inputs.
Actual behavior
The server correctly returns:
{
"error": {
"code": "invalid_memory_state",
"message": "merged and retired Artifacts cannot be edited",
"details": null
}
}
The operation declares 412, 422 and other errors, but omits 409. Consumers of the canonical contract therefore cannot discover this supported conflict response from that operation.
Environment
Runtime observation: PowerContext 1.5.0, Python 3.12, Linux x86_64.
Contract checked against upstream master c4c95e465775b5b87ccac796194e01086bd7cc8f.
I'll take this. The fix is in the canonical contract: declare the existing 409 Conflict response on replace_artifact, matching the invalid_memory_state behavior already documented for Atomic Memory, then regenerate the Python/JS/Desktop artifacts and add the contract assertion so the response list cannot regress. A stale replacement after a merge is exactly the case to cover: the content revision still matches, but the lifecycle state makes the write conflict.
This issue belongs to the Core module. @hidb4ai, please lead follow-up, with support from @frf12, @Fengzdadi, @beatenevo. Please provide a substantive response within 72 hours of issue creation, outlining the proposed disposition, any additional information needed, or the next investigation steps. After sufficient discussion and agreement on the scope and acceptance criteria, a contributor who volunteers to take it on can undertake implementation.
Activity
Lumea-art commentedon Nov 30, 2026
I'll take this. The fix is in the canonical contract: declare the existing 409
Conflictresponse onreplace_artifact, matching theinvalid_memory_statebehavior already documented for Atomic Memory, then regenerate the Python/JS/Desktop artifacts and add the contract assertion so the response list cannot regress. A stale replacement after a merge is exactly the case to cover: the content revision still matches, but the lifecycle state makes the write conflict.hireview001 commentedon Dec 2, 2026
This issue belongs to the Core module. @hidb4ai, please lead follow-up, with support from @frf12, @Fengzdadi, @beatenevo. Please provide a substantive response within 72 hours of issue creation, outlining the proposed disposition, any additional information needed, or the next investigation steps. After sufficient discussion and agreement on the scope and acceptance criteria, a contributor who volunteers to take it on can undertake implementation.