Commit Graph

266 Commits

Author SHA1 Message Date
Simone 2ac26dbd00 ci(lint): enhance PSScriptAnalyzer settings and suppress false positives; improve error handling in scripts 2026-05-14 18:34:03 +02:00
Simone 032d6f200e ci(lint): add rule to suppress false positives for param() in remote script blocks 2026-05-14 18:34:03 +02:00
Simone 7e6b65db18 ci(lint): update PSScriptAnalyzer settings and suppress warnings for plain-text passwords in templates 2026-05-14 18:34:03 +02:00
Simone 366ff0ce46 ci(lint): update PSScriptAnalyzer settings to include additional formatting rules 2026-05-14 18:34:02 +02:00
Simone e09c0cf5a5 ci(lint): update PSScriptAnalyzer invocation to use custom settings file 2026-05-14 18:34:02 +02:00
Simone 81c85beb81 ci: remove Python setup step from lint workflow 2026-05-14 18:34:02 +02:00
Simone 8a2727ccf7 ci(lint): use actions/setup-python to provision Python on runner
The act_runner service account doesn't have python in PATH. Delegating
to actions/setup-python@v5 which downloads/caches Python 3.11 reliably.

Also bump timeout-minutes 15 -> 20 to absorb first-run pip install.
2026-05-14 18:34:02 +02:00
Simone 305ee6fa8b ci: move lint.yml to .gitea/workflows so Gitea Actions discovers it
Gitea Actions only scans .gitea/workflows/ and .github/workflows/. The
file under gitea/workflows/ (no leading dot) was never picked up. Other
files in gitea/workflows/ remain as templates copied into consumer repos.
2026-05-14 18:34:02 +02:00
Simone 44a99af14f feat: add closeout checklist for Phase A1 implementation 2026-05-14 18:34:02 +02:00
Simone bd31a3f2f3 Phase A1: bootstrap Python ci_orchestrator package
- pyproject.toml (hatchling) with ruff/mypy/pytest dev deps
- src/ci_orchestrator/: config, credentials, backends (Protocol + WorkstationVmrunBackend), transport (WinRM via pypsrp, SSH via paramiko)
- CLI entry point with PoC 'wait-ready' subcommand (Windows + Linux guests)
- tests/python/: 35 unit tests, 83% coverage, all backends/transport mocked
- gitea/workflows/lint.yml: new 'python' job (ruff + mypy --strict + pytest --cov-fail-under=70)
- config.example.toml + README setup section + .gitignore Python entries

Neutral VmBackend Protocol prepared for Phase C ESXi extension.
See plans/implementation-plan-A-B.md step A1.
2026-05-14 18:34:02 +02:00
Simone 4d957d34b2 fix: correct table formatting in ideas-overview.md for better readability 2026-05-13 11:12:28 +02:00
Simone 4ac6dd85f9 refactor: restructure implementation plan for clarity and readability 2026-05-13 11:08:01 +02:00
Simone 770ac1edf8 Add unified implementation plan for Phase A and Phase B in Markdown format
- Create a new document `plans/implementation-plan-A-B.md` that consolidates the implementation plans for the Python rewrite (Phase A) and the migration to Linux Mint (Phase B).
- The document includes detailed sections such as executive summary, checklist, prerequisites, step-by-step activities, architectural hooks for future phases, risk matrix, and references.
- Ensure the plan is self-contained, adhering to specified structure and style guidelines, and does not introduce new technologies or modify existing files.
2026-05-13 10:49:10 +02:00
Simone 081f7e1d16 archive: move completed plans and sprint test plan to dated folders
- plans/archived/2026-05-13/: final-master-plan (done), 4 AI analysis/review
  docs (gpt55-analysis, gpt55-review-of-opus, opus47-analysis,
  opus47-review-of-gpt55)
- docs/archived/2026-05-13/: TEST-PLAN-v1.3-to-HEAD (sprint complete)
2026-05-13 10:47:06 +02:00
Simone 1dbeec0f8e feat: update installer SHA256 hashes for Python, DotNetInstallScript, SevenZip, and NodeJS 2026-05-13 10:41:42 +02:00
Simone 6cd6bff882 nice-to-have: implement all 6 tier items
- Get-CIJobSummary.ps1: already present with full implementation (marked done)
- Get-BuildArtifacts.ps1: add -JobId/-Commit params; Write-ArtifactManifest writes
  manifest.json (name, size, sha256, commit, jobId) after both Linux and Windows
  artifact collection branches
- Invoke-CIJob.ps1: add -GuestCPU/-GuestMemoryMB params; insert post-clone VMX
  override block (numvcpus/memsize rewrite) before vmrun start; pass -JobId/-Commit
  to Get-BuildArtifacts calls
- Watch-RunnerHealth.ps1: add -GiteaUrl/-GiteaCredentialTarget params; optional
  GET /api/v1/admin/runners check in Running branch warns if 0 online runners
- Install-CIToolchain-WinBuild2025.ps1: fill SHA256 hashes for Python 3.13.3,
  7-Zip 26.01, Node.js 22.14.0, dotnet-install.ps1
- Measure-CIBenchmark.ps1: add deltaKB field (linked-clone disk footprint in KB)
  measured post-clone; added to result object and summary Format-Table
2026-05-13 10:38:49 +02:00
Simone 8ca3e530c5 feat(low): sprint 4 Low items tutti 5 completati
codice:
- template/Validate-SetupState.ps1: docblock HTTP/Basic -> HTTPS/Basic, port 5986
- scripts/Validate-HostState.ps1 (nuovo): check ACL SSH key ci_linux, Credential Manager
  target BuildVMGuest, struttura dir F:\CI\, vmrun.exe raggiungibile

docs:
- docs/TEST-PLAN-v1.3-to-HEAD.md sezione 3.6: campi JSONL corretti (cloneSec/startSec/
  ipSec/winrmSec/destroySec/totalBootSec) per riflettere output reale di Measure-CIBenchmark.ps1
- docs/CI-FLOW.md tabella failure: 'partial artifacts' -> Get-GuestDiagnostics a diagnostics/
- docs/CHANGELOG.md (nuovo): log reverse-cronologico di tutti gli sprint completati
- plans/final-master-plan.md: tutti i Low marcati done
2026-05-13 10:26:08 +02:00
Simone e9d0f38f9f feat(medium): sprint 3 Medium items 6 implementati, 6 confermati gia' presenti
codice:
- Watch-DiskSpace.ps1: Event Log source CI-DiskAlert -> CI-DiskSpaceAlert
  (allineato con task scheduler CI-DiskSpaceAlert)
- Watch-RunnerHealth.ps1: maintenance flag  salta restart se
  F:\CI\State\runner-maintenance.flag esiste
- Invoke-CIJob.ps1:
  - param WebhookUrl (default '') per alert webhook
  - sanity check TemplatePath: Write-Warning se non sotto F:\CI\Templates\
  - 90-min duration warning: Start-Job che posta [WARNING] dopo 5400s
  - finally: Remove-Job per cancellare il warn se build finisce prima

docs:
- BEST-PRACTICES.md sezione 11: VMware HGFS write semantics e cache-poisoning risk
- final-master-plan.md: marcati done  post-failure diagnostics, UseSharedCache,
  VMDK SHA256, SSH host-key, template-refresh runbook, 90-min warn, HGFS,
  Event Log names, TemplatePath sanity, maintenance flag, Setup-Host pass docs,
  emoji-free webhooks
2026-05-13 10:19:55 +02:00
Simone 91f2305bb0 docs(plan): sprint 3 verification pass tutti gli High restanti gia' implementati
- H9 (ci-report-ip.service check): gia' in Validate-DeployState.ps1 branch Linux
- H10 (smoke test workflow): gia' in gitea/workflows/self-test.yml + scripts/Test-Smoke.ps1
- H12 (Get-GuestIPAddress): gia' estratto in _Common.psm1 e usato da Measure-CIBenchmark
- Medium: disk gate (L339), JobId ValidatePattern (L77), ExtraGuestEnv key validation
  (L184), phase-duration summary (L541), TEST-PLAN PS7 syntax gia' corretta
- Low: Install-Runner.ps1 gia' assente dal repo
- Aggiornato header Last updated + Status
2026-05-13 10:10:55 +02:00
Simone 344cdf7993 refactor(plans): update Linux host adaptation details for VMware Workstation Pro and KVM options 2026-05-13 10:04:09 +02:00
Simone c7cc2c7c38 feat(plans): add proposals for Python rewrite, Linux host adaptation, and ESXi support 2026-05-13 09:52:44 +02:00
Simone 3592dcab78 Refactor documentation and analysis in final master plan, opus47 analysis, and opus47 review of GPT-5.5
- Updated the final master plan to improve clarity and consistency in the status of various capabilities, including fixes and enhancements made as of 2026-05-12.
- Revised the opus47 analysis to provide a more structured overview of the system's production readiness, including detailed coverage of OWASP Top 10 risks and operational gaps.
- Enhanced the opus47 review of GPT-5.5 by clarifying severity ratings and rationales for various items, while adding new high-severity items that were previously overlooked.
2026-05-13 00:08:19 +02:00
Simone 5d1b47e943 feat(workflow): rinomina build-nsis.yml -> build-nsInnoUnp.yml, aggiunge job release
- Rinominato gitea/workflows/build-nsis.yml in build-nsInnoUnp.yml
- Aggiunto job release: scarica artifact Windows+Linux, crea release Gitea
  via API REST, comprime e uploada gli asset come zip (richiede secret GITEA_TOKEN)
- Aggiornati tutti i riferimenti in README.md, TODO.md, plans/*.md
2026-05-12 23:37:00 +02:00
Simone 075d1c5dcf docs(readme): sync con stato attuale (Linux support, burn-in, transport, action.yml)
- Stato: aggiornato (Windows+Linux e2e PASS, burn-in 4 job concorrenti PASS)
- Panoramica: diagram aggiornato con Linux/SSH path e dual runner label
- Template VM: aggiunta sezione LinuxBuild2404 (BaseClean-Linux, SSH, ci_build)
- Struttura: aggiunti _Transport.psm1, Test-CapacityBurnIn, Start-BurnInTest-Linux,
  Get-CIJobSummary, template Linux (Deploy/Prepare/Install-CIToolchain), actions/
- Setup rapido: separato in 1a Windows / 1b Linux con Prepare-LinuxBuild2404 -TakeSnapshot
- act_runner: tabella env vars completa (LINUX_TEMPLATE_PATH, SSH_KEY_PATH, ...)
  + labels windows-build:host e linux-build:host
- Uso build manuale: aggiunto esempio Linux guest + note -UseGitClone/-SkipArtifact
- Workflow: composite action documentata con tabella input; matrix Windows+Linux
- Docs: LINUX-TEMPLATE-SETUP.md non piu' 'non implementato'
2026-05-12 23:23:50 +02:00
Simone fe4439b95f fix(ssh): switch CI SSH to permissive mode (no known_hosts)
Root cause: ssh-keygen -R prints 'Host X not found in F:\CI\State\known_hosts'
to stderr when the IP has no prior entry. In PS5.1 with ErrorActionPreference=Stop,
native stderr is converted to ErrorRecords before 2>$null can discard them,
making the command a terminating error caught by the job's catch block.

This caused all 4 concurrent burn-in jobs to fail after ~15s with:
  Error: Host 192.168.79.XXX not found in F:\CI\State\known_hosts

Additionally, 4 concurrent SSH connections writing to the same known_hosts file
with no advisory locking risk file corruption under concurrent load.

Fix: set SshKnownHostsFile default to '' in Invoke-CIJob, Invoke-RemoteBuild,
and Get-BuildArtifacts. When KnownHostsFile='' _Transport.psm1 uses
StrictHostKeyChecking=no + UserKnownHostsFile=NUL (permissive mode), consistent
with Wait-VMReady and Prepare-LinuxBuild2404.ps1. Ephemeral CI VMs on a
local NAT network have no meaningful MITM risk.

Remove the ssh-keygen purge block from Invoke-CIJob.ps1 (no longer needed).

AGENTS.md: document PS5.1 native stderr / 2>$null interaction (error #12).
2026-05-12 22:51:20 +02:00
Simone 985e546f2d fix(template): clear machine-id in Prepare-LinuxBuild2404 (Step 7b)
Each Ubuntu clone derived from the same snapshot shared an identical
machine-id, causing systemd-networkd to use the same DHCP client-id
and receive the same NAT IP  triggering IP collision failures.

Step 7b truncates /etc/machine-id and removes /var/lib/dbus/machine-id
before the snapshot is taken. On first boot each clone generates a
fresh machine-id from /dev/urandom -> unique DHCP client-id -> unique IP.
2026-05-12 22:33:55 +02:00
Simone 435ccba06f docs(AGENTS): add machine-id Linux DHCP collision as known error #11 2026-05-12 22:30:18 +02:00
Simone 74331ac301 fix(diagnostics): use StrictHostKeyChecking=no for Linux guest-diag SSH
Diagnostics is best-effort. Using accept-new without UserKnownHostsFile
caused the system known_hosts (~/.ssh/known_hosts) to be consulted,
which holds a stale key from a previous clone of the same IP.
Switch to no+NUL (same as Wait-VMReady) to avoid false host-key errors.
2026-05-12 22:29:57 +02:00
Simone 31a040682e fix(linux): purge stale known_hosts entry before first SSH on each clone
Each Linux BuildVM clone gets a new SSH host key for the same
NAT IP, causing 'host key has changed' errors with accept-new mode.

After IP detection, ssh-keygen -R removes the old entry from the
CI-local known_hosts file (F:\CI\State\known_hosts by default)
before Phase 4/5 make any SSH connection. The file is created if
it does not exist yet. Windows jobs are unaffected.
2026-05-12 22:23:33 +02:00
Simone d275f149a6 docs(burnin-dummy): update README for Linux build support 2026-05-12 22:16:31 +02:00
Simone f765f3e74b feat(burnin): add build.sh for Linux guest + Start-BurnInTest-Linux.ps1
gitea/burnin-dummy/build.sh: bash equivalent of build.ps1 (sleep 30,
writes dist/build-info.txt). Needed because powershell is not present
on LinuxBuild2404 template.

scripts/Start-BurnInTest-Linux.ps1: burn-in wrapper for LinuxBuild2404
template (SnapshotName=BaseClean-Linux, GuestOS=Linux,
BuildCommand='bash build.sh'). Mirrors Start-BurnInTest.ps1.
2026-05-12 22:14:52 +02:00
Simone 9007934dca feat: expose skip-artifact as workflow input in action.yml
action.yml:
  - Add skip-artifact input (default: 'false').
  - Forward as INPUT_SKIP_ARTIFACT env var to the PS run step.
  - Pass SkipArtifact=true to Invoke-CIJob.ps1 when set.
  - Gate 'Upload artifacts' step on inputs.skip-artifact != 'true'.

Invoke-CIJob.ps1:
  - Restore -SkipArtifact switch; skips Phase 6 and logs 'skipped' event.

Invoke-RemoteBuild.ps1:
  - Restore -SkipArtifact switch; skips packaging inside the guest.
  - Error message updated to mention skip-artifact workflow input.
2026-05-12 22:05:17 +02:00
Simone a6acf1eef7 refactor(burn-in): remove -SkipArtifact; build.ps1 always produces dist/ 2026-05-12 22:00:43 +02:00
Simone 36cdd1fc25 docs(burn-in): add README for burnin-dummy repo 2026-05-12 21:57:18 +02:00
Simone 9601210baa feat(burn-in): add fake build script for burnin-dummy repo; update default BuildCommand
gitea/burnin-dummy/build.ps1:
  Fake build script to commit to the burnin-dummy repo.
  Creates dist\build-info.txt (date, host, pid) after ~30s ping delay.
  Invoke-RemoteBuild packages dist\ as artifacts.zip.

Start-BurnInTest.ps1:
  Default BuildCommand updated from ping-only delay to build.ps1 invocation.
  Run with -NoSkipArtifact to exercise the full artifact pipeline.
2026-05-12 21:55:38 +02:00
Simone 0a9b3f4348 fix(invoke-cijob): wrap Write-Host format string in parens to avoid -f being parsed as -ForegroundColor 2026-05-12 21:37:03 +02:00
Simone 041f350aa8 fix(burn-in): use hashtable splat for conditional -SkipArtifact in Start-BurnInTest
In PS 5.1, $(if (...) { '-SkipArtifact' }) inside a call produces the
literal string '-SkipArtifact' bound as a positional argument (-> IPList),
not interpreted as a switch name.
Fixed by building a hashtable and setting SkipArtifact = \True when needed.
2026-05-12 21:30:16 +02:00
Simone 80eeb389af fix(burn-in): add -SkipArtifact switch; restore production fail-on-missing-dist
PROBLEM: Invoke-RemoteBuild.ps1 was creating a placeholder artifact when the build
produced no dist/ directory. In production this hides build defects (build exits 0
but produces nothing = silent failure treated as success).

SOLUTION: Add explicit -SkipArtifact switch to the call chain:

Invoke-RemoteBuild.ps1:
  - Add -SkipArtifact switch. When set: skips packaging entirely (no zip created).
  - When absent (production default): missing GuestArtifactSource is a hard error
    with a clear message pointing to -SkipArtifact as the opt-in for no-output builds.

Invoke-CIJob.ps1:
  - Add -SkipArtifact switch. Passes it to Invoke-RemoteBuild.ps1.
  - Phase 6 (Get-BuildArtifacts) is entirely skipped when set; logs 'skipped' event.

Test-CapacityBurnIn.ps1:
  - Add -SkipArtifact switch. Adds '-SkipArtifact' flag to each child job argList.

Start-BurnInTest.ps1:
  - Always passes -SkipArtifact by default (burn-in uses delay commands, no output).
  - Add -NoSkipArtifact override switch for runs that do produce real artifacts.
  - Remove -NoSkipArtifact escape from wrapper: default burn-in never needs artifacts.
2026-05-12 21:28:11 +02:00
Simone e0b45fc71d fix(burn-in): create placeholder artifact when build command produces no output dir
Invoke-RemoteBuild.ps1: when BuildCommand succeeds (exit 0) but GuestArtifactSource
(default: dist) does not exist, instead of silently skipping packaging, now creates a
placeholder 'build-ok.txt' in the artifact output dir and zips it. This ensures
Get-BuildArtifacts.ps1 always finds artifacts.zip regardless of whether the build
produced real output files. Correct for burn-in, smoke, and delay-only build commands.

Start-BurnInTest.ps1: revert default BuildCommand to 'ping 127.0.0.1 -n 31 > nul'
(~30s delay, no artifact output) now that the pipeline handles missing dist gracefully.
The previous 'if not exist dist mkdir dist' workaround is no longer needed.
2026-05-12 21:23:40 +02:00
Simone 8595fbaf45 fix(burn-in): default BuildCommand creates artifact dir to exercise full pipeline
'exit 0' left C:\CI\build\dist non-existent -> packaging skipped -> Get-BuildArtifacts
could not find artifacts.zip -> all 4 jobs FAIL at artifact collection phase.

New default: 'if not exist dist mkdir dist & echo burnin_ok > dist\marker.txt'
This creates dist\marker.txt relative to C:\CI\build (GuestWorkDir), so the
packaging step finds it, creates artifacts.zip, and Get-BuildArtifacts succeeds.

Also updated docblock: clarify command runs via cmd /c; replace Start-Sleep example
(PS cmdlet, does not work via WinRM cmd) with ping delay equivalent.
2026-05-12 21:21:56 +02:00
Simone 8134a3e8d3 docs(plans): update master plan (sprints 2-5 complete, burn-in harness ready)
All Sprint 2 (C1, C2, H2, H3, H6, H7), Sprint 3 (H4, H5, H8, H9, H10, H11, H12),
Sprint 4 (T4.1-T4.6), Sprint 5 (T5.1-T5.6) tasks marked done.
Burn-in harness code-complete; live 4-way run pending.
Remaining open: smoke test live workflow validation (Task 1.4), benchmark alignment
verification, act_runner SSH alias live test.
2026-05-12 21:13:46 +02:00
Simone bb2572f451 feat(burn-in): capacity burn-in harness (Test-CapacityBurnIn.ps1)
scripts/Test-CapacityBurnIn.ps1 (new): N-way parallel burn-in harness using Start-Job
to launch N concurrent Invoke-CIJob.ps1 child processes for R rounds. After each round
asserts: all VMs destroyed, all jobs got distinct IPs, vm-start.lock gone, ip-leases
empty, wall time recorded. Params: -RepoUrl (mandatory), -IPList = @() (optional,
auto-detects via VMware Tools when empty), -GiteaCredentialTarget = 'GiteaPAT',
-Parallelism = 4, -Rounds = 3, -RoundTimeoutMinutes = 60, plus all Invoke-CIJob params.

scripts/Start-BurnInTest.ps1 (new): lab wrapper with all default params hardcoded
(template F:\CI\Templates\WinBuild2025, credentials BuildVMGuest/GiteaPAT, etc.)
for daily use. Exposes -Rounds, -Parallelism, -BuildCommand, -RoundTimeoutMinutes.
2026-05-12 21:13:31 +02:00
Simone c04a2f25aa feat(sprint5): quality pass, smoke test workflow, Get-CIJobSummary
Task 5.1: Delete runner/Install-Runner.ps1 (superseded by Setup-Host.ps1).
Task 5.2: Replace Unicode/Discord emoji in Watch-DiskSpace.ps1, Watch-RunnerHealth.ps1,
          Test-E2E-Section3.3.ps1 with plain-text prefixes ([WARNING], [ALERT], [WARN]).
Task 5.3: docs/TEST-PLAN-v1.3-to-HEAD.md: ForEach-Object -Parallel replaced with Start-Job;
          -RepositoryUrl replaced with -RepoUrl (3 occurrences); PS7 syntax removed.
Task 5.4: scripts/Get-CIJobSummary.ps1 (new): scans JSONL logs in F:\CI\Logs, prints summary
          table per job, -JobId detail view, -Failed filter, -Last N.
Task 3.5: gitea/workflows/self-test.yml (new): workflow_dispatch, smoke-windows + smoke-linux.
          scripts/Test-Smoke.ps1 (new): invokes Invoke-CIJob.ps1 with marker-file build,
          asserts artifact dir and JSONL success event.
Task 5.6: docs/BEST-PRACTICES.md Section 10 added: SHA256 pinning policy, priority table,
          PS 5.1 implementation pattern, update guidance.
2026-05-12 21:13:15 +02:00
Simone 9de86ac289 feat(sprint4): operational hardening, diagnostics, VMDK SHA256, runbook
Task 4.1: Invoke-CIJob.ps1 pre-clone disk gate (needs 10 GB free), JobId/ExtraGuestEnv
          pattern validation, redacted command logger (already included via _Common.psm1).
Task 4.2: Get-GuestDiagnostics helper invoked from catch block (best-effort, no throw).
Task 4.3: UseSharedCache wired through composite action and orchestrator.
Task 4.4: SSH known_hosts in F:\CI\State\known_hosts for CI jobs; accept-new for templates.
Task 4.5: Deploy-LinuxBuild2404.ps1 verifies Ubuntu VMDK SHA256 before import.
Task 4.6: RUNBOOK.md consolidated template-refresh section: stop runner, backup, boot,
          KMS reactivation, Prepare-*, shutdown, snapshot, Validate-DeployState, smoke,
          update config, retain prior snapshot 7 days, rollback procedure.
Validate-SetupState.ps1: minor lint fixes and docblock updates.
Wait-VMReady.ps1: Get-BuildArtifacts.ps1: hardening alignment with Sprint 4 objectives.
2026-05-12 21:12:51 +02:00
Simone 509d1fc284 feat(sprint3): Invoke-VmrunBounded, Get-GuestIPAddress, transport and concurrency hardening
H4: Invoke-VmrunBounded added to _Common.psm1 (Start-Process + Wait-Process + taskkill on
    timeout, returns {ExitCode;Output;TimedOut;ElapsedSeconds}). Wired in Invoke-CIJob.ps1
    for vmrun start (180s) and Remove-BuildVM.ps1 for stop/deleteVM (60s/90s).
H5: Cleanup-OrphanedBuildVMs.ps1 removes stale vm-start.lock (>30 min). ValidateRange
    lowered to 0 to allow emergency -MaxAgeHours 0. Invoke-RetentionPolicy.ps1 same.
H8: _Transport.psm1 SSH hardening: StrictHostKeyChecking=accept-new, F:\CI\State\known_hosts.
H9: Validate-DeployState.ps1 Linux branch added: checks ci-report-ip.service enabled,
    ci-report-ip.sh executable via SSH. New params: -GuestOS, -SshKeyPath, -SshUser.
H12: Get-GuestIPAddress extracted into _Common.psm1 (guestinfo.ci-ip primary, getGuestIPAddress
     fallback). Invoke-CIJob.ps1 Phase 3b replaced with single call. Measure-CIBenchmark.ps1
     updated to match.
Also: _Common.psm1 adds Write-CIRedactedCommand and ConvertTo-SafeShellSingleQuotedString.
     Pester suite updated: 30/30 pass.
2026-05-12 21:12:33 +02:00
Simone 7dff7d3dba feat(sprint2): fix critical and high-priority bugs
C1: composite action selects Linux/Windows template from GITEA_CI_LINUX_TEMPLATE_PATH
    based on resolved guest OS; build-nsis.yml adds belt-and-suspenders guest-os param.
C2: redact ExtraGuestEnv secrets in Invoke-RemoteBuild.ps1 (envPrefix never logged).
H2: composite action outputs block corrected; duplicate artifact-name input removed.
H3: Linux Mode 2 PAT now uses http.extraHeader (mirrors Windows branch, drops GIT_CLONE_URL).
H6: Setup-Host.ps1 directory array updated to canonical layout (adds State, ip-leases, keys,
    Cache\pip, WinBuild2025/2022/LinuxBuild2404; removes obsolete WinBuild).
H7: Backup-CITemplate.ps1 default TemplatePath -> WinBuild2025; -AllTemplates switch added.
H8: Setup-Host.ps1 adds StrictHostKeyChecking=accept-new and Step 8 to replicate SSH config
    to LocalSystem profile for act_runner service account.
H11: runner/config.yaml adds GITEA_CI_SCRIPT_ROOT env var; action.yml uses it in place of
     hardcoded N:\ path.
Also: Invoke-RemoteBuild.ps1 skips 7-Zip/Compress-Archive when artifact source dir does not
     exist (fixes burn-in smoke runs with exit-0 build command and no output).
2026-05-12 21:12:07 +02:00
Simone d33aaada1e feat(agent): add CI PS51 Author agent for PowerShell 5.1 scripting 2026-05-11 23:47:58 +02:00
Simone ec13461862 docs(plans): add multi-agent technical review and final master plan
- plans/gpt55-analysis.md: independent analysis by GPT-5.5
- plans/opus47-analysis.md: independent analysis by Opus 4.7
- plans/gpt55-review-of-opus.md: GPT-5.5 cross-review of Opus analysis
- plans/opus47-review-of-gpt55.md: Opus 4.7 cross-review of GPT-5.5 analysis
- plans/final-master-plan.md: consolidated master plan (8129 words)

Severity: 2 Critical, 12 High, 16 Medium, 10 Low, 6 Nice-to-have.
Top priorities: C2 secret logging in Invoke-RemoteBuild.ps1, C1 Linux
matrix template selection, H1 capacity=4 burn-in.
2026-05-11 23:47:06 +02:00
Simone 4758fbc519 refactor(§7.5): rinomina Setup-* Install-CIToolchain-* (WinBuild2025/2022/Linux2404)
- template/Setup-WinBuild2025.ps1  Install-CIToolchain-WinBuild2025.ps1
- template/Setup-WinBuild2022.ps1  Install-CIToolchain-WinBuild2022.ps1
- template/Setup-LinuxBuild2404.sh  Install-CIToolchain-Linux2404.sh

Aggiornati tutti i riferimenti in: Prepare-WinBuild2025/2022, Prepare-LinuxBuild2404,
Deploy-WinBuild2025/2022/LinuxBuild2404, Validate-DeployState, Validate-SetupState,
README.md, TODO.md, docs/WINDOWS-TEMPLATE-SETUP.md, docs/LINUX-TEMPLATE-SETUP.md,
docs/TEST-PLAN-v1.3-to-HEAD.md, gitea/actions/local-ci-build/action.yml.

§7 chiuso (5/5 done).
2026-05-11 22:48:33 +02:00
Simone 6511d47a9a P3 done: workflow-example.yml usa composite action (generalizzazione per altri repo)
Riscritta gitea/workflow-example.yml per usare la composite action
Simone/local-ci-system/.gitea/actions/local-ci-build@main invece della
chiamata diretta a Invoke-CIJob.ps1.

Commenti inline guidano la personalizzazione per ogni repo:
- build-command e artifact-source (unici campi obbligatori da adattare)
- submodules, repo-url, use-git-clone (opzionali)
- extra-guest-env-json per secret injection (chiavi di firma, GPG)
- artifact-name personalizzato (e.g. con ref_name per tag build)

Aggiunge workflow_dispatch per trigger manuale.
Rimossa logica di orchestrazione inline: zero duplicazione tra repo.
TODO.md: Gitea Workflow Integration chiuso (5/5).
2026-05-11 22:38:54 +02:00