HarperFast / HarperFast/harper-pro
add_node / set_node: accept replicates as { sends, receives } object
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 0
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 80
Description
`add_node` and `set_node` currently only accept a boolean for `replicates`. Customers (and the [containment mode work](https://github.com/HarperFast/harper-pro/issues/169) — CORE-3007) need it to also accept an object with `sends` and `receives` flags so a node can be set to e.g. "receive but don't send" via the operations API.
## Ask
- Accept either:
- `replicates: true` / `replicates: false` (current behavior), or
- `replicates: { sends: boolean, receives: boolean }`.
- Validate that at least one of `sends` / `receives` is present when the object form is used.
- Apply the resolved config to the same path the YAML config uses (so it stays consistent regardless of which entry-point sets it).
## Acceptance criteria
- `set_node` with the object form persists the `sends` / `receives` flags and they take effect on the running instance.
- `add_node` likewise accepts the object form when registering a new node.
- Boolean form continues to work unchanged.
- Documented in the operations-api docs.
## Blocks
- [CORE-3007](https://harperdb.atlassian.net/browse/CORE-3007) / [HarperFast/harper-pro#169](https://github.com/HarperFast/harper-pro/issues/169) — dynamic containment-mode toggle relies on this.
---
Tracked in Jira: [CORE-3002](https://harperdb.atlassian.net/browse/CORE-3002)
🤖 Filed by Claude on behalf of Kris.
Contributor guide
Assessment
This issue has not been assessed yet.