What does google_docs.document.text_replaced prove?
Last reviewed 2026-09-05Skill version 0.1.0Provisional
Prove that the document holds the text that the batch update promised. A batch update that landed is not one that reached its promise. This level reads the text runs of every tab against the confirmed text.
Replace the text in the document with the batch update.
What is the subject and the action?
Member
Value
Subject type
google_docs.document
Subject identity
document_id = $action.result.documentId
Canonical effect
document.batch_update
Provider operation
POST /v1/documents/{documentId}:batchUpdate
Idempotency
none, retry is not safe
How does the evidence correlate with this operation?
Strategy
Assurance
Keys
Required
resource_id
strong
document_id from $action.result.documentId
yes
resource_id
strong
write_revision_id from $action.result.writeControl.requiredRevisionId
no
Which evidence does the contract require?
Minimum evidence level E2. An independent channel is required. Minimum channels: 1.
Channel
Level
Independence
Verifier
Description
document_readback
E2
provider readback
http
Read the document from the provider. A condition path is $observed.document_readback.revisionId. The read states includeTabsContent, so the content sits under tabs and the legacy member body stays empty.
Which conditions must all hold for VERIFIED?
Condition
Meaning
Path
Operator
Expected
Evidence
document_is_the_subject
The document that the read returned is the document that the intent named. The read names the document of the write answer.
$observed.document_readback.documentId
eq
$input.document_id
document_readback
revision_is_the_revision_of_this_write
The document holds the revision that this batch update produced. The published schema states that a required revision identifier inside a response is the revision of the document after the request was applied.
$observed.document_readback.revisionId
eq
$action.result.writeControl.requiredRevisionId
document_readback
revision_moved_from_the_base
The revision differs from the revision that the agent read before the write. The published sentence states that an unchanged revision identifier means an unchanged document.
$observed.document_readback.revisionId
ne
$input.base_revision_id
document_readback
text_runs_match_the_intent
The text runs of every tab equal the list that the person confirmed, in document order. The query steps over a section break, which holds no paragraph. A Docs text run carries the newline that ends its paragraph, so the comparison keeps it.
$observed.document_readback
jsonpath
$input.expected_text_runs
document_readback
Which conditions give CONTRADICTED?
Condition
Class
Reason
Path
Operator
Expected
document_subject_differs
wrong subject
The agent changed a different document than the intent named.
$observed.document_readback.documentId
ne
$input.document_id
Which observed states map to a verdict before completion?
Rule
Match
Verdict
Reason
document_moved_past_this_write
($observed.document_readback.revisionId ne "$action.result.writeControl.requiredRevisionId") and ($observed.document_readback.revisionId ne "$input.base_revision_id")
CONTRADICTED
The document holds a revision that this write did not produce. A second batch update or another person wrote after it. The Docs API states no idempotency key, so do not write again. Ask a person.