POST /index/bulk/sha256/validity |
getSHA256ValidityMapRuntime |
Fast "does content already exist" check for many SHA-256 values before upload. |
GET /objects/checksum/{checksum} (feature branch) per checksum. |
No bulk checksum validity endpoint in current draft; requires fan-out checks. |
Health/discovery GET /index (local server behavior) |
Local client request path validated in tests |
Local metadata/service probe prior to object operations. |
GET /ga4gh/drs/v1/service-info. |
Local stack currently expects /index; needs service-info adoption path. |
GetObjectByHash |
ResolveGitScopedURL, DeleteRecordsByOID, local delete/sync flows |
Resolve records by SHA-256 OID. |
GET /objects/checksum/{checksum} (feature branch). |
Checksum type handling and hash canonicalization need alignment. |
BatchGetObjectsByHash |
Local metadata interface |
Batch lookup by checksum to reduce round-trips. |
No direct batch checksum query; fan-out GET /objects/checksum/{checksum}. |
Still no one-call batch checksum lookup. |
ListObjects |
Local metadata interface |
Administrative enumeration of all records. |
None in base DRS. |
DRS has no list endpoint. |
ListObjectsByProject |
Local metadata interface |
Project-scoped listing for maintenance and reporting. |
None in base DRS. |
DRS has no project listing endpoint; project scoping is implementation-specific metadata. |
GetProjectSample |
Local metadata interface |
Project sample for diagnostics/UX. |
None in base DRS. |
No sampling/list primitive in DRS. |
RegisterRecord / RegisterRecords |
Register flows (RegisterFile, push batch sync) |
Create metadata records before upload. |
POST /objects/register (feature branch, optional). |
Capability discovery + fallback required for servers that remain read-only. |
UpdateRecord |
Local metadata interface |
Mutate existing DRS metadata. |
PUT /objects/{object_id}/access-methods, PUT /objects/access-methods, and checksum update endpoints where applicable (feature branch, optional). |
No full object replacement endpoint; updates are scoped to specific mutable fields. |
DeleteRecord / DeleteRecordsByProject |
Delete-by-OID and cleanup flows |
Remove stale/duplicate records and support upsert semantics. |
PUT /objects/{object_id}/delete and PUT /objects/delete (feature branch, optional). |
Project-scope delete still requires client-side selection/filtering. |
Upload orchestration via transfer.Uploader and ResolveUploadURLs |
Upload flows in register.go, batch_sync.go, local_client.go |
Obtain presigned upload URLs and transfer file bytes. |
POST /upload-request followed by POST /objects/register (feature branch, optional). |
Client/server negotiation must handle unsupported upload methods and optional endpoint absence. |
ADR 0003: Align git-drs client API usage to GA4GH DRS-compatible operations
Status
Proposed
Context
The git-drs client currently depends on multiple data-plane and metadata operations that are not part of the GA4GH DRS API surface. This ADR inventories those calls, proposes the closest GA4GH DRS equivalents where possible, and defines a phased refactor + test plan.
Scope for this ADR:
client/drsandclient/local.What counts as "GA4GH DRS API" here
For this ADR, GA4GH DRS-compatible operations are treated as:
GET /ga4gh/drs/v1/objects/{object_id}GET /ga4gh/drs/v1/objects/{object_id}/access/{access_id}GET /ga4gh/drs/v1/service-infoAll client calls outside those read-oriented operations are considered non-DRS extensions.
Inventory: non-GA4GH calls used by the client
POST /index/bulk/sha256/validitygetSHA256ValidityMapRuntimeGET /objects/{id}.GET /index(local server behavior)GET /ga4gh/drs/v1/service-info./index; needs service-info adoption path.GetObjectByHashResolveGitScopedURL,DeleteRecordsByOID, local delete/sync flowsobject_idfrom OID and callGET /objects/{id}.BatchGetObjectsByHashGET /objects/{id}if deterministic IDs are adopted.ListObjectsListObjectsByProjectGetProjectSampleRegisterRecord/RegisterRecordsRegisterFile, push batch sync)UpdateRecordDeleteRecord/DeleteRecordsByProjecttransfer.UploaderandResolveUploadURLsregister.go,batch_sync.go,local_client.goInventory: non-GA4GH calls used by the client
POST /index/bulk/sha256/validitygetSHA256ValidityMapRuntimeGET /objects/checksum/{checksum}(feature branch) per checksum.GET /index(local server behavior)GET /ga4gh/drs/v1/service-info./index; needs service-info adoption path.GetObjectByHashResolveGitScopedURL,DeleteRecordsByOID, local delete/sync flowsGET /objects/checksum/{checksum}(feature branch).BatchGetObjectsByHashGET /objects/checksum/{checksum}.ListObjectsListObjectsByProjectGetProjectSampleRegisterRecord/RegisterRecordsRegisterFile, push batch sync)POST /objects/register(feature branch, optional).UpdateRecordPUT /objects/{object_id}/access-methods,PUT /objects/access-methods, and checksum update endpoints where applicable (feature branch, optional).DeleteRecord/DeleteRecordsByProjectPUT /objects/{object_id}/deleteandPUT /objects/delete(feature branch, optional).transfer.UploaderandResolveUploadURLsregister.go,batch_sync.go,local_client.goPOST /upload-requestfollowed byPOST /objects/register(feature branch, optional).Detailed traceability table
Updated ADR 0003 to explicitly account for the GA4GH DRS feature/issue-416-drs-upload branch as the basis for best-match write/upload/delete equivalents, instead of marking most write operations as having no equivalent.
POST /index/bulk/sha256/validityGET /ga4gh/drs/v1/objects/checksum/{checksum}(feature/issue-416-drs-upload)client/drs/register.go:365-390client/drs/register_helpers_test.go:128-183GET /index(local register/list/hash lookup behavior)GET /ga4gh/drs/v1/service-infofor health/capability probing; object reads viaGET /ga4gh/drs/v1/objects/{object_id}client/local/local_client.go:237-258client/local/local_client_error_test.go:328-381,416-470api.GetObjectByHash(...)/GetObjectByHashForGit(...)GET /ga4gh/drs/v1/objects/checksum/{checksum}(feature/issue-416-drs-upload)client/drs/orchestrator.go:68-105client/drs/client_methods_test.go:78-100BatchGetObjectsByHash(...)GET /ga4gh/drs/v1/objects/checksum/{checksum}client/local/local_client.go:256-257ListObjects(...)client/local/local_client.go:240-242ListObjectsByProject(...)client/local/local_client.go:243-245GetProjectSample(...)client/local/local_client.go:292-294RegisterRecord(...)andRegisterRecords(...)POST /ga4gh/drs/v1/objects/register(feature/issue-416-drs-upload, optional)client/local/local_client.go:295-300,328-333,412-415client/local/local_client_error_test.go:328-408UpdateRecord(...)PUT /ga4gh/drs/v1/objects/{object_id}/access-methodsorPUT /ga4gh/drs/v1/objects/access-methods(feature/issue-416-drs-upload, optional)client/local/local_client.go:301-303DeleteRecord(...)/DeleteRecordsByProject(...)PUT /ga4gh/drs/v1/objects/{object_id}/deleteandPUT /ga4gh/drs/v1/objects/delete(feature/issue-416-drs-upload, optional)client/drs/orchestrator.go:107-135;client/local/local_client.go:259-261,289-290transfer.DoUpload(...),transfer.Uploader,ResolveUploadURLs(...)POST /ga4gh/drs/v1/upload-request+POST /ga4gh/drs/v1/objects/register(feature/issue-416-drs-upload, optional)client/drs/register.go:282-333;client/local/local_client.go:467-550Decision
Adopt a DRS-first client contract for read paths immediately, and isolate write/management extensions behind explicit non-DRS capability interfaces.
1) Read-path target contract (DRS-native)
GET /objects/{id}+GET /objects/{id}/access/{access_id}.GET /service-info.2) Non-DRS extension boundary
MetadataAdminAPI,IngestAPI).3) Keep Git LFS Batch API unchanged
Gap analysis and refactor plan
Phase 0: Baseline and feature flags
drs.read_mode = legacy|drs_strictdrs.write_mode = extension_required|extension_optionalPhase 1: DRS-native read-path migration
did = drs://<authority>/<project>/<sha256>or equivalent stable mapping used consistently by client + server.ResolveGitScopedURL: resolve object ID directly from OID and callGetObject/GetDownloadURL./indexhealth checks withservice-infoprobing where supported.Phase 2: Write-path boundary hardening
DRSReadClient(strict DRS read ops)DRSWriteExtensionClient(register/update/delete, hash validity, upload URL resolution)Phase 3: Optional compatibility adapters
Phase 4: Remove hidden coupling
Test plan
Unit tests
GetObjectandGetDownloadURL.DRSReadClient.Integration tests
/ga4gh/drs/v1/*read endpoints.service-infoand explicit fallback behavior.Regression and safety checks
legacy + extensiondrs_strict + extensiondrs_strict + no extension (read-only expected)Consequences