0
0
Fork 0
Commit graph

7 commits

Author SHA1 Message Date
Karstein Phobic Nyvold Kvistad
2c7eeccb94 fix: drop dead sp21-plus-migration-notes branch refs from generated md + smoke-test doc
Branch was deleted after main caught up. server.ts auto-generates
library.md and pou-dump.md headers in user projects, so the broken
URL was leaking into every consumer of those tools. Now points at
the repo root (main is the only branch).
2026-04-26 22:56:43 +02:00
Karstein Phobic Nyvold Kvistad
3e2467149f docs/SMOKE-TEST: collapse v1+v2 into a single end-of-day doc
Two parallel smoke-test files had drifted out of sync:

  docs/SMOKE-TEST-2026-04-25.md      (morning v1, 28 invocations,
                                      pre device-side fix)
  docs/SMOKE-TEST-2026-04-25-v2.md   (afternoon v2, 29 invocations,
                                      post device-side fix)

Neither covered the late-afternoon work (six new git_* tools,
mirror_export, launcher refuse-on-duplicate, list_project_libraries
rewrite). Consolidating to one doc named SMOKE-TEST-2026-04-25.md
that:

  - Covers the full 36 distinct tool invocations (28 OK / 4 FAIL /
    1 PARTIAL).
  - Reduces the open-bugs list from 5 to 4 (list_project_libraries
    is fixed; the read/write inconsistency now narrows to
    add_library's missing dedupe + placeholder).
  - Adds rows for the 7 new tools verified end-to-end on X33 (8
    library refs, 91 .st mirror files) and on GitSmokeTest (full
    init -> commit -> remote_add -> branch_set_upstream_to -> push
    round-trip against gitlab.usv.no via cached HTTPS creds).
  - Documents the new infrastructure (PDE-license rewrite, launcher
    refuse-on-duplicate) as separate sections rather than bugs.
  - Cites the late-afternoon commits in the "What this proves" table
    so the smoke test traces every fix back to its source.

The morning v1 is removed; the afternoon v2 file is renamed onto the
canonical filename to preserve git's rename history.
2026-04-25 23:32:26 +02:00
Karstein Phobic Nyvold Kvistad
7f114a4454 docs: cross-reference all 5 remaining bugs against helpme-codesys.com
Per the project rule (check helpme-codesys.com first / cross-reference
before any scripting fix), each of the 5 open bugs from
SMOKE-TEST-2026-04-25-v2.md gets:

  - Empirical failure as observed today on SP22 Patch 1
  - Relevant docs URL on content.helpme-codesys.com
  - What the docs confirm (or fail to surface -- many pages are index-
    only with method bodies rendered by JS, not WebFetch'able)
  - Proposed fix path with rationale and approximate effort

Findings summarised:

  1. create_folder kwarg mismatch -> try positional 'create_folder("name")'
     (~10 LOC, high-probability fix)

  2. compile_project / get_compile_messages JSON long ->
     pre-process the dict to coerce IronPython long to int/str before
     json.dumps; belt-and-suspenders default=str (~15 LOC, single helper)

  3. list_project_libraries returns empty ->
     use ScriptLibManObject.get_libraries() (canonical), reuse the
     same Library Manager discovery pattern that add_library already
     succeeds with (~30 LOC)

  4. add_library duplicates / not placeholder ->
     pre-check via get_libraries() to dedupe; default to add_placeholder()
     to match Standard template convention; opt-in 'direct=true' for
     the old behaviour (~40 LOC, mildly breaking)

  5. rename_object partial refactor ->
     no documented refactor variant in scriptengine; brute-force walk
     of every POU + word-boundary regex replace, gated behind
     updateReferences=true flag (~80 LOC, biggest fix)

Order-of-attack ranking included. Each fix is its own commit per the
project rule, with the relevant docs URL cited inline in the commit
message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 18:56:58 +02:00
Karstein Phobic Nyvold Kvistad
5f3166ea24 docs: smoke test v2 (post login-probe + write API fix) -- 22 pass / 5 fail / 2 partial
Refresh of docs/SMOKE-TEST-2026-04-25.md after this afternoon's commits:

  e862846 + eee8ce2  connect_to_device login probe + loginWaitSeconds
  010811b + 64906c4  write_variable: SP22 prepare-then-write API
  b3bf4a8            download_to_device: same login probe + loginWait

All five previously-failing device-side ops (connect/read/write/start_stop/
download/disconnect) now PASS verified end-to-end against:

  - SP22 Patch 1
  - Control Win V3 runtime up on port 11740
  - Test project MCPTest with the user's manual cleanup applied (one
    dup library + one rename-without-callers reference fixed by hand
    after the morning sweep)

Five upstream bugs remain, each tracked as a separate item with the
proposed cross-reference path to the official scripting docs at
content.helpme-codesys.com:

  - create_folder kwarg mismatch
  - compile_project / get_compile_messages JSON long serialisation
  - list_project_libraries returns empty after successful add_library
  - add_library duplicates instead of dedupe / placeholder
  - rename_object partial refactor (own decl yes, callers no)

Diff vs morning baseline: 17 -> 22 PASS, 8 -> 5 FAIL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 18:52:07 +02:00
Karstein Phobic Nyvold Kvistad
a9347f7677 docs: add smoke-test report — 28 tool invocations, 17 pass
Verifies the watcher fix end-to-end: every passing tool used to
return the same execute_on_primary_thread marshal error and now
runs cleanly. Documents 5 unrelated pre-existing upstream bugs
exposed by the test (create_folder keyword mismatch, JSON long
serialisation in compile_project / get_compile_messages, online
API drift in connect/download/write_variable, orphaned CODESYS
on shutdown_codesys, library list/add inconsistency).

Test ran on SP21 Patch 5 due to MCP child orphaning during
re-registration churn; same architecture means SP22 is expected
to behave identically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 14:41:13 +02:00
Karstein Phobic Nyvold Kvistad
eae7d07cdf docs: add Sources section to SP21+ migration doc
Cite the CODESYS Forge thread, the official scripting docs index,
the Schneider Electric mirror with the historical signature, the
SP21 Patch 5 release notes, and the local ScriptSystem.pyi stub
that is the primary evidence for the API removal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 14:16:00 +02:00
Karstein Phobic Nyvold Kvistad
cbd1cd0a6b docs: SP21+/SP22 migration notes
Investigation of the system.execute_on_primary_thread removal:
- Confirmed gone in SP21 Patch 5 (no entry in ScriptSystem.pyi stubs).
- Single call site is watcher.py:195, structural to the bg-thread design.
- Proposes single-threaded primary-thread loop with system.delay() for
  message-pump time. No Node/TypeScript changes needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 14:07:06 +02:00