0
0
Fork 0
Codesys-MCP-SP21-plus/src
Karstein Phobic Nyvold Kvistad c50970b15e classifier + orchestrator: see untracked files, re-mirror after bump
Two real bugs surfaced from the MCPTest2 v1.1.0.0 -> v1.2.0.0 round.

Fix 1: classifier didn't see untracked files (CLASSIFICATION GAP)
   Adding FB_Position + FB_Random5s via create_pou + mirror_export
   produced new untracked .st files in mcp-mirror/. The classifier
   ran `git diff --name-status` which ONLY reports tracked changes;
   the new files were invisible until git-added. Result: classifier
   counted only 1 'modified' (PLC_PRG, the wiring update) instead
   of 1 modified + 2 added, and resolved 'revision' instead of
   'minor'. Added a `git ls-files --others --exclude-standard --
   mcp-mirror/` pass that pulls untracked files and tags them as
   adds (`added (untracked): <path>`). Now create_pou + release
   correctly classifies as minor.

Fix 2: orchestrator didn't re-mirror after bump (DESYNC)
   Pipeline was: mirror_export -> classify -> bump -> regen md ->
   git commit. mirror_export ran BEFORE the bump, so the captured
   mcp-mirror/_MCP_PROJECT_VERSION.st reflected the pre-bump GVL
   value. Then bump updated the in-memory GVL + saved the .project
   binary. Then commit went out with mcp-mirror at the OLD value
   while the binary already had the NEW value. Two consequences:
     - Next release call sees _MCP_PROJECT_VERSION.st as 'modified'
       vs the just-pushed v* tag (because the next mirror_export
       pulls the post-bump value, which now differs from the
       still-pre-bump mirror in the tag), triggering another bump.
     - The runtime-anchor on disk and the runtime-anchor inside the
       running PLC binary were silently desynced from the docs.
   Surfaced as MCPTest2 v1.1.0.0 (8d79193) shipping with binary
   GVL = 1.0.2.0 while docs said 1.1.0.0; resolved by the v1.2.0.0
   re-sync (1513e9c).
   Added a SECOND mirror_export call right after the bump, before
   regenerating library.md / pou-dump.md / Changelog. Soft-fails
   with WARNING -- the bump itself already succeeded, post-bump
   mirror is the documentation step.

Together these two fixes make release_project_version end-to-end
deterministic: 1 release call -> 1 release commit, no manual finish,
no re-bump on the next call. Verified offline: the path of the new
untracked-detection through ls-files --others, plus the second
mirror_export, give the orchestrator the post-bump state it
previously lacked.
2026-04-26 02:12:36 +02:00
..
scripts mirror_export: drop the 'Generated: <timestamp>' header line 2026-04-26 01:27:16 +02:00
bin.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
headless.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
ipc.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
launcher.ts shutdown_codesys: kill orphan CODESYS.exe when launcher has no tracked PID 2026-04-26 01:20:39 +02:00
logger.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
script-manager.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
server.ts classifier + orchestrator: see untracked files, re-mirror after bump 2026-04-26 02:12:36 +02:00
types.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00