Skip to content

Make model fields private with Bon builders - #3

Merged
Sajjon merged 3 commits into
mainfrom
codex/private-fields-bon-builders
Sep 2, 2026
Merged

Sajjon merged 3 commits into
mainfrom
codex/private-fields-bon-builders

Conversation

@Sajjon

@Sajjon Sajjon commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add Bon 3.9.3 and compile-time-checked builders for exposed model construction
  • make model data fields private, with read-only accessors or intentional consuming APIs
  • add getset 0.1.7 proc-macro derives for every simple field accessor in the core library and CLI, including copy and clone getters where needed
  • add targeted CLI and model tests for explicit-path conversion, missing-file errors, builder construction, answer replacement, empty answers, and consuming APIs
  • correct the sealed-file read error mapping to FailedToReadSecretFromFile
  • clean up a pre-existing redundant map closure required by the repository Clippy hook

Verification

  • cargo test --workspace --all-targets (93 tests)
  • cargo test --workspace --doc (66 doctests)
  • cargo +1.85.1 check --workspace --all-targets --locked
  • cargo clippy --all -- -D warnings
  • cargo llvm-cov --workspace --all-targets --lcov --output-path /private/tmp/svar-after.lcov (local line coverage: 84.63% to 89.24%)
  • scripts/cargo_readme.sh core --check
  • scripts/cargo_readme.sh cli --check
  • pre-commit: typos, fmt, clippy, doc tests, unit tests, and README checks

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.26%. Comparing base (1506578) to head (5ae6181).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ates/core/src/models/question/security_question.rs 93.75% 3 Missing ⚠️
crates/core/src/security_questions_sealed.rs 62.50% 3 Missing ⚠️
...models/answer/security_question_answer_and_salt.rs 95.65% 1 Missing ⚠️
...els/answer/security_questions_answers_and_salts.rs 97.56% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   93.98%   94.26%   +0.28%     
==========================================
  Files          19       19              
  Lines         565      610      +45     
==========================================
+ Hits          531      575      +44     
- Misses         34       35       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sajjon
Sajjon marked this pull request as ready for review September 2, 2026 05:38
@Sajjon
Sajjon merged commit 2462720 into main Sep 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant