Files Reviewed#1462
Conversation
…dates Bumps the npm_and_yarn group with 1 update in the / directory: [basic-ftp](https://github.com/patrickjuchli/basic-ftp). Updates `basic-ftp` from 5.3.0 to 5.3.1 - [Release notes](https://github.com/patrickjuchli/basic-ftp/releases) - [Changelog](https://github.com/patrickjuchli/basic-ftp/blob/master/CHANGELOG.md) - [Commits](patrickjuchli/basic-ftp@v5.3.0...v5.3.1) Updates `fast-xml-builder` from 1.1.5 to 1.2.0 - [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md) - [Commits](NaturalIntelligence/fast-xml-builder@v1.1.5...v1.2.0) Updates `ip-address` from 10.1.0 to 10.2.0 - [Commits](https://github.com/beaugunderson/ip-address/commits) --- updated-dependencies: - dependency-name: basic-ftp dependency-version: 5.3.1 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: fast-xml-builder dependency-version: 1.2.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: ip-address dependency-version: 10.2.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps the cargo group with 2 updates in the / directory: [openssl](https://github.com/rust-openssl/rust-openssl) and [rustls-webpki](https://github.com/rustls/webpki). Updates `openssl` from 0.10.77 to 0.10.79 - [Release notes](https://github.com/rust-openssl/rust-openssl/releases) - [Commits](rust-openssl/rust-openssl@openssl-v0.10.77...openssl-v0.10.79) Updates `rustls-webpki` from 0.103.12 to 0.103.13 - [Release notes](https://github.com/rustls/webpki/releases) - [Commits](rustls/webpki@v/0.103.12...v/0.103.13) --- updated-dependencies: - dependency-name: openssl dependency-version: 0.10.79 dependency-type: indirect dependency-group: cargo - dependency-name: rustls-webpki dependency-version: 0.103.13 dependency-type: indirect dependency-group: cargo ... Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Potential fix for code scanning alert no. 5: Resource exhaustion
…arn/npm_and_yarn-9401a92e25 build(deps): bump the npm_and_yarn group across 1 directory with 3 updates
…go-83c3bdb6f7 build(deps): bump the cargo group across 1 directory with 2 updates
📝 WalkthroughWalkthroughThree dependency and utility updates: ChangesRust Dependency Updates and Compatibility
Mock API Delay Capping
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
really awesome PR @rafaelfiguereod-stack :D welcome to the club! |
senamakel
left a comment
There was a problem hiding this comment.
some gi actions are failing like unit tests. do review and fix
…ck delay cap Addresses CI failures and reviewer feedback on PR tinyhumansai#1462: - fix(rand): update rand API calls to 0.10 compat - src/core/auth.rs: RngCore::fill_bytes → RngExt::fill - src/openhuman/security/pairing.rs: same - src/openhuman/memory/tree/tree_source/registry.rs: thread_rng().gen() → rand::random() - src/openhuman/tools/impl/computer/human_path.rs: Rng → RngExt bound, fix float type ambiguity - fix(sentry): remove "test" feature from production sentry dep (Cargo.toml:113) - fix(mock-api): add MAX_MOCK_DELAY_MS=30_000 cap in getDelayMs() (scripts/mock-api/state.mjs) - fix(mock-api): add re-export shim at scripts/mock-api-core.mjs for backward compat - chore: resolve merge conflicts in Cargo.lock, pnpm-lock.yaml, app/src-tauri/Cargo.lock
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/core/auth.rs`:
- Around line 181-184: Add trace-level entry/exit diagnostics around the
token-generation block (the code that creates `let mut bytes = [0u8; 32];
rand::rng().fill(&mut bytes); hex::encode(bytes)`) using the project's
tracing/log facility (e.g., tracing::trace! or log::trace!). Emit a stable
prefix like "token_generation:start" before filling `bytes` and
"token_generation:generated" after generation, and include only non-secret
metadata such as algorithm/entropy source or the token length (32) or a fixed
identifier — do NOT include `bytes`, the hex string, or any secret material in
the logs. Ensure the instrumentation is local to the token generation code path
(adjacent to the `rand::rng().fill(&mut bytes)` and `hex::encode(bytes)` calls)
and uses trace/debug level.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d1269cc0-2347-456d-9fcb-6b5cfe800de3
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockapp/src-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
Cargo.tomlscripts/mock-api/state.mjssrc/core/auth.rs
The upstream repo has CodeQL default setup enabled, which rejects SARIF uploads from advanced configurations with: "CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled". Removing the workflow restores green CI; default setup already provides the equivalent scanning at the repo level.
Per CodeRabbit suggestion + CLAUDE.md "Debug logging" policy: emit entry/exit `log::trace!` markers around the token generation flow with a stable `[auth]` prefix. No secret material is logged — only counts.
Summary
sentry(and friends) inCargo.toml/Cargo.lockto keep the Rust core on the current 0.x line.pnpm-lock.yamlto track those upstream dep updates.scripts/mock-api-core.mjsand restores the 30sMAX_MOCK_DELAY_MScap in the refactoredscripts/mock-api/state.mjs.rand 0.10API breakage acrosssrc/core/auth.rs,src/openhuman/security/pairing.rs,src/openhuman/memory/tree/tree_source/registry.rs, andsrc/openhuman/tools/impl/computer/human_path.rsso the Rust core compiles again..github/workflows/codeql.yml— it conflicts with the upstream repo's CodeQL default setup ("CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled") and breaks CI.Problem
CI on the original branch was red:
Analyze (ruby)/Analyze (javascript-typescript)from the new advanced CodeQL config rejected by GitHub, Rust core failing to compile againstrand 0.10, and the merged-inmock-api-core.mjsleft raw conflict markers that broke every test using the mock backend. Without this cleanup the dependency bumps could not land.Solution
Sequenced fixes: resolved the mock-api conflict + lock files first, restored the
Math.min(value, 30_000)delay cap that the earlier refactor dropped, removed"test"from the productionsentrydep (kept only in[dev-dependencies]), migrated four call sites to the newrand 0.10RngExt/rand::random()API, and removed the conflicting CodeQL workflow file.Submission Checklist
Impact
rand 0.10and the bumpedsentryline.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
rafaelfiguereod-stack:main93f6c126Validation Run
pnpm --filter openhuman-app format:checkpnpm typecheckpnpm test:unit(222 files, 2112 tests pass)cargo fmt --check+cargo checkpasscargo check --manifest-path app/src-tauri/Cargo.tomlpassValidation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
[dev-dependencies]Duplicate / Superseded PR Handling