Skip to content

Merge human-owned Pursuit map - #10

Merged
RightL merged 3 commits into
mainfrom
feature/human-owned-pursuit-map
Aug 28, 2026
Merged

RightL merged 3 commits into
mainfrom
feature/human-owned-pursuit-map

Conversation

@RightL

@RightL RightL commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Review and land the human-owned Pursuit map implementation.

Key changes:

  • simplify Pursuit to a human-owned Markdown graph
  • add direct XMind-like map editing in the existing Web Studio
  • add safe tree/storage operations, automatic F# backing, optimistic saves, and Git undo/redo
  • remove Update's semantic write access to Pursuit
  • add the explicit maintain-pursuit-map skill and align docs/examples

This PR is opened as draft while the implementation and CI are reviewed.

RightL added 2 commits August 28, 2026 09:14
Keep Pursuit in canonical Markdown while exposing its logical tree through the
existing Web Studio. Add direct map editing, automatic backing files, ordered
optimistic saves, and validated Git undo/redo with session and revision checks.

Block Update from changing Pursuit at both tool and candidate-commit boundaries.
Keep sync repair available and allow only exact reference repair in Memory for
map deletions. Preserve physical bytes or refuse unsafe Git checkout conversion.

Ship the locked Mind Elixir frontend and compiled assets in the Python package,
add the explicit map-maintenance skill, update current product rules and docs,
and verify storage, API, installer, browser, and Windows process behavior.
Check process liveness as well as creation-time identity before waiting or signaling. Windows can retain identity after exit while the parent holds the process handle. Accept a signaling error only when the owned process has exited or changed identity; preserve errors for a live process.

Add three regression tests. Verified with 1,403 tests (43 skipped), frontend tests/typecheck/build, compileall, and repeated native Windows shutdown checks.

@RightL RightL left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review result: not ready to merge. 整体架构与已确定设计一致,但合并前需要修复以下问题:

  1. 清理 Focus 占位文本。 新 starter 仍包含 No Pursuit is focused yet.;第一次 set_focus 只会追加引用,最终会同时出现“没有 Focus”和实际 Focus。新模板应使用空的 ## Focus。兼容旧 root 时,添加第一条 Focus 引用可仅删除完全匹配的历史占位句(且该 body 除空白外没有别的内容),不得删除用户自定义正文。增加从旧 starter 开始的回归测试。

  2. 修复 Windows Web 启动失败清理。 native Windows CI 在 _terminate_owned_web_process 的 os.kill 上报 WinError 5 Access is denied。Windows 路径应在重新验证 PID identity 后使用可靠的 Windows process/tree termination(例如 taskkill /PID <pid> /T /F 或 handle-based termination),随后等待并证明进程退出;不要仅吞掉 PermissionError,也不要削弱 reused-PID identity fence。更新相应单元测试并让 native integration test 通过。

  3. 修正 stale installer test。 test_rerun_preserves_managed_examples_and_user_state_byte_for_byte 仍替换/断言旧标题 Example Release Readiness,但新模板已没有该标题。改为替换当前实际存在的标题(例如 Example Application),同时保留 byte-for-byte preservation assertions。

  4. 把前端校验接入 CI。 Ubuntu job 应运行 npm ci、npm run typecheck、npm test、npm run build,并确认提交的 rightmemory/web/static/pursuit-map.js、CSS 和 license 与构建结果一致,防止 TypeScript source 与随 wheel 分发的 bundle 漂移。

修复后重新跑完整 Linux/Windows workflow。Ubuntu 的 async worker timeout 看起来可能是独立的偶发问题;若重跑仍复现,再调查进程清理/测试隔离,不要直接忽略。

@RightL RightL left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Update after reviewing current head 1f09da8: Windows Web shutdown fix is accepted; the latest Windows CI job now passes. Do not redo that work.

Remaining blockers before merge:

  1. Remove the contradictory starter Focus placeholder and add backward-compatible first-focus cleanup exactly as described in the prior review.
  2. Fix the stale Linux installer assertion (Example Release Readiness no longer exists; mutate/assert an actual current template title while retaining byte-preservation checks).
  3. Add frontend npm ci / typecheck / tests / build / committed-bundle-diff verification to GitHub Actions.
  4. The same detached async-worker shutdown timeout has now failed in two consecutive Ubuntu PR runs. It is no longer reasonable to treat it as a one-off. Investigate and fix the Linux process/test isolation issue, then require a fully green Linux/Windows workflow.

The implementation remains broadly sound; these are targeted finishing fixes, not a redesign.

Remove the starter Focus placeholder and clear only its exact legacy body when adding the first focus. Preserve user notes and update the installer byte-preservation fixture to use the current example title.

Add Ubuntu frontend install, typecheck, tests, build, and committed-bundle consistency checks. Treat Linux zombie/dead procfs states as exited while preserving process identity and PID permission checks. The original async-worker test was reproduced with a consumed stop request, idle worker state, released leader lock, and an unreaped child; it now stops without extending the timeout.

Verified the complete Ubuntu suite: 1,409 tests, 13 skipped, no failures or errors. Frontend checks and all three bundle hashes match. Windows verification is also running before merge.
@RightL
RightL marked this pull request as ready for review August 28, 2026 02:43
@RightL
RightL merged commit ff3f593 into main Aug 28, 2026
2 checks passed
@RightL
RightL deleted the feature/human-owned-pursuit-map branch September 28, 2026 06:18
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.

1 participant