Skip to content

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

Merged
CSRessel merged 1 commit into
mainfrom
fix/acp-send-error-release-build
Jun 2, 2026
Merged

fix(acp): make send_error available in release builds#493
CSRessel merged 1 commit into
mainfrom
fix/acp-send-error-release-build

Conversation

@nori-sessions
Copy link
Copy Markdown
Contributor

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

Summary

The release build on main is failing to compile while branch checks and the main check pass. Run that surfaced it: https://github.com/tilework-tech/nori-cli/actions/runs/26769466753

Root cause:

  • PR feat(acp): Implement ACP thread goal support #491 (ACP thread goal support) added thread_goal.rs, which calls self.send_error(&message) at thread_goal.rs:392 in a non-debug code path (a real user-facing validation error: "goal update must include an objective or status").
  • send_error (submit_and_ops.rs:298) was gated behind #[cfg(debug_assertions)] — it was originally only called from a debug-gated branch, so the method itself was debug-only.
  • CI never caught it: every check (rust-ci.yml, branch checks, main check) builds and tests with --profile ci-test, which inherits = "test" → debug-assertions on → the method exists.
  • The release job runs cargo build --release (nori-release.yml:365). [profile.release] leaves debug-assertions at its default of off → the method is compiled out → E0599: no method named send_error.

Fix: remove the #[cfg(debug_assertions)] gate so send_error exists in all builds. The error event it emits is a legitimate user-facing path in release, so it should not be compiled out. The remaining debug-only caller (submit_and_ops.rs:257, unknown-op diagnostic) stays debug-gated and is unaffected; the method is still used in release via the thread goal handler, so there is no dead-code warning.

Test plan

  • Reproduced the exact failure locally: cargo check --release -p nori-acpE0599 at thread_goal.rs:392.
  • Confirmed fix: cargo check --release -p nori-acp compiles cleanly.
  • CI green (release build + branch checks).

The thread goal handler added in #491 calls self.send_error() in a
non-debug code path, but send_error was gated behind
#[cfg(debug_assertions)], so it was compiled out of release builds.

CI never caught this because every check builds and tests with the
ci-test profile (which inherits from `test`, debug-assertions on), so
the method exists there. Only `cargo build --release` in the release
workflow compiles with debug-assertions off, where the method is absent
and the call fails to compile with E0599.

Remove the cfg gate so send_error exists in all builds.
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
@CSRessel CSRessel merged commit 2418db6 into main Jun 2, 2026
9 of 13 checks passed
@CSRessel CSRessel deleted the fix/acp-send-error-release-build branch June 2, 2026 15:00
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