fix(acp): make send_error available in release builds#494
Closed
nori-sessions[bot] wants to merge 1 commit into
Closed
fix(acp): make send_error available in release builds#494nori-sessions[bot] wants to merge 1 commit into
nori-sessions[bot] wants to merge 1 commit into
Conversation
thread_goal.rs:392 calls self.send_error() unconditionally, but the method was gated behind #[cfg(debug_assertions)], so it was compiled out of release builds and the call failed with E0599. CI only compiles with the ci-test profile (inherits test → debug-assertions on), so the method existed there and the break only surfaced in the release job's `cargo build --release`. Remove the gate so the method exists in all profiles; goal-update errors now surface to the user in release too. 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Nori Releaseworkflow fails atBuild release binarieswith a real compile error, while every branch/main check passes:Root cause:
send_error(submit_and_ops.rs) was gated behind#[cfg(debug_assertions)], but #491'sthread_goal.rs:392calls it unconditionally. CI compiles and tests with--profile ci-test, whichinherits = "test"→debug_assertionsON → the method exists → green. The release job runscargo build --release→debug_assertionsOFF → the method is compiled out → E0599. So no CI check ever exercises the release configuration where this breaks.This fix removes the
#[cfg(debug_assertions)]gate sosend_errorexists in all profiles. The other (debug-only) caller at submit_and_ops.rs:256 keeps its own#[cfg(debug_assertions)]guard and still compiles. Goal-update errors now also surface to the user in release builds instead of being silently dropped.Test plan
cargo check -p nori-acp --releasefailed with E0599 before the change.cargo check -p nori-acp --releasepasses.cargo check -p nori-acp) with no dead-code warnings.Nori Releasebuild goes green.Note / follow-up
CI never compiles in release mode, so this whole class of
cfg(debug_assertions)mismatch is invisible to branch/main checks. Worth considering a release-modecargo checkin CI (or in the release workflow before the heavy build) as a cheap guard. Out of scope for this PR.🤖 Generated with Claude Code