feat(platform): custom_metadata checksum concurrency control + enrich_sdk_metadata toggle [PYSDK-130][PYSDK-147]#691
Merged
Conversation
…rror [PYSDK-130] Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…YSDK-147] Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
|
…a [PYSDK-130][PYSDK-147] Update the platform and application Software Item Specs to document the new update_custom_metadata / update_item_custom_metadata parameters (custom_metadata_checksum, enrich_sdk_metadata), the run dump/update-metadata CLI flags, and ConcurrencyConflictError. Keeps the SIS in sync with the implementation per CC-SOP-01. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eability [PYSDK-130][PYSDK-147] Author a fresh software requirement SWR-APPLICATION-2-17 (Update Run and Item Custom Metadata After Creation, parent SHR-APPLICATION-2) covering post-creation custom-metadata updates with optimistic-concurrency checksum and the enrich_sdk_metadata toggle. Add test case TC-APPLICATION-CLI-07 verifying the behaviour and wire full traceability: - SIS -> SWR: itemFulfills SWR-APPLICATION-2-17 in SPEC-APPLICATION-SERVICE and SPEC_PLATFORM_SERVICE - SWR -> SHR: itemHasParent SHR-APPLICATION-2 - TC -> SIS/SWR: @tests tags on every scenario Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…7 scenarios [PYSDK-130][PYSDK-147]
Add record_property("tested-item-id", ...) traceability from the pytest tests
to the TC-APPLICATION-CLI-07 test-case scenarios, SWR-APPLICATION-2-17, and the
platform/application SIS.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7bd6b68 to
3f1a6a4
Compare
|
ari-nz
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



🛡️ Implements PYSDK-130 and PYSDK-147 (both tracked under VPTHP-44) following CC-SOP-01 Change Control, part of our ISO 13485-certified QMS | Ketryx Project
Supersedes the stale draft #632 (rebased onto current
main).Summary
Two logical commits extending custom-metadata updates on
Run.update_custom_metadata()/Run.update_item_custom_metadata()(platform), their four service wrappers, and theupdate-metadata/update-item-metadata/dump-metadata/dump-item-metadataCLI commands. Both parameters are keyword-only and fully backward compatible.[PYSDK-130]Optimistic concurrency controlcustom_metadata_checksum: str | Noneto both platform methods, forwarded verbatim onCustomMetadataUpdateRequest. The server rejects a stale write with HTTP 412.ConcurrencyConflictError(ValueError)inplatform/_exceptions.py(exported fromaignostics.platform); the service layer maps HTTP 412 →ConcurrencyConflictError. SubclassingValueErrorkeeps existingexcept ValueErrorcallers working.--checksumon the update commands (exit code 3 on conflict);--show-checksumon the dump commands emits{"custom_metadata": {...}, "custom_metadata_checksum": "..."}.[PYSDK-147]enrich_sdk_metadatatoggleenrich_sdk_metadata: bool = Trueto both platform methods. Default preserves current behaviour (merge auto-generated SDK tracking context into thesdkfield + schema-validate).enrich_sdk_metadata=False, the SDK skips both the merge and validation and forwardscustom_metadataverbatim — enabling round-tripping a previously readsdkfield unchanged.--enrich-sdk-metadata / --no-enrich-sdk-metadataon both update commands.Combined read → modify → write loop
Test plan
make lint(ruff, pyright, mypy) — cleanuv run pytest -m unit tests/aignostics/application tests/aignostics/platform— 590 passed🤖 Generated with Claude Code