Reuse shared native policy parsing in mxc_ffi
- Dominant language
- Rust
- Stars
- 1.3k
- Forks
- 79
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 117
Description
### Description of the task
Refactor the C ABI policy path in `src/ffi/mxc_ffi/src/lib.rs` to reuse the shared native policy parser and telemetry-version validation instead of maintaining the parallel `FfiPolicyEnvelope` / `validate_canonical_telemetry_version` implementation.
Preserve the FFI's typed error-code and error-detail behavior while ensuring policy JSON is interpreted once by the same contract used by the native execution boundary.
### Additional context
Identified while reviewing PR #821. Issue #1085 tracks the related but separate state-aware Node/.NET version-policy duplication; this task is scoped to the Rust C ABI/FFI parsing boundary.
Contributor guide
Research direction
Start in src/ffi/mxc_ffi/src/lib.rs and compare the C ABI policy path with the shared native policy parser and telemetry-version validation used by the native execution boundary. Review PR #821 for context; done means the parallel FfiPolicyEnvelope and validate_canonical_telemetry_version logic is reused while typed FFI error codes and details remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100