Skip to content

[PR #1035] fix(mini-chat): fail-fast on tenant upstream registration and avoid secret declassification#1740

Closed
orivaris wants to merge 1 commit into
mainfrom
cf-mirror-pr-1035
Closed

[PR #1035] fix(mini-chat): fail-fast on tenant upstream registration and avoid secret declassification#1740
orivaris wants to merge 1 commit into
mainfrom
cf-mirror-pr-1035

Conversation

@orivaris
Copy link
Copy Markdown

🔗 Mirrored PR cyberfabric/cyberware-rust#1035 | Author: aviator5 | Opened: 2026-03-12T12:30:05Z | Status: merged on 2026-03-12T13:41:05Z
GitHub API does not allow setting PR author or timestamps — attribution preserved here.


Summary by CodeRabbit

  • Bug Fixes

    • Enhanced error handling for tenant upstream provisioning, now explicitly reporting creation failures instead of silently skipping configurations.
  • Refactor

    • Optimized credential secret handling in client authentication processes.

…ecret declassification

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
@orivaris orivaris deleted the cf-mirror-pr-1035 branch May 26, 2026 15:01
@orivaris orivaris closed this May 26, 2026
@orivaris
Copy link
Copy Markdown
Author

coderabbitai[bot] commented on 2026-03-12T12:30:33Z:


No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 694556ff-b1d4-4cb7-8072-906c8556a335

📥 Commits

Reviewing files that changed from the base of the PR and between 5c4f85e and fd2f75e.

📒 Files selected for processing (2)
  • modules/mini-chat/mini-chat/src/infra/oagw_provisioning.rs
  • modules/mini-chat/mini-chat/src/module.rs

📝 Walkthrough

Walkthrough

This PR refactors error handling in OAGW upstream creation to use explicit error propagation via ok_or_else instead of silent failures, and simplifies secret credential handling by directly cloning client_secret without explicit secret extraction.

Changes

Cohort / File(s) Summary
OAGW Upstream Error Handling
modules/mini-chat/mini-chat/src/infra/oagw_provisioning.rs
Changed register_oagw_upstreams logic from conditional skip (requiring both alias and tenant_override) to stricter two-step error handling: tenant upstream creation now propagates errors via ok_or_else, and alias assignment occurs conditionally only when tenant_override exists.
Client Credentials Secret Handling
modules/mini-chat/mini-chat/src/module.rs
Removed SecretString::expose_secret() usage; client_secret now directly clones from credentials without explicit secret extraction, simplifying the handling pattern.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • cyberfabric/cyberfabric-core#1025: Modifies the upstream registration logic in modules/mini-chat/.../oagw_provisioning.rs and potentially conflicts with this PR's error handling approach.
  • cyberfabric/cyberfabric-core#1011: Touches the same files (oagw_provisioning.rs and module.rs) for OAGW registration and secret handling patterns.
  • cyberfabric/cyberfabric-core#1013: Modifies register_oagw_upstreams tenant-upstream handling with alternative error propagation logic.

Suggested reviewers

  • striped-zebra-dev
  • MikeFalcon77

Poem

🐰 Errors now sing out loud and clear,
No silent failures need we fear!
Secrets stripped of veils so thin,
A cleaner path to work within.
Small changes, big impact here! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: fail-fast error handling for tenant upstream registration and improved secret handling by avoiding explicit secret exposure.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants