Repository navigation
chore(decdn_node): sync config-schema surface to decdn main @ 0b94efe4 - #44
Merged
Merged
Conversation
Re-sync the decdn_node role's node.toml key surface to the current `main` of decdn/decdn (crates/common/src/config/types.rs). Every config section is `#[serde(deny_unknown_fields)]` with no serde aliases, so a stale key is a startup crash-loop. Field delta (verified against types.rs): - REMOVE: the whole `[blockchain]` swap block (swap_venue, swap_router_address, swap_quoter_address, swap_fee_tier, swap_balancer_pool, swap_pool_address) and pool_floor_signer_share_bps. - RENAME: pool_floor_signer_max_windows -> pool_floor_signer_live_windows (default now 8; lower-clamped to one window). - ADD (new optional knobs): blockchain.chain_staleness_grace_sec, cache.disk_headroom_mb, and the new `[client]` section's region_allowlist (ClientConfig). Touched: templates/node.toml.j2 (emit blocks), defaults/main.yml (vars), tasks/main.yml (asserts), README.md (knob docs), and the molecule/schema oracle: gen-schema-keys.py (add ClientConfig, bump header to 0b94efe4), regenerated files/schema-keys.txt (157 paths), converge.yml (set the new knobs, drop the removed ones), verify.yml (add `client` to the expected table set). Validated by rendering node.toml.j2 with the schema converge var set via Ansible's own template engine and running molecule/schema's exact drift-checker + tomllib parse against the regenerated schema-keys.txt: 155 emitted paths, all recognised; no removed key emitted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently remove obsolete knobs, introduce the new schema keys with guarded emission plus validation, and update the molecule/schema oracle accordingly to prevent config drift.
Pull request overview
Synchronizes the decdn_node Ansible role’s rendered node.toml schema surface with upstream decdn/decdn main (commit 0b94efe4) to prevent startup crash-loops from #[serde(deny_unknown_fields)] when the role emits unknown keys.
Changes:
- Removed upstream-deleted
blockchain.swap_*andblockchain.pool_floor_signer_share_bpsknobs from defaults, template emission, and validation. - Renamed
pool_floor_signer_max_windows→pool_floor_signer_live_windows, and added new guarded knobs:blockchain.chain_staleness_grace_sec,cache.disk_headroom_mb, and[client].region_allowlist. - Re-synced
molecule/schemaoracle (schema key inventory + scenario expected tables/vars) to match upstream config structs/paths.
File summaries
| File | Description |
|---|---|
| ansible/roles/decdn_node/templates/node.toml.j2 | Updates emitted TOML keys/tables to match upstream schema (remove swap/share_bps, rename live_windows, add new guarded keys + [client]). |
| ansible/roles/decdn_node/tasks/main.yml | Removes validations for deleted knobs and adds validation for new fields (including chain staleness and client region allowlist). |
| ansible/roles/decdn_node/README.md | Updates role documentation to reflect removed/renamed/added configuration knobs. |
| ansible/roles/decdn_node/defaults/main.yml | Updates default variables to remove old knobs and add the new ones with documented defaults/semantics. |
| ansible/molecule/schema/verify.yml | Adds [client] to the expected rendered table set for the schema scenario. |
| ansible/molecule/schema/files/schema-keys.txt | Updates the canonical allowed key-path inventory (swap/share_bps removed; new keys added). |
| ansible/molecule/schema/files/gen-schema-keys.py | Extends struct→path mapping to include ClientConfig and updates the upstream sync header. |
| ansible/molecule/schema/converge.yml | Updates schema scenario inputs to drop removed knobs and set new knobs so they render and are validated. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The fixture provenance was bumped to main but the README's Schema tracking paragraph still cited d306cc5c / 0.1.1. Match it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-syncs the
decdn_noderole'snode.tomlkey surface to the currentmainofdecdn/decdn(crates/common/src/config/types.rs, HEAD0b94efe4). Every config section is#[serde(deny_unknown_fields)]with no serde aliases, so any key the role emits that main's binary doesn't know is a startup crash-loop.Field delta (verified field-by-field against
types.rs)Removed (gone from main — the on-chain swap path was dropped, plus the share-bps floor knob):
blockchain.swap_venue,blockchain.swap_router_address,blockchain.swap_quoter_address,blockchain.swap_fee_tier,blockchain.swap_balancer_pool,blockchain.swap_pool_addressblockchain.pool_floor_signer_share_bpsRenamed:
blockchain.pool_floor_signer_max_windows→blockchain.pool_floor_signer_live_windows(default is now8, lower-clamped to one credit window)Added (new optional knobs on main, wired in with
""/[]defaults + guarded emission):blockchain.chain_staleness_grace_sec(u64, must be> 0, daemon default1800— ADR 011 serve-while-chain-stale window)cache.disk_headroom_mb(u64,0opts out, daemon default8192— #1930)client.region_allowlist(Vec<String>) in the new[client]section (ClientConfig)No other added/removed/renamed fields were found in
types.rsbetween the role's prior state and main.Files changed (
ansible/roles/decdn_node/)templates/node.toml.j2— drop swap + share_bps emission, rename max_windows→live_windows, add guardedchain_staleness_grace_sec([blockchain]),disk_headroom_mb([cache]scalar, above the sub-tables), and a new guarded[client]table withregion_allowlist.defaults/main.yml— dropdecdn_swap_*+decdn_pool_floor_signer_share_bps, rename the max_windows var, adddecdn_chain_staleness_grace_sec,decdn_disk_headroom_mb,decdn_client_region_allowlistwith safe empty defaults + one-line docs.tasks/main.yml— drop the swap addresses from the CLI-only-address assert, dropswap_venue(enum) /swap_fee_tier/share_bps(bounded-range) asserts, rename max_windows→live_windows in the integer-shape loop, addchain_staleness_grace_sec(must-be-positive) +disk_headroom_mb(integer shape) +client_region_allowlist(ISO-3166 alpha-2 shape) validation.README.md— knob docs updated (drop swap/share_bps, rename, add the three new knobs).molecule/schemaoracle re-syncedfiles/gen-schema-keys.py— addClientConfig→clienttoSTRUCT_PATHS, bump the header revision to0b94efe4(0.0.0).files/schema-keys.txt— regenerated from main'stypes.rs+config-typessources: 157 fully-qualified paths (swap/share_bps/max_windows gone;chain_staleness_grace_sec,pool_floor_signer_live_windows,disk_headroom_mb,client.region_allowlistpresent).converge.yml— set the new knobs, drop the removed ones.verify.yml— addclientto the exact expected table set.The other scenarios (
default,validation,host-env,slow-readiness,generate-keystore) set none of the removed knobs — no change needed.Validation
molecule/Docker tooling isn't installed on this host (PEP-668 blocks a global install), so I validated with the render-and-grep proof — which runsverify.yml's exact drift-checker:node.toml.j2with the schemaconverge.ymlvar set through Ansible's own template engine (real| bool/| intfilters).tomllib(valid TOML) and ranmolecule/schema's verbatim path-walk checker against the regeneratedschema-keys.txt: 155 emitted paths, all recognised; no removed key emitted.[client]in the exact sorted positionverify.ymlasserts, and 131 scalar keys (≥ the 125 breadth floor).🤖 Generated with Claude Code