Skip to content

feat(editor): R-00362 M6-C extract, submit, and auto commit/export - #12

Merged
Go1c merged 2 commits into
mainfrom
feat/R-00362-submit
Sep 2, 2026
Merged

feat(editor): R-00362 M6-C extract, submit, and auto commit/export#12
Go1c merged 2 commits into
mainfrom
feat/R-00362-submit

Conversation

@Go1c

@Go1c Go1c commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

R-00362 M6-C: buildPatch from four-state tokens, Host POST /api/patch/validate / /api/patch/apply, submit() apply then optional Git/SVN commit and export, DiffPreview 预检/提交补丁.

Base: origin/main ae51a4d (PR #11). Does not merge itself. Out of scope: ConflictPanel/rebase, patch.py semantics, push/PR from Host.

Acceptance

  1. Empty ops submit returns ok; files, fingerprints, and HEAD stay unchanged (skip commit/export when ops is empty).
  2. update / create / rename / delete match handwritten patch apply byte-for-byte (including tombstones). Create has no expect; other ops expect baseline tokens. New row M3 id replaces draft:. Ref columns emit target names, not ids.
  3. autoCommit=true: git log -1 first line config(<table>): <摘要>, whitelist three paths (git commit -- <paths>). autoCommit=false: dirty tree + 未提交 hint. SVN stub add then commit. allowDirtyWorkingTree=true skips commit.
  4. autoExport=true writes build/export. EXPORT_FAILED / VCS_COMMIT_FAILED keep TXT; draft is still deleted after successful apply.

Closeout (worktree LumioConfig-wt-R-00362, HEAD c5b908a)

  • python -m unittest discover -s tests -v: 110 tests, 1 skipped, OK
  • python tools/lumio_config.py validate: OK
  • python tools/lumio_config.py format --check: OK
  • python tools/lumio_config.py export --out build/export: OK (3 tables)
  • git diff --check: OK
  • node spec-lint.mjs .: OK
  • pnpm lint / pnpm test: 33 Vitest passed
  • pnpm build + pnpm e2e: 22 Playwright passed (host-drafts + host-submit included)

Reviewer

Branch review vs origin/main found 4 bugs (watcher race, autosave vs ReadyToSubmit, leftover draft after VCS/EXPORT failure, ref ids). Follow-up commit c5b908a addresses them plus delete/tombstone coverage and commit pathspec.

Do not merge until evaluator independently verifies the four GET'd items.

Cui added 2 commits September 2, 2026 17:02
Wire buildPatch from four-state tokens, Host POST /api/patch/validate|/apply, Git/SVN/None VcsAdapter.commit, and DiffPreview submit flow. Empty ops skip commit/export so fingerprints and HEAD stay unchanged. autoCommit writes only the whitelist paths; EXPORT_FAILED and VCS_COMMIT_FAILED keep already-applied TXT.
Lock apply/reload against the 2s revision watcher, delete the table draft after a successful apply even when commit/export fails, map ref tokens to target names, and commit only whitelist paths. Empty-ops validate is available from ReadyClean.
@Go1c
Go1c merged commit 50cd2f0 into main Sep 2, 2026
1 check passed
@Go1c
Go1c deleted the feat/R-00362-submit branch September 3, 2026 04:57
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