Commit graph

6 commits

Author SHA1 Message Date
Trentin Davide
85d0b579aa fix(validator,field-test): unblock Fanuc/Mitsubishi upload (ISS-018, ISS-019)
ISS-018: FanucProgram.Standardize() prepends a leading '\n' to the
program body, so the O#### header is not on lines[0]. The validator
first-line check read lines[0] and always failed "First line must be
O####", rejecting every valid Fanuc/Mitsubishi upload. Scan the first
non-blank line instead. Upload (FOCAS tape) format unchanged.

ISS-019: field-test .bat files passed -pathprogramma unquoted; on
install paths with spaces ("visual studio prove") cmd split the arg and
ArgParser captured only the first token -> truncated path. Quote the
arg in all 7 scripts.

Add regression test Validate_LeadingBlankLineBeforeONumber for both
Fanuc and Mitsubishi.

Surfaced by field testing against a local docker FTP server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 09:42:46 +02:00
dtrentin
68c5a555f3 chore(paul): close v0.6 Fagor Support milestone, log ISS-012..017
PAUL bookkeeping per chiusura milestone v0.6 (Phase 16: 16-01 + 16-02):
- STATE.md — sezione v0.6 + Phase 16-01 + 16-02 fixup post-review.
- ROADMAP.md — Milestone v0.6 + Phase 16 (2 plans).
- paul.json — version 0.6.0, milestone Fagor Support, phase 16
  fagor-ftp.
- phases/16-fagor-ftp/ — 16-01-PLAN.md + 16-01-SUMMARY.md (impl
  iniziale), 16-02-PLAN.md + 16-02-SUMMARY.md (fix post-review).
- ISSUES.md — ISS-012..ISS-017 derivati da code review v0.6:
  - ISS-012: Fagor ReadActiveProgramAsync/SelectMainProgram non impl
  - ISS-013: Program.Invia accoppia FanucProgram a tutti i produttori
  - ISS-014: ResolvePath null-folder NRE pattern (Siemens/Mitsubishi/Fagor)
  - ISS-015: encoding source-file rischio codepage Windows non-UTF8
  - ISS-016: WriteProgramAsync validator riceve path se Name null
  - ISS-017: FagorFtpClient.Ping swallow senza log

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 20:27:44 +02:00
dtrentin
60ce1c9d57 feat(15-logging): NLog structured logging — all output through NLog (v0.5 complete)
Phase 15 complete (2 plans):
- 15-01: NLog 5.2.8 + nlog.config (rolling file daily/7d + console); logger fields in
  FanucMachine, HeidenhainMachine, SiemensMachine, MitsubishiMachine, Lsv2Client, Program.cs;
  SetState event handler catches → _log.Warn; cleanup catches annotated; ISS-003/ISS-004 closed
- 15-02: All Console.Write/WriteLine in Program.cs replaced with _log.Info (103 calls);
  nlog.config console target layout=${message}, levels=Info only — Warn/Error file-only;
  operator console output identical; every interaction now timestamped in log file

Milestone v0.5 Operational Quality complete.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 23:57:27 +02:00
dtrentin
45ca8f5a47 chore(paul): close ISS-007, update git hash and issues log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 23:25:21 +02:00
dtrentin
32f68c5ed5 feat(14-test-hardening): env-var hardware test scaffolding + LicenseFile edge cases
Phase 14 complete — v0.4 Robustness milestone closed:
- HardwareTestHelper.GetIpOrSkip: Assert.Ignore when HEIDENHAIN/SIEMENS/MITSUBISHI_IP not set (ISS-007)
- Hardware_ConnectAsync_RealMachine [Category("Hardware")] added to all 3 integration test files
- LicenseFileTests: 4 tests covering empty, whitespace, valid base64, nonexistent path
- Validate_EmptyFingerprint_ReturnsFalse: confirms validator safe against empty input (ISS-008 scaffold)
- NcProgramManager.Tests.csproj: <Compile> entries for 2 new files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 23:24:58 +02:00
dtrentin
d4bb3419e8 docs(issues): create ISSUES.md from deferred items and codebase concerns
11 tracked issues from STATE.md deferred items + CONCERNS.md analysis:
- ISS-001: MachineFingerprint null dereference (High, Quick)
- ISS-002: Blocking async .GetAwaiter().GetResult() (Medium, Medium)
- ISS-003: Silent catch {} blocks (High, Quick-Medium)
- ISS-004: No structured logging framework (Medium, Substantial)
- ISS-005: SHA256 not disposed (Low, Quick)
- ISS-006: LSV2 connect timeout doesn't abort (Medium, Quick)
- ISS-007: Integration tests hardcoded IPs (Medium, Quick-Medium)
- ISS-008: MachineFingerprint untested on real hardware (High, Medium)
- ISS-009: Heidenhain ReadActiveProgram not implemented (Low, Substantial)
- ISS-010: Siemens ReadActiveProgram not implemented (Low, Substantial)
- ISS-011: Obsolete crypto APIs (Low, Quick when upgrading)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 22:52:35 +02:00