docs +update block_insert_after: result=failed may still persist non-failing blocks — unsafe to retry, no idempotency
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 77/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- cli, documentation
Direzione di ricerca
Trova il riferimento docs +update e leggi il risultato block_insert_after e le indicazioni per riprovare. Aggiorna la documentazione per spiegare che failed o partial_success possono lasciare dei blocchi applicati e che i client dovrebbero recuperare di nuovo l’intervallo di destinazione prima di riprovare. Il lavoro è completato quando il riferimento avverte chiaramente di questo comportamento e del rischio di riprovare senza verifiche.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
@larksuite/cli1.0.99 (npm), Linux,--as userdocs +update --command block_insert_after
Summary
When a single block_insert_after instruction contains multiple blocks and one of them fails server-side (e.g. a <whiteboard token="..."> cross-document clone that cannot be cloned), the API returns result=failed with degrade warnings — but the non-failing blocks of the same instruction are actually persisted. Any retry (a natural response to a failed result, especially in automated batch workflows) duplicates the already-applied blocks.
We verified this repeatedly while doing a large document restructure: a chunked batch-editing script that retried on failed produced 9 copies of the same ~10KB chunk before we noticed. The failed result genuinely looked like "nothing was applied".
Repro
-
Take any doc with an anchor block. Prepare a whiteboard token from a different document (cross-doc clone is not supported).
-
One instruction containing three blocks:
docs +update --command block_insert_after --block-id <anchor> --content \ '<p>para one</p><whiteboard token="TOKEN_FROM_OTHER_DOC" type="mermaid"></whiteboard><p>para three</p>' -
Response:
result=failed, warnings:degrade_code=2105, msg=Whiteboard clone failed. Retry later degrade_code=1003, msg=Instruction produced empty content after transform -
Fetch the region after
<anchor>:para oneandpara threeexist despiteresult=failed(the error message even says "produced empty content", which is not what happened). -
Re-run step 2 → a second copy of the paragraphs appears. Repeat → N copies.
Expected
Any of the following would fix the foot-gun:
- Atomic per-instruction semantics: apply all blocks or none (rollback on partial failure), or
- Truthful reporting:
resultreflects per-block outcomes andnew_blockslists what was actually applied even whenresult=failed, or - Idempotency key: accept a client-generated request id so automated retries are safe.
Suggested docs fix (minimum)
At minimum, the +update reference should state that failed/partial_success does not mean "nothing was applied", and that clients must re-fetch the target range to verify before retrying. Right now nothing warns about this, and the degrade message "Retry later" actively encourages the unsafe retry.
Impact
Agent-driven batch editing is a first-class use case for this CLI ("built for humans and AI Agents"). Retrying on failure is the standard recovery pattern for agents; a failed result that silently applied half the instruction turns every retry into silent content duplication at scale.
- Lingua principale
- Go
- Stelle
- 18.2k
- Fork
- 1.4k
- Merge medio
- 1g 3h
- PR unite (30g)
- 18
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di larksuite/cli
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
domain/im
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
mail: all-ASCII draft bodies are hard-wrapped every 998 bytes, inserting newlines inside words and tagsForse già presa @linye157 l’ha presa 26 giorni fa. Apertadomain/mail
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
auth: a 429 from the Token Endpoint during refresh deletes a still-valid loginForse già presa @linye157 l’ha presa 26 giorni fa. Apertabug domain/auth domain/im
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
larksuite/cli#2869 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
domain/core enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di larksuite/cli
Issue simili
-
test_archive_is_downloaded_after_logout_login doesn't wait for the storage client after loginAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
github/github-mcp-server#3960 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
JuliusBrussee/caveman#1594 ·
I maintainer di solito rispondono entro 1 giorno
-
C-bug O-community X-blathers-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
cockroachdb/cockroach#176264 · 1 commento ·
-
security trivy
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
kubefleet-dev/kubefleet#1068 ·
I maintainer di solito rispondono entro 3 giorni