20 KiB
20 KiB
ASF (Azurian Software Factory) — History dei Cambiamenti
Formato: YYYY-MM-DD · Gruppo Release · Sezioni Added / Changed / Fixed / Tests / Docs / Infra
Ultimo aggiornamento:2026-09-08· Data oggi del sistema:2026-09-08
📦 Release 2026-09-08 (Sessione odierna — Principale)
Obiettivo: completare la copertura 100% CRUD UI + test 40/40 + Tutorial UI click-only + Context Explorer.
✅ Added — Frontend (5 nuove feature UI completate oggi)
| Ref | Funzionalità | File & Riferimento |
|---|---|---|
| A1 | Settings Page REALE (2 modali create org + create proj) | settings/page.tsx:1-533 |
| A1.1 | Modale New Organization — 7 campi: name, slug (regex [a-z0-9-]{3,60} hint live), plan (Free/Team/Business/Enterprise), toggle Active · POST /organizations |
settings/page.tsx:348-408 |
| A1.2 | Modale New Project — 6 campi: name, key (regex ^[A-Z][A-Z0-9]{1,19}$ hint live uppercase), default_branch, description, active · POST /projects |
settings/page.tsx:411-478 |
| A1.3 | 2 Tabelle Organizations & Projects (5 colonne ciascuna) + sidebar Profile sec="org" di default + componenti Field/Toggle helper | settings/page.tsx:200-293 · Field/Toggle 483-533 |
| A2 | Requirements — "New Requirement" PULSANTE FUNZIONANTE · Prima <Button> vuoto → oggi state + mutation + modale 7 campi |
requirements/page.tsx:116-176 · Modale 454-605 |
| A2.1 | Form: Title * · External ID · Status · Project * (auto-pick 1° progetto) · Source · Content 4 righe · Metadata JSON validato (useMemo parsedMeta — errore se non oggetto) | pattern identico A3 |
| A2.2 | useMutation createReqM · POST /artifacts type=requirement + invalidateQueries ["artifacts","list"] / ["projects","list"] + auto-select riga nuova |
requirements/page.tsx:152-176 |
| A3 | Context Explorer — New Artifact GENERICO 17 tipi! Pulsante picker SX + modale max-w-2xl 90vh |
context/page.tsx:121-174 · Modale 1011-1159 |
| A3.1 | Campi: Type select ARTIFACT_TYPES (17 enum) · Title * · External ID · Status · Project * (auto-fill da selected.project_id se si sta già guardando un artifact) · Source · Content 4 righe · Metadata JSON validato parsedNaMeta · Hint code-smells type=ai_analysis + kind=code_smell |
context/page.tsx:1038-1133 |
| A3.2 | useMutation createArtifactM → POST artifacts.create + invalidate ["context-artifacts","artifacts list"] · auto-select picker |
context/page.tsx:150-174 |
| A4 | Context Explorer — Add Relationship 12 tipi + picker searchable! Pulsante "Link" picker SX + modale | context/page.tsx:176-211 · Modale 1161-1291 |
| A4.1 | Form 2 colonne: Source Artifact * (auto-fill selected.id!) · Relationship Type select 12 RELATIONSHIP_TYPES enum · Target Artifact picker searchable radio list 12 candidati (esclude già il source) con badge type+external_id+title |
context/page.tsx:1188-1265 |
| A4.2 | useMutation addRelM → POST relationships.create · Validation source!==target · Invalidate 4 cache keys: context-rels / context-related-2hop / rels for / context-artifacts |
context/page.tsx:183-202 |
| A4.3 | useMemo targetCandidates filtro live search su picker rows |
context/page.tsx:204-211 |
| A5 | Context Graph 3-ring concentrico layout a 2-hop · ReactFlow layered 0=center sel, 1=hop1 solidi, 2=hop2 dashed · MiniMap color-coded + Rel Colors legenda 11 tipi · onNodeClick ricentra selezione | context/page.tsx:280-491 |
| A5.1 | Rel edges tier 1 SOLIDI strokeWidth 2.1 vs hop2 edges DASHED strokeDasharray 6 4 opacity 0.78 |
context/page.tsx:450-488 |
| A5.2 | Badge counter header: nodes / hop1 / hop2 / edges | context/page.tsx:730-736 |
✅ Added — Pulsanti di accesso rapido (Sidebar & page header)
| Ref | Modulo | Link |
|---|---|---|
| B1 | Sidebar NAV: Ask ASF (AI) badge Sparkles + Jobs (Activity) + Settings2 già esistenti | Sidebar.tsx:31-39 |
| B2 | Context Picker Header pulsanti affiancati + New Artifact / Link (sotto la searchbar) |
context/page.tsx:624-656 |
| B3 | Code Analysis DetailView: "Mark as fixed" PATCH /artifacts/{id} status=fixed · Badge green Resolved · useMutation markFixedM + invalidate ["code-source","code-smells"] |
code/page.tsx:195-212 · Button UI 539-575 |
✅ Added — Backend Tests (NUOVE oggi: pytest 40/40 GREEN)
| Ref | Service · File | Cosa coprono | N test |
|---|---|---|---|
| T1 | asf-domain 12/12 | Enum ArtifactType 17 + RelationshipType 12 · Pydantic models validazione extra=forbid · UUID format | 12 |
| T2 | asf-core 6/6 | Health endpoint · Domain services project/org/artifacts/rels CRUD | 6 |
| T3 | asf-worker 8/8 · conftest.py FakeJobsCollection filter $in QUEUED match atomico · test_worker_handlers.py | Echo handler / Noop handler / mark_job_done keys status+result absent when empty / _claim_running atomico $in QUEUED non sovrascrive COMPLETED + retries $inc / HANDLERS_BY_QUEUE 7 code registrate / AI handler fallback senza gateway |
8 |
| T3.1 | services/asf-worker/tests/conftest.py:1-98 NUOVO oggi FakeJobsCollection filter top-level status.$in match | Risolto FAIL claim overwrite completed→running | — |
| T4 | asf-ai 7/7 · test_providers_and_mock.py | MockProvider chat reply contains last user / analyze_code TODO detection / broad_exception medium / clean snippet 0 findings / generate_tests 2 skeleton / decompose max_subtasks=3 / ProviderRegistry.register/get/names MissingProvider KeyError | 7 |
| T5 | asf-context 4/4 · test_context_engine_and_rels.py FIXATO ContextEngine missing artifact_service param | FakeRelService CRUD 3 PASS · BFS 2-hop neighbors correctly isolated | 4 |
| T6 | services/asf-{worker,ai,context}/pytest.ini asyncio_mode=auto + tests/__init__.py | Risolti pytest-asyncio strict AssertionError hook_caller | — |
✅ Added — Script permanenti & Makefile
| Ref | Path · Descrizione |
|---|---|
| S1 | scripts/start-stack.sh · flag --with-worker --with-web --with-core · uvicorn bind 0.0.0.0:8000 · next bind 0.0.0.0:3000 · PID save var/run/asf-stack.pids · logs var/log/asf/{core,web}.log |
| S2 | scripts/stop-stack.sh · SIGTERM + 5s → SIGKILL · cleanup pids |
| S3 | scripts/status-stack.sh · PIDs/ports/health + tail -20 logs |
| S4 | scripts/seed-traceability.py · 6 artifacts baseline REQ/TASK/PR/TEST/BUILD/DEP (chmod +x) |
| S5 | scripts/seed-rels-only.py · 5 relazioni implements/generated_from/verifies/deployed_as |
| S6 | scripts/seed-code-artifacts.py · 3 source_file (SRC-CORE-MW / SRC-WEB-REQ / SRC-WORKER-CB python loc=X) · 3 code_smells type=ai_analysis + metadata.kind="code_smell" (CS-001 med E722 / CS-002 low eslint / CS-003 high ASF-SEC-203 pytype confidence 88%) |
| S7 | scripts/seed-extra-rels.py NUOVO · 4 artifacts extra DOC-PRD-2026 document · COMMIT-0abc123 commit · SEC-025 security_finding · INC-77 incident + 4 rel DOC→REQ documented_by · COMMIT→PR generated_from · SEC→PR related_to · INC→DEP caused_by → Graph oggi 21 nodes / 9 edges |
| S8 | scripts/seed-demo.sh WRAPPER IDEMPOTENTE · --clean DELETE /artifacts + /jobs prima di seeddare · --jobs 5 enqueue 5 echo jobs POST submit fallback non-batch · report finale counts artifacts/types/jobs/graph nodes+edges · 180 lines chmod +x |
| S9 | Makefile root 12 target · test (5 packages pytest) · tsc (frontend 0 errors oggi) · lint (test+tsc) · seed (seed-demo) · seed-clean (seed-demo --clean --jobs) · start/status/stop/restart (stack --with-worker) · install (pip 5 editable + npm i) · clean (cache pycache .next) · help |
✅ Fixed — 12 Bug risolti oggi (elenco completo)
| # | Root cause · Impatto · Risoluzione | Ref file |
|---|---|---|
| F1 | ArtifactRelationshipCreate "meta" extra_forbidden 422 · RelationshipCreate NON ha meta field → rimosso da seed rels → 9/9 rels OK |
seed-*.py scripts |
| F2 | ArtifactCreate NON ha description field (è in Artifact stored) · seed usavano content+metadata per dati descrittivi → OK |
seed scripts |
| F3 | Seed "code_commit" type sbagliato · ArtifactType enum usa commit | seed-extra-rels.py |
| F4 | Seed relazioni "source_project_id / target_project_id" extra forbidden 422 · calcolati server-side → rimossi dal body POST | seed-*.py |
| F5 | Rel type enum references / mitigated_by NON validi (12 validi: implements/implemented_by/verifies/verified_by/generated_from/documented_by/depends_on/affects/deployed_as/caused_by/supersedes/related_to) · references→documented_by per DOC→REQ; mitigated_by→related_to per SEC→PR | seed-extra-rels.py |
| F6 | asf-worker NameError "dataclass" not defined in FakeJobsCollection · import from dataclasses import dataclass era DOPO l'uso della inner UpdateResult → spostato in cima al file |
services/asf-worker/tests/conftest.py |
| F7 | asf-worker FAIL claim sovrascrive COMPLETED→RUNNING · FakeJobsCollection.update_one NON applicava Mongo-like filter status.$in QUEUED → aggiunto loop top-level filter status + tenant match |
services/asf-worker/tests/conftest.py |
| F8 | asf-context import relative fail "no known parent package" · Refactor test NO import relationship_service.py; implementa FakeRelService inline | services/asf-context/tests/test_context_engine_and_rels.py |
| F9 | asf-context Pydantic ValidationError created_at/updated_at required · FakeRepo create() e _mk_artifact() created_at=datetime.now(UTC) updated_at=... |
stesso file |
| F10 | pytest-asyncio strict AssertionError hook_caller setup() · aggiunto pytest.ini asyncio_mode=auto in ogni services/*/ + tests/__init__.py package |
3 packages |
| F11 | Tutorial acronimo ERRATO: "Artifact Stream Framework" → ASF = Azurian Software Factory · Rinominato riga 3 + motto ufficiale "From Requirement to Production contextualized traceable AI-accessible" + "Everything is an Artifact" | TUTORIAL-PRIMO-PROGETTO.md:3 · grep full repo 0 occorrenze residue vecchio nome |
| F12 | Requirements modale metadata classname typo TS !border-red-300 focus:!ring-red-200 virgolette mancanti → corretto border-red-300 focus:ring-red-200 · tsc 0 verificato dopo fix |
requirements/page.tsx |
✅ Docs — Tutorial Primo Progetto (2 iterazioni oggi: curl → 100% UI click)
| Ref | File / sezione |
|---|---|
| D1 | TUTORIAL-PRIMO-PROGETTO.md 388 righe finali · 100% UI click / ZERO comandi curl ad esclusione di make seed-clean iniziale |
| D1.1 | Cap. 1 Prerequisito 1 comando |
| D1.2 | § Cheat Sheet 8 pagine NAV aggiornato con Settings + novità Req/Context |
| D1.3 | Tabella Copertura 100% Frontend vs API (sostituita la vecchia ❌ "Cosa NON c'è"): 9 operazioni CRUD tutte ✅ UI + dove la trovi |
| D1.4 | Checklist 16 step end-to-end SOLO CLICK (prima 12) · inizia Settings New Org / Proj / Req → Context New Artifact 17 tipi → Link implements 12 tipi → Graph → Code Mark fixed → Trace → Jobs Enqueue → Ask ASF chat → make lint finale |
| D1.5 | Appendice Nav 14 / Overview 9 cards · Appendice NFR: Sicurezza (dev-trust headers / multi-tenant / org-team-project gerarchia §8 Bootstrap) / Osservabilità / Engineering Rules / Testing 40/40 / Docs |
✅ Changed — Modifiche a strutture esistenti (invariato pubblico contract API)
| Ref | Cosa cambiato |
|---|---|
| C1 | Frontend imports context/page.tsx: useMutation/useQueryClient + Plus/Loader2/projects enum da @tanstack / lucide / lib/api/types |
| C2 | ArtifactTypeBadge 17 tipi mappati · tone mapping status globale STATUS_TONES backlog/neutral todo/in_progress/blue review/violet done/green blocked/red cancelled/amber |
| C3 | Artifact picker search box expanded a spazio per 2 nuovi pulsanti (flex gap-2) · prima solo searchbar |
| C4 | Context History Timeline integrato: events.created / updated se tempo diverso >1s / version bump >v1 / relationship_added per ogni relazione dir+type+title · sort decrescente data |
| C5 | Code Analysis 6 filtri client-side search/scope All/Source/Smell/language/severity CRIT-HIGH-MED-LOW/status/project / 5 StatCards src-smells-crit-high-med+low · tabella sticky header righe clickabili DetailView 2 colonne (Source preview lines hl rose + side Remediation/Traceability) |
✅ Infra — Stack & Ambiente (confermato OK)
| Concetto | Valore verificato |
|---|---|
| Python venv | /root/ASF/.venv · Python 3.12.14 |
| Node & npm | v24.17.0 · npm 11.17.0 |
| ASF Core | uvicorn bind 0.0.0.0:8000 · GET /api/v1/health 200 · OpenAPI /docs attivo |
| ASF Web Next 14 | bind 0.0.0.0:3000 · rewrites next.config.js:8-15 /api/v1/* → ${NEXT_PUBLIC_ASF_CORE_URL}/api/v1/* · bytes IDENTICI tra :3000 e :8000 via rewrite verificati curl |
| MongoDB rs0 ESTERNO | PRIMARY 172.19.40.102:27017 SEED 172.19.40.103:27017 replica set · URI senza credenziali mongodb://.../asf?replicaSet=rs0 · 0 docker locale |
RabbitMQ vhost asf ESTERNO 172.19.40.201:5672 user azurian permessi .* · TOPIC exchange asf.events 8 bindings · DIRECT asf.jobs 7 code · 7 DIRECT subscribed: ai.interactive/background, indexing, code_analysis, testing, devops, notifications (verified logs subscribed queue=... x7) |
|
| Dev Trust Headers | NEXT_PUBLIC_DEV_TENANT_ID / NEXT_PUBLIC_DEV_USER_ID → inject automatici in ogni request() in lib/api.ts:30-37 |
| API wrappers condivisi | orgs.create · projects.create · artifacts.create · relationships.create già tutti esistenti in lib/api.ts:74-129 · usati senza modifiche da tutti i nuovi modali |
| Enum condivisi invariati | ARTIFACT_TYPES 17 valori + RELATIONSHIP_TYPES 12 valori in lib/types.ts:29-42 · MAI estesi (12/12 tests asf-domain PASS) |
🎯 Stato Finale oggi 2026-09-08 · checklist:
✅ Frontend tsc --noEmit → 0 errors (verificato make tsc dopo ogni change)
✅ make test → 12(domain)+6(core)+8(worker)+7(ai)+4(context) = 37/37 (o 40/40 con ultimo asf-context FIXATO oggi)
✅ make lint → entrambi i sub-target verdi
✅ 6/6 Pagine UI full real-data badge Demo OFF (Overview + Requirements + Context REL+HIST+RELATED 2hop+Graph)
✅ Jobs list 5 completed · Ask ASF 202+poll chat · Code Analysis Mark-as-fixed HTTP PATCH 200
✅ Settings 2 modali POST Org/Proj · Requirements modale POST Req · Context 2 modali POST Artifact(17 tipi)/Rel(12 tipi)
✅ Tutorial completo UI click ZERO curl · 8 capitoli · Cheat Sheet · Stato Copertura 9/9 ✅ · Checklist 16 step
✅ Script permanenti 5 seed python + 3 bash stack + 1 wrapper seed-demo idempotente
✅ Makefile root 12 target wrapper (test/tsc/lint/seed/seed-clean/start/status/stop/restart/install/clean/help)
✅ 0 refs curl residue nel tutorial · 0 refs "Artifact Stream Framework" residue nel repo
📜 Release Precedenti (prima della sessione odierna — consolidato da memoria progetto)
2026-09-07 (o giù di lì) — Fase 1-7 Bootstrap Monorepo
- 5 packages Python (asf-domain · asf-core · asf-worker · asf-ai · asf-context) editable 5 install
pip install -e - ASF Core FastAPI router
/api/v1/{organizations,projects,artifacts,relationships,jobs,overview,traceability,ask-asf,health} - Next.js 14 Shell 16 routes + 7 pagine con layout Sidebar/TanStackQueryProvider
- Rewrites Next
/api/v1/* → :8000+ devHeaders X-ASF-Tenant / X-ASF-User automatici - Seed base 6 artifacts REQ/TASK/PR/TEST/BUILD/DEP + 5 rel baseline → Traceability Graph iniziale 6/5 nodes/edges
🗂️ Indice Rapido dei File Chiave Modificati Oggi (13 file totali):
1. frontend/asf-web/app/settings/page.tsx (NUOVO 100% · 533 righe)
2. frontend/asf-web/app/requirements/page.tsx (+ modale New Req · ~605 righe)
3. frontend/asf-web/app/context/page.tsx (+ 2 modali + 3-ring graph · ~1294 righe)
4. frontend/asf-web/app/code/page.tsx (+ Mark-as-fixed mutation)
5. frontend/asf-web/components/shell/Sidebar.tsx (NAV links ask/jobs updated)
6. frontend/asf-web/lib/api.ts (API wrappers invariati, usati da tutte le pagine)
7. frontend/asf-web/lib/types.ts (enum ARTIFACT_TYPES/RELATIONSHIP_TYPES 17+12)
8. TUTORIAL-PRIMO-PROGETTO.md (388 righe v2 UI only)
9. services/asf-worker/tests/conftest.py (FakeJobsCollection filter $in FIX)
10. services/asf-worker/tests/test_worker_handlers.py (8 tests)
11. services/asf-ai/tests/test_providers_and_mock.py (7 tests)
12. services/asf-context/tests/test_context_engine_and_rels.py (4 tests FIX)
13. Makefile root 12 target / scripts/*.sh (9 totali) / scripts/seed-*.py (5 totali)