[PR #3627] [CLOSED] fix(harmony): retain JavaScript runtime hints #5856

Closed
opened 2026-10-31 01:09:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3627
Author: @eco-null
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/harmony-javascript-runtime-hints


📝 Commits (2)

  • e92ff9e fix(harmony): retain JavaScript runtime hints
  • 4d2beb8 chore(harmony): sync PR with current main

📊 Changes

3 files changed (+77 additions, -4 deletions)

View changed files

📝 src/domain/harmony/harmonyApplication.ts (+6 -4)
📝 tests/acceptance/harmonyArtifactJourney.test.ts (+29 -0)
📝 tests/boundary/filesystem/harmony/application.test.ts (+42 -0)

📄 Description

Current status: proposal adapted into main

Maintainer commit fc935d0df incorporates this proposal and its regressions into a broader mobile runtime-component correction. Its commit message explicitly credits @eco-null and PR #3627. Issue #3350 is now closed as completed. This PR itself is still open and has not been merged; its production fix is superseded by that upstream commit, so no duplicate implementation or conflict-resolution push is proposed.

Independent local verification of pinned main fc935d0df on Windows, Node 24.18.0/npm 11.16.0: 27/27 tests passed in three files (tests/boundary/filesystem/harmony/application.test.ts, tests/acceptance/harmonyArtifactJourney.test.ts, tests/acceptance/applications/androidRuntimeComponentHints.test.ts). The two Harmony regression files match this PR's files exactly. The CLI/MCP acceptance workflows use generated fixtures; this is not a new real-package/provider proof or upstream CI result. Existing branch validation below is historical and remains tied to its recorded head.

The original proposal and validation record follow; the existing human readiness declarations are preserved.


Summary

Fixes #3350. HarmonyOS projection now retains the javascript runtime-family hint whenever its authenticated component list contains JavaScript, including .jsx, .ts, .tsx, .mts, and .cts sources.

Problem and expected behavior

The inventory already classifies these source extensions as javascript-bundle, and the projection includes them in components.javascript. A second, narrower filename regex in the runtime summary omitted the same components. An inert HAP with only index.tsx therefore returned a JavaScript component and an empty runtime-family list despite complete inventory coverage.

Change and scope

Derive the JavaScript hint from the already classified component collection and remove the duplicated suffix interpretation. Keep existing path-based fallback behavior and all other runtime-family rules. No schema, provider, or execution authority changes.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Harmony application domain projection, runtime-family derivation.
  • Contribution scope fit and linked maintainer decision: ordinary static-projection bug fix; additional scope decision not applicable.
  • CLI and MCP/tool-catalog contract: same schemas and shared workflow; corrected runtime_families values.
  • Provider, bridge, target-format, or platform compatibility: HAP, HSP, and App Pack projections; no provider/bridge changes.
  • Evidence, artifact, provenance, or reconstruction contract: preserve component paths, hashes, source Evidence and limitations; the projection ID reflects the corrected result.
  • Target selection, authority, upstream behavior, and cleanup: existing authenticated inventory only; no target-code execution or new effects.
  • Generated metadata, package, or installation impact: none; build outputs remain uncommitted.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

Validated after merging pinned origin/main 5e30969cc5f1255d44ec7a1f1ca8dbac0af5e7c4 on Windows x64 with Node 24.18.0/npm 11.16.0. This incorporates current main's inventory expectation coverage: { scope: "container-entries", status: "complete" } and preserves the original three-file PR scope.

  • With this PR's tests on that main revision and the original production owner restored temporarily, 6 failed / 20 passed: the five .jsx, .ts, .tsx, .mts, .cts runtime hints and the compiled acceptance journey. Fixed source was restored in finally before rebuilding.
  • With the fix restored, 26/26 passed. Boundary cases cover each source extension, deterministic projection and unrelated-content controls. The compiled CLI/stdio MCP journey covers HAP, HSP and App Pack projection parity, session closure and unchanged source bytes.
  • The SHA-pinned real Harmony pipeline HAP passed CLI inspection/projection, stdio MCP parity, closure and unchanged source bytes on this updated tree. That package is an Ark control without the five regression extensions; those are covered by inert owned ZIP fixtures.
  • This independently repeats the before/after result described in the contributor's review comment. Their Linux results are their report, not an independently executed Linux run here.

Validation performed

Executed on the updated tree:

  • npm ci — locked installation passed; audit reported 0 vulnerabilities.

  • npm run test:focused -- tests/boundary/filesystem/harmony/application.test.ts tests/acceptance/harmonyArtifactJourney.test.ts — 26 passed after the six-failure baseline above.

  • npm run check — passed typecheck, lint, formatting, knip, metadata and architecture guards; lint has 0 errors and repository warnings.

  • npm run verify:test-discovery — 1,352 test files discovered exactly once.

  • npm run fixtures:harmony — existing pinned HAP SHA-256 verified.

  • REA_HARMONY_TEST_HAP=<absolute fixture path> npm run verify:harmony — passed (environment set with PowerShell).

  • git diff --check and pre-commit formatting/lint — passed.

  • npm run check:fast — passed through the pre-push hook.

Update commit: 4d2beb84476923727d5fad446ce3cae843bc1780 merges the pinned main revision without rewriting the original contribution commit. The PR diff remains three files (77 additions / 4 deletions).

The commands above are local results. Upstream CI run 38787800875 subsequently completed successfully for head 4d2beb84476923727d5fad446ce3cae843bc1780, including static checks, source tests, package build, documentation generation, all five test shards, bundled Windows x64 native controls, Linux native package baseline, Portable tests and the CI required aggregate. Conditional provider/platform jobs marked skipped do not establish real-provider coverage. Greptile's 5/5 code review is separate from CI.

Compatibility, safety, and release

No breaking schema or migration changes. Static inventory inference remains an inference, not evidence of target execution. No target scripts were executed; no HarmonyOS SDK, browser or native analysis engine was used. Local macOS/Linux runs, the complete local deterministic gate and controlled performance/token measurements were not run; upstream CI results are recorded above; no performance improvement is claimed.

Author readiness

Human owner: @eco-null

AI-assisted contribution. Human owner @eco-null reports reviewing the final diff and validation evidence and has completed all three initial-readiness declarations.

AI-assisted technical review checked the three-file diff against updated main, including the shared component classification owner, runtime-family derivation, regression proof and validation limits. No unrelated change or remaining duplicate JavaScript suffix interpretation was found in the touched projection. This is an agent technical review; the human owner's previously completed initial-readiness declarations remain below.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed (existing documented behavior is restored; schemas and catalog are unchanged).
  • User-visible CLI/MCP changes include representative output.
  • AI-assisted technical review checked the final diff for secrets, unrelated cleanup, and unsupported claims; the human owner has completed the readiness declarations above.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3627 **Author:** [@eco-null](https://github.com/eco-null) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/harmony-javascript-runtime-hints` --- ### 📝 Commits (2) - [`e92ff9e`](https://github.com/morluto/rea/commit/e92ff9e1c4f89f1011d6f5858e70839f226477ee) fix(harmony): retain JavaScript runtime hints - [`4d2beb8`](https://github.com/morluto/rea/commit/4d2beb84476923727d5fad446ce3cae843bc1780) chore(harmony): sync PR with current main ### 📊 Changes **3 files changed** (+77 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/harmony/harmonyApplication.ts` (+6 -4) 📝 `tests/acceptance/harmonyArtifactJourney.test.ts` (+29 -0) 📝 `tests/boundary/filesystem/harmony/application.test.ts` (+42 -0) </details> ### 📄 Description ## Current status: proposal adapted into main Maintainer commit [fc935d0df](https://github.com/morluto/rea/commit/fc935d0df3d7589363242e9e5718c94a4262f1d4) incorporates this proposal and its regressions into a broader mobile runtime-component correction. Its commit message explicitly credits @eco-null and PR #3627. Issue #3350 is now closed as completed. This PR itself is still open and has not been merged; its production fix is superseded by that upstream commit, so no duplicate implementation or conflict-resolution push is proposed. Independent local verification of pinned main `fc935d0df` on Windows, Node 24.18.0/npm 11.16.0: **27/27 tests passed in three files** (`tests/boundary/filesystem/harmony/application.test.ts`, `tests/acceptance/harmonyArtifactJourney.test.ts`, `tests/acceptance/applications/androidRuntimeComponentHints.test.ts`). The two Harmony regression files match this PR's files exactly. The CLI/MCP acceptance workflows use generated fixtures; this is not a new real-package/provider proof or upstream CI result. Existing branch validation below is historical and remains tied to its recorded head. The original proposal and validation record follow; the existing human readiness declarations are preserved. --- ## Summary Fixes #3350. HarmonyOS projection now retains the `javascript` runtime-family hint whenever its authenticated component list contains JavaScript, including `.jsx`, `.ts`, `.tsx`, `.mts`, and `.cts` sources. ## Problem and expected behavior The inventory already classifies these source extensions as `javascript-bundle`, and the projection includes them in `components.javascript`. A second, narrower filename regex in the runtime summary omitted the same components. An inert HAP with only `index.tsx` therefore returned a JavaScript component and an empty runtime-family list despite complete inventory coverage. ## Change and scope Derive the JavaScript hint from the already classified component collection and remove the duplicated suffix interpretation. Keep existing path-based fallback behavior and all other runtime-family rules. No schema, provider, or execution authority changes. ## Contract and boundary impact - Semantic owner and earliest changed stage: Harmony application domain projection, runtime-family derivation. - Contribution scope fit and linked maintainer decision: ordinary static-projection bug fix; additional scope decision not applicable. - CLI and MCP/tool-catalog contract: same schemas and shared workflow; corrected `runtime_families` values. - Provider, bridge, target-format, or platform compatibility: HAP, HSP, and App Pack projections; no provider/bridge changes. - Evidence, artifact, provenance, or reconstruction contract: preserve component paths, hashes, source Evidence and limitations; the projection ID reflects the corrected result. - Target selection, authority, upstream behavior, and cleanup: existing authenticated inventory only; no target-code execution or new effects. - Generated metadata, package, or installation impact: none; build outputs remain uncommitted. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage Validated after merging pinned `origin/main` `5e30969cc5f1255d44ec7a1f1ca8dbac0af5e7c4` on Windows x64 with Node 24.18.0/npm 11.16.0. This incorporates current main's inventory expectation `coverage: { scope: "container-entries", status: "complete" }` and preserves the original three-file PR scope. - With this PR's tests on that main revision and the original production owner restored temporarily, **6 failed / 20 passed**: the five `.jsx`, `.ts`, `.tsx`, `.mts`, `.cts` runtime hints and the compiled acceptance journey. Fixed source was restored in `finally` before rebuilding. - With the fix restored, **26/26 passed**. Boundary cases cover each source extension, deterministic projection and unrelated-content controls. The compiled CLI/stdio MCP journey covers HAP, HSP and App Pack projection parity, session closure and unchanged source bytes. - The SHA-pinned real Harmony pipeline HAP passed CLI inspection/projection, stdio MCP parity, closure and unchanged source bytes on this updated tree. That package is an Ark control without the five regression extensions; those are covered by inert owned ZIP fixtures. - This independently repeats the before/after result described in the [contributor's review comment](https://github.com/morluto/rea/pull/3627#issuecomment-6199278013). Their Linux results are their report, not an independently executed Linux run here. ## Validation performed Executed on the updated tree: - `npm ci` — locked installation passed; audit reported 0 vulnerabilities. - `npm run test:focused -- tests/boundary/filesystem/harmony/application.test.ts tests/acceptance/harmonyArtifactJourney.test.ts` — **26 passed** after the six-failure baseline above. - `npm run check` — passed typecheck, lint, formatting, knip, metadata and architecture guards; lint has 0 errors and repository warnings. - `npm run verify:test-discovery` — **1,352 test files** discovered exactly once. - `npm run fixtures:harmony` — existing pinned HAP SHA-256 verified. - `REA_HARMONY_TEST_HAP=<absolute fixture path> npm run verify:harmony` — passed (environment set with PowerShell). - `git diff --check` and pre-commit formatting/lint — passed. - `npm run check:fast` — passed through the pre-push hook. Update commit: `4d2beb84476923727d5fad446ce3cae843bc1780` merges the pinned main revision without rewriting the original contribution commit. The PR diff remains three files (77 additions / 4 deletions). The commands above are local results. Upstream [CI run 38787800875](https://github.com/morluto/rea/actions/runs/38787800875) subsequently completed successfully for head `4d2beb84476923727d5fad446ce3cae843bc1780`, including static checks, source tests, package build, documentation generation, all five test shards, bundled Windows x64 native controls, Linux native package baseline, Portable tests and the `CI required` aggregate. Conditional provider/platform jobs marked skipped do not establish real-provider coverage. Greptile's 5/5 code review is separate from CI. ## Compatibility, safety, and release No breaking schema or migration changes. Static inventory inference remains an inference, not evidence of target execution. No target scripts were executed; no HarmonyOS SDK, browser or native analysis engine was used. Local macOS/Linux runs, the complete local deterministic gate and controlled performance/token measurements were not run; upstream CI results are recorded above; no performance improvement is claimed. ## Author readiness Human owner: @eco-null AI-assisted contribution. Human owner @eco-null reports reviewing the final diff and validation evidence and has completed all three initial-readiness declarations. AI-assisted technical review checked the three-file diff against updated main, including the shared component classification owner, runtime-family derivation, regression proof and validation limits. No unrelated change or remaining duplicate JavaScript suffix interpretation was found in the touched projection. This is an agent technical review; the human owner's previously completed initial-readiness declarations remain below. - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed (existing documented behavior is restored; schemas and catalog are unchanged). - [x] User-visible CLI/MCP changes include representative output. - [x] AI-assisted technical review checked the final diff for secrets, unrelated cleanup, and unsupported claims; the human owner has completed the readiness declarations above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5856
No description provided.