# ECP-0112: Match Nested OP Deployer Intent Schema Status: Draft ## Problem / context `ecp-forge` OP Stack bootstrap failed with `missing key id` even though `/var/lib/every-channel/op-stack/deployer/.deployer/intent.toml` contained an `id` field. After that was repaired, bootstrap also found a placeholder `state.json` whose deployment fields were still null. The current `op-deployer` intent format writes chain and role values under nested TOML sections, while the bootstrap helper only matched keys at the start of a line and treated any `state.json` as completed state. ## Decision Update the OP Stack bootstrap helper to replace TOML keys after optional indentation, preserve that indentation when writing the replacement value, and run `op-deployer apply` unless the state file has non-null applied deployment fields. ## Consequences - The existing `op-deployer/v0.6.0-rc.3` intent file can be repaired in place. - The bootstrap service can generate sequencer, batcher, proposer, challenger, and dispute monitor runtime config from the existing deployment state. - Placeholder `state.json` files no longer block the apply step. - The change stays compatible with flat TOML keys if `op-deployer` changes the layout again. ## Alternatives considered - Regenerate the deployment state from scratch. Rejected because a surgical config repair is safer for an already deployed OP Stack root. - Keep matching only top-level keys. Rejected because it does not match the live `op-deployer` schema on `ecp-forge`. ## Rollout / teardown Deploy the updated bootstrap helper, restart `every-channel-op-stack-bootstrap.service`, and then restart the dependent OP Stack containers. Teardown is reverting this helper change and regenerating the OP Stack root with a known-flat intent schema.