Commit graph

2 commits

Author SHA1 Message Date
e608977359 docs: add code review bug analysis report
Static analysis findings for nc_program_manager: 8 security criticals
(FTP plaintext, LSV2 cleartext, path traversal, license bypass),
4 functional bugs, 3 NRE risks, 3 resource leaks. See BUG_ANALYSIS.md
for prioritized fix list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 21:53:03 +02:00
dtrentin
b3d7402498 feat(16-fagor): Fagor CNC FTP support + validator gating
Phase 16 (v0.6 milestone) — supporto Fagor CNC via FTP, riuso pattern
Siemens/Mitsubishi (FtpWebRequest + ASCII).

Modelli supportati: 8060/8065/8070 (FTP nativo), 8055 (con opzione
Ethernet). Modelli 8025-8050 esclusi (solo RS232).

Code:
- Cnc/Fagor/* — FagorConnectionConfig, IFagorFtpClient, FagorFtpClient,
  FagorMachine. ProgramExtension configurabile (default .nc),
  ProgramDirectory /Users/Prg/.
- Cnc/Models/CncManufacturer.cs — enum + Fagor.
- Cnc/CncMachineFactory.cs — case Fagor, porta default 21.
- Cnc/NcProgramValidator.cs — refactor IsRestrictiveDialect():
  block-80/no-tab/no-lowercase/nested-parens/comment-32 ora applicati
  solo a Fanuc+Mitsubishi (Heidenhain/Siemens/Fagor esenti). Fagor name
  rules: max 24 char, no ñ (escape ñ per safety codepage), stem
  alphanumerico + spazi (estensione separata).
- ArgParser.cs — case "fagor".
- Program.cs — help text manufacturer/username/password.

Tests:
- FagorMachineTests — 12 unit (10 mock + 2 validator reale).
- FagorMachineIntegrationTests — 5 stub-based (riusa FtpServerStub) + 1
  hardware skip via FAGOR_TEST_IP env var.
- NcProgramValidatorTests — 12 nuovi Fagor (8 + 4 extension coverage), 6
  lock Siemens/Heidenhain exemption, 3 esistenti Siemens→Fanuc.
- CncMachineFactoryTests — Create_Fagor_ReturnsFagorMachine.

Docs:
- README.md — sezione "Controller Fagor" italiano: modelli supportati/
  non supportati, regole nome, env var test.

Build:
- *.csproj — 4 Compile Include main + 2 test.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 20:27:18 +02:00