ASSEMBLE · VERIFY · INSPECT

Conditional object writes: protect the live generation

Follow exact content through assembly, a conditional write and a scoped version read.

60-second inspection · no external storage

Scroll the diagram horizontally to inspect every column. The exact state and trace below provide text alternatives.

Your experiment

A competing writer commits before this client. The expected generation stays 1, so a conditional write fails. Set it to 2 and rerun: one write succeeds but the same retry fails after the generation changes. Disable the condition and observe the overwrite and extra retry generation.

Play inspects the whole trace over 60 seconds at 1×. Pause, step, restart or change speed. Parameters reset the trace without autoplay. Teaching time is not network, storage or SDK latency.

Exact visible content

Decision trace

Complete state inspector

Artifact event fields illustrate the pinned A2A v0.3 shape, not full protocol conformance. Storage is a separate application policy: a final marker is required before commit; expected generation protects the current live version; generation 0 cannot replace this already-existing object. File input is encoded text, not an upload. The byte limit counts decoded or serialized content, not base64/wire overhead. Data uses JSON parsing/serialization and does not preserve whitespace or duplicate keys. Version retention and read grants are explicit fixture policies, not full ADK/GCS semantics. No IAM, encryption, malware scanning, checksums, lifecycle rules or remote durability is implemented. All records, objects and identities are fictional. No credentials, files, cloud services or external model are accessed. Pinned A2A v0.3 reference · Cloud Storage preconditions · Official AICassindra articles.

Reject a stale object write

Begin with Another writer commits first enabled and Expected live generation set to 1. Seek to the end: the other writer owns generation 2, the client has made zero writes, and its stale condition fails. Change the expectation to 2: the first client attempt creates generation 3, but Retry the same write intent fails because the live generation has changed. The final status describes that retry, so inspect client writes as well as the status. One successful effect followed by a rejected retry is different from two failed attempts. These numbered generations are small teaching identifiers, not predictions of actual cloud generation values.

Compare conditional and unconditional retries

Require matching live generation controls a compare-before-write condition. Disable it to ignore the expectation: with both the concurrent writer and retry enabled, the client writes twice and the live generation becomes 4. Re-enable it and set Expected live generation to 0: this already-existing object cannot satisfy a create-only condition. Cloud Storage uses generation matching to protect writes against changed objects. This fixture has no absent-object state, HTTP responses, backoff or reconciliation protocol. A failed retry cannot by itself establish whether an earlier request succeeded; here the complete local trace makes both attempts visible.

Build and validate the exact content

Part kind selects text, a JSON object or an inline file made from editor text. Load valid example replaces the editor with a valid fixture for the selected kind. Maximum text chunks divides Unicode code points into at most that many pieces; Append later text parts chooses accumulation or replacement. Enter ABCDEF with three chunks: append preserves ABCDEF, while replacement leaves EF. Send final artifact marker is an application completion gate: disable it to refuse storage even after receiving all pieces. JSON arrays, null and malformed JSON fail the typed object requirement. Inline file encodes editor text; it never reads an uploaded file.

Measure bytes rather than characters

Choose Inline file, enter one euro symbol, disable the competing writer and retry, and require generation 1. Set Per-version UTF-8 byte limit to 2: the client writes nothing. Increase it to 3: the stored decoded body occupies exactly three bytes. The four-character Base64 representation is a transport encoding and is not what this limit counts. JSON is parsed and serialized before measuring, so whitespace is not retained. Empty text is permitted. Markup remains literal text in the content and state inspectors; it does not create HTML elements.

Separate authorization, history and observation

Actor tenant chooses the owner Alpha or foreign Beta. Beta cannot write even if Grant Beta read access only is enabled. That grant permits reading an available generation; it does not change write authorization. Reader version chooses the current object or generation 1. Retain earlier versions preserves baseline for a pinned read; disabling retention removes older records when another version commits. This is a local retention switch, not a complete implementation of Cloud Storage versioning, soft delete, IAM or lifecycle rules. No remote bucket, credentials, network durability or actual SDK is involved.

Inspect each operation at a readable pace

Play reveals the precomputed operations across sixty inspection seconds at normal speed. Pause holds the current operation; Next operation advances a boundary; Restart rewinds the same configured experiment. Speed changes viewing pace, while Inspection scrubs to any time. Changing a fixture input rebuilds from baseline and pauses, so it never appends effects to an earlier experiment. Expand experiment opens the workspace fullscreen. On a phone, focus the diagram region and scroll horizontally to read every column at its native size. Exact visible content, Decision trace and Complete state inspector provide text equivalents. These seconds measure teaching playback, not storage latency.