Skip to content

feat(remote): add HarmonyOS proxy lease backend - #2266

Merged
thymikee merged 11 commits into
callstack:mainfrom
bytemain:ark/harmonyos-lease-backend
Sep 8, 2026
Merged

feat(remote): add HarmonyOS proxy lease backend#2266
thymikee merged 11 commits into
callstack:mainfrom
bytemain:ark/harmonyos-lease-backend

Conversation

@bytemain

@bytemain bytemain commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

HarmonyOS devices exposed by a proxy can select the additive harmonyos-instance lease backend. Selected serials survive command materialization, and HarmonyOS runtime hints survive Node response normalization and .ad recording/replay. Runtime platform validation is derived from one kernel vocabulary; existing non-leaf apple selection remains compatible, while leaf mismatches remain strict.

Related to #2265. Unsupported providers remain fail-closed; this does not add HarmonyOS capacity to iOS/Android-only cloud providers.

Validation

Published head: fa0b33c679820943bf15e7228cba3d0dedcfa033, tree 6218ca9415334b96080e427d9f81fed6ee880214, base 367e795ee72458ef2a340a627e5e9a1680c03712. 18 touched files in the complete PR.

Local affected gate passed: format, lint, typecheck, layering, dead-code audit, build, 4,834 related tests in 628 files, and released-surface wire compatibility. The first related run exposed a host AWS_REGION=ap-southeast-1 assumption in the unchanged AWS profile test; the isolated test passed with AWS region overrides unset, then the complete affected gate passed under the same clean environment. No test skipped or unrelated AWS code changed.

Freshly rebased onto upstream main; preserved the existing changelog entries and wire ledger. Response normalization and script roundtrip regressions were observed failing before the fix. The proxy route test exposed missing serial propagation before that was corrected. Removing HarmonyOS from the shared runtime vocabulary makes the schema/open normalization regression fail.

Tests cover mocked proxy inventory through backend inference, command materialization, real LeaseRegistry admission and release, plus leaf/non-leaf runtime compatibility. These are not live-device receipts.

Live HarmonyOS proxy inventory → open → snapshot/selector click/logs → close passed on API23 emulator at this exact head on 2026-09-08. Separate client/proxy processes used real loopback HTTP, a scoped harmonyos-instance lease, live Settings navigation, nonempty app logs and screenshot; post-close heartbeat rejected the inactive lease. Detailed receipt is in the PR comments. This does not cover a Linux client, cross-host tunnel, text entry, Metro, or physical devices. License acceptance was authorized and completed. Exact-head upstream CI is still action_required pending maintainer approval; the PR is not yet merge-ready.

CLI lease grammar, runtime guidance, and Unreleased changelog are updated; no skills changed. The scope crosses the runtime-platform contract, its CLI/Node/daemon/script consumers, and focused tests as required by the end-to-end issue.

Copilot AI lite review requested due to automatic review settings September 3, 2026 10:21

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.

🟡 Changes recommended

The new harmonyos-instance backend is added to the contract but still needs follow-up updates to hardcoded CLI/remote-config validation lists and related platform compatibility/test coverage to avoid runtime/UX breakage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR extends the remote connection/lease contract surface to recognize HarmonyOS devices by introducing a new harmonyos-instance lease backend and wiring HarmonyOS proxy devices + CLI lease-backend resolution to use it.

Changes:

  • Extend shared contracts to include SessionRuntimeHints.platform: 'harmonyos' and LeaseBackend: 'harmonyos-instance'.
  • Resolve --platform harmonyos and HarmonyOS proxy devices to the harmonyos-instance lease backend for allocation/heartbeat/close flows.
  • Update the CLI error text for cases where a lease backend must be explicitly determined.
File summaries
File Description
src/cli/commands/connection-runtime.ts Adds HarmonyOS → harmonyos-instance backend resolution for flags and proxy devices; updates related error messaging.
packages/kernel/src/contracts.ts Expands the shared contract unions for session runtime hints and lease backend backends to include HarmonyOS.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

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

Comment on lines 7 to 9
export type SessionRuntimeHints = {
platform?: 'ios' | 'android';
platform?: 'ios' | 'android' | 'harmonyos';
metroHost?: string;
Comment thread packages/kernel/src/contracts.ts Outdated
const DAEMON_LOCK_POLICIES = ['reject', 'strip'] as const;
export type DaemonLockPolicy = (typeof DAEMON_LOCK_POLICIES)[number];
const LEASE_BACKENDS = ['ios-simulator', 'ios-instance', 'android-instance'] as const;
const LEASE_BACKENDS = ['ios-simulator', 'ios-instance', 'android-instance', 'harmonyos-instance'] as const;
if (flags.leaseBackend) return flags.leaseBackend;
if (flags.platform === 'android') return 'android-instance';
if (flags.platform === 'ios') return 'ios-instance';
if (flags.platform === 'harmonyos') return 'harmonyos-instance';
@claude

claude Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks for taking this on — HarmonyOS support is a welcome addition and the overall shape of the change looks right. A few things need to land before it works end to end, mostly allowlists that still need the new backend added.

Blocking

  1. src/daemon/lease-registry-scope.ts:133normalizeLeaseBackend still accepts only ios-simulator | ios-instance | android-instance and throws INVALID_ARGS: Unsupported lease backend: harmonyos-instance. It gates allocate, admission, and the heartbeat/close scope match (and src/daemon/human-control-contract.ts:58), so --platform harmonyos currently resolves a backend the daemon rejects — remote open still fails, just with a different error.
  2. src/commands/cli-grammar/flag-definitions-connection.ts:108 and src/remote/remote-config-schema.ts:64 keep the three-value enum, so --lease-backend harmonyos-instance is rejected by the parser and by the config schema, even though the new message at src/cli/commands/connection-runtime.ts:701 advertises harmonyos.

Worth a look

  1. No provider can currently serve the backend — packages/provider-limrun/src/device.ts:10 returns undefined for it, and src/cli/connection/limrun-profile.ts:55 is typed to the two existing instance backends. It fails closed, so this isn't urgent, but an explicit refusal would be easier to debug than a silent undefined.
  2. src/cli/commands/remote-bridge.ts:3 omits harmonyos-instance, so the Metro bridge silently no-ops for HarmonyOS. Entirely reasonable as a first step — could you confirm that's intentional, so it doesn't read as an oversight later?

Docs and tests

  • CHANGELOG.md needs an entry under ## Unreleased with the (#2266) reference — a new lease backend, a newly accepted --platform value, and a changed error string are all user-visible.
  • The enumValues and usageLabel in flag-definitions-connection.ts:108 are the documented CLI surface that docs/agents/cli-flags.md reflects, so updating them covers the docs side. website/docs/docs/configuration.md doesn't enumerate backends, so it needs no change.
  • Tests are worth adding: src/daemon/__tests__/lease-registry.test.ts for the normalizer, and src/__tests__/remote-connection.test.ts for resolveRequestedLeaseBackend / leaseBackendForDevice. Right now reverting the diff wouldn't break any test.

CI hasn't run on this yet, so it's worth a rerun once the above is pushed. Happy to help with any of it if useful — thanks again for the contribution!


Generated by Claude Code

Copilot AI review requested due to automatic review settings September 3, 2026 12:15

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.

🟡 Changes recommended

The new HarmonyOS backend/runtime literals are added to the shared contract but existing daemon-side validation/allowlists still reject them, which will break real lease admission and runtime-hint usage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment on lines 7 to 9
export type SessionRuntimeHints = {
platform?: 'ios' | 'android';
platform?: 'ios' | 'android' | 'harmonyos';
metroHost?: string;
Comment on lines 688 to 693
export function resolveRequestedLeaseBackend(flags: CliFlags): LeaseBackend | undefined {
if (flags.leaseBackend) return flags.leaseBackend;
if (flags.platform === 'android') return 'android-instance';
if (flags.platform === 'ios') return 'ios-instance';
if (flags.platform === 'harmonyos') return 'harmonyos-instance';
return undefined;
Copilot AI review requested due to automatic review settings September 3, 2026 12:20
@bytemain

bytemain commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the blocking review items in ebe79ebd:

  • normalizeLeaseBackend now accepts harmonyos-instance, so daemon allocation/admission/heartbeat/close scopes no longer reject the backend.
  • CLI flag grammar and remote-config schema now accept/document harmonyos-instance.
  • Runtime compatibility checks no longer treat HarmonyOS as an unknown platform; persisted Harmony runtime hints are matched by platform.
  • Added remote connection coverage for --platform harmonyosharmonyos-instance and daemon normalizer coverage.
  • Added Unreleased changelog entry (feat(remote): add HarmonyOS proxy lease backend #2266).

Validation: corepack pnpm typecheck; unit tests for remote-connection and lease-registry (76 passed); git diff --check.

The provider daemon still needs to expose an actual HarmonyOS lease implementation before this can be considered end-to-end; this PR keeps unsupported providers fail-closed and documents that scope.

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.

🔵 Needs a closer look

The updated runtime/platform compatibility check introduces a behavior regression that can drop runtime hints for non-leaf platform selectors (e.g., apple) and should be corrected before approval.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

src/cli/commands/connection-runtime.ts:740

  • isRuntimeCompatibleWithPlatform now enforces strict equality for any --platform selector. This is a behavior change from the prior logic (which only enforced for ios/android) and can cause runtime hints (e.g., metroHost/metroPort) to be dropped when callers use non-leaf selectors like apple, vega, etc. If the intent is only to extend the strict check to HarmonyOS, keep the previous guard and add harmonyos to it.
    src/tests/remote-connection.test.ts:51
  • This test uses as never to bypass the CliFlags type, which can hide real type errors. Other tests in this file pass a minimal CliFlags object instead; do the same here so the compiler keeps protecting the call site.
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 12:25
@bytemain

bytemain commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in af89c1fcd (fork branch bytemain:ark/harmonyos-lease-backend):

  • daemon normalizeLeaseBackend accepts harmonyos-instance
  • CLI flag grammar and remote-config schema allow it
  • Harmony runtime hints are accepted by daemonRuntimeSchema; compatibility checks now compare any declared platform, including HarmonyOS
  • added resolver/normalizer tests and Unreleased changelog entry

Validation: corepack pnpm typecheck; 76 unit tests passed (remote-connection + lease-registry); git diff --check.

The PR remains intentionally contract-level: actual proxy daemon/provider Harmony lease implementation and end-to-end open/heartbeat/close still require maintainer design and follow-up. Until then, proxy OHOS remains unsupported at runtime.

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.

🔵 Needs a closer look

The contract/schema now accepts HarmonyOS runtime hints, but daemon-side runtime-hint normalization still only supports iOS/Android, so HarmonyOS runtime hints will fail at runtime.

Review details

Suppressed comments (1)

packages/kernel/src/contracts.ts:13

  • SessionRuntimeHints.platform and daemonRuntimeSchema now accept "harmonyos", but the daemon-side runtime hint normalization still only recognizes ios/android (e.g. src/daemon/session-runtime.ts rejects any other value and toRuntimePlatform maps only ios/android). This makes HarmonyOS runtime hints fail at runtime despite the updated contract/schema.
export type SessionRuntimeHints = {
  platform?: 'ios' | 'android' | 'harmonyos';
  metroHost?: string;
  metroPort?: number;
  bundleUrl?: string;
  launchUrl?: string;
};
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@thymikee

thymikee commented Sep 3, 2026

Copy link
Copy Markdown
Member

BLOCKED at af89c1fcdd55206651957b0eda5a7a33edcee005.

  1. Daemon session-runtime normalization and toRuntimePlatform still only accept/map iOS and Android after the wire schema admits harmonyos; add real-route tests.

  2. isRuntimeCompatibleWithPlatform now drops existing non-leaf apple selectors. Restore strict comparison only for leaf ios/android/harmonyos, and add an apple regression.

  3. Linked Add remote proxy lease backend for HarmonyOS (harmonyos-instance) #2265 acceptance is not implemented: provider lifecycle/backend mapping remains iOS/Android-only while the Changelog claims full allocation/heartbeat/close. Either implement and prove the full proxy route, or rescope as a private prerequisite and remove the public claim.

  4. No exact-head checks have run and the PR is currently DIRTY.

@bytemain
bytemain force-pushed the ark/harmonyos-lease-backend branch from af89c1f to 1533c52 Compare September 3, 2026 12:35
Copilot AI review requested due to automatic review settings September 3, 2026 12:35
@bytemain

bytemain commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current upstream main 4e9820e46 after merge conflict; new PR head 1533c527e419d4810f3ddb79e8cb35920505d5ab (tree 21d6f5dba4476ce5062e3a768f72d1208a4a2715). Re-ran typecheck, 76 targeted unit tests, and diff-check successfully. Please re-review this fresh head.

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.

🟡 Changes recommended

The PR introduces a runtime-hints contract mismatch and a likely compatibility regression (plus missing wire-compat ledger updates) that can break expected behavior and/or CI.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (2)

src/cli/commands/connection-runtime.ts:741

  • isRuntimeCompatibleWithPlatform now compares runtime.platform ("ios"|"android"|"harmonyos") directly to CliFlags['platform'] (PlatformSelector, including values like "apple", "macos", "vega", etc). This is a behavior change from the previous guard and will drop stored runtime hints when callers use selectors like --platform apple, even though that alias is commonly accepted elsewhere.
  if (!runtime.platform || !platform) {
    return true;
  }
  return runtime.platform === platform;
}

packages/kernel/src/contracts.ts:275

  • This expands SessionRuntimeHints.platform / daemonRuntimeSchema to accept "harmonyos", but the daemon-side runtime hint normalization still only supports "ios" and "android" (e.g. src/daemon/session-runtime.ts rejects anything else via normalizeRuntimePlatformInput / toRuntimePlatform). As-is, the contract says HarmonyOS is allowed while the daemon will still throw INVALID_ARGS, so HarmonyOS runtime hints are not actually supported yet.
export const daemonRuntimeSchema = schema<SessionRuntimeHints>((input, path) => {
  const record = expectObject(input, path);
  return {
    platform: optionalEnum(record, 'platform', ['ios', 'android', 'harmonyos'] as const, path),
    metroHost: optionalString(record, 'metroHost', path),
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread packages/kernel/src/contracts.ts Outdated
Comment on lines 47 to 48
const LEASE_BACKENDS = ['ios-simulator', 'ios-instance', 'android-instance', 'harmonyos-instance'] as const;
export type LeaseBackend = (typeof LEASE_BACKENDS)[number];
Comment thread CHANGELOG.md Outdated
Comment on lines 5 to 8
- Added the `harmonyos-instance` remote lease backend so HarmonyOS proxy devices can participate in
the same explicit allocation, heartbeat, and close lifecycle as other remote instances (#2266).

- Fixed: `settings airplane on|off` now takes an Android device offline. It is applied through
Copilot AI review requested due to automatic review settings September 3, 2026 13:02
@bytemain

bytemain commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the maintainer review in c496a27c3 (rebased branch head follows):

  • daemon session runtime normalization and toRuntimePlatform now accept/map HarmonyOS.
  • compatibility remains strict only for leaf ios/android/harmonyos; non-leaf selectors such as apple retain prior behavior.
  • changelog wording now scopes this as a prerequisite contract, not full allocation/heartbeat/close support.
  • targeted contract tests remain green.

Validation on the rebased branch: corepack pnpm typecheck; 76 targeted unit tests passed; git diff --check. End-to-end provider lifecycle is intentionally not claimed in this PR.

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.

🟡 Changes recommended

It overwrites an existing Unreleased changelog entry and introduces a test that should be colocated with the existing lease-registry-scope test module for consistency.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

CHANGELOG.md:7

  • This change replaces (removes) the existing Unreleased changelog entry about strict wait absent <selector> polling (#2236). If that feature is still unreleased, it should remain in the Unreleased section and this HarmonyOS entry should be added as an additional bullet rather than overwriting it.
- Added the `harmonyos-instance` lease contract and CLI/runtime plumbing as a prerequisite for
  HarmonyOS proxy support; provider/daemon allocation remains gated until its end-to-end lifecycle
  is implemented and validated (#2266).
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread src/__tests__/remote-connection.test.ts Outdated
Comment on lines +50 to +52
test('HarmonyOS platform resolves to its proxy lease backend', () => {
assert.equal(resolveRequestedLeaseBackend({ platform: 'harmonyos' } as never), 'harmonyos-instance');
});
Comment on lines +13 to +15
test('normalizeLeaseBackend accepts HarmonyOS instance backend', () => {
assert.equal(normalizeLeaseBackend('harmonyos-instance'), 'harmonyos-instance');
});
Copilot AI review requested due to automatic review settings September 3, 2026 13:14
@bytemain

bytemain commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up 1533c527 -> c496a27 -> d1f9e52 adds wire-compat ledger acknowledgements for the additive HarmonyOS backend/runtime declarations. pnpm check:daemon-wire-compat now passes against v0.20.10 (protocol unchanged; additive entries documented).

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.

🔵 Needs a closer look

It currently drops an existing Unreleased changelog entry and introduces test issues (misplaced test and a type-escaping as never) that should be corrected before approval.

Review details

Suppressed comments (3)

CHANGELOG.md:8

  • This edit removes the existing Unreleased changelog entry about strict wait absent polling (#2236). Unless that item was intentionally dropped elsewhere, it should be kept and the HarmonyOS lease note added alongside it to avoid losing release notes.
- Added the `harmonyos-instance` lease contract and CLI/runtime plumbing as a prerequisite for
  HarmonyOS proxy support; provider/daemon allocation remains gated until its end-to-end lifecycle
  is implemented and validated (#2266).

src/daemon/tests/lease-registry.test.ts:15

  • This new test exercises normalizeLeaseBackend from lease-registry-scope.ts, but it’s being added to lease-registry.test.ts. There is already a dedicated lease-registry-scope.test.ts; moving this test there keeps tests aligned with the module under test and avoids mixing scope-validation coverage into the registry suite.
test('normalizeLeaseBackend accepts HarmonyOS instance backend', () => {
  assert.equal(normalizeLeaseBackend('harmonyos-instance'), 'harmonyos-instance');
});

src/tests/remote-connection.test.ts:52

  • Using as never here defeats type-checking and can mask future signature changes to resolveRequestedLeaseBackend. Prefer constructing a real CliFlags value via the existing forceConnectFlags helper (already imported in this file).
test('HarmonyOS platform resolves to its proxy lease backend', () => {
  assert.equal(resolveRequestedLeaseBackend({ platform: 'harmonyos' } as never), 'harmonyos-instance');
});
  • Files reviewed: 10/10 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

bytemain and others added 10 commits September 8, 2026 01:11
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <artin@cat.ms>
Signed-off-by: Ark <raft-mobile-ark@mail.build>
@bytemain
bytemain force-pushed the ark/harmonyos-lease-backend branch from 68c21a0 to fa0b33c Compare September 7, 2026 17:47
Copilot AI review requested due to automatic review settings September 7, 2026 17:47
@bytemain

bytemain commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed at fa0b33c (rebased onto 367e795). Resolved conflicts without dropping upstream changelog/ledger entries; fixed Node runtime normalization and .ad open/runtime-set roundtrips through one kernel runtime-platform vocabulary; corrected runtime-set guidance. A new proxy inventory/materialization test also exposed missing HarmonyOS serial propagation, now fixed. Local affected gates passed, including 4,834 related tests and wire compatibility; the PR body has exact evidence and RED/GREEN details. Live proxy/device evidence is still NOT RUN because local DevEco startup is blocked on license acceptance. I am not requesting ready-for-human or claiming merge readiness. Could a maintainer approve/trigger the upstream exact-head CI if this fork run requires approval? I will continue with the live lifecycle receipt when the emulator is available.

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.

🟡 Changes recommended

A follow-up update is needed so remote-bridge gating recognizes harmonyos-instance; otherwise HarmonyOS proxy leases may silently skip metro/bridge behavior in dependent CLI commands.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 18/18 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +54 to +59
const LEASE_BACKENDS = [
'ios-simulator',
'ios-instance',
'android-instance',
'harmonyos-instance',
] as const;
@thymikee

thymikee commented Sep 7, 2026

Copy link
Copy Markdown
Member

The earlier runtime-hint, script roundtrip, and serial propagation gaps are fixed in fa0b33c. No further code findings from this review. The remaining requirement is a live HarmonyOS proxy run covering inventory → open → snapshot/input/logs → close, with lease and artifact evidence; the reported DevEco license prompt still blocks that validation, so ready-for-human should wait. CI separately needs maintainer approval before it can run; this is not a test failure.

@bytemain

bytemain commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

HarmonyOS live proxy receipt — 2026-09-08

Exact head: fa0b33c679820943bf15e7228cba3d0dedcfa033, clean tree 6218ca9415334b96080e427d9f81fed6ee880214.

PASS for live proxy inventory → lease allocation/materialization → open → snapshot → selector input → logs → close. Client and proxy are separate processes on the same Mac, communicating over loopback HTTP through /agent-device; this is not a Linux-client or tunnel-network test. No mocks or fabricated device inventory were used.

Device: HarmonyOS emulator, serial 127.0.0.1:16001, API 23, software emulator 6.1.0.115(SP11DEVC00E115R4P11). DevEco instance UUID 2b3d0abd-a4b0-489e-91e0-165ef3cf9734; matching slot marker and exclusive slot lock verified. User authorized accepting the emulator license before starting it.

Observations

  1. connect proxy configured the separate client without allocating a lease. Inventory returned exactly the selected booted HarmonyOS emulator.
  2. open com.huawei.hmos.settings --platform harmonyos --serial 127.0.0.1:16001 succeeded. This installed system-app ID was first verified from the device bundle inventory.
  3. Persisted lease: cbfba9f318f38651860a66b19f521070, backend harmonyos-instance, provider proxy, device key harmonyos:mobile:127.0.0.1:16001, client 6881d7106322572c, run proxy-6881d7106322572c, tenant proxy. Materialized command returned the same serial.
  4. Snapshot returned the Settings home tree including about_device. click 'id="about_device"' resolved uniquely through the live runtime and succeeded. The following snapshot contained AboutDevice.version_info_group and HarmonyOS version 6.1.0; this verifies the input changed the actual UI, not just a successful dispatch acknowledgment.
  5. logs start and logs stop succeeded; the actual captured app log was 174,241 bytes. Screenshot was generated (1320×2856 JPEG content despite the requested .png path; retained with .jpg extension in the local evidence bundle).
  6. close succeeded. A subsequent direct SDK heartbeat for the original lease returned UNAUTHORIZED: Lease is not active. disconnect removed connection state; its released:false is after close already invalidated the lease. Its redundant close request appears as UNAUTHORIZED in the request journal; that is not treated as a second successful close.
  7. Scoped daemon shutdown reported stopped:true, cleanupConfidence:known, no orphaned claims and no pending provider releases. Proxy stopped, slot lock released, emulator stopped.

Artifact provenance

  • Built CLI index SHA-256: 78fdb93562bf044b1b49ee24312daa84e22fc50fcc7f372a7aad128bddb0edf7.
  • Built daemon SHA-256: 8f6bf36795fd50ec79ab051b16f71ffd6bc482a80e743cf3bd6d20e62f015fa9.
  • Screenshot SHA-256: f34c53e13f896f70c31c4525ce4cf7b38e15321fc93d050eb34ac7c03520d4af.
  • Captured log SHA-256: 6061a81e11fd355a156ccca4d4997e1f3f02bba76a9c1dbc8f495926f4e93335.
  • Original command outputs preserved locally under artifacts/agent-device-2266-live; unshared raw log/proxy state under /tmp/ark2266-live. Bearer tokens are not included in the public receipt.
  • The generic artifacts command returned an empty inventory; this receipt binds directly observed screenshot/log files, not a claim that they were automatically published by the artifact catalog.

Limits

No physical OHOS, Linux client, cross-host tunnel, text-entry, Metro/React DevTools, or Raft application repair claim. Input coverage is the selector click with observed navigation. Upstream CI still requires maintainer approval; no merge-ready claim based on this receipt alone.

@thymikee

thymikee commented Sep 8, 2026

Copy link
Copy Markdown
Member

The reported live proxy run on fa0b33c resolves the remaining validation gap: it covers lease allocation, Settings navigation through a selector click, logs, screenshot, and lease invalidation after close. No remaining code findings; ready for human review. This is same-host HTTP evidence, not a Linux-client or cross-host test, and CI still needs maintainer approval before merging.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 8, 2026
@thymikee

thymikee commented Sep 8, 2026

Copy link
Copy Markdown
Member

let's rebase this and make sure coverage is good

@thymikee

thymikee commented Sep 8, 2026

Copy link
Copy Markdown
Member

Coverage exposed two changes that need correction at fa0b33c. The new runtime import from script-utils into kernel/contracts expands the eager import graph through the ad-script facade; preserve the shared platform vocabulary without adding that eager edge, and rerun the eager-closure gate. The new backend-resolution test also grows remote-connection.test.ts past its pinned size; move it into the existing HarmonyOS-specific test file. The reported live proxy validation remains useful, but these code-quality findings need resolving before review readiness.

@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 8, 2026
Signed-off-by: Ark <raft-mobile-ark@mail.build>
Copilot AI review requested due to automatic review settings September 8, 2026 10:45
@bytemain

bytemain commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the eager-closure and test-size findings in 0baaaa0. The script codec now imports the shared runtime-hint vocabulary as a type only; its local lookup is checked exhaustively with satisfies Record<NonNullable<SessionRuntimeHints["platform"]>, true>, so missing/new/invalid platform entries fail compilation without evaluating kernel/contracts at startup. Moved the backend regression into the HarmonyOS test file and restored the legacy test file to upstream size. Observed both quality gates RED at fa0b33c; all 495 targeted gate/behavior tests now pass, and the full affected gate passes with AWS region overrides unset. The earlier live proxy receipt remains bound to fa0b33c, not relabeled as a new-head device run. Please rerun/review this current exact; no readiness label applied.

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.

🔵 Needs a closer look

The Unreleased changelog entry describes HarmonyOS proxy support as still gated/incomplete, which conflicts with the functionality and tests added in this PR.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

CHANGELOG.md:49

  • This changelog entry says HarmonyOS proxy support is still gated pending an end-to-end allocation lifecycle, but this PR adds the harmonyos-instance backend with allocation/close wiring and tests. Please update the bullet so it reflects the shipped behavior (and doesn’t imply the feature is incomplete).
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@thymikee

thymikee commented Sep 8, 2026

Copy link
Copy Markdown
Member

The eager-import and test-size findings are fixed at 0baaaa0. No remaining code findings; the earlier live proxy receipt still covers the unchanged device path, while the reported structural gates cover this delta. Ready for human review. Exact-head CI has not run yet.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 8, 2026
@thymikee
thymikee merged commit c61b6ed into callstack:main Sep 8, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants