Skip to content

fix(llm): resolve two compile errors blocking develop build (CI #33417130814) - #6214

Merged
makr-code merged 2 commits into
developfrom
copilot/fix-ci-build-status-develop-yet-again
Aug 31, 2026
Merged

fix(llm): resolve two compile errors blocking develop build (CI #33417130814)#6214
makr-code merged 2 commits into
developfrom
copilot/fix-ci-build-status-develop-yet-again

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Two hard compile errors in the llm module broke the develop build since 1164dfe. Both are in speculative-decoding paths introduced recently.

Changes

src/llm/llama_wrapper.cpp:1770const pointer passed to non-const llama_token* param

  • llama_batch_get_one(llama_token*, int32_t) requires a mutable pointer; the local draft_token was incorrectly declared const
  • Fix: drop const from the local variable
// Before — doesn't compile: cannot bind const int* to llama_token*
const auto draft_token = static_cast<llama_token>(token_id);
const auto batch = llama_batch_get_one(&draft_token, 1);

// After
auto draft_token = static_cast<llama_token>(token_id);
const auto batch = llama_batch_get_one(&draft_token, 1);

src/llm/inference_engine_enhanced.cpp:2263draft_model_id undeclared in trySpeculativeGeneration

  • Variable only exists in the calling scope (processRequest, line 1536); was erroneously referenced in the callee
  • Fix: derive the ID locally from draft_plugin->getModelInfo() with a safe fallback
const auto draft_info = draft_plugin ? draft_plugin->getModelInfo() : std::nullopt;
const std::string draft_model_id = (draft_info && !draft_info->model_id.empty())
    ? draft_info->model_id : "(unknown draft model)";

Linked Issues

Closes #6095

Type of Change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Refactoring (non-breaking)
  • Documentation
  • Breaking change (requires MAJOR version bump — see VERSIONING.md)
  • Security fix
  • Other:

Breaking Change Checklist

  • MAJOR version bump planned in VERSION and CMakeLists.txt
  • Migration guide added in docs/migration/
  • Announcement prepared for GitHub Discussions (≥ 2 weeks before release)
  • CHANGELOG ### Removed / ### Changed section updated

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Benchmarks run (if performance-sensitive change)

No tests changed — both fixes are in error paths (const-correctness and diagnostic logging) with zero behavioral delta in the happy path.

Security Tiering Impact (Required for Runtime Changes)

  • Impacted tier(s):

    • T0 Trusted Core
    • T1 Security & Platform Services
    • T2 Data Plane Engines
    • T3 Interface & Protocol Edge
    • T4 Managed Extension Runtime
    • T5 Plugin Boundary
    • N/A (docs-only / non-runtime)
  • Trust-boundary crossings documented in PR description (example: T3 -> T2, T5 -> T4 brokered call)

  • Boundary controls validated for affected T3/T4/T5 paths (AuthN/AuthZ, validation, rate limits, audit)

  • Boundary-focused tests added/updated or explicit N/A rationale provided

  • If trust level/privilege increased, security maintainer approval is attached

N/A — changes are purely const-correctness and local variable scoping in speculative decode paths; no control flow or data-plane logic altered.

📚 Research & Knowledge (wenn applicable)

  • Diese PR basiert auf wissenschaftlichen Paper(s) oder Best Practices?
    • Falls JA: Research-Dateien in /docs/research/ angelegt?
    • Falls JA: Im Modul-README unter "Wissenschaftliche Grundlagen" verlinkt?
    • Falls JA: In /docs/research/implementation_influence/ eingetragen?

Relevante Quellen:

  • Paper:
  • Best Practice:
  • Architecture Decision:

AI-Generated Code (KI-generierter Code)

  • Symbol-Referenzen mit GetSymbolReferences_CppTools geprüft (siehe .github/instructions/cpp-language-service-tools.instructions.md)
  • Keine rohen Pointer und kein new/delete ohne explizites Review eingeführt
  • RAII und Exception-Safety für neue/angepasste Pfade geprüft
  • Keine unnötig komplexen KI-Abstraktionen eingeführt
  • Performance-Metriken geprüft, falls Hotpath betroffen

AI Review Workflow (Required for AI-assisted PRs)

  • Findings-first review performed with .github/prompts/pr-diff-findings-review.prompt.md
  • Security hardening review performed for security-sensitive/runtime changes with .github/prompts/security-hardening-review.prompt.md (or N/A documented)
  • API impact review performed for API/contract changes with .github/prompts/api-change-impact-review.prompt.md (or N/A documented)
  • All Critical/High findings are resolved or explicitly accepted with rationale in PR description
  • Residual risks and follow-up actions documented in PR description
  • Severity policy applied according to .github/copilot/REVIEW_SEVERITY_POLICY.md

N/A — trivial const/scope fix; no API surface, security path, or logic change.

High-Finding Exception Record (only if High is accepted)

  • High-finding exception claimed in this PR

  • Finding reference:

  • Maintainer approver:

  • Mitigation in current release:

  • Target fix milestone:

  • Tracking issue:

  • Validation evidence:

Release Readiness Gate (Required for release-scoped changes)

  • Release readiness reviewed with .github/prompts/release-readiness-check.prompt.md for branch transition scope
  • Branch governance validated against BRANCHING_STRATEGY.md and RELEASE_STRATEGY.md
  • Versioning/changelog impact validated against VERSIONING.md and CHANGELOG.md

Checklist

  • Code follows project style guidelines (clang-format / clang-tidy)
  • Self-review completed
  • Documentation updated (if needed)
  • CHANGELOG.md updated under [Unreleased]
  • No new warnings introduced
  • Security-sensitive paths reviewed by security maintainer (if applicable)

Scanner and IntelliSense Gates

  • IntelliSense/Compiler: no new errors in changed files
  • clang-tidy/cppcheck: no new high-risk findings in changed files
  • Gap Scanner: no new critical findings in categories security, input_validation, query_correctness, distributed_consistency, concurrency, memory
  • Gap Scanner: no new high findings in the same categories (or explicitly approved)
  • Gap Scanner delta report attached (baseline vs current), not only absolute totals
  • New unknown scanner findings triaged (fixed, re-categorized, or justified)

Copilot AI lite review requested due to automatic review settings August 31, 2026 19:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI linked an issue Aug 31, 2026 that may be closed by this pull request
- llama_wrapper.cpp:1770: remove const from draft_token local variable so
  llama_batch_get_one() can accept a non-const llama_token* pointer.
- inference_engine_enhanced.cpp:2263: draft_model_id was used in
  trySpeculativeGeneration() but never declared there (it only exists in
  the caller). Derive the id from draft_plugin->getModelInfo() at the
  call site instead.

Fixes CI build run 33417130814 (issue #6095).

Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI build status for develop branch fix(llm): resolve two compile errors blocking develop build (CI #33417130814) Aug 31, 2026
Copilot AI requested a review from makr-code August 31, 2026 19:44
@makr-code
makr-code marked this pull request as ready for review August 31, 2026 19:46
@makr-code
makr-code merged commit 398e92d into develop Aug 31, 2026
11 checks passed
@github-actions github-actions Bot added this to the Backlog milestone Aug 31, 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.

[CI] Build status tracker — develop

3 participants