Repository navigation
docs(api): name both SDK lines in the notes stale-guard deviation row - #649
Conversation
Name both SDK lines in the notes body-form row. SDK 1.17.1 sends every note write in the body form and builds a RefUpdateError from result.status. The new SDKs on SDK main fa4c317 send appends and delete guards to forms that answer 409, but a note create still gets our 412, which they turn into a RefUpdateError. The deviation ends when gate G1 of #352 fires. Refs #647 _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ Change-Id: I03ef831b8385b01db0dd0cd8bedfe615be384b24 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Why
The notes row in
docs/explanation/wire-compatibility.mdkeeps a staleexpected_notes_ref_shaon the legacy body forms (POST .../notesandthe deprecated
DELETEbody) at412precondition_failed. Its reasonnamed only "the SDKs" and
result.status. The new SDKs on SDK mainfa4c317send two of the three note writes to forms that already answer409, but their note create still gets our412. The row did not sayso. #648 fixed the same gap in the commit-pack, diff-commit and
restore-commit rows, and its merge record on #647 listed this row as a
follow-up.
What changed
The notes row now states:
1.17.1(@pierre/storage,pierre-storageandcode-storage-go) does. It sends every note write in the body formand builds a
RefUpdateErrorwhose status isresult.status, hereprecondition_failed. Upstream's409hasresult.statusconflict.@pierre/sdk,pierre-sdkandgithub.com/pierrecomputer/sdk/go) do. An append goes toPOST .../notes/appendand a delete sends its guard as theexpected_notes_ref_shaquery parameter, so both get our409. Anote create still sends
POST .../noteswith the guard in the body.The SDKs pick
RefGuardErroronly for the coderef_guard_failed,so our
412becomes aRefUpdateError. A caller that retries acreate with
current_shaworks against upstream and fails againstopen.storage. A delete that sends its guard only in the deprecated
body field
expected_ref_sha(new Python and TypeScript SDKs) getsthe
412too.api: problem-details later tiers (specific codes, instance, result envelope, git/LFS writers, problem+json) — held on SDK trigger #352 and Upstream drift (SDK main fa4c317): the new SDKs branch on ref_guard_failed; end the #533 412 stale-guard deviations when G1 fires #647.
No code changes.
Evidence
I read each claim in the SDK source (github.com/pierrecomputer/sdk):
packages/code-storage-go/v1.17.1(35610abb, all three packagesat
1.17.1). Body forms: Gorepo.go:716(delete) and:775(create and append), TypeScript
src/index.ts:1336,:1383and:1447, Pythonpierre_storage/repo.py:1705-1725and:2417-2436.Error status from
result.status: Gorepo.go:722-733and:781-796, TypeScriptsrc/index.ts:1340-1350and:1451-1465,Python
pierre_storage/repo.py:2491-2503.fa4c317, routes: Gogo/repos_gen.go:1403-1406(append),:1447-1450(create),:1476-1490(delete, guard in the query).Python
python/src/pierre/_generated/namespaces/repos.py:633-636,:661-664,:690-698, and:2323-2333(the delete body still takesexpected_ref_sha). TypeScripttypescript/src/generated/operations/repos.ts:1215-1217,:1251-1269and:1303-1316.fa4c317, error type: Gogo/errors.go:244-258, Pythonpython/src/pierre/_errors.py:191-194, TypeScripttypescript/dist/runtime/errors.js:150-153. Each checks the coderef_guard_failedfirst. Otherwise a body with aresultobjectgives
RefUpdateError.409result.statusconflict(docs/upstream/openapi.yaml:8303forPOST,:7992forDELETE).expected_notes_ref_shaquery parameter answer409(
internal/api/handlers_write_refs.go:939-955,:1032-1038). The412body fromwrefNoteFail(:684-695) has aresultobject andno
codeorerrormember.Validation
python3 scripts/check-doc-links.py: broken links: 0. This includesthe README link and citation checks from ci(scripts): check links in every README #638 and ci(scripts): check README code citations #639.
python3 scripts/test_check_doc_links.py: 29 tests OK.Refs #647
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high