Skip to content

fix(apr-cli): build without the inference feature (#4972) - #5167

Open
noahgift wants to merge 2 commits into
mainfrom
la-72/lab-4972-r3
Open

noahgift wants to merge 2 commits into
mainfrom
la-72/lab-4972-r3

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

apr-cli does not compile with --no-default-features on main: cargo check -p apr-cli --no-default-features --lib stops with 23 errors (E0061, E0277, E0282, unresolved items), in chat, golden-output, output-verification, run, serve and dispatch code that reaches realizar without the inference gate.

This puts the gate back where it belongs and adds no new behaviour under default features:

Row Change
1 Gate the inference-only items (realizar chat-template import, thinking-on budget helpers, the runtime thinking-on leg, serve::route_index, the Devices dispatch arm) on feature = "inference"
2 Add not(inference) fallbacks: the banner names no template family, and a forced accelerator is refused for every architecture (there is no forward on any device)
3 Align the not(inference) ChatSession::new stub's signature with its inference twin
4 Tests for the no-inference refusal: forced is refused for every architecture, including an unread one; unforced is never refused

Measured on main 812dbe3 plus this diff: cargo fmt --check, cargo check and cargo clippy -D warnings with and without default features all exit 0. Without the diff, the no-default check exits 101 with 23 errors.

The second commit re-cites the 14 docs/audits/surface_audit.csv rows that cite dispatch_analysis.rs at the current line of their anchor, which the G2.1 freshness check requires; check_dogfood_coverage.sh passes. This replaces #5162, which conflicted with main in that ledger.

Not yet measured: the row-4 tests. cargo test -p apr-cli --no-default-features --lib does not compile on this head: 70 errors, none in an item this diff touches. Test code elsewhere in the crate assumes inference, for example the Tune command and the golden-output helpers. Until the lib test target builds without inference, no job compiles or runs row 4. Making that target build is follow-up work, not part of this PR.

Refs #4972
keep-open: #4972 is the LAB check that apr-cli builds without inference; it closes once that check runs green at night, not on this merge.

🤖 Generated with Claude Code

noahgift and others added 2 commits October 11, 2026 20:02
`cargo check -p apr-cli --no-default-features --lib` failed with 23 errors:
items that use realizar or axum, or call inference-only helpers, were not
behind `cfg(feature = "inference")`. The default build hid them, and the
workspace-wide no-default check unifies `inference` back into apr-cli.

- Gate `serve::route_index`, the `Devices` dispatch arm, the runtime
  thinking-ON leg, the four thinking-budget helpers and chat's realizar import.
- `forced_accelerator_refusal` without inference refuses any forced
  accelerator by name; its realizar-table tests now need inference, and a
  no-inference module pins the new behaviour.
- The chat banner names its template through `banner_template_family`, which
  says plainly when the build has no detector.
- The no-inference `ChatSession::new` stub takes `force_cpu`, like its callers.

The default build is unchanged. A planted undefined call in a no-inference-only
arm turns the check RED (rc 101) while the default build stays green; reverted,
it is green again. Clippy `-D warnings` is clean in both feature sets.

Refs #4972

Agent: la-0.72b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 9447c19)
…rrent lines (Refs #4972)

The inference gates in this branch moved dispatch_analysis.rs, so G2.1
freshness asks for the ledger rows that cite it. Each of the 14 rows now
names the line of its anchor on this head: the eval task match arms, the
chat accelerator check, and the parity per-op dispatch. Most of these
citations had already drifted on main; no row changes anything but its
line number.

Agent: la-0.72b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5167 head=2f27c098bb8788295be784568d22e4472863a93a verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

This branch has not been deployed

No deployments
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