<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omar Baruzzo</title>
    <description>The latest articles on DEV Community by Omar Baruzzo (@omarbaruzzo).</description>
    <link>https://dev.to/omarbaruzzo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3871271%2F50981d31-31ef-4f39-90a0-68f15adc1f24.png</url>
      <title>DEV Community: Omar Baruzzo</title>
      <link>https://dev.to/omarbaruzzo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omarbaruzzo"/>
    <language>en</language>
    <item>
      <title>Ancorirani zapis dokazuje kada. Tko ga je napisao?</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Thu, 03 Dec 2026 11:16:58 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/ancorirani-zapis-dokazuje-kada-tko-ga-je-napisao-54g7</link>
      <guid>https://dev.to/omarbaruzzo/ancorirani-zapis-dokazuje-kada-tko-ga-je-napisao-54g7</guid>
      <description>&lt;p&gt;Ako anchorirate append-only log na lancu, anchor dokazuje vrijeme i integritet, ne autora. Ključevi po writeru u KMS-u, potpisi nad kanonskim bajtovima, povijest ključeva u logu.&lt;/p&gt;

&lt;p&gt;Anchoring decision ledgera na javnom lancu daje dva jamstva koja svatko može provjeriti: zapis je postojao prije određenog bloka i od tada se nije promijenio. Oba su vrijedna. Nijedno ne govori tko je zapis stvorio. Tu rupu je lako previdjeti, jer ledger na dijagramu arhitekture gotovo uvijek ima jednog writera, a u produkciji ih ima nekoliko.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rupa između upisa i anchora
&lt;/h2&gt;

&lt;p&gt;Zapisi se obično prvo upisuju u bazu, a zatim se anchoriraju u batchevima, s jednim Merkle rootom na lancu za svaki batch. Između upisa i anchora zapis je samo redak. Bilo koji servis s pravom pisanja u tu tablicu može ubaciti redak, a sljedeći anchor certificirat će ga jednako kao sve ostale. Integracijski job s previše prava, skripta podrške, kompromitirani servisni račun: anchor ih ne razlikuje.&lt;/p&gt;

&lt;p&gt;Ograničavanje prava pisanja pomaže i treba ga napraviti. Ali permission je konfiguracija, a revizor ne može provjeriti kako je bila postavljena jednog utorka prije osam mjeseci. Potpis može provjeriti bilo tko, bilo kada.&lt;/p&gt;

&lt;h2&gt;
  
  
  Potpis na izvoru
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Jedan ključ po writeru.&lt;/strong&gt; Servis agenta, servis za odobrenja, integracijski job: svaki ima svoj ključ za potpis, a svaki ključ smije potpisivati samo vrste zapisa koje taj writer proizvodi. Ključevi su u KMS-u ili HSM-u, nikad u konfiguracijskoj datoteci, a servisi traže potpis bez da ikad drže privatni ključ.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Potpisuju se kanonski bajtovi.&lt;/strong&gt; Potpis pokriva kanonsku serijalizaciju zapisa, iste bajtove čiji se hash koristi za anchoring. Zapis nosi key ID, pa verifier zna koji javni ključ treba koristiti.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ljudi potpisuju u svoje ime.&lt;/strong&gt; Kad osoba odobri odluku, odobrenje se potpisuje njezinim vlastitim credentialom, a ne servisom u njezino ime. «Odobrio» postaje nešto što treća strana može provjeriti, a ne polje koje je netko ispunio.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Povijest ključeva dio je ledgera.&lt;/strong&gt; Javni ključevi, razdoblja valjanosti i opozivi također su zapisi, potpisani i anchorirani kao i ostali. Verifier provjerava je li ključ bio valjan u trenutku upisa. Ako je ključ kompromitiran, opoziv ima datum, a anchori pokazuju koji su zapisi postojali prije njega. Potpis i anchoring zajedno ograničavaju štetu.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tri provjere za verifiera
&lt;/h2&gt;

&lt;p&gt;Tada nezavisni verifier za svaki zapis provjerava tri stvari. Potpis: tko ga je napisao. Inclusion proof: da pripada anchoriranom batchu. Anchor: kada je taj batch postojao. Tko, uključeno, kada. Bez bilo koje od tri, ledger tvrdi umjesto da dokazuje.&lt;/p&gt;

&lt;p&gt;Za tvrtke u regiji koje rade za strane klijente, upravo te tri provjere traži revizor partnera. Na početku projekta to nije skupo izgraditi. Dodati nakon godinu dana nepotpisanih zapisa puno je teže, jer ti zapisi ostaju nepotpisani zauvijek.&lt;/p&gt;

&lt;p&gt;Možete li danas dokazati koja je komponenta napisala zapis u vašem audit trailu, ili samo da postoji?&lt;/p&gt;

&lt;p&gt;Original i ažuriranja: &lt;a href="https://www.omarbaruzzo.it/hr/blog/firmare-il-decision-ledger" rel="noopener noreferrer"&gt;tko je napisao ovaj zapis? potpisi i anchori&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/hr/blog/firmare-il-decision-ledger" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/hr/blog/firmare-il-decision-ledger&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>aiagents</category>
      <category>enterprise</category>
      <category>auditabilita</category>
    </item>
    <item>
      <title>Un registro ancorato dimostra quando. Chi ha scritto la voce?</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Thu, 03 Dec 2026 11:12:59 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/un-registro-ancorato-dimostra-quando-chi-ha-scritto-la-voce-3h2c</link>
      <guid>https://dev.to/omarbaruzzo/un-registro-ancorato-dimostra-quando-chi-ha-scritto-la-voce-3h2c</guid>
      <description>&lt;p&gt;Se ancorate un log append-only sulla catena, l'ancoraggio dimostra tempo e integrità, non l'autore. Chiavi per componente in un KMS, firme sui byte canonici, storico delle chiavi nel log.&lt;/p&gt;

&lt;p&gt;Ancorare un decision ledger su una catena pubblica dà due garanzie che chiunque può verificare: la voce esisteva prima di un certo blocco, e da allora non è cambiata. Sono garanzie preziose. Nessuna delle due dice chi ha creato la voce. È un buco facile da non vedere, perché nello schema di architettura il registro ha quasi sempre un solo scrittore, e in produzione ne ha diversi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Il buco tra scrittura e ancoraggio
&lt;/h2&gt;

&lt;p&gt;Di solito le voci si scrivono prima in un database e si ancorano a lotti, con una radice di Merkle sulla catena per ogni lotto. Tra la scrittura e l'ancoraggio, la voce è solo una riga. Qualunque servizio con permesso di scrittura su quella tabella può inserire una riga, e l'ancoraggio successivo la certificherà esattamente come le altre. Un job d'integrazione con troppi permessi, uno script dell'assistenza, un'utenza di servizio compromessa: l'ancoraggio non li distingue.&lt;/p&gt;

&lt;p&gt;Restringere i permessi di scrittura aiuta, e va fatto. Ma un permesso è configurazione, e un revisore non può controllare com'era configurato un martedì di otto mesi fa. Una firma la può controllare chiunque, in qualsiasi momento.&lt;/p&gt;

&lt;h2&gt;
  
  
  Firmare alla fonte
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Una chiave per ogni componente che scrive.&lt;/strong&gt; Il servizio dell'agente, quello delle approvazioni, il job d'integrazione: ognuno ha la sua chiave di firma, e ogni chiave può firmare solo i tipi di voce che quel componente produce. Le chiavi stanno in un KMS o in un HSM, mai in un file di configurazione, e i servizi chiedono la firma senza mai tenere la chiave privata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Firmare i byte canonici.&lt;/strong&gt; La firma copre la serializzazione canonica della voce, gli stessi byte di cui si calcola l'hash per l'ancoraggio. La voce porta l'identificativo della chiave, così il verificatore sa quale chiave pubblica usare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Le persone firmano per sé.&lt;/strong&gt; Quando una persona approva una decisione, l'approvazione è firmata con la sua credenziale, non da un servizio per suo conto. «Approvato da» diventa qualcosa che un terzo può verificare, non un campo che qualcuno ha compilato.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lo storico delle chiavi fa parte del registro.&lt;/strong&gt; Chiavi pubbliche, periodi di validità e revoche sono voci anche loro, firmate e ancorate come le altre. Il verificatore controlla che la chiave fosse valida quando la voce è stata scritta. Se una chiave viene compromessa, la revoca ha una data, e gli ancoraggi mostrano quali voci esistevano prima. Firma e ancoraggio insieme delimitano il danno.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tre controlli per chi verifica
&lt;/h2&gt;

&lt;p&gt;A quel punto un verificatore indipendente controlla tre cose per ogni voce. La firma: chi l'ha scritta. La prova di inclusione: che appartiene a un lotto ancorato. L'ancoraggio: quando quel lotto esisteva. Chi, incluso, quando. Tolto uno dei tre, il registro fa un'affermazione invece di offrire una prova.&lt;/p&gt;

&lt;p&gt;Per una software house .NET è una scelta da fare in progetto. Costruirla all'inizio costa poco. Aggiungerla dopo un anno di voci non firmate è molto più difficile, perché quelle voci resteranno non firmate per sempre.&lt;/p&gt;

&lt;p&gt;Nel vostro audit trail oggi sapete dimostrare quale componente ha scritto una voce, o solo che la voce c'è?&lt;/p&gt;

&lt;p&gt;Originale e aggiornamenti: &lt;a href="https://www.omarbaruzzo.it/it/blog/firmare-il-decision-ledger" rel="noopener noreferrer"&gt;chi ha scritto questa voce? firme e ancoraggi&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/it/blog/firmare-il-decision-ledger" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/it/blog/firmare-il-decision-ledger&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>aiagents</category>
      <category>enterprise</category>
      <category>auditabilita</category>
    </item>
    <item>
      <title>An anchored entry proves when. Who wrote it?</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Thu, 03 Dec 2026 11:09:12 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/an-anchored-entry-proves-when-who-wrote-it-4bhl</link>
      <guid>https://dev.to/omarbaruzzo/an-anchored-entry-proves-when-who-wrote-it-4bhl</guid>
      <description>&lt;p&gt;If you anchor an append-only log on-chain, the anchor proves time and integrity, not authorship. Per-writer keys in a KMS, signatures over canonical bytes, key history in the log.&lt;/p&gt;

&lt;p&gt;Anchoring a decision ledger on a public chain gives two guarantees that anyone can verify: the entry existed before a given block, and it has not changed since. Both are valuable. Neither says anything about who created the entry. That gap is easy to miss, because a ledger usually has a single writer in the architecture diagram and several in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap between write and anchor
&lt;/h2&gt;

&lt;p&gt;Entries are usually written to a database first and anchored in batches, with one Merkle root on the chain for each batch. Between the write and the anchor, the entry is just a row. Any service with write access to that table can insert a row, and the next anchor will certify it exactly like the others. An integration job with too many permissions, a support script, a compromised service account: the anchor cannot tell them apart.&lt;/p&gt;

&lt;p&gt;Restricting write access helps, and it should be done. But a permission is configuration, and an auditor cannot check how it was configured on a Tuesday eight months ago. A signature can be checked by anyone, at any time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sign at the source
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;One key per writer.&lt;/strong&gt; The agent service, the approval service, the integration job: each has its own signing key, and each key may sign only the entry types that writer produces. Keys live in a KMS or an HSM, never in a configuration file, and the services request signatures without ever holding the private key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sign the canonical bytes.&lt;/strong&gt; The signature covers the canonical serialization of the entry, the same bytes that get hashed for anchoring. The entry carries the key ID, so a verifier knows which public key to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;People sign as themselves.&lt;/strong&gt; When a person approves a decision, the approval is signed with that person's own credential, not by a service on their behalf. "Approved by" becomes something a third party can verify, rather than a field someone filled in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The key history is part of the ledger.&lt;/strong&gt; Public keys, their validity periods and their revocations are entries too, signed and anchored like the rest. A verifier checks that the key was valid when the entry was written. If a key is compromised, the revocation has a date, and the anchors show which entries existed before it. Signing and anchoring together put a boundary around the damage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three checks for the verifier
&lt;/h2&gt;

&lt;p&gt;With this in place, an independent verifier checks three things for any entry. The signature: who wrote it. The inclusion proof: that it belongs to an anchored batch. The anchor: when that batch existed. Who, included, when. Remove any of the three and the ledger is making a claim instead of offering a proof.&lt;/p&gt;

&lt;p&gt;None of this is expensive to build at the start. It is much harder to add after a year of unsigned entries, because those entries will stay unsigned forever.&lt;/p&gt;

&lt;p&gt;In your audit trail today, can you prove which component wrote an entry, or only that it is there?&lt;/p&gt;

&lt;p&gt;Original and updates: &lt;a href="https://www.omarbaruzzo.it/en/blog/firmare-il-decision-ledger" rel="noopener noreferrer"&gt;who wrote this ledger entry? signatures plus anchors&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/en/blog/firmare-il-decision-ledger" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/en/blog/firmare-il-decision-ledger&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>aiagents</category>
      <category>enterprise</category>
      <category>auditabilita</category>
    </item>
    <item>
      <title>Vaš AI agent treba kill switch</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Tue, 01 Dec 2026 11:16:12 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/vas-ai-agent-treba-kill-switch-8bf</link>
      <guid>https://dev.to/omarbaruzzo/vas-ai-agent-treba-kill-switch-8bf</guid>
      <description>&lt;p&gt;Ako imate LLM agenta u produkciji, evo checkliste za dan kad ga morate ugasiti: feature flag, fallback queue, circuit breaker, posao u tijeku, vježbe.&lt;/p&gt;

&lt;p&gt;Svaki AI agent koji radi u produkciji u nekom će trenutku trebati zaustaviti. Provider modela ima outage. Update modela promijeni ponašanje na način koji eval set nije uhvatio. Netko pronađe put za prompt injection. Loop noću počne pozivati alate i račun raste iz sata u sat. Ništa od toga nije rijetko i ništa nije pod vašom kontrolom.&lt;/p&gt;

&lt;p&gt;Većina timova zna kako zaustaviti agenta: rollback, skaliranje na nulu, opoziv API ključa. Malo ih zna odgovoriti na pitanje koje je važno: što se događa s poslom dok je agent ugašen? Ako je iskren odgovor «sve stane», projekt nije isporučio značajku. Isporučio je ovisnost o sustavu koji nitko ne zna sigurno pauzirati.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pet stvari koje treba dizajnirati prije go-livea
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Switch izvan modela i izvan releasea.&lt;/strong&gt; Flag po zadatku i, gdje ima smisla, po klijentu, koji operativa može uključiti u nekoliko sekundi, bez deploya i bez dežurnog developera. Rollback nije switch: spor je i sa sobom povlači sve ostalo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fallback.&lt;/strong&gt; Kad je agent ugašen, posao se vraća ljudima: queue s vlasnikom i s istim podacima koje bi agent vidio. Često je fallback jednostavno procedura koja je postojala prije agenta. Treba je održavati živom i dokumentiranom, čak i ako je mjesecima nitko ne koristi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatski circuit breaker.&lt;/strong&gt; Neka zaustavljanja ne smiju čekati čovjeka. Circuit breaker na greške i timeoute providera. Gornja granica potrošnje po vremenskom prozoru. Pragovi na signale kvalitete koje već prikupljate, poput naglog rasta apstencija ili prijedloga koje korisnici odbijaju. Kad se aktivira, sustav sam prelazi na fallback i netko dobiva obavijest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pravilo za posao u tijeku.&lt;/strong&gt; Zaustaviti nove zadatke je lako. Teško je ono što je napola gotovo: ažuriran zapis, poruka koja još nije poslana. Koraci moraju biti idempotentni, a switch mora imati definirano ponašanje: nema novih zadataka, započeti se završavaju ili parkiraju u stanju iz kojeg netko može nastaviti.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redovita vježba.&lt;/strong&gt; Switch koji nikad nije korišten ne radi. Testira se u stagingu kod svakog releasea i u produkciji po rasporedu, u radno vrijeme. Svako uključivanje se logira: tko, kada, zašto i kada je agent ponovno pokrenut. Taj log ide uz decision ledger, jer objašnjava rupe u njemu.&lt;/p&gt;

&lt;h2&gt;
  
  
  Zašto je to arhitektura
&lt;/h2&gt;

&lt;p&gt;Kill switch izgleda kao operativni detalj, ali mijenja dizajn. Tjera agenta da stoji iza jasne granice zadatka, sa strukturiranim inputom koji može obraditi i čovjek. Tjera na idempotentne korake. Tjera tim da održi ručni put živim. Sustav izgrađen tako lakše se testira, lakše predaje i degradira umjesto da padne.&lt;/p&gt;

&lt;p&gt;EU AI Act to izričito navodi za visokorizične sustave: ljudski nadzor uključuje mogućnost prekida rada sustava tipkom za zaustavljanje ili sličnim postupkom koji ga dovodi u sigurno stanje. Za tvrtke u regiji koje rade za strane klijente, to je i prvo pitanje koje partner postavi nakon incidenta: što ste napravili u prvih pet minuta?&lt;/p&gt;

&lt;p&gt;Ako sutra u 10:00 ugasite agenta, tko radi posao u 10:05?&lt;/p&gt;

&lt;p&gt;Original i ažuriranja: &lt;a href="https://www.omarbaruzzo.it/hr/blog/spegnere-un-agente-ai" rel="noopener noreferrer"&gt;checklista za kill switch LLM agenata&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/hr/blog/spegnere-un-agente-ai" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/hr/blog/spegnere-un-agente-ai&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>enterprise</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Il vostro agente AI ha bisogno di un interruttore</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Tue, 01 Dec 2026 11:13:47 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/il-vostro-agente-ai-ha-bisogno-di-un-interruttore-5ao1</link>
      <guid>https://dev.to/omarbaruzzo/il-vostro-agente-ai-ha-bisogno-di-un-interruttore-5ao1</guid>
      <description>&lt;p&gt;Se avete un agente LLM in produzione, ecco una checklist per il giorno in cui dovrete spegnerlo: feature flag, coda di riserva, circuit breaker, lavoro a metà, prove.&lt;/p&gt;

&lt;p&gt;Ogni agente AI che lavora in produzione prima o poi andrà fermato. Il fornitore del modello ha un disservizio. Un aggiornamento del modello cambia il comportamento in un modo che l'insieme di casi di prova non aveva colto. Qualcuno trova una strada per la prompt injection. Un ciclo comincia a chiamare strumenti di notte e il conto cresce di ora in ora. Niente di tutto questo è raro, e niente è sotto il vostro controllo.&lt;/p&gt;

&lt;p&gt;Quasi tutti i team sanno dire come si ferma l'agente: rollback, repliche a zero, revoca della chiave API. Pochi sanno rispondere alla domanda che conta: che fine fa il lavoro mentre l'agente è spento? Se la risposta onesta è «si ferma tutto», il progetto non ha consegnato una funzionalità. Ha consegnato una dipendenza da un sistema che nessuno sa mettere in pausa in sicurezza.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cinque cose da progettare prima del collaudo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Un interruttore fuori dal modello e fuori dal rilascio.&lt;/strong&gt; Un flag per singolo compito e, dove ha senso, per singolo cliente, che l'assistenza può azionare in pochi secondi, senza un deploy e senza chiamare gli sviluppatori. Un rollback non è un interruttore: è lento e si porta dietro tutto il resto.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Un percorso di riserva.&lt;/strong&gt; Quando l'agente è spento, il lavoro torna alle persone: una coda con un responsabile, con gli stessi dati che avrebbe visto l'agente. Spesso il percorso di riserva è semplicemente la procedura che esisteva prima. Va tenuta viva e documentata, anche se per mesi nessuno la usa.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interruttori automatici.&lt;/strong&gt; Alcune fermate non devono aspettare una persona. Un circuit breaker sugli errori e sui timeout del fornitore. Un tetto alla spesa per finestra di tempo. Soglie sui segnali di qualità che già raccogliete, come un aumento improvviso delle astensioni o delle proposte rifiutate dagli utenti. Quando scatta, il sistema passa da solo al percorso di riserva e qualcuno riceve l'avviso.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Una regola per il lavoro a metà.&lt;/strong&gt; Fermare le pratiche nuove è facile. Il difficile è quella iniziata: un record aggiornato, un messaggio non ancora inviato. I passi devono essere idempotenti e l'interruttore deve avere un comportamento definito: niente nuove pratiche, quelle avviate si chiudono o si parcheggiano in uno stato da cui qualcuno può riprendere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Una prova periodica.&lt;/strong&gt; Un interruttore mai usato non funziona. Va provato in collaudo a ogni rilascio e in produzione a intervalli fissi, in orario di lavoro. Ogni azionamento va registrato: chi, quando, perché, quando l'agente è stato riacceso. Quel registro sta accanto al decision ledger, perché ne spiega i buchi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Perché è una scelta di architettura
&lt;/h2&gt;

&lt;p&gt;L'interruttore sembra un dettaglio operativo, ma cambia il progetto. Obbliga l'agente a stare dietro il confine chiaro di un compito, con input strutturati che anche una persona sa lavorare. Obbliga a passi idempotenti. Obbliga a tenere viva la strada manuale. Per una software house .NET sono voci da mettere nel documento di progetto e nel preventivo, non da aggiungere dopo il primo incidente.&lt;/p&gt;

&lt;p&gt;L'AI Act lo dice in modo esplicito per i sistemi ad alto rischio: la sorveglianza umana comprende la possibilità di interrompere il sistema con un pulsante di arresto o una procedura analoga che lo porti in uno stato sicuro. Anche fuori da quel perimetro, il cliente che firma il contratto farà la stessa domanda dopo il primo incidente.&lt;/p&gt;

&lt;p&gt;Se domani alle 10 doveste spegnere l'agente, chi farebbe il lavoro alle 10:05?&lt;/p&gt;

&lt;p&gt;Originale e aggiornamenti: &lt;a href="https://www.omarbaruzzo.it/it/blog/spegnere-un-agente-ai" rel="noopener noreferrer"&gt;la checklist dell'interruttore per agenti LLM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/it/blog/spegnere-un-agente-ai" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/it/blog/spegnere-un-agente-ai&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>enterprise</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Your AI agent needs an off switch</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Tue, 01 Dec 2026 11:09:01 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/your-ai-agent-needs-an-off-switch-2l54</link>
      <guid>https://dev.to/omarbaruzzo/your-ai-agent-needs-an-off-switch-2l54</guid>
      <description>&lt;p&gt;If you run an LLM agent in production, here is a checklist for the day you have to turn it off: feature flag, fallback queue, circuit breakers, in-flight work, drills.&lt;/p&gt;

&lt;p&gt;Every AI agent that runs in production will have to be stopped at some point. The model provider has an outage. A model update changes behaviour in a way the eval set did not catch. Someone finds a prompt injection path. A loop starts calling tools at night and the bill grows by the hour. None of this is exotic, and none of it is under your control.&lt;/p&gt;

&lt;p&gt;Most teams can say how to stop the agent: roll back, scale to zero, revoke the API key. Few can answer the question that matters: what happens to the work while the agent is off? If the honest answer is "nothing gets done", the project did not ship a feature. It shipped a dependency on a system nobody can pause safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five things to design before go-live
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A switch outside the model and outside the release.&lt;/strong&gt; A flag per task and, where it makes sense, per tenant, that operations can flip in seconds, without a deploy and without the development team on call. Rolling back a release is not a switch: it is slow, and it takes everything else with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A fallback path.&lt;/strong&gt; When the agent is off, the work goes back to people: a queue with an owner, holding the same inputs the agent would have seen. Often the fallback is simply the procedure that existed before the agent. Keep it alive and documented, even if nobody uses it for months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic breakers.&lt;/strong&gt; Some stops should not wait for a human. A circuit breaker on provider errors and timeouts. A ceiling on spend per time window. Thresholds on quality signals you already collect, such as a sudden rise in abstentions or in proposals rejected by users. When a breaker trips, the system moves to the fallback path on its own and someone is notified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A rule for work in flight.&lt;/strong&gt; Stopping new work is easy. The hard part is the case that is half done: a record updated, a message not yet sent. Steps need to be idempotent, and the switch needs a defined behaviour: stop accepting new tasks, then finish or park what is in progress in a state someone can resume. Never leave a step half written.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A drill.&lt;/strong&gt; A switch that has never been used does not work. Test it in staging with every release and in production on a schedule, during working hours. Log every flip: who, when, why, and when the agent was turned back on. That log belongs next to the decision ledger, because it explains the gaps in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this belongs in the architecture
&lt;/h2&gt;

&lt;p&gt;The off switch looks like an operations detail, but it shapes the design. It forces the agent to sit behind a clear task boundary, with structured inputs that a person can also process. It forces idempotent steps. It forces the team to keep the manual path alive. A system built this way is easier to test and easier to hand over, and it degrades instead of failing.&lt;/p&gt;

&lt;p&gt;For high-risk systems, the EU AI Act makes the point explicitly: human oversight includes being able to interrupt the system through a stop button or a similar procedure that brings it to a halt in a safe state. Even outside that scope, a customer who signs a contract will ask the same question after the first incident.&lt;/p&gt;

&lt;p&gt;If you had to switch your agent off tomorrow at 10:00, who would do the work at 10:05?&lt;/p&gt;

&lt;p&gt;Original and updates: &lt;a href="https://www.omarbaruzzo.it/en/blog/spegnere-un-agente-ai" rel="noopener noreferrer"&gt;the kill switch checklist for LLM agents&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/en/blog/spegnere-un-agente-ai" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/en/blog/spegnere-un-agente-ai&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>enterprise</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Vaši korisnici ne žele chatbot</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:11:35 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/vasi-korisnici-ne-zele-chatbot-18mg</link>
      <guid>https://dev.to/omarbaruzzo/vasi-korisnici-ne-zele-chatbot-18mg</guid>
      <description>&lt;p&gt;Ako upravo spajate LLM na poslovnu aplikaciju iza chat widgeta, prvo razmislite o gumbu. Evo zašto ga je lakše testirati, autorizirati i revidirati.&lt;/p&gt;

&lt;p&gt;Kad tvrtka odluči dodati umjetnu inteligenciju u ERP ili portal za klijente, prva ideja je gotovo uvijek ista: chat u kutu ekrana. Na demu radi odlično. U produkciji je, u većini slučajeva, najslabije sučelje koje se moglo odabrati. Korisnici ne žele razgovarati sa softverom: žele da posao koji već rade traži manje koraka.&lt;/p&gt;

&lt;h2&gt;
  
  
  Zašto se chat loše drži u produkciji
&lt;/h2&gt;

&lt;p&gt;Neograničen scope. Slobodno tekstualno polje ne govori korisniku što može napraviti. Tko ne zna što pitati, pita sve ili funkciju uopće ne koristi. A neograničen scope ne može se testirati: ne postoji skup test slučajeva koji pokriva «bilo koje pitanje».&lt;/p&gt;

&lt;p&gt;Nejasni permissions. Chat koji odgovara na sve mora moći čitati sve. Tada permissions više nisu na ekranu, nego u filtru primijenjenom nakon svakog odgovora, koji mora biti savršen svaki put.&lt;/p&gt;

&lt;p&gt;Izgubljena odgovornost. Kad nešto pođe po zlu, revizor ne želi dugi transkript. Želi znati koji se podatak promijenio, što je sustav predložio i tko je to odobrio. U razgovoru ta informacija postoji samo ako ju je netko namjerno izvukao.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dosadna alternativa koja radi
&lt;/h2&gt;

&lt;p&gt;Jedan precizan zadatak, iza jednog gumba, na ekranu gdje se posao već radi. «Ispuni iz računa», «Predloži klasifikaciju», «Pripremi odgovor na reklamaciju». Input je strukturiran: dokument, zapis, kontekst koji zadatak treba i ništa više. Output je prijedlog u poljima obrasca, koji korisnik pregleda, ispravi i potvrdi. Sustav bilježi što je predložio, što je prihvaćeno i tko je prihvatio.&lt;/p&gt;

&lt;p&gt;Postoji i druga prednost koju je lako previdjeti. Kad model nije siguran, obrazac to može pokazati: polje ostavljeno prazno s kratkim razlogom, vrijednost označena za provjeru. Chat na svako pitanje odgovara istim sigurnim tonom, pa korisnik ne može razlikovati čvrst odgovor od nagađanja. Uski zadatak oslanja se i na permissions koji već postoje: gumb se prikazuje samo onima koji smiju uređivati taj zapis, a model vidi samo ono što prikazuje taj ekran.&lt;/p&gt;

&lt;p&gt;Jedan zadatak znači jedan eval set, jedan skup permissions i mjerljiv trošak po izvršenju. Za tvrtke u regiji koje rade za strane klijente, to je i način da se značajka procijeni i ponudi po fiksnoj cijeni.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kad chat ima smisla
&lt;/h2&gt;

&lt;p&gt;Chat zaslužuje svoje mjesto kad je istraživanje sam zadatak: pretraga arhive dokumenata, prva razina podrške, otvorena analiza podataka. Tamo se pitanje ne može predvidjeti i razgovor je proizvod. Problem nije chat, nego korištenje chata kao default sučelja za svaku funkciju, jer ga je najbrže pokazati.&lt;/p&gt;

&lt;p&gt;Koja AI značajka u vašem proizvodu bi bolje radila kao gumb?&lt;/p&gt;

&lt;p&gt;Original i buduća ažuriranja: &lt;a href="https://www.omarbaruzzo.it/hr/blog/non-serve-un-chatbot" rel="noopener noreferrer"&gt;dizajn AI značajki kao pojedinačnih zadataka&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/hr/blog/non-serve-un-chatbot" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/hr/blog/non-serve-un-chatbot&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>ux</category>
      <category>architecture</category>
    </item>
    <item>
      <title>I vostri utenti non vogliono un chatbot</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:10:48 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/i-vostri-utenti-non-vogliono-un-chatbot-2fl7</link>
      <guid>https://dev.to/omarbaruzzo/i-vostri-utenti-non-vogliono-un-chatbot-2fl7</guid>
      <description>&lt;p&gt;Se state per collegare un LLM a un'applicazione gestionale dietro un widget di chat, considerate prima un pulsante. Ecco perché è più facile da collaudare, autorizzare e verificare.&lt;/p&gt;

&lt;p&gt;Quando un'azienda decide di aggiungere l'intelligenza artificiale a un gestionale o a un portale clienti, la prima idea è quasi sempre la stessa: una chat nell'angolo dello schermo. In demo funziona benissimo. In produzione, nella maggior parte dei casi, è l'interfaccia più debole che si potesse scegliere. Gli utenti non vogliono conversare con il software: vogliono che il lavoro che fanno già richieda meno passaggi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Perché la chat regge male in produzione
&lt;/h2&gt;

&lt;p&gt;Perimetro illimitato. Un campo di testo libero non dice all'utente che cosa può fare. Chi non sa cosa chiedere chiede di tutto, oppure non usa la funzione. E un perimetro illimitato non si collauda: non esiste un insieme di casi di prova che copra «qualsiasi domanda».&lt;/p&gt;

&lt;p&gt;Permessi confusi. Una chat che risponde a tutto deve poter leggere tutto. A quel punto i permessi non stanno più nella schermata: stanno in un filtro applicato a valle di ogni risposta, che deve essere perfetto ogni volta.&lt;/p&gt;

&lt;p&gt;Responsabilità persa. Quando qualcosa va storto, il revisore non vuole una lunga trascrizione. Vuole sapere quale dato è cambiato, quale proposta ha fatto il sistema e chi l'ha approvata. In una conversazione questa informazione esiste solo se qualcuno l'ha estratta apposta.&lt;/p&gt;

&lt;h2&gt;
  
  
  L'alternativa noiosa che funziona
&lt;/h2&gt;

&lt;p&gt;Un compito preciso, dietro un pulsante, nella schermata dove il lavoro si fa già. «Compila dalla fattura», «Proponi la classificazione», «Prepara la risposta al reclamo». L'input è strutturato: il documento, il record, il contesto che serve e niente di più. L'output è una proposta nei campi del modulo, che l'utente controlla, corregge e conferma. Il sistema registra cosa ha proposto, cosa è stato accettato e da chi.&lt;/p&gt;

&lt;p&gt;C'è un secondo vantaggio che si nota poco. Quando il modello non è sicuro, un modulo lo può mostrare: un campo lasciato vuoto con una breve motivazione, un valore segnalato da verificare. Una chat risponde a ogni domanda con lo stesso tono sicuro, e l'utente non ha modo di distinguere una risposta solida da un'ipotesi. Un compito stretto si appoggia anche ai permessi che esistono già: il pulsante compare solo a chi può modificare quel record, e il modello vede solo quello che mostra quella schermata.&lt;/p&gt;

&lt;p&gt;Un compito vuol dire un insieme di casi di prova, un insieme di permessi, un costo per esecuzione misurabile. Per una software house .NET è una funzionalità come le altre: un caso d'uso, i suoi test, i suoi permessi, e un preventivo che si può fare davvero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quando la chat ha senso
&lt;/h2&gt;

&lt;p&gt;La chat si guadagna il suo posto quando esplorare è il compito stesso: cercare in un archivio di documenti, assistenza di primo livello, analisi aperta dei dati. Lì la domanda non si può prevedere e la conversazione è il prodotto. Il problema non è la chat: è usarla come interfaccia di default per ogni funzione, perché è la più rapida da mostrare.&lt;/p&gt;

&lt;p&gt;Quale funzione AI del vostro prodotto starebbe meglio dietro un pulsante?&lt;/p&gt;

&lt;p&gt;Originale e aggiornamenti: &lt;a href="https://www.omarbaruzzo.it/it/blog/non-serve-un-chatbot" rel="noopener noreferrer"&gt;progettare le funzioni AI come compiti singoli&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/it/blog/non-serve-un-chatbot" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/it/blog/non-serve-un-chatbot&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>ux</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Your users do not want a chatbot</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:09:08 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/your-users-do-not-want-a-chatbot-480m</link>
      <guid>https://dev.to/omarbaruzzo/your-users-do-not-want-a-chatbot-480m</guid>
      <description>&lt;p&gt;If you are about to wire an LLM into a business app behind a chat widget, consider a button first. Here is why it is easier to test, authorize and audit.&lt;/p&gt;

&lt;p&gt;When a company decides to add AI to an ERP or a customer portal, the first idea is almost always the same: a chat box in the corner of the screen. It demos beautifully. In production it is, in most cases, the weakest interface you could have picked. Users do not want to have a conversation with their software. They want the work they already do to take fewer steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chat holds up badly in production
&lt;/h2&gt;

&lt;p&gt;Unbounded scope. A free text field does not tell users what they can do. People who do not know what to ask either ask anything or never use the feature. And unbounded scope cannot be tested: there is no set of test cases that covers "any question".&lt;/p&gt;

&lt;p&gt;Blurry permissions. A chat that answers everything must be able to read everything. Permissions then no longer live in the screen. They live in a filter applied after every answer, and that filter has to be perfect every time.&lt;/p&gt;

&lt;p&gt;Lost accountability. When something goes wrong, the auditor does not want a long transcript. They want to know which record changed, what the system proposed and who approved it. In a conversation, that information exists only if someone extracted it on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  The boring alternative that works
&lt;/h2&gt;

&lt;p&gt;One precise task, behind a button, in the screen where the work already happens. "Fill from invoice", "Suggest a classification", "Draft the reply to this complaint". The input is structured: the document, the record, the context the task needs and nothing more. The output is a proposal in the form fields, which the user reviews, corrects and confirms. The system logs what it proposed, what was accepted and by whom.&lt;/p&gt;

&lt;p&gt;There is a second benefit that is easy to miss. When the model is not sure, a form can show it: a field left empty with a short reason, a value flagged for review. A chat answers every question in the same confident tone, so the user cannot tell a solid answer from a guess. A narrow task also reuses the permissions you already have: the button appears only to users who can edit that record, and the model sees only what that screen shows.&lt;/p&gt;

&lt;p&gt;One task means one eval set, one set of permissions and a cost per run you can measure. It is a feature like any other: a use case, its tests, its permissions, and an estimate you can actually give.&lt;/p&gt;

&lt;h2&gt;
  
  
  When chat earns its place
&lt;/h2&gt;

&lt;p&gt;Chat earns its place when exploration is the task itself: searching a document archive, first-line support, open-ended data analysis. There the question cannot be predicted and the conversation is the product. The problem is not chat. It is using chat as the default interface for every feature because it is the fastest one to show.&lt;/p&gt;

&lt;p&gt;Which AI feature in your product would work better as a button?&lt;/p&gt;

&lt;p&gt;Original and future updates: &lt;a href="https://www.omarbaruzzo.it/en/blog/non-serve-un-chatbot" rel="noopener noreferrer"&gt;designing AI features as single tasks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/en/blog/non-serve-un-chatbot" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/en/blog/non-serve-un-chatbot&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>ux</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Pisati na lanac je lako, čitati ga nije</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:18:20 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/pisati-na-lanac-je-lako-citati-ga-nije-4j69</link>
      <guid>https://dev.to/omarbaruzzo/pisati-na-lanac-je-lako-citati-ga-nije-4j69</guid>
      <description>&lt;p&gt;Ako ste ikad napisali petlju koja poziva eth_getLogs i upisuje retke u tablicu, ovo je za vas. Ta petlja sada je dio vašeg sustava evidencije.&lt;/p&gt;

&lt;p&gt;Tko gradi sustav na blockchainu, gotovo svu pažnju posveti pisanju: smart contract, potpis, naknada, potvrda transakcije. Ali ostatak sustava, ERP, portal, računovodstvo, mora znati što se dogodilo na lancu. Taj dio, čitanje, gotovo je uvijek najslabije dizajniran.&lt;/p&gt;

&lt;h2&gt;
  
  
  Petlja koja postaje source of truth
&lt;/h2&gt;

&lt;p&gt;Tipična verzija je servis koji u intervalima ispituje RPC node, čita evente koje emitira contract i upisuje ih u tablicu. Radi u razvoju, radi na demu. Onda aplikacija počne čitati iz te tablice: salda, statuse narudžbi, obavijesti, izvještaje. Od tog trenutka source of truth za korisnike više nije lanac, nego vaša kopija lanca. A tu kopiju piše petlja koju nitko nikad nije promatrao kao kritičnu komponentu.&lt;/p&gt;

&lt;p&gt;Lanac jamči da se finalizirana transakcija neće promijeniti. Ne jamči ništa o vašoj kopiji: ako nedostaje event, ako ih je jedan previše, ako je neki poništen reorgom, korisnik vidi pogrešan podatak koji izgleda kao siguran.&lt;/p&gt;

&lt;h2&gt;
  
  
  Četiri stvari koje indexer mora podnijeti
&lt;/h2&gt;

&lt;p&gt;Reorg. Prije nego postane konačan, blok može biti zamijenjen drugim: eventi koje je sadržavao nestanu ili se pojave drugim redoslijedom. Za svaki event spremite broj i hash bloka. Razlikujte viđeni event od konačnog prema pravilu finality lanca koji koristite, ne prema broju potvrda odabranom napamet. A kad se hash već pročitanog bloka više ne poklapa, vratite se do zajedničke točke i čitajte ponovno.&lt;/p&gt;

&lt;p&gt;Idempotency. Isti event stići će više puta: nakon restarta, nakon timeouta, nakon reorga. Prirodni ključ je transaction hash plus log index unutar transakcije. Interni brojač ili vrijeme dolaska ne identificiraju ništa. S unique ograničenjem na tom ključu u bazi, drugi upis postaje bezopasan.&lt;/p&gt;

&lt;p&gt;Rupe. Servis se zaustavi zbog deploya, node vrati grešku na rasponu blokova, stranica rezultata se odreže zbog limita providera. Ako indexer krene od trenutnog bloka, taj raspon je tiho izgubljen. Treba trajni checkpoint zadnjeg uspješno obrađenog bloka, backfill job koji čita od njega i provjera koja rupe prijavljuje umjesto da ih skriva.&lt;/p&gt;

&lt;p&gt;Provider. RPC node je produkcijska ovisnost kao baza ili queue: ima limite poziva, ispade, ponekad podatke s kašnjenjem. Tretirajte ga kao svaki vanjski servis: eksplicitni timeouti, retry s backoffom, metrike, alerti. I periodička usporedba s drugim neovisnim izvorom, barem za salda i statuse koji su bitni.&lt;/p&gt;

&lt;h2&gt;
  
  
  Što to znači za isporuku
&lt;/h2&gt;

&lt;p&gt;Indexer nije pomoćni kod. Ide u scope projekta, sa svojim testovima: simulirani reorg, duplicirani event, preskočeni raspon. Ide u runbook, s odgovornom osobom i procedurom za ponovnu izgradnju kopije od nule. I ide u procjenu, jer je to pravi posao, često veći od samog contracta. Za tvrtke u regiji koje grade za strane klijente, to je dio koji će partner pitati nakon prvog krivog salda.&lt;/p&gt;

&lt;p&gt;Lanac je konačan. Vaša kopija lanca nije, dok je ne dizajnirate da to postane.&lt;/p&gt;

&lt;p&gt;Tko u vašem timu odgovara za indexer?&lt;/p&gt;

&lt;p&gt;Ažuriranja i originalna verzija: &lt;a href="https://www.omarbaruzzo.it/hr/blog/leggere-la-catena-in-produzione" rel="noopener noreferrer"&gt;dizajn puta čitanja u blockchain integraciji&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/hr/blog/leggere-la-catena-in-produzione" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/hr/blog/leggere-la-catena-in-produzione&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>enterprise</category>
      <category>web3</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Scrivere sulla catena è facile, rileggerla no</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:12:57 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/scrivere-sulla-catena-e-facile-rileggerla-no-494c</link>
      <guid>https://dev.to/omarbaruzzo/scrivere-sulla-catena-e-facile-rileggerla-no-494c</guid>
      <description>&lt;p&gt;Se avete mai scritto un ciclo che chiama eth_getLogs e inserisce righe in una tabella, questo pezzo è per voi. Quel ciclo ora fa parte del vostro sistema di registrazione.&lt;/p&gt;

&lt;p&gt;Chi costruisce un sistema su blockchain mette quasi tutta l'attenzione sulla scrittura: lo smart contract, la firma, la commissione, la conferma della transazione. Ma il resto del sistema, il gestionale, il portale, la contabilità, ha bisogno di sapere che cosa è successo sulla catena. E quella lettura è quasi sempre il pezzo progettato peggio.&lt;/p&gt;

&lt;h2&gt;
  
  
  Il ciclo che diventa fonte di verità
&lt;/h2&gt;

&lt;p&gt;La versione tipica è un servizio che interroga a intervalli un nodo RPC, legge gli eventi emessi dal contratto e li inserisce in una tabella. Funziona in sviluppo, funziona in demo. Poi l'applicazione comincia a leggere da quella tabella: saldi, stati degli ordini, notifiche, report. Da quel momento la fonte di verità per gli utenti non è più la catena: è la vostra copia della catena. E quella copia è scritta da un ciclo che nessuno ha mai pensato come un componente critico.&lt;/p&gt;

&lt;p&gt;La catena garantisce che una transazione finalizzata non cambi. Non garantisce niente sulla vostra copia: se manca un evento, se ce n'è uno di troppo, se uno è stato annullato da una riorganizzazione, l'utente vede un dato sbagliato con l'aspetto di un dato certo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quattro cose che l'indicizzatore deve gestire
&lt;/h2&gt;

&lt;p&gt;Riorganizzazioni. Prima di essere definitivo, un blocco può essere sostituito da un altro: gli eventi che conteneva spariscono o ricompaiono in un ordine diverso. Per ogni evento salvate il numero e l'hash del blocco che lo contiene. Distinguete fra evento visto ed evento definitivo secondo la regola di finalità della catena che usate, non secondo un numero di conferme scelto a sentimento. E quando l'hash di un blocco già letto non coincide più, sappiate tornare indietro fino al punto comune e rileggere.&lt;/p&gt;

&lt;p&gt;Idempotenza. Lo stesso evento arriverà più di una volta: dopo un riavvio, dopo un timeout, dopo una riorganizzazione. La chiave naturale è l'hash della transazione più l'indice del log dentro la transazione. Un contatore interno o l'ora di arrivo non identificano niente. Con un vincolo di unicità sul database, la seconda scrittura diventa innocua.&lt;/p&gt;

&lt;p&gt;Buchi. Il servizio si ferma per un rilascio, il nodo restituisce un errore su un intervallo di blocchi, una pagina di risultati viene troncata dal limite del fornitore. Se l'indicizzatore riparte dal blocco corrente, quell'intervallo è perso senza rumore. Serve un checkpoint persistente dell'ultimo blocco elaborato con successo, un job di recupero che rilegga da lì e un controllo che segnali i buchi invece di nasconderli.&lt;/p&gt;

&lt;p&gt;Il fornitore. Il nodo RPC è una dipendenza di produzione come un database o una coda: ha limiti di chiamate, disservizi, a volte dati in ritardo. Per una software house .NET va trattato come qualsiasi servizio esterno: timeout espliciti, retry con backoff, metriche, avvisi. E un confronto periodico con una seconda fonte indipendente, almeno sui saldi e sugli stati che contano.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cosa significa per una consegna
&lt;/h2&gt;

&lt;p&gt;L'indicizzatore non è codice di contorno. Va nel perimetro del progetto, con i suoi test: una riorganizzazione simulata, un evento duplicato, un intervallo saltato. Va nel runbook, con un responsabile e una procedura per ricostruire la copia da zero. E va nel preventivo, perché è lavoro vero, spesso più del contratto.&lt;/p&gt;

&lt;p&gt;La catena è definitiva. La vostra copia della catena no, finché non la progettate perché lo diventi.&lt;/p&gt;

&lt;p&gt;Nel vostro team, chi è responsabile dell'indicizzatore?&lt;/p&gt;

&lt;p&gt;Aggiornamenti e versione originale: &lt;a href="https://www.omarbaruzzo.it/it/blog/leggere-la-catena-in-produzione" rel="noopener noreferrer"&gt;progettare il percorso di lettura di un'integrazione blockchain&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/it/blog/leggere-la-catena-in-produzione" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/it/blog/leggere-la-catena-in-produzione&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>enterprise</category>
      <category>web3</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Writing to the chain is easy. Reading it back is not</title>
      <dc:creator>Omar Baruzzo</dc:creator>
      <pubDate>Tue, 24 Nov 2026 11:09:07 +0000</pubDate>
      <link>https://dev.to/omarbaruzzo/writing-to-the-chain-is-easy-reading-it-back-is-not-3id8</link>
      <guid>https://dev.to/omarbaruzzo/writing-to-the-chain-is-easy-reading-it-back-is-not-3id8</guid>
      <description>&lt;p&gt;If you have ever written a loop that polls eth_getLogs and inserts rows into a table, this one is for you. That loop is now part of your system of record.&lt;/p&gt;

&lt;p&gt;Teams that build on a blockchain put almost all their attention on the write path: the smart contract, the signature, the fee, the confirmation. But the rest of the system, the ERP, the portal, the accounting, needs to know what happened on-chain. That read path is almost always the least designed part of the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The loop that becomes the source of truth
&lt;/h2&gt;

&lt;p&gt;The typical version is a service that polls an RPC node at intervals, reads the events emitted by the contract and inserts them into a table. It works in development, it works in the demo. Then the application starts reading from that table: balances, order states, notifications, reports. From that moment the source of truth for your users is no longer the chain. It is your copy of the chain, written by a loop nobody ever treated as a critical component.&lt;/p&gt;

&lt;p&gt;The chain guarantees that a finalized transaction will not change. It guarantees nothing about your copy. If an event is missing, duplicated or reverted by a reorg, the user sees a wrong value that looks like a certain one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four things the indexer has to handle
&lt;/h2&gt;

&lt;p&gt;Reorgs. Before it is final, a block can be replaced by another one, and the events it contained disappear or come back in a different order. Store the block number and block hash with every event. Distinguish a seen event from a final one according to the finality rule of the chain you use, not a confirmation count picked by feel. When the hash of a block you already read no longer matches, walk back to the common ancestor and re-read.&lt;/p&gt;

&lt;p&gt;Idempotency. The same event will arrive more than once: after a restart, after a timeout, after a reorg. The natural key is the transaction hash plus the log index within the transaction. An internal counter or the arrival time identifies nothing. With a unique constraint on that key, the second write becomes harmless.&lt;/p&gt;

&lt;p&gt;Gaps. The service stops for a deploy, the node returns an error on a block range, a page of results is truncated by the provider's limits. If the indexer restarts from the current block, that range is lost silently. You need a persistent checkpoint of the last block processed successfully, a backfill job that re-reads from it, and a check that reports gaps instead of hiding them.&lt;/p&gt;

&lt;p&gt;The provider. Your RPC node is a production dependency like a database or a queue: it has rate limits, outages and sometimes lagging data. Treat it like any external service, with explicit timeouts, retries with backoff, metrics and alerts. And compare it periodically with a second, independent source, at least for the balances and states that matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for a delivery
&lt;/h2&gt;

&lt;p&gt;The indexer is not glue code. It belongs in the project scope with its own tests: a simulated reorg, a duplicated event, a skipped range. It belongs in the runbook, with an owner and a procedure to rebuild the copy from scratch. And it belongs in the estimate, because it is real work, often more than the contract itself.&lt;/p&gt;

&lt;p&gt;The chain is final. Your copy of it is not, until you design it to be.&lt;/p&gt;

&lt;p&gt;Who in your team owns the indexer?&lt;/p&gt;

&lt;p&gt;Updates and the original version: &lt;a href="https://www.omarbaruzzo.it/en/blog/leggere-la-catena-in-produzione" rel="noopener noreferrer"&gt;designing the read path of a blockchain integration&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Articolo originale: &lt;a href="https://www.omarbaruzzo.it/en/blog/leggere-la-catena-in-produzione" rel="noopener noreferrer"&gt;https://www.omarbaruzzo.it/en/blog/leggere-la-catena-in-produzione&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>enterprise</category>
      <category>web3</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
