contain-a-bad-config-rollout
Use when a config or flag push (not a deploy) causes errors — detects it as the cause, reverts the config fast, and freezes further pushes while the bad value is purged from every consumer.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- contain-a-bad-config-rollout
- description
- Use when a config or flag push (not a deploy) causes errors — detects it as the cause, reverts the config fast, and freezes further pushes while the bad value is purged from every consumer.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md354 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Contain a bad config rollout
Modern incidents are frequently config, not code: a flag flipped, a rate limit lowered, a routing table edited. Config deploys are often faster, less reviewed and less observable than code deploys, so a bad one spreads everywhere before anyone connects the change to the symptom.
Procedure
-
Prove it is config, not code: the binary did not change, but behaviour did. Diff the effective config against the previous version. Keep a version/hash of config at every consumer and a timeline of changes: diff <(curl -s localhost:8080/admin/config) config/last-known-good.yaml git -C config-repo log --since="30 min ago" --oneline
-
Revert the config first — it is usually faster than a code rollback and does not need a build. Ship the previous known-good value through the same pipeline (so the pipeline itself is exercised), not by hand-editing a file on one host.
-
Purge the bad value everywhere: consumers cache config (env at boot, TTL in memory, edge CDN). A revert to the source does nothing until the caches expire or are actively invalidated. Push an invalidation, then confirm each consumer reports the old hash: curl -s -X POST localhost:9090/config/invalidate?key=rate_limit for p in $REPLICAS; do curl -s "http://:9090$p/admin/config" | jq -r '.rate_limit'; done
-
Freeze further config pushes immediately: block the
config-repo(require review) and pause the sync from the flag service, so a second bad value does not land while you are reverting the first. -
Distinguish cheap-revert from needs-migration: some config changes (a shard key, a serialization format) are not safely reversible because data already written under the new value. Identify those and treat them as code changes with a forward fix, not a revert.
-
Find the review gap that let it through and close it: config changes that touch money, auth, routing or limits should require review and a canary. Add a schema/range validator to the config pipeline so an out-of-range value is rejected at push time.
-
Add a canary for config: apply to 1% of consumers, watch error rate for 5 minutes, then widen. A config change that can be canaried like code gets caught at 1%, not 100%.
Pitfalls
- Reverting the source while consumers hold a cached bad value for its full TTL, so the incident persists for minutes after the "fix".
- Hand-editing one host to restore service and calling it done, leaving the other N-1 hosts on the bad value and the next sync re-applying it.
- Rolling back config that already caused irreversible effects (a flag that sent notifications), so the revert restores the flag but not the 50k emails.
- No config versioning, so you cannot name the previous value or prove which change caused the symptom.
Verification
# the revert must propagate to every consumer and the error rate must fall
git -C config-repo revert --no-edit <bad-sha> && git -C config-repo push
for p in $REPLICAS; do curl -s "http://$p:9090/admin/config" | jq -r '.config_hash'; done | sort -u | wc -l
# expect 1 (all replicas on the same, good hash)
curl -s 'localhost:9090/api/v1/query?query=rate(http_requests_total{code=~"5.."}[1m])' | jq '.data.result[].value'
Report: the config diff that caused it, the revert pushed through the pipeline, the invalidation result showing every replica on one hash, and the review/canary change added so the same class cannot spread silently again.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.