{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "kkjiangk-agent-py--build-idempotent-remediation-executor",
 "repo": "kkjiangk/agent-py",
 "repo_url": "https://github.com/kkjiangk/agent-py",
 "repo_slug": "kkjiangk-agent-py",
 "title": "Build a remediation executor that dedupes commandId",
 "page_title": "How to build a remediation executor that dedupes commandId with Agent Py",
 "summary": "Write the external consumer that applies remediation commands safely under at-least-once delivery.",
 "who": "A platform engineer who needs to connect approved remediation commands to a real system, since the repo does not include an executor.",
 "problem": "Command delivery is at least once, so the same remediation command can arrive more than once and must not change a system twice.",
 "outcome": "An executor that records each commandId before applying side effects and skips commands it has already handled.",
 "steps": [
  "Read the remediation approval and dispatch sections of the README and docs/architecture.md to confirm the command shape.",
  "Check config/project.template.json for the name of the Kafka topic that carries remediation commands. (inferred, check the README)",
  "Subscribe your executor to that topic and read the stable commandId from each message.",
  "Store each commandId in durable storage before you apply any side effect, and skip commands already recorded.",
  "Replay one command twice in a staging environment and confirm the side effect happens once."
 ],
 "agent_prompt": "In the kkjiangk/agent-py repository, read the remediation approval and dispatch documentation and draft an executor that deduplicates messages by commandId before applying side effects. Report the topic name and the storage you chose. Verify with a staging replay that a duplicate commandId causes no second side effect.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "4 hours",
 "basis": "readme",
 "caveat": "The repo does not include a production remediation executor, so any executor you write changes real systems and should be tested in staging first.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10+, uv, Node.js 22+, and Docker Compose installed locally",
  "Access to a configured Qwen-compatible model service and its API key",
  "Tencent CLS credentials if you use the CLS integration",
  "Git clone of kkjiangk/agent-py"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/kkjiangk-agent-py/build-idempotent-remediation-executor/",
 "md": "https://dedupedai.com/use-cases/kkjiangk-agent-py/build-idempotent-remediation-executor/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/kkjiangk-agent-py--build-idempotent-remediation-executor.json",
 "api_version": "v1"
}
