Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions desktop/src-tauri/src/connections/compatibility.json
Original file line number Diff line number Diff line change
Expand Up @@ -2001,5 +2001,26 @@
"remember_memory",
"search_memory"
]
},
{
"id": "sqlite-replace-artifact-conflict-eef8209-v1",
"serverCommit": "eef82096a4947405feb55e63fbdd9768c4581a34",
"contractSha256": "ce939d9d5985fea5921575c18766abc5b67e4c4b35c09da5ce86e16951b06793",
"artifactSha256": "d25e21d9d4af4a82bd4c28edbb350d8739b024b1e58a67d96d171377c76b975c",
Comment on lines +2007 to +2009

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This record's wheel digest doesn't reproduce from its serverCommit.

artifactSha256 names the exact Server build this record was qualified against. desktop/tests/real_server.py --product-qualification checks the wheel against it before it starts the Server, and product preparation requires the record to match the actual Server build.

I built eef8209 cleanly: git archive, then uv build --wheel with version 1.6.2.dev80+geef82096a and hatchling 1.33.0. The wheel's SHA-256 is 01c8f5c6…, not d25e21d9…, and the harness's product_profile() rejects it with product_qualification_mismatch. The same steps reproduce #2553's recorded wheel byte for byte, so the build is deterministic. I also tried the versions a dirty tree at eef8209 would get on 12-01 or 12-02, and the versions of fe31aec and 1eb0c4b. None gives d25e21d9….

If this PR continues, please rebuild the wheel from the committed serverCommit, rerun the native qualification against that wheel, and update the record.

"operations": [
"get_access_principal",
"get_artifact_revision",
"get_capabilities",
"get_connection_identity",
"get_default_scope",
"get_liveness",
"get_readiness",
"get_scope",
"get_server_info",
"get_stats",
"list_scopes",
"remember_memory",
"search_memory"
]
}
]
2 changes: 1 addition & 1 deletion desktop/src-tauri/src/transport/operations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"contractSha256": "32a8aebe3ac5b5eb388e03e0b0e25fc95ea232b10b94caf16323bd369cd7bf69",
"contractSha256": "ce939d9d5985fea5921575c18766abc5b67e4c4b35c09da5ce86e16951b06793",
"operations": {
"get_liveness": {
"method": "GET",
Expand Down
1 change: 1 addition & 0 deletions desktop/ui/src/generated/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10889,6 +10889,7 @@ export interface operations {
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
404: components["responses"]["NotFound"];
409: components["responses"]["Conflict"];
412: components["responses"]["PreconditionFailed"];
422: components["responses"]["InvalidRequest"];
428: components["responses"]["PreconditionRequired"];
Expand Down
2 changes: 1 addition & 1 deletion desktop/ui/src/generated/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

// Generated from openapi/powercontext.yaml. Do not edit.
export const contractSha256 = "32a8aebe3ac5b5eb388e03e0b0e25fc95ea232b10b94caf16323bd369cd7bf69";
export const contractSha256 = "ce939d9d5985fea5921575c18766abc5b67e4c4b35c09da5ce86e16951b06793";
export const operations = {
"get_liveness": {
"method": "GET",
Expand Down
2 changes: 2 additions & 0 deletions openapi/powercontext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5047,6 +5047,8 @@ paths:
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/Conflict"
"412":
$ref: "#/components/responses/PreconditionFailed"
"422":
Expand Down
1 change: 1 addition & 0 deletions src/powercontext/http/_generated/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3741,6 +3741,7 @@ class AccessRequirement(BaseModel):
401: {"$ref": "#/components/responses/Unauthorized"},
403: {"$ref": "#/components/responses/Forbidden"},
404: {"$ref": "#/components/responses/NotFound"},
409: {"$ref": "#/components/responses/Conflict"},
412: {"$ref": "#/components/responses/PreconditionFailed"},
422: {"$ref": "#/components/responses/InvalidRequest"},
428: {"$ref": "#/components/responses/PreconditionRequired"},
Expand Down
1 change: 1 addition & 0 deletions src/powercontext/http/_generated/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5891,6 +5891,7 @@
"401": {"$ref": "#/components/responses/Unauthorized"},
"403": {"$ref": "#/components/responses/Forbidden"},
"404": {"$ref": "#/components/responses/NotFound"},
"409": {"$ref": "#/components/responses/Conflict"},
"412": {"$ref": "#/components/responses/PreconditionFailed"},
"422": {"$ref": "#/components/responses/InvalidRequest"},
"428": {"$ref": "#/components/responses/PreconditionRequired"},
Expand Down
7 changes: 7 additions & 0 deletions tests/test_api_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ def test_every_access_protected_operation_declares_the_unavailable_response() ->
assert operation["responses"]["503"] == {"$ref": "#/components/responses/Unavailable"}


def test_replace_artifact_declares_the_conflict_response() -> None:
contract = yaml.safe_load(CONTRACT_PATH.read_text())
operation = contract["paths"]["/v1/scopes/{scope_id}/artifacts/{family}/{artifact_id}"]["put"]

assert operation["responses"]["409"] == {"$ref": "#/components/responses/Conflict"}


def test_source_ingestion_operations_preserve_the_access_boundary() -> None:
contract = yaml.safe_load(CONTRACT_PATH.read_text())
expected = {
Expand Down
Loading