Skip to content

refactor(desktop): share the dev userData profile across worktrees - #3359

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:refactor/desktop-dev-shared-data
Aug 23, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:refactor/desktop-dev-shared-data

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Use one Maka Dev AppProfile for plain and TCC development across worktrees. Released Maka keeps its separate profile, and the Runtime Host state root remains independent from the AppProfile.

Electron's requestSingleInstanceLock() is the sole authority for which development client may use the shared profile. Plain Electron consumes its child exit code; the LaunchServices-detached TCC launcher consumes a private one-shot winner/loser verdict. No command-line process scan participates in the decision.

The TCC app and its launcher now have deliberately separate lifecycles. The launcher owns only its Vite server, log follower, and per-launch files. Ctrl-C stops those resources but does not quit the TCC Electron app; the user quits that app with Cmd-Q. Accordingly, the verdict carries no PID, and the launcher performs no PID liveness polling or TERM/KILL teardown.

The launch attempt is one cancellable ownership boundary. A tested launch session owns signal registration, aborts the attempt, and joins its eventual result; all asynchronous preparation finishes before launch files or processes are created, so cancellation cannot be followed by a late Electron spawn or leaked launch files.

The TCC bundle identity remains worktree-scoped because macOS permissions are tied to that signed bundle identity. Existing per-worktree profile data is not deleted; the launcher warns when it finds the legacy location.

Refs #3539

Verification

  • npm --workspace @maka/core test — 639/639 passed
  • npm --workspace @maka/desktop test — 1265/1265 passed
  • node --test apps/desktop/scripts/dev-app-runtime.test.mjs — 20/20 passed
  • npm --workspace @maka/desktop run typecheck — passed
  • npm run format:check — passed

Migration

Previous TCC data remains under ~/Library/Application Support/Maka Dev-<WORKTREE_ID>. The app now reads ~/Library/Application Support/Maka Dev unless --user-data-dir is supplied. No data is copied or removed automatically.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex contributed architecture analysis, implementation, tests, documentation, and review remediation. The commit retains a Generated-by: Codex trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@Astro-Han
Astro-Han marked this pull request as ready for review August 20, 2026 19:25
@Astro-Han
Astro-Han requested a review from M4n5ter August 20, 2026 19:28

@hqhq1025 hqhq1025 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.

Reviewed the current revision across the TCC bootstrap, the plain Desktop and repository CLI profile contracts, and runtime cache invalidation. The shared Maka Dev data root now matches the other development entry points while the worktree-scoped bundle identity remains unchanged; the previous marker is invalidated by the new burned-in path. The script syntax and focused marker/bootstrap assertions passed, and the required CI check is green.

Codex-assisted review performed under the maintainer-approved review workflow.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated Codex review — blocking finding on exact head c17e155f47d8ff5cae02cb20a41f5a9f91950b01.

P2: the shared profile invalidates the launcher's worktree-local stale-owner recovery. resolveMacosDevelopmentLaunch() still calls ensureNoRunningDevelopmentApp(), but that function probes and kills only this worktree's DEV_EXECUTABLE. After this PR, a TCC app from worktree A and a launch from worktree B use the same Maka Dev single-instance lock while having different executable paths. If A is still running—or was orphaned after its terminal/Vite process died—B cannot see or stop it. B's Electron instance is absorbed by A's lock and exits, while B's monitor only watches B's path and eventually reports never-started. This is the same stale-window failure the ownership step's comment says it prevents, now moved to the cross-worktree case.

The README partly exposes the mismatch: it says another worktree's app survives and holds the shared lock, then says a launch reclaims an app left by a hard-killed session. The latter is no longer true across worktrees.

Before merge, make launch ownership profile-scoped as well as userData profile-scoped (or fail immediately with an explicit current-owner contract), and add a two-worktree regression that proves a stale owner cannot absorb the new launch. Keep DEV_BUNDLE_ID worktree-scoped for TCC as this PR already does.

Required conclusions:

  1. Optimal for the actual problem: not yet; the data-root correction is sound, but ownership follows the old isolation boundary.
  2. Production code to delete: none identified.
  3. Tests to delete/replace: none; current marker smoke coverage misses the cross-worktree lock behavior.
  4. Deeper refactor: no; align the existing stale-owner recovery with the new shared-profile boundary.
  5. Ready to merge: no, despite green test and a current-head committer approval.
  6. Residual risk/gaps: stale/other-worktree app absorption and 30-second false never-started failure.

This is a developer-workflow behavior change; the existing independent human review remains necessary under CONTRIBUTING.md after the blocker is resolved.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-review of unchanged exact head c17e155f47d8ff5cae02cb20a41f5a9f91950b01 against current main@d62857a8357e9160926726a2a13096bc2dc2b91d. Converting the existing blocking automated comment into an explicit changes-requested gate because the head has not changed.

P2 — shared userData leaves stale-owner recovery worktree-local. resolveMacosDevelopmentLaunch() still asks ensureNoRunningDevelopmentApp() to find/kill only this worktree's DEV_EXECUTABLE. After the PR, worktree A and B use one Maka Dev single-instance lock but retain different executable paths. A running or orphaned app from A is invisible to B's recovery; B is absorbed by A's lock, exits, and its own-path monitor eventually reports never-started. Make launch ownership profile-scoped too, or fail immediately with an explicit current-owner contract, and add a two-worktree regression.

Required conclusions remain:

  1. Optimal: not yet; data ownership and process ownership use different boundaries.
  2. Production code to delete: none identified.
  3. Tests to delete/replace: none; add cross-worktree ownership coverage.
  4. Deeper refactor: no; align the existing recovery seam with the shared profile.
  5. Ready to merge: no, despite green test and the earlier human approval.
  6. Residual risks/gaps: stale-window absorption and a false 30-second never-started failure; developer-workflow behavior needs fresh independent human review after repair.

@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from c17e155 to 21e165b Compare August 22, 2026 15:30
@Astro-Han

Copy link
Copy Markdown
Contributor Author

Pushed a fix for the blocking finding — new head 21e165b87, rebased onto 4acfa2693.

@jackwener your P2 was right: sharing the userData root made Electron's single-instance lock cross-worktree while ensureNoRunningDevelopmentApp() still probed and killed only this worktree's DEV_EXECUTABLE. We verified the absorption path end to end before changing anything.

We took the second of the two options you offered — fail immediately with an explicit current-owner contract — rather than making the kill profile-scoped. The reason: a profile-scoped kill would mean worktree B's launch script terminates a window someone may be actively using in worktree A. Sharing a data root does not confer disposal rights over another worktree's process, so naming the owner and stopping is both smaller and more honest than expanding what we are willing to kill.

What changed:

  • assertNoCrossWorktreeOwner() runs before ensureNoRunningDevelopmentApp() — establish that no foreign owner holds the lock first, then clean up our own leftovers.
  • sharedDevelopmentAppCommandLines() probes via pgrep -af and treats exit codes 0 and 1 as the only valid answers; anything else throws rather than being read as "nothing is running", so a probe failure cannot be mistaken for a clear lock.
  • The error names the owner's full command line and says what to do about it (Quit it (Cmd-Q)), because the failure this replaces was exit-0 plus a never-started report 30 seconds later — indistinguishable from a normal launch.
  • apps/desktop/README.md now says same-worktree reclaim still works while cross-worktree fails fast with the owner named, replacing the claim you flagged as no longer true.

The two-worktree regression you asked for is in apps/desktop/scripts/dev-app-runtime.test.mjs — 7 cases covering: another worktree's command line reported as owner, our own not reported, none running, a foreign owner producing a throw whose message carries both the guidance and the owner path, and a path that merely shares a suffix still classified as foreign. Wired into the desktop test:dist chain so it runs in CI rather than only locally.

DEV_BUNDLE_ID stays worktree-scoped for TCC, as you asked.

One note on the diff you will see: the branch's merge base predated the ASF header sweep, so the rebase onto current main picked up headers that already exist upstream. The only substantive commit is 21e165b87.


This work was AI-assisted. The finding was reproduced and the fix verified against the exact head above; please push back where we got it wrong.

@jackwener
jackwener dismissed their stale review August 22, 2026 18:33

P2 is addressed on 21e165b: assertNoCrossWorktreeOwner fails fast when another worktree holds the shared Maka Dev lock, with tests for foreign vs own paths. Dismissing the stale CHANGES_REQUESTED.

jackwener
jackwener previously approved these changes Aug 22, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Independent review of 21e165b87. Did not treat Astro-Han authorship as evidence.

  1. Problem. TCC dev userData was Maka Dev-<worktreeHash> while CLI and plain npm run dev use Maka Dev. Enabling TCC silently switched the database and broke attaching to the same host.

  2. Solution. Share ~/Library/Application Support/Maka Dev. Keep DEV_BUNDLE_ID worktree-scoped for TCC. Burn userDataDir into the runtime marker so old cached apps rebuild.

  3. The earlier P2 (worktree-local stale-owner recovery vs shared lock) is fixed: assertNoCrossWorktreeOwner pgrep's every Maka Dev.app Electron, treats a non-own path as owner, and fails immediately instead of being absorbed. Own-path prefix is not confused with a sibling suffix. Tests cover that. Own-worktree leftovers still go through ensureNoRunningDevelopmentApp.

Approve. Merge stays with the author.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Follow-up after independently checking Darwin pgrep on macOS 26. My earlier APPROVE was too early.

pgrep -af on Darwin is not Linux procps. Here -a means include ancestors, and without -l stdout is PIDs only. -f -l is what prints PID + full argv. The production probe therefore returns bare PIDs, startsWith(ownExecutable) never matches, and this worktree's leftover TCC app is treated as a foreign owner — fail-fast runs before ensureNoRunningDevelopmentApp(). That is a real P1 on this head.

Second P1: the probe only matches Maka Dev.app/.../Electron. Plain npm run dev is Electron.app/.../Electron with app.setName('Maka Dev'), which still holds the shared profile lock. That process is invisible to the new owner check, so the original absorption/never-started hole is not actually closed.

P2: --user-data-dir is applied after the owner probe, so an isolated launch can be blocked by an unrelated default-profile owner.

The shared Maka Dev root and worktree-scoped DEV_BUNDLE_ID are still the right data-plane cut. The process-owner probe has to key on the profile, with Darwin pgrep -fl, not on one bundle suffix.

Not converting this to REQUEST_CHANGES (comment-only). I no longer consider this head merge-ready.

@jackwener
jackwener dismissed their stale review August 22, 2026 18:39

Darwin pgrep -af does not print argv; own leftover TCC app is misclassified as foreign owner, and plain Electron.app npm-run-dev is invisible to the probe. Independent re-check with kabi-sol. Dismissing this APPROVE; head 21e165b is not merge-ready.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Independent re-review of 459995ac. The pgrep-then-ps split is the right Darwin fix (I reproduced pgrep -f PIDs + ps -p pid -o command= on this Mac; BSD -a is not involved). The owner judgment still has two P1s. Do not merge this head. GitHub APPROVED is a leftover hqhq1025 review on c17e155f, not a current GO.

P1: worktreeFromCommandLine splits on whitespace. Paths contain spaces. This file already documents ~/Dropbox (Personal) as a pgrep-regex case. On that command line the /apps/desktop and /node_modules/ markers no longer start with /, so the function returns undefined. The owner then does not recognise self and ?? DEV_USER_DATA_DIR treats the process as a foreign holder of the shared lock — self-blocking, same shape as pgrep -af. Maka Dev.app still parses only because /apps/desktop appears before that space; that is luck. Scan the raw string for the marker, then walk left to a / (space+slash) argv boundary; do not tokenise.

P1: the scan is any npm Electron, not Maka Dev. The rough filter matches node_modules/.bin/electron and Electron.app/Contents/MacOS/Electron. Another repo's Electron recovers a worktree, has no maka dev-env.json, and is attributed to the shared Maka Dev profile. Launching then fail-fasts as a cross-worktree owner. Missing env file ≠ "uses the Maka default profile". Only Maka Dev.app, or a worktree that actually published a maka env file, should participate in the lock judgment.

Tests still use synthetic argv and say real Darwin pgrep/ps samples are "still being collected". That is the same self-proving fixture failure as the previous startsWith(node_modules/.bin/electron) head. Cover a space-containing root and an unrelated node_modules/electron process.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Integration pass on cbdd2cc2 (not an approve).

TCC and plain both hit assertNoCrossWorktreeOwner then ensureNoRunningDevelopmentApp. Data-root drop of WORKTREE_ID plus the legacy-dir warn matches the README shutdown/owner text. CI runs test:dist, which includes the new script tests.

P1: Linux startDevelopmentApp now probes this worktree's node_modules/.bin/electron shim, but quitMacosDevelopmentApp still no-ops off darwin. A leftover same-worktree npm run dev therefore throws could not be stopped. On main, liveness only looked at the Darwin bundle path, so this path did not fail-closed. Either teach quit to signal the Linux shim, or keep shim/real reclaim Darwin-only.

GitHub APPROVED is still the stale hqhq1025 review on an older head.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Integration re-review of 4f6e838d (not an approve).

P1: post-spawn recheck on appeared → exited and plain child exit 0 conflates absorption with a normal session end. Cmd-Q of a TCC app takes the appeared-then-exited path; a finished npm run dev takes exit-0. recheckAfterAbsence then reports any remaining foreign/false-positive holder as "absorbed this launch". That is only valid when this launch never became the lock owner (never-started, or an immediate second-instance exit). After the app has appeared, the lock was ours; a later process is not this launch being absorbed.

Tests currently require the appeared→exited path to print the conflict. That encodes the false positive.

Fix: recheck only on never-started (TCC) and on a short-lived exit-0 (plain). Do not recheck after a session that actually ran.

@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from 9e8646f to 8d3e52f Compare August 23, 2026 02:08
@Astro-Han

Copy link
Copy Markdown
Contributor Author

Heads-up: this branch was force-pushed twice just now, so anyone with a local copy will need to re-fetch. Current head is 8d3e52f70bfb4e3dd74ad77d5dff078a987e066c.

What changed in the code. The launcher's pre-flight owner probe is gone. It tried to answer "which worktree currently owns this dev data directory?" by matching pgrep -f output against an expected bundle path and argv shape. That premise does not hold: the TCC profile is not on the command line (it lives in a mutable dev-env.json), plain values contain spaces, the npm shim reports argv[0] as node, and helper, GPU, and about-to-exit processes all match the same pattern. A LaunchServices-started app never presents the argv shape the probe expected at all. Rather than keep patching the heuristic, we removed it and rely on the single-instance lock, which is the actual authority for that question. dev-app-profile.mjs and its test are deleted; net effect on the branch is roughly −480 lines.

Two smaller fixes went in with it: the monitor's default branch is now fail-closed instead of exiting 0 on an unrecognized outcome, and splitDevelopmentCliArgs now strips the launcher flag unconditionally. The latter was conditional before, which meant a user passing the flag by hand could persist it into dev-env.json and permanently silence the conflict dialog for Dock launches.

Some context on the rejected approach is in #3539, including what we verified about Chromium's NotifyOtherProcessOrCreate behaviour and where our conclusions are inferences rather than direct observations.

Why the second force-push. Twenty-eight of the thirty commits were authored as Ubuntu <[email protected]> — the default git identity on the machine the work ran on, not the actual author. They are now correctly attributed. The tree is byte-identical across the rewrite (git diff between the pre- and post-rewrite heads is empty) and the commit count is unchanged; only author and committer metadata differ.

@hqhq1025 — sorry for the churn. Your approval is on c17e155f from Aug 20, which predates all of this, so it no longer reflects what is here. Whenever you have time, a fresh look at 8d3e52f7 would be appreciated. No rush from our side.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Independent re-review at exact head 8d3e52f70bfb4e3dd74ad77d5dff078a987e066c. All three check-runs (audit, test, package) are completed / success on that SHA.

Disclosure first, because it changes how you should read this. This PR is authored under the Astro-Han account, which is the same shared account our review line publishes from — so we are the responsible party here and cannot approve our own work. This review was therefore run as a separate, blind line: the reviewer reached a provisional judgment on the head before reading any of the existing GitHub review threads, and only then reconciled against them. It is posted as a comment, not an approval, by design.

Every earlier finding is closed, and closed properly. The last outstanding [P1] — the post-spawn owner recheck reporting false absorption on appeared→exited and on any exit-0 — is gone because the heuristic itself was removed. The launch now consumes a real loser marker / exit 42 from the main process, so the finding's precondition no longer exists rather than being papered over. The same is true for the Darwin pgrep -af tokenization, the space-in-path problem, foreign-Electron misidentification, and the Linux plain-reclaim conflict: the roughly 480 lines of heuristic ownership probing that carried them are deleted. Removing a second source of truth rather than patching it is the right shape, and it is worth saying so plainly.

The audit was run across the whole range from the previously reviewed tree 4f6e838d, not just the last commit — which is what surfaced the split below.

Three [P2]s and one [P3]. Of these, only Finding 1 arrived with the replacement loser-contract; Findings 2 and 3 predate the earlier review and were missed by it. They are marked as such rather than presented as regressions, because the distinction matters when you decide what to fix and where.

Two candidates were deliberately withdrawn rather than left in: splitDevelopmentCliArgs preserving a canonical flag (only reachable if an unsupported caller deliberately substitutes the contract value; every production caller omits the override), and the core-constants import failure (it fails toward the native dialog, and plain's original non-zero exit code survives — not a silent success).

This review is AI-assisted. Under CONTRIBUTING.md §Review it does not count as the required independent human review; and since the PR is authored from the same shared account, an approval from this line would not be meaningful here regardless.

@M4n5ter M4n5ter left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technical review of exact head e9f1232170d594355ae646c5fa8f0ede17017b61. I found one development-only P2 below, so the implementation is not yet GO: an unclassified TCC invocation can still terminate the existing same-worktree lock owner before proving ownership. Exact-head hosted audit, test, and package checks are terminal green; the focused launcher suite passes 19/19, core passes 606/606, and the current-main merge-tree is clean.

中文

本次技术审查绑定精确 head e9f1232170d594355ae646c5fa8f0ede17017b61。当前实现仍有下方 1 个仅开发态的 P2,因此暂未达到 GO:尚未完成归类的 TCC invocation 在证明所有权前,仍可能终止同一 worktree 中已经持有锁的实例。精确 head 的 audit、test、package 均终态绿;launcher 聚焦测试 19/19、core 606/606 通过,且与当前 main 的 merge-tree 干净。

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Independent incremental review of exact head e9f1232170d594355ae646c5fa8f0ede17017b61, performed by the prior Kabi reviewer with the new-commit judgment sealed before reading current review conclusions. Acting on behalf of @WAWQAQ under the standing Kabi review/action authorization; Kabi holds the publisher seat for this head.

Conclusion: COMMENT — one P2 remains, plus one P3. No APPROVE.

The previous findings are properly closed or moot on this head: executable-path ownership probing, the shared launch log, the plain-start legacy warning gap, and the Linux preflight reclaim path were removed or moved to the correct authority boundary. The selected product contract is also implemented consistently: both development entry points use the shared Maka Dev profile.

[P2] An unclassified TCC launcher can still terminate the existing lock owner before proving that this invocation owns the bundle.

apps/desktop/scripts/start-dev-app.mjs:25-52 and apps/desktop/scripts/dev.mjs:156-185 send signals and non-zero open exits through the default stop path. That calls app.stop() with terminateApp unset; apps/desktop/scripts/dev-app-runtime.mjs:445-448 therefore calls quitMacosDevelopmentApp(), whose pkill -f match is the worktree bundle executable path, not this launch identity. Only the already-classified absorbed path passes terminateApp: false.

Reachable reproduction: keep the same-worktree TCC bundle running on the shared profile, start another TCC launcher, then interrupt that launcher before its private log reports the loser marker (or make the LaunchServices handoff fail). The second invocation has no positive ownership evidence, yet its teardown kills the existing owner. This corroborates the exact-head inline finding already posted by M4n5ter; it was independently traced after provisional sealing rather than independently discovered.

The clean fix is to make termination depend on positive ownership tied to this invocation (winner marker/PID/nonce) and fail closed while ownership is unknown. Add signal and non-zero-handoff production-seam tests with a pre-existing owner.

[P3] Per-launch logs can accumulate after abnormal launcher death.

apps/desktop/scripts/dev-app-runtime.mjs:162-169 creates a UUID log under tmpdir()/maka-dev-launches; cleanup exists only in stop() at :448. SIGKILL, a crash, or power loss bypasses cleanup and leaves the full session output indefinitely until OS temp cleanup. Add bounded startup cleanup (age-based at minimum; launcher-PID ownership is cleaner). This remains non-blocking because it is Darwin-only, explicitly opt-in, and has OS temp cleanup as a fallback.

Fresh gate immediately before publication: OPEN, non-draft, MERGEABLE/CLEAN; exact-head hosted audit, test, and package are all completed/success. GitHub's aggregate APPROVED includes stale/other-account history and does not override this live P2. No merge action was taken. This Agent-executed review does not claim to satisfy the unresolved ASF required-human-review wording.

@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from 9032549 to 18539a8 Compare August 23, 2026 10:18

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

English

Independent re-review of exact head 18539a8cf13b3c66b5dd82883c81f423edfe9b1e: COMMENT — one P2 remains.

[P2] apps/desktop/scripts/dev-app-runtime.mjs:207-216 trusts the last winner-marker-shaped substring in the app's mixed stdout log as the PID to terminate.

The new per-launch log separates launches, but it is still the complete stdout/stderr stream of the winning Electron app. devLogWinnerPid() uses lastIndexOf(DEV_WINNER_LOG_MARKER) and accepts the following positive integer from anywhere in that stream. Supported application data can contain the same bytes later: for example, Runtime Host profile names reject control characters but allow a name such as [dev] single-instance winner: 222; an unavailable profile is logged verbatim by runtime-host-profile-service.ts:826.

Reproduction: a private launch log containing the legitimate first line ... winner: 111, followed by [runtime-host] ... winner: 222 is unavailable, makes stopDevelopmentLaunch() send both TERM and KILL to PID 222. PID 111 — the app this launcher actually won — remains running. The current test covers only one uncontested marker, so file permissions and per-launch uniqueness do not block this path.

Please keep the ownership result outside the mixed application log (for example, a dedicated one-shot result file/pipe), or at minimum accept only the first exact, line-anchored winner record emitted before full boot and ignore/reject later marker-shaped output.

The earlier bundle-wide pkill -f finding is otherwise genuinely fixed: an unclassified launch no longer terminates another worktree, and the normal classified path targets a PID rather than a bundle pattern. Exact-head audit, test, and package are all completed/success; the focused launcher suite passed 18/18 after rebuilding Core. No other new P0–P3 was found in the incremental surface.

中文

对 exact head 18539a8cf13b3c66b5dd82883c81f423edfe9b1e 的独立增量复核结论:COMMENT——仍有一条 P2。

[P2] apps/desktop/scripts/dev-app-runtime.mjs:207-216 把应用混合 stdout 日志中最后一个形似 winner marker 的子串当成要终止的 PID。

新的每次启动独立日志隔离了不同 launcher,但它仍承载获胜 Electron 应用的全部 stdout/stderr。devLogWinnerPid() 使用 lastIndexOf(DEV_WINNER_LOG_MARKER),并接受该子串后任意位置的正整数。受支持的应用数据可以在启动后再次产生同样字节:例如 Runtime Host profile 名只禁止控制字符,允许命名为 [dev] single-instance winner: 222;profile 不可用时,runtime-host-profile-service.ts:826 会把名称原样写入日志。

复现:私有 launch log 第一行是真实的 ... winner: 111,之后出现 [runtime-host] ... winner: 222 is unavailable,stopDevelopmentLaunch() 会向 PID 222 同时发送 TERM 与 KILL;launcher 实际拥有的 PID 111 继续运行。现有测试只覆盖单个无争议 marker,因此文件权限与每次启动唯一日志都拦不住该路径。

请把 ownership 结果移出混合应用日志(例如使用专用的一次性结果文件/pipe);最低限度也应只接受 full boot 前写入的第一条、整行锚定的 winner 记录,并忽略或拒绝之后形似 marker 的输出。

除此之外,上一轮 bundle-wide pkill -f finding 已真正关闭:未分类 launch 不再终止其他 worktree,正常已分类路径也改为按 PID 而非 bundle pattern 终止。exact-head audit、test、package 均 completed/success;重建 Core 后定向 launcher 测试 18/18。增量范围内未发现其他新 P0–P3。

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Independent incremental review of exact head 18539a8cf13b3c66b5dd82883c81f423edfe9b1e, performed by the prior Kabi reviewer with the new-commit judgment sealed before reading current reviewer conclusions. Acting on behalf of @WAWQAQ under the standing Kabi review/action authorization; Kabi holds the publisher seat for this head.

Conclusion: COMMENT — one P2 remains, plus one P3. No APPROVE.

The prior P2 is genuinely closed at the mechanism level: bundle-wide pkill -f termination is deleted; an unclassified launch sends no signal; a classified winner targets only the PID recorded in its private launch result. Old executable-path ownership heuristics remain deleted, and the selected shared Maka Dev AppProfile contract is implemented consistently.

[P2] Mixed application logs can override the winner PID used for termination.

apps/desktop/scripts/dev-app-runtime.mjs:207-218 uses lastIndexOf(DEV_WINNER_LOG_MARKER) over the entire per-launch stdout/stderr log. A supported Runtime Host profile name may contain printable text such as [dev] single-instance winner: 222 (packages/runtime-host/src/client/host-profile.ts:697-705), and an unavailable startup profile is logged verbatim to stderr after the real winner marker (apps/desktop/src/main/runtime-host-profile-service.ts:819-827). Because open redirects both stdout and stderr into the same file, stopDevelopmentLaunch() then reads PID 222, sends TERM and later KILL to it, and leaves the actual owner PID 111 running. If PID 222 is not signalable, the teardown can instead throw EPERM.

This reachability candidate first appeared in the same-head review already published by M4n5ter after the Kabi provisional was sealed; Kabi independently traced and confirmed it. It is corroborated evidence, not an independent discovery.

Minimum lift: accept only the first exact, line-anchored winner record emitted before boot; add a production-seam log containing a legitimate winner line followed by the marker bytes inside an unavailable profile name, and assert only the real PID receives signals. Clean lift: move ownership data out of mixed stdout/stderr into a dedicated one-shot PID/result file or pipe. Treat EPERM as “not owned / do not signal,” not an unhandled teardown error.

[P3] Per-launch logs still accumulate after abnormal launcher death.

apps/desktop/scripts/dev-app-runtime.mjs:464 removes the UUID log only from normal stop(). SIGKILL, crash, or power loss leaves full-session output under tmpdir()/maka-dev-launches until OS cleanup. Add bounded startup scavenging; a launcher-PID-owned cleanup record is cleaner than age alone.

Fresh gate before publication: head unchanged, OPEN/non-draft/MERGEABLE/CLEAN; exact-head audit, test, and package are all completed/success. GitHub's aggregate APPROVED comes from hqhq1025@c17e155f, not this head, and does not override the live P2 hold. No merge action was taken. This Agent review does not claim to satisfy the unresolved ASF required-human-review wording.

@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from 18539a8 to 221985a Compare August 23, 2026 11:34
@Astro-Han

Copy link
Copy Markdown
Contributor Author

@M4n5ter @jackwener

Addressed at exact head 221985ae068720c7b1235687bc0f93b019edeae0.

We did not tighten the mixed-log marker parser. The marker protocol has been removed entirely.

Electron remains the sole single-instance authority and now publishes exactly one structured winner + PID or loser verdict to this invocation’s private result file. The file is created with exclusive-write semantics; stdout/stderr remains a separate observation-only log. The detached TCC launcher waits for that result, monitors only the reported winner PID, and sends no signal while ownership is unknown.

The previous DEV_WINNER_LOG_MARKER, DEV_LOSER_LOG_MARKER, whole-log scanning, and log-driven monitor branches are deleted. The regression reproduces ordinary application output containing a later marker-shaped PID and proves that only the PID from the dedicated result is signalled.

Verification on this exact head: local Desktop test:dist 1284/1284, Desktop typecheck and Biome passed; hosted audit, test, and package are all completed/success. AI-assisted implementation; please re-review the exact head.

@Astro-Han

Copy link
Copy Markdown
Contributor Author

Re-reviewed at exact head 221985ae068720c7b1235687bc0f93b019edeae0. Exact-head audit, test, and package are all completed/success.

The previously-raised P2 is genuinely closed, and closed well. DEV_WINNER_LOG_MARKER / DEV_LOSER_LOG_MARKER, the whole-log scan, and the log-driven lifecycle branches are all gone. The Electron lock now writes winner+pid or loser exactly once to a result file private to that invocation, with wx making the first writer unique; stdout and stderr are observed but no longer carry authority. Removing the mixed log as a second authority is a real simplification, and the regression that plants a fake 222 marker in ordinary log text while the legitimate winner is 111 pins it properly.

One new finding on the cancellation path.

[P2] Cancelling before the verdict exists can orphan an app that later wins the lock — apps/desktop/scripts/start-dev-app.mjs:23-40, apps/desktop/scripts/dev-app-runtime.mjs:465-473

The signal handlers are deliberately registered before await startDevelopmentApp(), and the comment explains exactly why — that part is right. The gap is that stop() is one-shot:

async function stop(code = 0, options = {}) {
  if (stopping) return;
  stopping = true;
  await app?.stop({ terminateApp: options.terminateApp });

Path A — signal arrives before the handle exists. If prepare/codesign/handoff hasn't returned, app is still null. stop() sets stopping = true and awaits nothing, because there is no handle to stop. The pending startDevelopmentApp() then completes normally, spawns tail and open, and returns a live app. Any later stop returns immediately at the stopping guard, so that launch is never adopted or terminated. In the dev.mjs path the Vite server has already been closed by then, so what survives is a blank-window app holding the shared Maka Dev profile lock — and the lingering tail can keep the launcher itself from exiting.

Path B — signal arrives after spawn but before the result is written. app.stop() calls stopDevelopmentLaunch(), which reads the winner pid, finds nothing, and returns false without signalling. Control then reaches rmSync(launch.resultFile, { force: true }). If Electron wins the lock immediately afterwards it recreates its own result file and keeps running, and no second stop is ever attempted.

Why the existing guard doesn't cover this. The test an unclassified TCC invocation cannot terminate another lock owner proves the right thing — an unknown invocation must not signal anyone. It does not establish that the same unknown invocation won't become the winner a moment later, which is the case here. The stopping boolean is what prevents the compensating cleanup once the verdict finally arrives.

Suggested shape: make cancellation a durable request on the launch handle rather than a single attempt. If the signal precedes the handle, the handle must execute the cancellation as soon as it returns; if the signal lands after spawn but before the verdict, don't delete the result file first — wait for this invocation's one-shot verdict, then terminate only that PID when it's the winner and signal nobody when it's a loser. That reuses the result authority this PR just established, and it does not mean going back to a bundle-wide pkill or to log parsing. A production-seam regression for "stop with no result, delayed winner afterwards" would pin it.

If there is a structural convergence worth doing now, it's letting start/stop/cancel share one launch-handle lifecycle — that's the same change, and I found no second independent simplification worth raising.

Validation

Ran: workspace dependency build; Desktop build:main, four typecheck passes, Biome over 9 files; the dedicated result/launcher/core tests 22/22; Desktop test:dist 1284/1284; git diff --check and a clean merge-tree against current main.

Not run: this was a Linux host, so there was no real macOS LaunchServices/TCC hand-launch. The finding above comes from running the production functions directly plus static control flow across both entry points — it is not claimed as a reproduction on a real machine.

@Astro-Han

Copy link
Copy Markdown
Contributor Author

Two [P3] addenda at the same head 221985ae068720c7b1235687bc0f93b019edeae0, from a second reviewer working independently of the earlier comment. Neither blocks.

[P3] Winner identity is a bare PID, so a reused PID can be followed or killed — apps/desktop/scripts/dev-app-runtime.mjs:240-252, 497-531

The result file records {winner, pid}, and everything downstream trusts the number alone. monitorDevelopmentApp polls liveness with kill(pid, 0), and quitMacosDevelopmentApp sends TERM, waits a fixed 3 s, then sends KILL:

if (!signal('TERM', pid)) return false;
await delay(graceMs);
signal('KILL', pid);

There is no identity re-check between those two signals. If Electron exits inside the polling interval or the grace window and the OS reuses that PID, the launcher will either follow an unrelated process as if it were the app, or KILL it.

This needs dev-only conditions plus fast PID reuse, hence P3. The clean minimal fix is to make liveness and signalling verify identity rather than existence: before each call, confirm the process's argv still contains this invocation's unique --maka-dev-launch-result-file=<path>, or record an equivalent OS process-birth identity. A regression covering "PID reused after TERM" would pin it.

[P3] No scavenger for the per-invocation log and result files

The UUID log/result pair is removed only in startDevelopmentApp().stop() (:466-472). A launcher that dies to SIGKILL, a crash, or power loss leaves both files behind, with OS temp cleanup as the only fallback. Same finding as before, still P3.

Note on the earlier [P2]

This reviewer's pass concluded GO with no P0–P2, but it examined the marker/result authority rather than the cancellation path, so it does not bear on the [P2] raised in the preceding comment about cancelling before the verdict exists. That finding was verified independently against the source and still stands — treat the GO as scoped to the authority question.

Independent validation at this head: @maka/core 638/638, Desktop main 1265/1265, main-result plus launcher focused 20/20. One note for anyone reproducing: an initial npm ci --ignore-scripts skips the three dependency patches and fails the UI prebuild; a normal npm ci applies them and everything passes. That first failure was environmental, not a code regression.

@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from 221985a to 9369509 Compare August 23, 2026 13:49
@Astro-Han

Copy link
Copy Markdown
Contributor Author

Automated follow-up from Codex on behalf of AstroHan, at exact head 93695090fef9f6f6d50b049788199b4306636442.

The cancellation P2 and bare-PID P3 shared one architectural cause: the detached TCC launcher was still treated as an owner of the Electron process. This head removes that ownership instead of adding another cancellation state machine.

  • A TCC winner verdict is now only { "status": "winner" }; it carries no PID.
  • developmentLaunchWinnerPid, stopDevelopmentLaunch, quitMacosDevelopmentApp, PID liveness polling, and TERM/KILL teardown are deleted.
  • After the one-shot lock verdict, the launcher stops observing Electron. Ctrl-C cleans up only launcher-owned resources (the log follower, result/log files, and Vite server); the TCC app remains open until the user quits it with Cmd-Q.
  • The pre-handle signal guard in start-dev-app.mjs is no longer needed and is deleted, so the reported Path A one-shot cancellation state also disappears.

This closes the failure paths in the cancellation P2 and the PID-reuse P3 by removing their preconditions. The temp-file scavenging P3 remains a nonblocking, separate observation; this change does not add a scavenger state machine for it.

Local verification on this head: Core 639/639, Desktop 1265/1265, launcher 16/16, Desktop typecheck, and repository format check. Hosted CI is still running; this note does not claim it is green.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technical review of exact head 93695090fef9f6f6d50b049788199b4306636442, acting on behalf of @WAWQAQ under the standing Kabi review/publisher authorization.

Conclusion: COMMENT — one P2 remains, plus the acknowledged nonblocking P3. No APPROVE and no merge.

The two requested historical candidates are mostly closed. start-dev-app.mjs now installs signal handlers only after its launch handle exists, and the detached TCC path has deleted winner PID reporting, PID liveness polling, and the fixed TERM→KILL sequence entirely. The private one-shot result file is the sole lock-verdict channel; ordinary logs carry no authority.

[P2] npm run dev can still create launcher resources and Electron after cancellation

apps/desktop/scripts/dev.mjs:158-177 retains the old one-shot shape: shutdown() sets shuttingDown = true, calls app?.stop() while app may still be null, then closes Vite; the concurrent app = await startDevelopmentApp(...) is not cancelled or joined. startDevelopmentApp() has real asynchronous boundaries before it returns the handle (apps/desktop/scripts/dev-app-runtime.mjs:100-108,376-416): both launch modes lazily import the Core contract, and the TCC mode prepares the bundle first. After those awaits it can still spawn plain Electron, or tail plus open, and only then return the cleanup handle.

Reachable path: run npm run dev, deliver SIGINT while the lazy contract import/start preparation is pending, and let that start finish before Vite's asynchronous close finishes. The first shutdown() skips app.stop() because app === null; the launch then creates its child/resources and assigns app, but every later cleanup request returns at if (shuttingDown) return. The process can therefore start Electron after the user cancelled, and the TCC path can leave the log follower plus launch files uncleaned; its app is pointed at the Vite server that cancellation just closed. The plain child is likewise never terminated by the launcher.

The current guard does not cover this: moving handlers below the await fixed npm start, not npm run dev, and the 16 launcher tests exercise exported helpers but not either top-level signal coupler. Join cancellation to the in-flight launch (or pass an AbortSignal) so shutdown awaits/adopts the eventual handle and runs stop() exactly once before closing/exiting. Add a seam test with a deferred startDevelopmentApp() that resolves after the signal and assert its returned handle is stopped.

[P3] Abnormal launcher death still leaves per-launch output

apps/desktop/scripts/dev-app-runtime.mjs:176-185,430-433 creates UUID log/result paths and removes them only through normal handle cleanup. SIGKILL, crash, or power loss still leaves full-session logs under the temp directory until OS cleanup. This remains nonblocking; bounded startup scavenging would close it.

Validation: Core 639/639, Desktop main 1265/1265, launcher 16/16; worktree clean. Fresh machine state before publication: OPEN, non-draft, MERGEABLE/CLEAN; exact-head audit, test, and package are all completed/success. GitHub's aggregate APPROVED is only stale old-head history, not a current-head GO.

@Astro-Han

Copy link
Copy Markdown
Contributor Author

Automated architecture decision note from Codex on behalf of AstroHan, at exact head 93695090fef9f6f6d50b049788199b4306636442.

The repeated P3 about abnormal-death leftovers is accepted and deliberately deferred for this PR.

Current scope and impact:

  • It is reachable only in the opt-in macOS TCC development path after SIGKILL, process crash, or power loss bypasses normal cleanup.
  • The launch directory is created with mode 0700, and launch files use 0600; they are local developer artifacts under the OS temporary directory.
  • Normal launcher shutdown removes the files. Abnormal shutdown relies on the OS temporary-file lifecycle and may retain full-session output longer than desired.

Why this PR does not add a scavenger:

  • A safe scavenger must distinguish an active launch from an abandoned one before deleting its live log or one-shot verdict.
  • Age alone can delete a valid long-running session. Launcher-PID ownership or a lease recreates the process-identity and lifecycle state that this head deliberately removed. A more elaborate lease/registry would cost more authority and failure modes than this dev-only residual currently justifies.
  • This PR's architectural goal is to leave Electron as the sole app-lifecycle owner and keep the launcher contract one-shot. Adding another persistent cleanup authority would work against that goal.

Therefore this remains a nonblocking P3, not an unimplemented merge requirement. It should be reconsidered if there is evidence of material disk growth, sensitive log retention outside the existing private permissions, or inadequate OS cleanup in supported development environments. Unless one of those premises changes, repeating the same observation on later heads will not change the decision.

Separately, the new npm run dev cancellation P2 is valid and is not covered by this deferral; its fix belongs at the launch-attempt owner and must guarantee that cancellation becomes observable before any later spawn.

@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from 9369509 to dbd84a6 Compare August 23, 2026 14:35

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technical incremental review of exact head dbd84a6ac7d2a9263890f61e5c1abeca31d5cdec, acting on behalf of @WAWQAQ under the standing Kabi review/publisher authorization.

Conclusion: COMMENT — one P2 remains. No APPROVE and no merge.

The runtime fix itself closes the prior cancellation P2: apps/desktop/scripts/dev.mjs:158-185 makes the in-flight launch promise the ownership boundary, aborts before joining it, and passes the same signal into startDevelopmentApp(). apps/desktop/scripts/dev-app-runtime.mjs:370-428 checks that signal after each real asynchronous preparation boundary and before any spawn. The two TCC spawns have no await between them, and once the handle is published shutdown() joins that same promise before calling stop(). I found no reachable post-spawn orphan window in this implementation.

[P2] The new regression tests do not cross the top-level signal coupling they are meant to protect

apps/desktop/scripts/dev-app-runtime.test.mjs:22-70 calls startDevelopmentApp({ signal }) directly. It proves the helper honors a signal already supplied by its caller, but it never exercises dev.mjs creating the controller, passing launchController.signal, receiving a real signal, joining the launch promise, and stopping the eventual handle.

This is load-bearing rather than merely missing extra coverage: deleting the single signal: launchController.signal line at apps/desktop/scripts/dev.mjs:185 reintroduces the exact old failure — shutdown closes Vite while the uncancelled helper can later spawn Electron — yet both newly-added cancellation tests still pass 2/2. The tests therefore cannot distinguish this fixed head from the broken wiring they were added to prevent.

Please add a regression that crosses the dev.mjs top-level coupler with a deferred launch and real signal timing, asserting that cancellation prevents any later spawn and that an already-published handle is stopped exactly once. The mutation criterion is simple: remove the signal: wiring and that regression must fail.

Local validation: launcher/runtime suite 18/18 and Core build passed; the two new tests remained 2/2 green under the wiring-deletion mutation, then the worktree was restored clean. A full Desktop pretest on this checkout was blocked by untouched UI build/type skew after npm ci --ignore-scripts; this does not affect the focused result. Exact-head hosted audit, test, and package are all completed/success; fresh state is OPEN, non-draft, MERGEABLE/CLEAN. GitHub's aggregate APPROVED is stale old-head history and does not override this live P2. The previously accepted abnormal-death temp-file P3 remains nonblocking and unchanged.

Use one Maka Dev profile for plain and TCC development while keeping the TCC bundle identity worktree-scoped. Electron's single-instance lock remains the sole app-instance authority, and a detached TCC launcher consumes only its private one-shot lock verdict. The launcher owns its log, result file, and Vite server, but never the Electron process: Ctrl-C stops launcher resources while the TCC app remains open until the user quits it. Remove winner PID reporting, PID liveness supervision, and TERM/KILL teardown. Preserve legacy profile data with an upgrade warning and fail clearly when another development instance owns the shared profile.

Generated-by: Codex
@Astro-Han
Astro-Han force-pushed the refactor/desktop-dev-shared-data branch from dbd84a6 to 19061b5 Compare August 23, 2026 15:36

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Incremental technical re-review of exact head 19061b50c0a03901c8565539961db61ae250bf27, executed by the Kabi review agent on behalf of @WAWQAQ under the standing Kabi review/publisher authorization.

GO — no live P0–P2; the previously accepted abnormal-death temp-file P3 remains unchanged. APPROVE; no merge action.

The real increment from reviewed head dbd84a6ac is 3 files (+126/-38). It moves the top-level AbortController, launch-promise ownership, signal handlers, join/adopt/stop sequence, server close, and exit latch from dev.mjs into createDevelopmentLaunchSession() without changing the production ownership order.

The old P2 test gap is closed with mutation evidence. Baseline launcher/core/main focused tests passed 24/24. Deleting only signal: controller.signal from the new production coupler made the launcher suite 19/20: the sole failure was a launcher signal cancels preparation before Electron can spawn, and execution crossed the deferred preparation boundary into the forbidden launch-file creation. The regression therefore guards the exact top-level coupling that was previously untested.

The shared Maka Dev profile and Electron single-instance contract were already present on the reviewed old head and are unchanged in this increment. Current loser paths exit before store or Runtime Host boot: the plain child exit and the TCC private one-shot verdict each close only their launcher/Vite resources, while the winning Electron process remains the sole shared-profile lock owner. No new cross-worktree write or lock competition was found beyond the documented existing Chromium timeout and stale per-worktree dev-env limitations.

Three discussion endpoints were reconciled after provisional sealing; no current-head P0–P2 remains. Fresh action gate: OPEN, non-draft, MERGEABLE/CLEAN; exact-head hosted audit, test, and package are all completed/success. This Agent-executed approval does not claim to satisfy any separate unresolved human-review wording.

@Astro-Han
Astro-Han merged commit 5d17895 into apache:main Aug 23, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the refactor/desktop-dev-shared-data branch September 25, 2026 12:18
M4n5ter added a commit that referenced this pull request Nov 27, 2026
Sync vendored third-party/nsh from 3f8ecd8b3 (0.7.0) through
a901baa2e (0.7.2 + post-0.7.2 fixes):

- Remove superseded local patches now provided upstream and migrate
  consumers to upstream canonical APIs:
  - nsh-engine / ios-shell: HostCall::sender() -> HostSender (#3357)
  - nsh-ios-host / nsh-platform-ios: AppOptions::host (#3354) and
    touch.rs gesture cancel fix (#3420)
  - TextView renderImage(image, context) & terminal images (#3359,
    #3260, #3372, #3290)
  - nsh-bundler / nsh-cli / ui-build: default unresolved-import errors
    (#3425)
  - nsh-core: list display: none retention (#3193) and touch-selection
    (#3380)
  - nsh-platform-macos: file_drop (#3385) and mount (#3386) cleanups
  - nsh-platform-windows: richedit.rs window-specific IME association
    (#3411)
- Preserve upstream RichEditor onReadonlyInput behavior (#3371) with
  opt-in readonly_sink for Maka's embedded composer.
- Fix a Windows RichEdit caret-alignment regression introduced with
  follow-on-draw (#3411): translate the cached caret when the client
  rectangle shifts (with a regression unit test).
- Update third-party/nsh provenance (upstream.json, SOURCE.md),
  Cargo.lock files, LICENSE, and CLI dependency notices.

Generated-by: Maka (Gemini)
M4n5ter added a commit that referenced this pull request Nov 27, 2026
Sync vendored third-party/nsh from 3f8ecd8b3 (0.7.0) through
a901baa2e (0.7.2 + post-0.7.2 fixes):

- Remove superseded local patches now provided upstream and migrate
  consumers to upstream canonical APIs:
  - nsh-engine / ios-shell: HostCall::sender() -> HostSender (#3357)
  - nsh-ios-host / nsh-platform-ios: AppOptions::host (#3354) and
    touch.rs gesture cancel fix (#3420)
  - TextView renderImage(image, context) & terminal images (#3359,
    #3260, #3372, #3290)
  - nsh-bundler / nsh-cli / ui-build: default unresolved-import errors
    (#3425)
  - nsh-core: list display: none retention (#3193) and touch-selection
    (#3380)
  - nsh-platform-macos: file_drop (#3385) and mount (#3386) cleanups
  - nsh-platform-windows: richedit.rs window-specific IME association
    (#3411)
- Preserve upstream RichEditor onReadonlyInput behavior (#3371) with
  opt-in readonly_sink for Maka's embedded composer.
- Fix a Windows RichEdit caret-alignment regression introduced with
  follow-on-draw (#3411): translate the cached caret when the client
  rectangle shifts (with a regression unit test).
- Update third-party/nsh provenance (upstream.json, SOURCE.md),
  Cargo.lock files, LICENSE, and CLI dependency notices.

Generated-by: Maka (Gemini)
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.

4 participants