Skip to content

fix(acp): make send_error available in release builds#494

Closed
nori-sessions[bot] wants to merge 1 commit into
mainfrom
fix/send-error-release-compile
Closed

fix(acp): make send_error available in release builds#494
nori-sessions[bot] wants to merge 1 commit into
mainfrom
fix/send-error-release-compile

Conversation

@nori-sessions
Copy link
Copy Markdown
Contributor

@nori-sessions nori-sessions Bot commented Jun 2, 2026

Summary

The Nori Release workflow fails at Build release binaries with a real compile error, while every branch/main check passes:

error[E0599]: no method named `send_error` found for reference `&backend::AcpBackend`
  --> acp/src/backend/thread_goal.rs:392:34

Root cause: send_error (submit_and_ops.rs) was gated behind #[cfg(debug_assertions)], but #491's thread_goal.rs:392 calls it unconditionally. CI compiles and tests with --profile ci-test, which inherits = "test"debug_assertions ON → the method exists → green. The release job runs cargo build --releasedebug_assertions OFF → 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 so send_error exists 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

  • Reproduced the failure locally: cargo check -p nori-acp --release failed with E0599 before the change.
  • After the fix: cargo check -p nori-acp --release passes.
  • Debug profile still compiles cleanly (cargo check -p nori-acp) with no dead-code warnings.
  • CI Nori Release build 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-mode cargo check in CI (or in the release workflow before the heavy build) as a cheap guard. Out of scope for this PR.

🤖 Generated with Claude Code

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>
@CSRessel
Copy link
Copy Markdown
Collaborator

CSRessel commented Jun 2, 2026

@CSRessel CSRessel closed this Jun 2, 2026
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