Repository navigation
OpenConceptLab/ocl_issues#2881 | Export API and Subscriptions: POST/DELETE responses, download steps - #69
Conversation
… POST/DELETE responses, download steps - Overview: is_processing turning False doesn't mean an export exists. - POST: 208 while exporting, 409 only for an already-queued job, 303 with a URL header (or 204 with noRedirect=true) when the export exists, and force=true to create it again. - DELETE: Delete caption, 204 No Content / 404 Not Found, 403 for non-admins. - Subscriptions: the export GET redirects (Location) to an expiring signed URL for a zip, not an exportURL header for a single-use tar; convert the filename's lastUpdated to ISO 8601 for updatedSince. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eds a POST, DELETE limit Addresses Codex pass 1: order of 208/force/noRedirect on POST; a 204 on GET means no export, so subscription clients POST to create one; DELETE removes only the export under the current lastUpdated; drop the unsupported speed claim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paynejd
left a comment
There was a problem hiding this comment.
Codex adversarial review, pass 1 (codex-cli 0.160.1, commit 7b78512)
Run locally before the branch could be pushed. The oclapi2 links point to the OpenConceptLab/oclapi2#929 branch.
Found four issues in the changed lines, including retained inaccuracies:
-
[P2] DELETE does not always remove the downloadable export — exportapi.md:163. GET selects the cached key using
get_export_path(), but DELETE removesversion.version_export_path, computed from the current timestamp. If the cached key has an older timestamp or legacy format, DELETE can return204while leaving it downloadable. This is a pre-existing backend limitation; qualify the deletion guarantee. See mixins.py:1114 and models.py:1399. -
[P2] Retrying GET cannot recover a missing export — subscriptions.md:22. The instructions group
204and208together as conditions resolved by waiting. After an export fails or is deleted, repeated GETs can return204indefinitely: GET never schedules creation. Explain that a persistently missing export, with no pending creation work, requires POST to initiate creation before polling. See mixins.py:1048. -
[P3] The
noRedirectresponse condition omits precedence — exportapi.md:139. An existing export plusnoRedirect=truedoes not necessarily return204: addingforce=truetakes the creation branch (202or409), and an active export takes precedence over both flags (208). Qualify the303/204cases as applying when no export is running and force is disabled. See mixins.py:1085. -
[P3] The unconditional speed advantage is unsupported — exportapi.md:4. “It is also faster” is not guaranteed by the implementation. Version seeding queues the export after other processing steps, and collection exports wait for expansion processing. Keep the reliability rationale; remove or qualify the performance claim. See tasks.py:442 and tasks.py:156.
Ran the requested diff and checked the specified implementation. In-memory branch checks confirmed findings 1–3; no files were modified.
Overall verdict: changes requested. No P0 or P1 findings.
|
Replies to Codex pass 1. All four are fixed in 0daea32:
|
…omits HEAD/ for HEAD exports Addresses Codex pass 2 on ocl-docs#69. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paynejd
left a comment
There was a problem hiding this comment.
Codex adversarial review, pass 2 (codex-cli 0.160.1, commit 0daea32)
- [P2] The
303follow-up instruction fails for HEAD exports — docs/source/oclapi/apireference/exportapi.md:134. For an existing HEAD export, POST returnsURL: /orgs/OWNER/sources/REPO/export/, omitting/HEAD/, because the implementation appendsexport/toversion.uri. That URL matches the version-detail route with versionexport, normally returning404; collections behave identically. Thus “use GET there to download it” and the illustrated header are inaccurate for this supported case. Direct clients to GET the original explicit-version export endpoint and document the HEAD header limitation.
Overall verdict: Needs changes — one remaining P2 finding.
|
Reply to Codex pass 2: HEAD export and the 303 |
paynejd
left a comment
There was a problem hiding this comment.
Codex adversarial review, pass 3 (codex-cli 0.160.1, commit 5cab8e9)
No remaining or new [P0]–[P3] findings in the changed lines. Verified the requested diff against the specified implementation, including the HEAD export URL-header caveat. No files modified.
Overall verdict: Approve.
Closes OpenConceptLab/ocl_issues#2881
Follows #68 (merged), which it builds on.
oclapi/apireference/exportapi.mdOverview:
is_processingturningFalsedoesn't mean an export exists, because the flag is cleared even when the export fails. The page now says to use the Export API to check.POST: the response codes now match
ConceptContainerExportMixin.post:202when an export is started;208while an export is being created;409only when the same job is already queued;303with aURLheader when the export exists, or204withnoRedirect=true.force=true(create the export again) is now documented.DELETE: the example is captioned "Delete", not "Create". The status labels are now
204 No Contentand404 Not Found, and the403for users without admin access is listed.oclapi/apireference/other/subscriptions.md302,Locationheader) to a signed URL that expires. It doesn't return anexportURL/exportUrlheader, and the URL isn't single-use.lastUpdated(2026-09-30_123456) to ISO 8601 (2026-09-30T12:34:56Z) forupdatedSince.🤖 Generated with Claude Code