Restore Node/Python binding tests for BReg apply reasons
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend, testing-qa
Research direction
Start with crates/registry-breg-client/tests/fixtures/review-reasons.json and the deleted-path references in crates/registry-breg-client-node/test/review-reasons.test.js and crates/registry-breg-client-py/tests/python/test_review_reasons.py. Read the Rust contract at crates/registry-breg-client/tests/lifecycle_contract.rs:75-83, then run the Node and Python binding test suites. Done means both bindings cover the bounded with_reason contract, or the suites explicitly document why Rust-only coverage is sufficient.
Written by the indexing model from the issue text.
Description
The Node.js and Python binding tests for BReg's apply-reason API were deleted without replacement. As of PR #1189 (commit 47000edc5), crates/registry-breg-client-node/__test__/review-reasons.test.js, crates/registry-breg-client-py/tests/python/test_review_reasons.py, and the shared fixture crates/registry-breg-client/tests/fixtures/review-reasons.json were removed. The with_reason API itself is still exercised at the Rust level in crates/registry-breg-client/tests/lifecycle_contract.rs:75-83 (only_apply_accepts_a_bounded_reason), but the two language bindings that wrap it have no equivalent coverage anymore.
Failure scenario: a future change to the Node or Python binding layer for with_reason (bounds checking, Unicode handling, the Debug redaction of the reason text) regresses silently, since only the Rust-level test would catch a logic bug, and the bindings' own serialization/FFI boundary isn't exercised for this API at all.
Suggested fix:
- Restore an equivalent Node and Python test (they don't need to be identical to the deleted ones, just re-cover the bounded reason contract at the binding layer) or explicitly note in the binding test suites why Rust-level coverage is considered sufficient.
Filed from the review of #1189; not merge-blocking.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 3h 45m
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from registrystack/registry-stack
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1239 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
registrystack/registry-stack#1235 ·
-
area:breg bug good first issue rust
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1227 ·
-
area:casework documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
registrystack/registry-stack#1217 ·
-
area:breg documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
registrystack/registry-stack#1213 ·
All issues in registrystack/registry-stack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100