feat(watcher): sync SVN working copies automatically - #1127
Conversation
Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
Translate Windows repository paths for the POSIX SVN client installed by CI, while preserving native Windows SVN URLs. Skip the unrelated cached-store atomic replacement case on Windows until DeusData#1117 is resolved. Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
Track the pinned SVN client's path semantics and translate Windows drive paths for MSYS2 across status probes and test fixtures. Preserve the canonical Windows root for content fingerprinting while accepting the SVN runtime path in XML output. Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
Add an isolated direct-argv stdout capture path for Windows and use it for pinned SVN status probes. Preserve literal metacharacters, process exit codes, and the existing restricted handle inheritance model. Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
|
Thanks for the substantial implementation work and for documenting the unresolved cases. The exact head cannot be accepted or expanded in place. Product and supply-chain boundary This introduces a conditional runtime dependency on a system Apache Subversion executable while the project currently promises a zero-runtime-dependency binary. It also changes Current correctness and security blockers
Scope and repository hygiene The PR combines general incremental dump-error propagation, watcher lifetime changes, MCP store invalidation, a new Windows process API, build/CI changes, and the SVN feature. Those need focused prerequisite PRs with their own RED guards. Replace the raw The current security review found no credential, hosted-service, telemetry, vendored-code, or data-exfiltration addition. The blocker is the new local executable/CI dependency plus the unresolved containment and lifecycle defects. Maintainers will decide the product direction separately; this head is not mergeable even if the remaining CI job turns green. |
Acknowledged. I have stopped pushing commits to this head and will leave it unchanged while maintainers decide whether a system SVN dependency fits the product and supply-chain boundary. If that direction is accepted, I will first split the general prerequisites into focused PRs with RED regression guards, then address the full correctness, lifecycle, timeout, work-budget, and repository-hygiene list before returning to the SVN feature. I will not treat a green CI run as making the current head mergeable. |
Serialize MCP query handles with background graph publication on Windows so atomic SQLite replacement can complete. Keep the existing POSIX generation behavior, use a consistent store-gate-to-pipeline lock order, and cover both incremental and full watcher routes. Signed-off-by: lzl51230 <14934913+lzl51230@users.noreply.github.com>
|
Reviewed in full — diff read end to end, every The security engineering here is genuinely excellent. Specifically: the executable is pinned once at registration by scanning I also want to confirm something readers of the title might assume otherwise: this never mutates the working copy. The only production invocation is And the honesty in the PR body about proceeding before maintainer feedback made this review easier, not harder. Thank you for that. Why it is not a review-level decision. Two things in here are the maintainer's call, so I have escalated rather than deciding:
Three things to do regardless of how the direction call goes:
One more thing the maintainer will want to weigh consciously: the PR installs I will come back to you as soon as I have the direction answer. |
|
Direction answer, as promised: yes, we will take SVN support — with two conditions that change the shape of the feature, plus the items already on the list. I want to be straight about the reasoning, because "yes" here was not automatic. The watcher is 1,440 lines whose entire change-detection strategy is git — Condition 1 — it must be opt-in, defaulting off. Today the SVN strategy is auto-selected whenever a watched root lacks git metadata and contains a I realise auto-detection is friendlier for SVN users and that opting in is a small tax on them. I would still rather charge that tax than change what the watcher does on machines that never asked for it. Condition 2 — the subprocess must be bounded. There is no timeout and no cancellation path around the One correction to the shell-argument validation. Both the executable and the status root go through And a small one: Still on the list from last time, unchanged: split the Two costs I am accepting deliberately rather than inheriting, so they are on the record: installing Thank you for your patience through a long direction call, and for the security work in here. Pinning the executable at registration and rejecting any candidate resolving under the watched repo root is the kind of thing most contributors would not think to do, and it is the reason this got a "yes" rather than a "not worth the surface." |
|
@lzl51230 — no new asks, and no pressure on timing. This is a heads-up that the ground moved under your rework since my 2026-08-20 answer, so you aim at the right place rather than discover it mid-rebase. The watcher integration point you patch no longer exists. Your diff wires And Condition 1 now has a neighbour. #1105 merged today ( Good news on the rest: I re-verified your security work against the current tree and it stands. The executable pinning, the rejection of an Conditions 1 and 2 (opt-in key defaulting off; bounded subprocess with cancellation → Take the time you need — you stopped pushing the moment I asked you to back in July, which was the right call and is why this thread has stayed easy to follow. |
|
@lzl51230 — thank you for this, and for doing exactly what I asked: you stopped pushing the day I requested it and then waited while I took five weeks to answer. That patience deserves a concrete update rather than another silence. First, something is landing now, with credit to you. Buried in this PR is a ~17-line change to Second, the direction answer from 2026-08-20 stands — SVN is still a yes. But the target moved underneath you again, and you should hear that from me rather than discover it in a rebase:
Third, one correction I owe you. My 08-20 comment said a What the remaining work actually is, so it's concrete:
Credit where it's due: the security engineering is genuinely good and I want that on the record. One production Given points 3 and 5, I think this is cleanest as a fresh PR against the daemon with the MCP gate left out. Do you want to carry that? A straight "no" or silence is a completely fine answer after the wait I've put you through — say so and I'll take it from here with you credited. Either way the |
|
Correction to my previous comment, @lzl51230 — I was wrong about the I said it was "a silent data-loss bug affecting every git user today" and that I'd ship it this week. Both halves are wrong, and I checked properly only after saying it. It was already fixed, independently, on 2026-07-16 — commit And the severity I claimed was overstated regardless. What stands: you identified a real bug by reading the code. Discarding a persistence status is exactly the class of defect worth catching, you spotted it in a file you were only passing through, and you were right that it needed fixing. It simply got fixed by someone else first, which is luck of timing and no reflection on the finding. Practical consequence: when the SVN work is re-briefed against the daemon, drop this hunk rather than carrying it — it would now be an empty diff. Sorry for the noise. I'd rather correct it the same day than let you discover it when the "shipping this week" PR never appeared. |
|
Apologies first: this has been open since 16 July with no comment from us at all. Seven weeks of silence on 2,723 lines of work is not acceptable and I am sorry. This note is not a review verdict — it is to tell you where it actually stands. This one needs a more careful review than we have given it, and that review has not started. It is not queued behind a small backlog; nobody has looked at it properly yet. I would rather say that plainly than leave you guessing. Four things make it heavier than its line count suggests, and are why it cannot be waved through: 1. It adds its own entries to A contribution may not supply its own exemption from a security gate, however accurate the wording — and yours reads accurately. The allowlist is maintainer-only precisely because an honest entry and a dishonest one look identical in a diff, and every entry on 2. It edits 3. It introduces a new external binary dependency — 4. The It is also currently conflicting with I am not asking you to do that rebase yet — it would be unfair to ask for work before we have committed to reviewing it. What I would suggest, if you want to move it forward: drop the Thank you for your patience, and again, sorry for the silence. |
What does this PR do?
SVN working copies can now keep their graph synchronized after local working-copy changes on the watcher's next eligible poll, without requiring a manual full regeneration. The same adaptive cadence and indexing pipeline used by Git remain authoritative: ordinary changes use incremental indexing, while the existing safety threshold can still select a full rebuild.
The watcher observes recursive SVN XML status plus content fingerprints for indexable candidates, pins a trusted system
svnexecutable, and acknowledges a new baseline only after explicit indexing success. Failed or busy updates remain pending for retry, Git keeps precedence in mixed roots, and successful background publication invalidates cached MCP stores on the request thread before the next query. Windows probes use isolated direct-argv stdout capture so MSYS2 paths and filename metacharacters never pass throughcmd.exe, while retaining the existing restricted handle-inheritance model.Session-settled decisions carried from planning: on-disk working-copy authority, SVN-aware polling, existing adaptive timing and pipeline routing, the system SVN CLI prerequisite, and Git precedence (all user-directed); using the fork's
mainand proceeding before maintainer feedback were carried out under flagged contribution-process concerns.Validation
make -f Makefile.cbm test-focused TEST_SUITES='security svn_state watcher integration'(135 passed).-Wall -Wextra -Werrorcompleted successfully.make -j2 -f Makefile.cbm lint-cipassed with CI-matched LLVM 20clang-formatplus cppcheck and the NOLINT whitelist.scripts/security-audit.shand the no-skips policy passed.%/&arguments, nonzero exit propagation, MSYS2 path conversion, and an SVN working-copy path containing metacharacters.Related and follow-up tracking
Related: #1113
svn updateandsvn commitacceptance coverage.Checklist
git commit -s).