Skip to content

feat(native): prepare llama.cpp v0.4.0 adoption - #478

Merged
leehack merged 3 commits into
mainfrom
chore/adopt-native-v0.4.0
Sep 7, 2026
Merged

feat(native): prepare llama.cpp v0.4.0 adoption#478
leehack merged 3 commits into
mainfrom
chore/adopt-native-v0.4.0

Conversation

@leehack

@leehack leehack commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Adopt matching native and Web llama.cpp v0.4.0 runtimes, with regenerated native bindings, MTMD ABI updates, session migration tests, and Apple companion 0.0.18 preparation.

Closes #479 (pre-existing Markdown writer-audit contamination by installed website dependencies; narrowly fixed as a validation prerequisite).

Production-readiness scope

  • Native v0.4.0: published header/manifest/inventory/checksum validation, regenerated FFI model lazy-mode/quantization fields and MTMD options, matching primary and split-library file/buffer calls.
  • Web assets v0.1.43: immutable release 384042112; tag commit 78be0c8c628cd8cbc6a1268b1a9758c3d6d052a6; source 89178be67c3c84300bc1b129182bd5bc5a8e21fc; upstream v0.4.0@5266f24da75dc449bd56cbed7addb9c8e4a6a73e.
  • Exact manifest SHA-256 111eefc3588842cebfe665b363378edca34924764610263e1eda5280dfcfaa27; native manifest SHA-256 6187e6483eb03c86d79bb774e01ece71b201cb00561550bbc948b20d237b5cdc.
  • Apple companion 0.0.18 metadata/SwiftPM pairing prepared; package NOT published. It requires the matching next core release with v0.4.0 FFI and must not publish alone. Current published core0.8.22 users must retain companion0.0.17; development snippets override both packages to the same checkout. Core version remains 0.8.22; this is not a core release-prep PR.
  • Old native sessions (version 9) must be regenerated; version 10 save/load and old-version rejection followed by valid reload are tested.
  • Web/native parity gates remain enforced. Frozen release notes preserved; only current Unreleased notes and maintained snippets updated.
  • LiteRT native/Web pins, public video support, GPU qualification, and new lazy-loading APIs unchanged/out of scope.

Publication prerequisite completed with user authorization

The failed automatic Web scan 34104915793 was retried, completed successfully, and dispatched publication 34117166273. That publication completed SUCCESS and produced immutable v0.1.43 using already-successful candidate 34100775215 and qualification 34102054173. The previous failure was a GitHub API timeout before credential exposure. No safeguards were bypassed or environment settings changed.

Validation

  • Targeted Web parity/provenance + companion metadata: 75/75 PASS. The five initial draft failures are fixed without relaxing those gates.
  • Live check_webgpu_bridge_tag.dart --verify-manifest: PASS, including 17 consumer pins, v0.4.0 family parity, exact provenance and manifest bytes.
  • Maintained Web fetch: PASS; seven artifact checksums verified.
  • Consumer chat-app-web-real-model-smoke: PASS on local Chromium CPU/WASM worker with stories15M, pinned v0.1.43 staged in the deployable build; model load and nonempty generation, no page errors/request failures.
  • Native ABI/state/inference: 25/25 PASS; strengthened symbol/call-site suite 16/16 PASS.
  • Real Qwen3.5-0.8B Q4_K_M + F16 projector, macOS arm64 Metal: four tool-call variants PASS; public image file + bytes PASS. CPU stories15M baseline/external-draft output hashes match 2eed00e8; pipeline evidence, not a speedup claim.
  • Root analyzer, canonical formatting, final docs build/strict links, release-doc version verifier including --release-prep: PASS.
  • Full VM after coordinated changes and Writer-safety Markdown audit scans installed website dependencies #479 correction: 1,985 PASS / 77 fixture skips, with website dependencies installed. The initial Writer-safety Markdown audit scans installed website dependencies #479 failure is superseded by this passing rerun.
  • Final-head Chrome: 925/925 PASS; exact-head hosted Chrome also SUCCESS.
  • NVIDIA and older non-SVE Android physical devices unavailable; no passes claimed. No new Pixel test or physical playback/intelligibility claim in this PR.

High-risk regression review

  • Classification: high risk, artifact consumer/FFI/runtime routing.
  • Exact head 451518d20590b9f75e95d7957649e856a082f802; base 3ad853d286689046dec659938cdbb082b97ce00b.
  • Independent Astra native_v040_independent_qa: PASS on exact final head. Prior package-pairing finding corrected with explicit unreleased warning, safe published pairing, and mandatory same-checkout overrides. No remaining blocker in the independent bounded review; final hosted CI still required.
  • Production deletion/bypass proof: individually scoped assertions for all four MTMD primary/fallback file/buffer calls and same-library defaults, real helper and public file/byte path tests, old-session negative+recovery test.
  • Writer-safety Markdown audit scans installed website dependencies #479 affects the test's filesystem ownership inventory, not runtime or publication authority. Maintained source/docs/versioned-doc checks remain; installed/generated dependency Markdown and symlink traversal are excluded with regressions.
  • Known PR-caused P1 regressions: 0 known after the corrected full VM suite and independent Astra QA. Final live review threads: 0 total / 0 unresolved; refresh again before merge.
  • Hosted CI: 15/15 populated exact-head checks SUCCESS, including CI run 34118433659. GitHub reports CLEAN / MERGEABLE. Independent Astra QA PASS on the exact head. Remains DRAFT awaiting the separate merge decision. No merge or Dart package publication authorized/performed.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Chat app preview removed for leehack/llamadart-chat-pr-478.

@leehack
leehack marked this pull request as ready for review September 7, 2026 12:02
@leehack
leehack merged commit f43ada3 into main Sep 7, 2026
16 checks passed
@leehack
leehack deleted the chore/adopt-native-v0.4.0 branch September 7, 2026 12:03
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.

Writer-safety Markdown audit scans installed website dependencies

1 participant