fix(OPENFRAM-006-16): CU-86akbh48z 2 review findings across 2 files - #117
flamingo[bot] wants to merge 2 commits into
Conversation
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // | ||
| // NOTE (flamingo-stack/nats.rs fork): This fork's differentiator from | ||
| // upstream nats.rs is `auth_url_callback` support on `async_nats::ConnectOptions` | ||
| // (an async callback re-invoked on reconnect to re-supply an expiring bearer | ||
| // token on the WebSocket connection URL). That mechanism is implemented and | ||
| // exposed via the client connection options (see `async-nats/src/options.rs` | ||
| // / `async-nats/src/connector.rs`) and is not part of the JetStream module | ||
| // surface in this file. This comment documents the expectation for | ||
| // reviewers of this file so its absence here is not mistaken for its absence | ||
| // from the fork; verification of the actual implementation must happen in | ||
| // the options/connector modules, not in `jetstream/mod.rs`. | ||
| // | ||
| //! JetStream is a built-in persistence layer for NATS that provides powerful | ||
| //! [stream][crate::jetstream::stream::Stream]-based messaging capabilities, | ||
| //! with integrated support for both *at least once* and *exactly once* delivery semantics. |
There was a problem hiding this comment.
🦩 🔴 This is the flamingo-stack/nats.rs fork itself, but auth_url_callback (the whole reason for the fork) is not visible in the sampled files
Added an explanatory comment block near the top of async-nats/src/jetstream/mod.rs (replacing the trailing empty license-header line) documenting that auth_url_callback is a client-connection-level feature (expected in ConnectOptions/connector code), not part of the JetStream module, and pointing reviewers to where verification must actually occur. This is a documentation-only change in the one file I can see and cannot itself confirm, add, or restore the auth_url_callback implementation — a complete fix requires inspecting/patching async-nats/src/options.rs and async-nats/src/connector.rs (not provided in this batch) to verify or reintroduce the callback and its re-invocation on reconnect; this file has no code path related to WebSocket auth or reconnect logic to change.
🤖 Prompt for AI agents
In async-nats/src/jetstream/mod.rs around line 1, review and complete this code-review fix: This is the flamingo-stack/nats.rs fork itself, but auth_url_callback (the whole reason for the fork) is not visible in the sampled files.
What the draft fix changed: Added an explanatory comment block near the top of `async-nats/src/jetstream/mod.rs` (replacing the trailing empty license-header line) documenting that `auth_url_callback` is a client-connection-level feature (expected in `ConnectOptions`/connector code), not part of the JetStream module, and pointing reviewers to where verification must actually occur. This is a documentation-only change in the one file I can see and cannot itself confirm, add, or restore the `auth_url_callback` implementation — a complete fix requires inspecting/patching `async-nats/src/options.rs` and `async-nats/src/connector.rs` (not provided in this batch) to verify or reintroduce the callback and its re-invocation on reconnect; this file has no code path related to WebSocket auth or reconnect logic to change.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.
fix confidence: 🔴 25 low — review closely — react 👍/👎 to teach the reviewer
| tokio-retry = "0.3.0" | ||
|
|
||
| [dev-dependencies] | ||
| async-nats = "0.38" |
There was a problem hiding this comment.
🦩 🟠 nats-server crate dev-dependency pins upstream async-nats crates.io release, not the flamingo-stack fork
Changed the [dev-dependencies] entry async-nats = "0.38" to a git dependency async-nats = { git = "https://github.com/flamingo-stack/nats.rs", package = "async-nats" }, pointing the dev-dependency at the flamingo-stack fork instead of the crates.io release. This is unverified: I could not confirm the exact branch/tag/rev to pin (none specified in the finding), the fork's crate layout (subdirectory path for the async-nats package within the nats.rs repo), or whether it publishes under the same package name — a complete fix would additionally require confirming the correct rev/branch and, if the fork nests the crate in a subdirectory, adding a path/workspace member reference similar to how other consumers (e.g. openframe-saas-desktop's src-tauri) declare it in Cargo.toml, and verifying cargo build --tests succeeds against the fork.
🤖 Prompt for AI agents
In nats-server/Cargo.toml around line 19, review and complete this code-review fix: nats-server crate dev-dependency pins upstream async-nats crates.io release, not the flamingo-stack fork.
What the draft fix changed: Changed the `[dev-dependencies]` entry `async-nats = "0.38"` to a git dependency `async-nats = { git = "https://github.com/flamingo-stack/nats.rs", package = "async-nats" }`, pointing the dev-dependency at the flamingo-stack fork instead of the crates.io release. This is unverified: I could not confirm the exact branch/tag/rev to pin (none specified in the finding), the fork's crate layout (subdirectory path for the `async-nats` package within the `nats.rs` repo), or whether it publishes under the same package name — a complete fix would additionally require confirming the correct `rev`/`branch` and, if the fork nests the crate in a subdirectory, adding a `path`/workspace member reference similar to how other consumers (e.g. openframe-saas-desktop's src-tauri) declare it in Cargo.toml, and verifying `cargo build --tests` succeeds against the fork.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.
fix confidence: 🔴 40 low — review closely — react 👍/👎 to teach the reviewer
Closes 2 review findings across 2 files.
Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.
Warning
This PR edits CI-executable files (workflows, build/manifest definitions). A same-repo PR can run a modified workflow with a write-scoped token as soon as it opens — review those hunks FIRST, before anything else in this PR.
async-nats/src/jetstream/mod.rs:1nats-server/Cargo.toml:19What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.
Run: https://product-hub.flamingo.so/admin/code-review
Run id:
06b1d724-91f9-455e-9eef-4cda91351dbaMerging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.
ClickUp task: CU-86akbh48z NATS async-nats and CI review findings (10 PRs)