TECHNOLOGY

Read every object-list page before declaring a model complete

In this article
THE QUICK TAKE

Follow opaque service continuation tokens and SDK stop conditions, distinguishing listed objects from common prefixes before validating a release manifest.

A publisher lists an object prefix, sees a plausible collection of shards and declares the model complete. The response may be only one page, and grouped prefixes are not shard objects. Traverse the documented pagination contract before assessing inventory, then compare that inventory with an accepted release manifest. A completed listing is still different from an application-level publication transaction.

Preserve selection parameters

Record bucket type, prefix, delimiter and endpoint context for the listing. These parameters determine which objects and grouped prefixes appear. Do not use one successful query as evidence that every artifact key is covered. General-purpose and directory buckets have documented differences, including ordering behavior. An algorithm relying on lexical order must first establish that its chosen bucket contract supplies it.

Follow the continuation token

Inspect truncation state and use the returned next continuation token under the API contract. The token is opaque and is not a real object key. Do not construct it from the last displayed name or replace it with a different starting-position mechanism as if they were interchangeable. Preserve progress only after successfully parsing and accepting the current page.

Separate paginator limits

An SDK paginator can expose its own item limits and resume tokens in addition to service page controls. Record the selected abstraction and its stop condition. A configured maximum number of items can intentionally stop traversal before all service results are consumed. Finishing an application iterator under such a limit must not be reported as proof that the prefix contained no further objects.

Parse objects and groups correctly

ListObjectsV2 distinguishes object contents from common prefixes created through delimiter grouping. A group counts under the listing rules without being a model shard. The API also documents the need to parse complete responses rather than treating a successful HTTP status as sufficient. Preserve page errors and malformed-response handling; do not publish a partial inventory after a parser failure as if it were the complete expected set.

Validate the accepted release

Compare fully collected keys and metadata with the explicit expected revision, then retrieve and validate required object identities. Concurrent publication across several keys remains an application consistency question. Test truncated pages, opaque tokens, grouped prefixes and an SDK item limit in an isolated harness. A useful result establishes what the traversal observed, not that every observed object belongs to one coherent model release or is readable with the worker’s separate object permissions.

Primary references

Amazon S3 ListObjectsV2 Pagination Contract.

Boto3 S3 ListObjectsV2 Paginator.

Amazon S3 Programmatic Key Listing.

Related reading: Keep tokenizer vocabulary, special tokens and chat templates in one release; Init container downloads an artifact again: making preparation idempotent.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles