Skip to content

chore(deps): update getrandom to 0.4 (LAB-11170) - #31

Merged
27Bslash6 merged 1 commit into
mainfrom
lab-11170-getrandom-0.4
Oct 26, 2026
Merged

27Bslash6 merged 1 commit into
mainfrom
lab-11170-getrandom-0.4

Conversation

@27Bslash6

Copy link
Copy Markdown
Contributor

Replaces #13, which does not compile: getrandom 0.3 removed getrandom::getrandom.

Change

create_file_key fills the 32-byte file-key secret with getrandom::fill, the 0.3+ replacement. It reads the same OS source as before (getrandom(2) on Linux, getentropy on macOS), and an error still stops ck with "cannot generate a file key".

getrandom 0.2 stays in Cargo.lock as a transitive dependency of other crates; ck's own call is on 0.4.

Checks run locally

  • cargo fmt --all -- --check, cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked: all suites pass, including the run tests that create file.key
  • cargo deny check: advisories, bans, licenses, sources ok
  • cargo +1.85 check --locked --all-targets: rust-version unchanged

No user-facing change, so no docs change and chore(deps).

getrandom 0.3 removed getrandom::getrandom; getrandom::fill is its
replacement and draws from the same OS source.
@kodus-27b

kodus-27b Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

Kody Code Review — 1 suggested fix.
Paste the prompt below to your agent and all review fixed at once!

🛠️ Open Agent Prompt
A code review identified the following issues in this pull request.
Each section describes what was found and includes a reference implementation where available.

Files involved:
- Cargo.toml:33

---

### [1/1] Cargo.toml:33
Issue identified during code review:
Breaking dependency upgrade in Cargo.toml: `getrandom` jumps from 0.2 to 0.4, crossing two semver-breaking releases of this security-critical randomness source, which changed the API and backend feature flags. Any remaining call to `getrandom::getrandom` fails to compile because 0.3+ renamed it to `getrandom::fill`, and wasm targets fail to build without the `wasm_js` backend feature. Fix: migrate call sites to `getrandom::fill`, enable the required target/backend features, commit the updated Cargo.lock, and attach `cargo audit` or OSV output for 0.4 to the PR.

---

Review each issue in context, use the reference implementations as guidance, and apply fixes that are consistent with the surrounding codebase.

Comment thread Cargo.toml
@27Bslash6

Copy link
Copy Markdown
Contributor Author

@kody start-review

@27Bslash6
27Bslash6 merged commit 5e225fc into main Oct 26, 2026
5 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