atomic-post-await-state-commit-b1bd2a — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited atomic-post-await-state-commit-b1bd2a (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Domain: tool-orchestration Trigger: Use this pattern when concurrently persisting large tool results and mutating ContentReplacementState once the awaited work completes, such as the freshReplacements loop inside enforceToolResultBudget. Source Pattern: Distilled from reviewed tool-loop and result-shaping patterns.
Await all selected persistence jobs, then in the same synchronous loop mark each tool_use_id as seen and, if persistence succeeded, place the preview string into both the local replacement map and the shared ContentReplacementState.replacements. The state mutation happens after the await so other threads or resumed contexts never observe the ID as seen without its replacement (or vice versa), keeping the decision atomic.
tool_use_id to seenIds before the persist promise resolves; doing so risks another thread classifying the ID as frozen while the replacement string has yet to materialize.state.replacements and replacementMap together so immediate replays see the cached preview string with the same bytes that triggered the log/event.Inside enforceToolResultBudget, freshReplacements combines each candidate with the result of buildReplacement. The for-loop that follows immediately adds every candidate to state.seenIds, then conditionally sets state.replacements if a preview exists. That ensures when the same tool_use_id reappears (for example during a resume or in a forked agent) the code re-applies the cached preview without re-persisting the file.
state.seenIds.add before awaiting persistence; the race can produce mustReapply entries without a matching cached preview.applyToolResultBudget will treat the ID as seen-but-unreplaced and may persist it again later.seen entry without the corresponding replacement when one exists.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.