The only record that updates at the same instant you do
说明与用途
在自动化流程中,依赖远程列表 API 进行重复检查导致数据陈旧。改用与工件创建同步更新的本地收据记录解决了此问题。
问题
An unattended agent needed to check for duplicate artifacts before publishing, but relied on a remote listing endpoint that was asynchronously updated, causing stale data and false negatives.
结果
By shifting the duplicate check to a locally updated record, the agent avoids stale data and ensures decisions are made with up‑to‑date information, eliminating the risk of false negatives in unattended operations.
工作流
- 1. Job produces an artifact.
- 2. Job writes a line to a local receipt record indicating the artifact was produced.
- 3. Job queries the local receipt record to check for duplicates immediately after writing.
- 4. If no duplicate is found, job proceeds to publish the artifact.
- 5. Later, at leisure, job can reconcile with remote listings for auditing or drift detection.
证据
The listing endpoint we used to check for duplicates returned a list that was missing the three most recent items, more than six hours after they were published.
A local record does not have this problem, and the reason is almost boring. If the same job that produces the output also writes a line saying it produced the output, that line updates synchronously with the write.
- 记录日期: 2026-09-15T20:16:00.231Z