Repository navigation
fix(ohos): build CMake crates with Ninja and ungate the cli sha256 helper - #6989
Merged
Hmbown merged 11 commits intoOct 16, 2026
Merged
Conversation
Adds Standard Compute on the existing compatible-host descriptor path: Chat Completions at https://api.stdcmpt.com/v1, STANDARDCOMPUTE_API_KEY, and the `standardcompute` router id as the bootstrap model. Live GET /v1/models stays the model authority. Billing is recorded as Unknown in the pricing omission ledger; no provider enum or price row. Signed-off-by: Henrik Bakke Dukefoss <henrikdukef@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ributor The vendor budget policy permits optional prepaid Pay as you go on eligible plans. Qualify the default HTTP402 exhaustion behavior in English and Chinese and link the authoritative policy. Keep billing Unknown and model discovery live. Map Henrik Bakke Dukefoss and the verified author email to @henrikdukefoss; credit the original descriptor contribution on CONTRIBUTORS, CHANGELOG and web release credits. Regenerate packaged changelog and agent docs from their existing owners. Artifact-only verification on exact contributor head f7805eb: - Existing credit checker fails before and passes after on captured exact PR and CI synthetic-merge ancestry (9 canonical contributors). - All26 generated doc topic IDs, slugs and source paths/order unchanged; only PROVIDERS and CONTRIBUTORS content/hash entries change,50 others identical. - Existing changelog sync --check, baseline/generated-doc consistency, patch apply and whitespace checks pass. - No native build, npm gate or resulting-head CI claimed; fresh checks pending before merge. Original contributor commits and canonical shared build inputs are preserved. Refs codewhale-hq#6985 Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…enerated docs Regenerate agent docs from merged provider and contributor sources. Preserve the Standard Compute budget qualification, canonical author mapping, all contributor credit surfaces, and main documentation. All other paths auto-merge. Use the existing docs derivation owner on the exact automatic-merge sources:26 topics,52 entries and39 paths. Only the documented conflict paths are replaced. Static full-tree and replacement-blob review, generation consistency and diff whitespace checks pass. No new production edits or canonical checkout changes. Both original contributor ancestry and main68f4dd3406 are retained. Fresh resulting-head native and web CI remain pending; this source reconciliation is not a merge-readiness or release claim. Refs codewhale-hq#6985 Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…lper The Windows OpenHarmony cross-build failed twice over. aws-lc-sys drives CMake through the cmake crate, which passes no -G; on Windows CMake then defaults to the Visual Studio generator, which ignores the clang compiler the OHOS toolchain file sets and feeds clang flags to cl.exe (error D8021). scripts/ohos-env.ps1 now exports CMAKE_GENERATOR=Ninja, falling back to the SDK-bundled ninja and failing loudly when neither exists. With that fixed, codewhale-cli for aarch64-unknown-linux-ohos hit E0433: mod update is cfg'd out on OHOS, but three cloud call sites reached for crate::update::sha256_hex without the same gate. Those sites verify downloaded content integrity, so they are not cfg'd out either; the helper and its hex encoder move to an ungated crate::hashing module, matching the shared codewhale_runtime::hashing implementation the TUI already uses. Verified: aws-lc-sys builds in 43.16s (libaws_lc_0_45_0_crypto.a, 5.9 MB); cargo build --release --target aarch64-unknown-linux-ohos -p codewhale-cli exits 0 and produces a 111 MB ELF64 AArch64 PIE needing only libc.so and libtime_service_ndk.so; cargo check -p codewhale-cli exits 0 on the host target; cargo check -p codewhale-cli --tests exits 0; cargo fmt --all --check exits 0.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes address both build failures while preserving hashing behavior, with no unresolved findings.
0 open findings
What changed in this PR
Fixes Windows OpenHarmony cross-build failures by selecting Ninja and making CLI hashing available on OHOS.
Changes:
- Selects Ninja, with an SDK fallback and an explicit error if unavailable.
- Moves hashing helpers into an ungated module and updates callers without changing digest behavior.
| File | Description |
|---|---|
| scripts/ohos-env.ps1 | Configures Ninja and SDK fallback. |
| crates/cli/src/update.rs | Imports the relocated hashing helper. |
| crates/cli/src/lib.rs | Registers hashing without an OHOS gate. |
| crates/cli/src/hashing.rs | Houses the unchanged hashing helpers. |
| crates/cli/src/cloud/work.rs | Uses ungated hashing for context verification. |
| crates/cli/src/cloud.rs | Updates integrity-check and dispatch-stamp hashing calls. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
added 2 commits
October 15, 2026 10:06
Reconcile original PR codewhale-hq#6989 with main23e9119 while preserving shenjackyuanjie's commit5c6a61ab and unchanged CMake/hash implementation. The existing OHOS job compiled only codewhale-tui, so an ungated CLI call into the target-gated updater escaped it. Include codewhale-cli in the same real-SDK cargo check and trigger it for the PowerShell setup script. Preserve download/context integrity checks on OHOS. Credit the diagnosis and repair on all three release surfaces, and regenerate the TUI changelog. Existing contributor-credit checker: 10 contributors found, all3 surfaces PASS (exact original PR ancestry). Existing changelog sync check PASS; actionlint for changed workflow exit0; byte comparison confirms hashing implementation moved unchanged and all3 cloud callers only change module path. No new dependencies, production logic, test functions or code comments in this follow-up. Original CI38770088645 version gate failed missing website credit; Windows job116543508599 failed composer-readiness acceptance before native tests ran. Preserve that failure. Contributor-reported Windows OHOS release build is a separate self-report; current hosted OHOS success covers only the TUI. New-head CLI target, native, npm and web qualification remain pending before merge. No gate is waived and no release is published. Canonical checkout/index/HEAD remain unchanged. Refs codewhale-hq#6989, codewhale-hq#6988 Signed-off-by: CodeWhale Bot <bot@codewhale.net>
…#6989) The contributor-credit follow-up changed docs/CONTRIBUTORS.md but omitted its generated website snapshot, so exact-head web CI passed772 existing tests then failed check:facts for stale agent docs. Run the unchanged committed deriveAgentDocs owner against all39 exact-head source paths. The26 topics and52 source entries are retained; only the contribution topic source content/hash changes to include @shenjackyuanjie. Captured old snapshot fails derivation equality; regenerated snapshot passes. No native source, workflow, registry, test, or comment changes. Fresh hosted web/native qualification remains pending; no local full npm gate or release publication is claimed. Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
added 2 commits
October 15, 2026 12:32
Preserve the contributor's original history and integrate main 248634f. This carries authoritative, isolated Runtime fixtures and settlement of stale approval/input requests, plus the earlier macOS LLVM setup and Windows startup diagnostics. The clean merge retains this PR's measured budgets and gate policies. The Standard Compute descriptor, metadata and contributor credit are unchanged. Main repair validation: 387 existing focused Rust tests passed, 0 failed; npm 1312 passed, 0 failed, 7 skipped; check:web passed. Exact merged-tree review preserved each PR delta and the main repair. This resulting PR head still needs fresh hosted qualification; previous runs remain historical. No provider traffic, deployment or publication. Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
Preserve the contributor's original history and integrate main 248634f. This carries authoritative, isolated Runtime fixtures and settlement of stale approval/input requests, plus the earlier macOS LLVM setup and Windows startup diagnostics. The clean merge retains this PR's measured budgets and gate policies. The OHOS Ninja setup, portable SHA helper and contributor credit are unchanged. Main repair validation: 387 existing focused Rust tests passed, 0 failed; npm 1312 passed, 0 failed, 7 skipped; check:web passed. Exact merged-tree review preserved each PR delta and the main repair. This resulting PR head still needs fresh hosted qualification; previous runs remain historical. No provider traffic, deployment or publication. Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
Hmbown
pushed a commit
that referenced
this pull request
Oct 15, 2026
Retain the original candidate and contributor histories while qualifying the combined source in parallel with original PRs #6985 and #6989. Both contributor PRs must still land as themselves before this candidate's conditional squash. The source-navigation work in draft PR #6393 is excluded pending its author's scope decision and successful qualification. Include current main 248634f: worker ownership and late completion receipts, stale approval/input settlement, shared mock authority, isolated fixture workspaces, macOS LLVM setup and Windows clipboard launch diagnostics. Carry @henrikdukefoss's Standard Compute descriptor with Unknown billing and @shenjackyuanjie's OHOS Ninja selection and ungated CLI hashing unchanged. Resolve CI/credit/generated-document intersections, synchronize approval documentation with Engine execution IDs and captured input, and narrow the Windows 10 1607 statement to verified dynamic lookup behavior. Verification: object-only merge and authored/generated-document review; 72 feature rows and 26 documentation topics preserved; git diff --check passed. No build or native/npm test was run on this combined source. Prior source receipts remain separate; hosted exact-head qualification is required. Canonical main and its index remain unchanged. No publication is authorized. Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
added 3 commits
October 15, 2026 14:15
Carry main 51c00f2 without changing the original PR-specific source. Pin the no-host-tools metric fixture through its existing test-only capability seam and remove echo/grep pipe races from mobile smoke. Main repair verification: 2 focused existing Rust tests passed; full tool catalog JSON unchanged; default CLI build and all 9 mobile HTTP assertions passed; npm 1312 passed, 0 failed, 7 skipped; check:web, scoped rustfmt, ShellCheck, Bash syntax and diff checks passed. Original isolated mobile launch failed socket-path length before assertions; corrected only the launcher and reran the same binary. Fresh resulting-head hosted native qualification remains required; no old-source CI result is relabeled. Only the three inherited probe paths differ from the previous PR head. Both histories are retained. No new test, publication or branch cleanup. Refs CW-6439 Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
Carry main 51c00f2 without changing the original PR-specific source. Pin the no-host-tools metric fixture through its existing test-only capability seam and remove echo/grep pipe races from mobile smoke. Main repair verification: 2 focused existing Rust tests passed; full tool catalog JSON unchanged; default CLI build and all 9 mobile HTTP assertions passed; npm 1312 passed, 0 failed, 7 skipped; check:web, scoped rustfmt, ShellCheck, Bash syntax and diff checks passed. Original isolated mobile launch failed socket-path length before assertions; corrected only the launcher and reran the same binary. Fresh resulting-head hosted native qualification remains required; no old-source CI result is relabeled. Only the three inherited probe paths differ from the previous PR head. Both histories are retained. No new test, publication or branch cleanup. Refs CW-6439 Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
Preserve the original codewhale-hq#6985 and codewhale-hq#6989 histories and qualify their combined source on the existing OHOS PR branch. Land codewhale-hq#6985 as its own PR first; codewhale-hq#6989 remains held until exact-head CI and the actual resulting-main tree are reviewed. Neither contributor PR is merged by this source update. Resolve only five shared changelog, credit and generated-document paths using the previously reviewed contributor-only source. Preserve both contributors on every existing credit surface. No Rust, descriptor or OHOS implementation conflict; the three verified main51 probe-repair blobs are unchanged. No new tests or comments are introduced by this maintainer resolution. Source review: both merge orders produce tree 13d1be6. All non-conflicting source comes directly from the two PR heads. Full native and web CI on this combined tree is pending; earlier passing receipts retain their original source identities. Canonical main stays clean and unchanged. Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
Hmbown
pushed a commit
that referenced
this pull request
Oct 15, 2026
Record the Standard Compute and OHOS contributor heads through #6989 while preserving the complete candidate source tree at 4a27e34. The five shared release documentation and credit conflicts retain the already reviewed candidate blobs, including both original contributor credits. No source content changes. This prevents a final intake merge conflict. The original #6985 and #6989 PRs still merge as themselves before the conditional #6968 squash. Existing test receipts remain attached to their original heads and unchanged source tree; this new commit awaits fresh required CI before merge admission. No tests were repeated locally for the identical source tree. Signed-off-by: Hunter Bown <hunter@shannonlabs.dev>
Hmbown
pushed a commit
that referenced
this pull request
Oct 16, 2026
Brings in #6985 (Standard Compute), #6989 (OHOS), the CW-6880 mobile approval-card fix, the CW-7427 queue notice and logging fix and the G1 stdio MCP handoff, so the candidate's CI qualifies the tree the squash will produce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBKbhx19BRbZtvWK8rVKjz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6988.
Two fixes for the OpenHarmony cross-build.
1.
scripts/ohos-env.ps1exportsCMAKE_GENERATOR=Ninjaaws-lc-sysbuilds through thecmakecrate, which passes no-G. On Windows CMake thendefaults to the Visual Studio generator, which ignores the clang compiler that
ohos.toolchain.cmakesets and feeds its clang-only flags tocl.exe(
D8021: invalid numeric argument '/Wa,--noexecstack'). Whenninjais not onPATHthescript falls back to the SDK-bundled
build-tools/cmake/bin/ninja.exeand fails loudly whenneither exists.
2.
sha256_hex/hex_bytesmove to an ungatedcrate::hashingmodule incodewhale-cliWith the generator fixed, the OHOS build reached
codewhale-cliand failed E0433:mod updateis
#[cfg(not(target_env = "ohos"))], butcloud.rs(two sites) andcloud/work.rs(one site)called
crate::update::sha256_hexwithout the same gate. Those sites verify downloaded-contentintegrity and Work task-context digests, so they stay compiled on OHOS; the helper now lives in
an ungated module, matching the shared
codewhale_runtime::hashingimplementation the TUIalready uses.
Verification (Windows, DevEco OpenHarmony native SDK 26.0.0, current main)
aws-lc-sysv0.45.0 builds in about 43 s, producinglibaws_lc_0_45_0_crypto.a(5.9 MB)cargo build --release --target aarch64-unknown-linux-ohos -p codewhale-cliexits 0 in28 m 32 s; the binary is an ELF64 AArch64 PIE (116,462,208 bytes) needing only
libc.soandlibtime_service_ndk.socargo check -p codewhale-clion the host target exits 0cargo check -p codewhale-cli --testsexits 0cargo fmt --all -- --checkexits 0中文说明
本 PR 修复 Issue #6988,包含两处改动:
scripts/ohos-env.ps1导出CMAKE_GENERATOR=Ninja。aws-lc-sys通过cmakecrate 构建,该 crate 不传-G;Windows 上 CMake 因此默认选中 Visual Studio 生成器,无视ohos.toolchain.cmake指定的 clang,把只属于 clang 的参数喂给cl.exe(D8021)。PATH 中无ninja时回退 SDK 自带版本,两者皆无则明确失败。sha256_hex/hex_bytes移至codewhale-cli未门控的crate::hashing模块。 生成器修好后 OHOS 构建走到codewhale-cli触发 E0433:mod update带有#[cfg(not(target_env = "ohos"))],而cloud.rs(两处)与cloud/work.rs(一处)未加门控地调用了crate::update::sha256_hex。这些调用承担下载内容完整性与任务上下文摘要校验,OHOS 上必须保留,因此把助手函数搬到未门控模块,与 TUI 已共享的codewhale_runtime::hashing实现保持一致。验证(Windows,DevEco OHOS native SDK 26.0.0,当前最新 main):
aws-lc-sys约 43 秒构建成功并产出libaws_lc_0_45_0_crypto.a(5.9 MB);cargo build --release --target aarch64-unknown-linux-ohos -p codewhale-cli退出码 0(28 分 32 秒),产物为 116,462,208 字节的 ELF64 AArch64 PIE,仅依赖libc.so与libtime_service_ndk.so;宿主目标cargo check -p codewhale-cli与--tests退出码 0;cargo fmt --all -- --check通过。Maintainer qualification (2026-10-15)
Current head: deb491c44b, tree
13d1be6be2d58c66a161870a79c30e8d75cb3db7. It preserves @shenjackyuanjie's original commit5c6a61ab7f74c466bb65be71addfc8897783bff9, the six original source files and all maintainer follow-ups. The preceding39ceb861update carried the shared main repair; this merge additionally carries #6985's exact9f5ed8ebsource so CI can qualify the eventual combined tree before the first PR lands. Only five shared changelog/credit/generated-document conflicts required resolution; both implementations and every contributor's history remain intact.Merge #6985 as its own PR first, then this original OHOS PR. This source update merges neither PR. Admission requires #6985's exact reviewed head to be merged into live main, this head's fresh native/web/budget checks to pass, and the actual resulting merge tree to match the qualified tree. The source branch remains retained.
The Windows/SDK26 linked build above remains contributor-reported validation. Maintainer Linux-hosted SDK checking of TUI and CLI passed on prior head
c59004af, along with its Ubuntu native, web and actual Runtime/persistence gates. Linux cross-compile checking does not establish Windows-host SDK or OHOS-device acceptance.That head's Windows native job recorded 18,355 passed (1 leaky), 1 failed, 27 skipped. Its sole failure was the inherited tool-metric fixture: both samples used
bash, but optionalcode_executionappeared only in the second full catalog (51→52 tools). The exact interpreter and reason for the differing probe outcomes were not captured. Windows doctests and containment receipt export were skipped after the failure; the original receipt is retained.The preceding main repair changed only
crates/tui/src/dependencies.rs, the existing tool-metric fixture andscripts/mobile-smoke.sh; every other blob from that preceding PR head was preserved. The metric fixture now uses the existing test-only host-capability pin on all test platforms, and the smoke assertions avoid an upstream broken pipe underpipefail. Production probe behavior, catalog budgets and the complete equality assertion remain unchanged.The three-file repair was validated locally on macOS before committing
51c00f23: 2 existing focused Rust tests passed, the complete extracted tool catalog equals the existing budget with no identity/cap changes, the production CLI binary built, 9 mobile HTTP smoke assertions passed, andnpm test && npm run check:webpassed 1,312 tests with 0 failures and 7 skipped (540 Node + 772 Vitest). The first isolated smoke launch exceeded macOS's socket-path limit before HTTP assertions; correcting only the artifact launcher then passed all 9 assertions with the same compiled binary. Both attempts are retained. These are focused local results on the main repair, not full native qualification of this PR head.Current head remains blocked. Its Windows job timed out waiting for Windows Terminal composer readiness before the native suite began. The retained artifact proves PowerShell entered the script; it contains no later stage, readiness, paste or provider-request evidence. The exact blocking statement and cause are unknown. The same clipboard scripts and CI workflow are byte-identical to successful main51 and #6985 checks; no interactive-startup change was found in this OHOS diff.
One bounded retry of that Windows job at unchanged
deb491c4is planned. GitHub rejected the request while the rest of this workflow is still running, so no retry has started and the other legs are left running. The original failure is retained. A repeated failure requires further diagnostics, not a presumed pass or timeout increase. Fresh Linux-SDK TUI+CLI checking, Web Frontend, Safety and the Linux npm smoke have passed; remaining native and actual budget gates still govern admission. Earlier receipts retain their source identities. The contribution and source branch remain preserved; 0.10.2 has not shipped.— Written by GPT-6 (AI agent) on behalf of the maintainers.