Repository navigation
OpenConceptLab/ocl_online#554 | Collection and version create ignore expansion_uri - #950
Conversation
…expansion_uri A new collection or version has no expansions yet, so only an update may name one. Both create paths stored any expansion_uri sent with the request; the server now sets it itself, as it already did for expansion_url. The update check is unchanged and now has a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QvHhCgtEqAD6xKyJAbToDH
|
Codex review, pass 1 (codex-cli 0.163.0, commit b6d0d83): clean, no findings. The full pass is on the private ticket. Simplification and adversarial passes follow. |
|
Simplification pass (Claude subagent, commit b6d0d83): clean, nothing to cut. An adversarial pass follows. |
|
Adversarial pass (Claude subagent, commit b6d0d83): the fix held. No route still stores a caller-supplied value that names another host or another collection's expansion, and no legitimate client flow breaks. It recorded two Low issues outside this change, both limited to the owner's own collections on the same host, and one Info note. They're on the private ticket; none is fixed here. |
|
Review loop finished (head b6d0d83): Codex pass 1, the simplification pass and the adversarial pass are all done, with nothing to fix in this PR. CI passes. Ready to merge. |
Part of OpenConceptLab/ocl_online#554.
What changes: creating a collection (
POST …/collections/) or a collection version (POST …/<collection>/versions/) no longer stores anexpansion_urisent with the request.PUT/PATCHon a version accepts anexpansion_urlthat names one of its own expansions and refuses anything else with 400.expansion_urlwas already dropped on create;expansion_urinow behaves the same way. No OCL client sends either on create.Tests:
CollectionListViewTest.test_post_201_ignores_expansion_uriandCollectionVersionListViewTest.test_post_201_ignores_expansion_uri, send an absolute URL and another collection's expansion, with auto-expansion on and off. All four cases failed before the change.CollectionVersionRetrieveUpdateDestroyViewTest.test_put_expansion_url, keeps the update check covered: it refuses a foreign value and accepts the version's own. Nothing tested that check before.PYTHONHASHSEED=2, as in CI: 2,454 tests pass. The local test image predates thefakeredisdependency, so its two modules (250 tests) ran separately with it installed, and pass. CI runs everything together.pylint -j0 core/: 10.00. Its only messages come from the same missingfakeredisimport, in files this PR doesn't touch.🤖 Generated with Claude Code
https://claude.ai/code/session_01QvHhCgtEqAD6xKyJAbToDH