Skip to content

docs(mindmap): #568 fiabiliser la generation SVG sans RDP actif + helper script - #569

Merged
jsboige merged 1 commit into
masterfrom
docs/mindmap-reliability-no-rdp
Jun 21, 2026
Merged

docs(mindmap): #568 fiabiliser la generation SVG sans RDP actif + helper script#569
jsboige merged 1 commit into
masterfrom
docs/mindmap-reliability-no-rdp

Conversation

@jsboige

@jsboige jsboige commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Quoi

Réponse à « Tu n'as pas une façon de fiabiliser définitivement la création de mindmap sans souci RDP ? » — décision jsboige : les deux, OS maintenant + Freeplane ensuite.

Cette PR livre la partie doc + outil (aucun changement de code pipeline, aucun changement de rendu) :

  • docs/investigations/2026-06-21-mindmap-reliability-without-rdp.md — cause racine + recette OS-niveau + findings Freeplane préservés.
  • docs/investigations/scripts/Enable-MindmapInteractiveSession.ps1 — helper (désactive verrouillage/écran de veille/veille système ; option -ParkToConsole ; autologon documenté en consentement-jsboige).

Pourquoi

FreeMind n'a aucune API d'automatisation : l'export SVG passe par des frappes clavier qui exigent un premier plan interactif. RDP minimisé/inactif → GetForegroundWindow() null → frappes perdues → FreeMind SVG not detected. C'est opérationnel, pas un bug de code.

Hors scope (volontaire)

Suivi

🤖 Generated with Claude Code

…ript

Document the root cause of the FreeMind SVG export RDP fragility (no
automation API -> needs a foreground interactive desktop; idle/minimized
RDP yields a null foreground -> dropped keystrokes) and ship two fixes:

- Immediate (no code, no fidelity change): persistent interactive session
  recipe + Enable-MindmapInteractiveSession.ps1 helper (disable
  lock/screensaver/sleep; optional tscon /dest:console parking; autologon
  documented as jsboige-consent only).
- Long-term (changes engine): preserve the empirical Freeplane c.export()
  findings + the .mm-format blocker; tracked in #568. Flagged that
  Freeplane != Batik rendering -> needs ai-01/jsboige visual validation.

XSLT fallback stays out (regresses PR #184), per jsboige.

Co-Authored-By: Claude <noreply@anthropic.com>

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[NanoClaw] — security review · Argumentum #569 (mindmap SVG reliability without active RDP)

Verdict: LGTM with concerns (3 non-blocking concerns)

Scope: 2 files, +309/-0, docs-only. Adds docs/investigations/2026-06-21-mindmap-reliability-without-rdp.md (root-cause analysis: FreeMind SendKeys needs a real foreground window, lost when RDP is idle) + docs/investigations/scripts/Enable-MindmapInteractiveSession.ps1 (138-line PowerShell helper: disables screensaver/lock/sleep, optional -ParkToConsole to tscon the session to the physical console, -Revert). No pipeline code touched, no rendering change.

Security scan: Script grepped for Invoke-Expression/iex/Start-Process/& /os.system/eval/exec→ **0 hits**. NoInvoke-WebRequest/Invoke-RestMethod/WebClient/DownloadFile/http(s)://in the script (thehttps://matches are all doc-text GitHub links). No hardcoded credentials — secrets appear only as *warnings* in docs ("don't store plaintextDefaultPassword, use LSA-encrypted Autologon"). The single interpolation into a command is tscon $sid /dest:consolewhere$sid = (Get-Process -Id $PID).SessionId — a process-table integer, not external input, so not injectable. All registry paths (HKCU:\Control Panel\Desktop, HKLM:...\Policies\System) and powercfg` args are fixed string literals.

Verified:

  • Script safety, line by line. Set-RegValue writes fixed Name/Value pairs to fixed paths; powercfg /change monitor-timeout-ac 0 etc. are fully hardcoded. Read-Host answer is only string-compared to 'YES', never concatenated into a command. -Revert restores ScreenSaveActive=1, monitor-timeout-ac=10, standby-timeout-ac=30, InactivityTimeoutSecs=900 — symmetric and reasonable.
  • Doc accuracy vs code — checked all load-bearing claims against the repo:
    • SendKeys macro {ESC} → %f → 8×DOWN → RIGHT → 12×DOWN → ENTER×3 matches FallacyMindMapDocumentConfig.cs:635-670 exactly (8×DOWN loop, RIGHT, 12×DOWN loop, 3×ENTER). Doc TL;DR reproduces it correctly.
    • GetForegroundWindow() / SetForegroundWindow() P/Invoke dependency confirmed in the same file (~lines 300-310) — the "no foreground = keys drop" root cause is real.
    • MindMapFormat enum + if (Format == MindMapFormat.Freeplane) branch exists (FallacyMindMapDocumentConfig.cs:33,290).
    • FreeplaneMap : FreemindMap confirmed (MindMap.cs:178; doc cites :167 — off by ~10 lines, the parent class FreemindMap is at 169).
    • EnsureGroovyExportScript writes export_to_svg.groovy with c.export(node.map, svgFile, 'Scalable Vector Graphic (SVG) (.svg)', true) (FallacyMindMapDocumentConfig.cs:780-798) — matches the doc's Groovy snippet character-for-character.
    • TryXsltSvgConversion exists as dead code (:714) — matches "XSLT fallback exists in dead code".
  • tscon ... /dest:console behavior is accurately documented as immediately disconnecting the RDP client; the script double-gates it behind -ParkToConsole + an interactive YES confirmation.
  • Autologon credential warning is correctly explicit: plaintext DefaultPassword discouraged, Sysinternals Autologon.exe (LSA-encrypted) preferred, "DO NOT apply unilaterally — jsboige consent".

Concerns:

  1. (non-blocking, doc) Imprecise line citations. Doc §1 points at FallacyMindMapDocumentConfig.cs:307 for the active SendKeys path, but the macro is at lines 635-670 (307 is the SerializeMindMapAsync/thread-pool dispatch area — related but not the keystrokes). §3.3 cites MindMap.cs:167 for FreeplaneMap : FreemindMap, actual line 178. Both point to the right file; the line numbers drift. Fix or drop the #Lnnn anchors to avoid future stale-link flags.
  2. (non-blocking, script) Set-RegValue 'HKCU:\Control Panel\Desktop' 'ScreenSaveActive' '0' 'String' uses New-ItemProperty -PropertyType String for a value that's conventionally REG_SZ. Works, but ScreenSaveActive is read by explorer.exe as a string — fine. The real nit: HKLM:\...\Policies\System\InactivityTimeoutSecs is written as DWord but this policy key actually expects DWORD and only takes effect on Pro/Enterprise SKUs via group policy; on Home SKUs the write succeeds silently with no effect. Worth a one-line note in the doc that the machine-lock hardening is best-effort and SKUs/GPO-dependent.
  3. (non-blocking, script/docs) -Revert restores ScreenSaveActive=1 but doesn't restore ScreenSaverIsSecure (the APPLY step sets it to 0). Minor asymmetry — on revert the secure-on-wake flag stays at whatever APPLY left it. Not a security hole (user explicitly lowered it), but -Revert should arguably restore it too for true idempotency.

No blocking issues. Script is injection-free, reversible, double-gates the disruptive tscon, and the docs' technical claims hold up against the actual converter code.

— NanoClaw

@jsboige
jsboige merged commit 53a39c8 into master Jun 21, 2026
3 checks passed
@jsboige
jsboige deleted the docs/mindmap-reliability-no-rdp branch June 21, 2026 07:37
jsboige added a commit that referenced this pull request Jun 25, 2026
The §3.7 'breakthrough' (version-only patch suffices, blocker §3.3 refuted)
was based on a 4-node toy-sample (302 B). Re-tested on the real production
maps (Virtues 161 KB, Fallacies 1.15 MB) per ai-01 dispatch v2: the -R groovy
script NEVER runs — Freeplane stalls at map-open ('requesting mode: MindMap'
then silence) until killed at 240s. An instrumented script (script_started as
first line) confirms the script is never invoked.

→ §3.7.1 conclusion is FALSE at production scale. Version-only is insufficient;
the complex FreeMind body triggers a map-open stall (hypothesis: blocking modal
requiring a foreground click). §3.4 step 1 (native Freeplane serialization)
remains likely required. #599 returns to the same foreground dependency as
FreeMind.

Decision: do NOT adopt #599 for production. FreeMind SendKeys + OS persistent
session (PR #569) remains the only functional path. #599 code stays opt-in
(Format=Freeplane, FreeMind default unchanged) but adoption gated on modal
confirmation + native serialization.

Methodological self-correction: a minimal-sample probe != validation — always
test at production scale before declaring a blocker 'refuted'.

Co-Authored-By: Claude <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 6, 2026
…ker documented + design proposal (#737)

Executes dispatch `5czj9v` [1] PRIMAIRE in the DoD's explicit "SI bloqué → blocker documenté +
design proposal = livrable valide" form. Read-only synthesis — 0 re-probe of the stalled path.

The dispatch asked for a feasibility spike of the Freeplane headless c.export() SVG path (#568).
Code=truth (verified before any spike) shows the path is already blocked and the goal already met:

- PR #599 (25-27/06) documents the production-scale stall (§3.8): on REAL pipeline cards (Virtues
  161 KB, Fallacies 1.15 MB), the -R Groovy script never executes — Freeplane stalls at
  "requesting mode: MindMap" → kill at 240 s. The toy-sample 4-node probe that "broke through"
  §3.3 was not representative.
- Verdict NÉGATIF, endorsed by ai-01 and decided by jsboige WE 27/06. PR #599 closed (opt-in code
  not worth maintaining).
- The #568 goal (retirer la dépendance RDP-foreground) is ALREADY achieved by the OS-level fix
  #569 (tscon + persistent session, MERGED 2026-06-21) — which keeps the proven FreeMind+Batik
  rendering and removes the foreground requirement without an engine change.

Design proposal: (A) #569 [shipped, recommended] vs (B) c.export()+native Freeplane serialization
[multi-tick, engine≠Batik, need already covered] vs (C) timeout/retry wrapper [addresses symptom
not cause] vs (D) XSLT [forbidden by jsboige, PR #184].

Recommendation: close #568 (goal met via #569). Do NOT re-probe c.export() without a new
jsboige/ai-01 mandate + a concrete hypothesis distinguishing the production stall from the
toy-sample success. Honors the worker's standing lesson "NEVER re-try #568 (réfuté, #599 closed)".

Prepared in mode (a) of the worker's FLAG to the coordinator (msg gqvma1): consolidate the known
blocker + design proposal, no re-probe. Does not re-open a closed dossier — closes the dispatch's
[1] ask by recording the blocker is already documented and the goal already met by another path.

Read-only: 0 write Cards/, 0 régén, 0 CSV/DB/OWL, 0 rendering code, 0 re-probe. gh pr/issue view +
git log/show + Read of existing docs only.

Dispatch 5czj9v [1] PRIMAIRE / #568. Base 9ed2e78.

Co-authored-by: Your <your.email@example.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
jsboige added a commit that referenced this pull request Jul 12, 2026
… full-IIS) (#792)

The 3 #131/#132 runbooks were written Jun 15-25 as PRE-execution prep,
before the migration was delivered. They now describe steps that have
already happened (or carry an undocumented lesson that would bite a
future executor). This refresh adds POST-EXECUTION REALITY banners +
one targeted correctness addition — without rewriting the historical
procedure (a valid record of the prep/reasoning).

Changes (docs-only, 3 files, +85/-1):
- 131-step1-sandbox-upgrade-runbook.md: POST-EXEC banner — marks the
  sandbox upgrade DELIVERED (10.3.2+2sxc21 live full-IIS, ACME bypass
  active), points to phase2-exec-rollback + MEMORY + UPGRADE-ASSESSMENT
  as current truth, flags 2 staleness items resolved (§2 "2sxc 15.02"
  was stale — already 21.07; §5 "templates untouched" moot — cliff crossed).
- 131-regen-staging-runbook.md: REFRESH banner — scope DEFERRED 4-vs-8
  lang RESOLVED (8-lang shipped #565, 41 SVGs), foreground-lock mitigated
  (#569 tscon recipe), Playwright deadlock resolved (#651), build-server
  deadlock lesson; points to regen-readiness-refresh-c1ed77d2 (#782) as
  the live harness.
- 132-deployment-runbook.md: POST-EXEC banner (sandbox+full-IIS delivered,
  prod VPS go-live remains the gated frontier) + the critical B1-inversion
  lesson added to §5.5(a): 2sxc-21 REQUIRES .NET 8/9 BCL stack
  (Json 9.0.0.0/SCI 9.0.0.0/Bcl 8.0.0.0), NOT the 6.0.0.0 reversion the
  early repair-bin-net48.ps1 encoded. This was a real gap — the runbook
  predates the B1 incident and would have led a future executor to break
  2sxc 21 with JsonOptions MissingMethodException.

po-2023 lane (docs/dnn-localization/). Non-gated. No Cards/, no .cs, no DB.
Gated ai-01 review before merge.

Co-authored-by: Claude-Code <noreply@anthropic.com>
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.

2 participants