Repository navigation
Conversation
53a4c4b to
13cb4bf
Compare
13cb4bf to
751c37c
Compare
|
Rebased onto current |
|
Re-reviewed
I found no correctness defect in the 409 declaration. The current head passed a real TCP HTTP + Core + SQLite scenario: retain the ETag, merge the input, reject replacement of that input with |
hireview001
left a comment
There was a problem hiding this comment.
- Resolve merge conflicts with the target branch.
A replacement whose If-Match still identifies the content revision can conflict with the current lifecycle, for example when Atomic Memory was merged into a successor; the Server already returns 409 invalid_memory_state, and the Atomic Memory workflow documents it, but the canonical contract omitted the response. Declare the shared Conflict response on replace_artifact, assert it in the contract test, and regenerate the Python, JS and Desktop artifacts.
Regenerate the Desktop contract identity and operations from the rebased OpenAPI document, and add the matching bundled compatibility profile built from this branch's wheel.
81d7d28 to
1eb0c4b
Compare
|
Rebased onto current |
|
Current head |
|
Reopening: I closed this PR in error while comparing it with #2553. That closure was my mistake. Apologies for interrupting the contribution; this PR remains open for review. |
|
Compared this with #2553 at
中文:两个 PR 的契约改动相同,都能干净合入当前 master。对本 PR 有两点建议:更新描述(兼容性记录实际是新增而非删除);把测试换成行为测试(合并两条 Atomic Memory 后用原 ETag 替换输入,断言 |
hidb4ai
left a comment
There was a problem hiding this comment.
Reviewed 1eb0c4b. Declaring the existing 409 Conflict is consistent with the actual replacement operation, and the Python/Desktop artifacts regenerate without drift. A real TCP HTTP/Core/SQLite flow returned invalid_memory_state for replacement of a merged input with its still-current ETag, preserved that revision, and successfully replaced/read back the active successor. No database tables or new endpoints are introduced.
Merge confidence: 85/100. CI is not fully green: the failed run shows next/font compilation failure and macOS/Windows package-download timeouts; another run is queued. Those outstanding checks remain separate from this code approval.
|
The affected modules are Desktop, Core. @PsiACE, please coordinate follow-up. Desktop: @PsiACE @knqiufan; Core: @hidb4ai @frf12 @Fengzdadi @beatenevo. Please coordinate the review of the affected changes. |
Fengzdadi
left a comment
There was a problem hiding this comment.
Reviewed 1eb0c4b. The 409 declaration matches what the Server returns, and the generated files match the contract. The failed harness-validation / Acceptance (sqlite) job isn't caused by this change: the same step failed on master's 38fa902 run.
#2553 makes the same declaration. I'd continue #2551 there and close this PR as a duplicate: its test covers the 409 and the served contract, its Desktop record reproduces from its recorded commit, and it was opened first. If this PR continues instead, two things need to change first.
Needs a change
- The Desktop record doesn't reproduce from its
serverCommit. Inline oncompatibility.json. - The description says the qualification record is dropped, but the diff adds one. jasper-yl raised this on 12-02, and it's still the case. Please replace that paragraph with how the record was qualified: how the wheel was built and what the native run covered.
| "serverCommit": "eef82096a4947405feb55e63fbdd9768c4581a34", | ||
| "contractSha256": "ce939d9d5985fea5921575c18766abc5b67e4c4b35c09da5ce86e16951b06793", | ||
| "artifactSha256": "d25e21d9d4af4a82bd4c28edbb350d8739b024b1e58a67d96d171377c76b975c", |
There was a problem hiding this comment.
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.
Closes #2551.
Change
replace_artifactcan already return HTTP 409invalid_memory_state: a replacement whoseIf-Matchstill identifies the content revision can conflict with the current lifecycle, for example after the Atomic Memory was merged into a successor. The Atomic Memory workflow and the Server documented it, but the canonical OpenAPI contract omitted the response.This declares the existing
Conflictresponse on the operation, adds the contract assertion, and regenerates the Python client/schema plus the Desktop operation/type artifacts from the changed contract.The earlier Desktop qualification record is dropped: current
masterremoveddesktop/VALIDATION.mdand its evidence field, so it no longer applies. The contract and generated artifacts are the complete change.Validation
tests/test_api_contract.py+tests/test_desktop_contract.py→ 66 passed.AI assistance
Authored with AI assistance and reviewed by the contributor before submission.