Az irányoktól a végrehajtásig
governance és auditálhatóság egy autonóm AI-flottában
governance and auditability in an autonomous AI fleet
An English version of this article follows below. Jump to the English version.
Egy hete arról írtam, hogy merre tart a saját AI-flottám: összefoglaltam az irányokat, a gyors nyereségeket és a nagyobb architekturális lépéseket. Az azóta eltelt idő nagyrészt arról szólt, hogy ezekből az irányokból konkrét mechanizmus legyen. Nem elvek, hanem beépített kapuk, naplók és attribúciós láncok. Ez a cikk arról szól, mit jelent a gyakorlatban, amikor egy autonóm rendszer nemcsak cselekszik, hanem el is számol a cselekedeteiért.
1. Az ígéret és a beváltása
A szeptember 15-i összegzésben azt fogalmaztam meg irányként, hogy egy önállóan cselekvő rendszernél a bizalom nem érzelem kérdése, hanem a nyomon követhetőségé. Egy autonóm ügynök-flotta ugyanis nem automatizált szkriptek gyűjteménye, hanem elosztott döntési rendszer, ahol az egyes ügynökök önálló cselekvési jogkörrel bírnak. Nagyvállalati IT-szemmel ez pontosan az a konfiguráció, amely megfelelő korlátok nélkül az irányítás elvesztéséhez vezet.
A kérdés az én olvasatomban nem az, hogy megbízhat-e az ember az AI-ban, hanem hogy ha valami elromlik, meg tudjuk-e mondani: melyik ügynök, milyen jogkörrel, mikor és milyen külső hatásra hozta azt a döntést. Enélkül nincs sem incidensvizsgálat, sem felelősség. A szeptemberi időszak arról szólt, hogy ezt a képességet ne ígéretként, hanem beépített rétegként kapja meg a rendszer. Három pillérre bontom: a látható kapukra, a megbízható adatrétegre, és a láthatatlan, de nélkülözhetetlen minőségi befektetésre.
2. Első pillér: a látható kapuk
2.1 A fail-closed elv
A legélesebb változás a visszafordíthatatlan műveletek kezelése. Korábban a rendszer megkísérelhetett veszélyes lépéseket, például fájlok törlését, erőltetett verzió-felülírást vagy adatbázis-séma eldobását, ha az összefüggésből úgy tűnt, ez a kért feladat. Most ezeket egy fail-closed kapu állítja meg. A logika szándékosan fordított a megszokott szoftveres alaphelyzethez képest: ha a kapu ellenőrző szkriptje nem érhető el, hibát dob, vagy időtúllépéssel leáll, az eredmény mindig elutasítás, sosem végrehajtás. A fail-open lehetőség architekturálisan ki van zárva.
Az én olvasatomban ez a legfontosabb tervezési döntés az egészben. Egy elromlott ellenőrzés sem nyithat kiskaput. A meghibásodás iránya a biztonság felé mutat, nem a kényelem felé. Ez drágább üzemeltetni, mert több riasztással és több kézi jóváhagyással jár, de pontosan ez az ár, amit az ellenőrizhetőségért fizetek. Egy fail-open rendszer csak reménykedik, hogy a kivételes eset nem következik be.
2.2 Az elmaradt műveletek is események
A második réteg az auditnapló láthatóságáról szól. Korábban a napló azt rögzítette, ami megtörtént. Most azt is, ami nem történt meg, és miért. Ha egy folyamat érzékeny, személyes adatot próbál mentés előtti tisztítás nélkül továbbadni, az esemény naplóba kerül. Ha egy ütemezett feladat azért nem fut le, mert a célzott munkamenet nem él, az sem csendben marad ki, hanem rögzül. Ha egy jóváhagyás-kérelem döntés nélkül lejár, maga az időtúllépés is auditált esemény.
Ezek az elmaradt végrehajtások korábban láthatatlanok voltak. Éppen ez a fajta hiányzó adat a legveszélyesebb: egy meg nem történt művelet kívülről ugyanúgy néz ki, mint egy sikeres, csendes lefutás. Azzal, hogy a rendszer a nem-eseményeket is naplózza, a viselkedésének a teljes képe válik láthatóvá, nem csak a sikeres fele.
2.3 Principal-attribúció és a napló tisztasága
A harmadik elem a principal-attribúció. Minden auditált eseménynél rögzítve van, melyik identitás kezdeményezte. Ez nem pusztán az ügynök azonosítója, hanem az is, hogy a kérés milyen csatornán és milyen jogosultsági kontextusban érkezett. A cél egyszerű: ha hat hónappal később kérdés merül fel egy döntés eredetéről, a nyom ne csak azt mondja meg, mi történt, hanem azt is, kinek a nevében.
Van egy negyedik, ritkán emlegetett terület is: a verziókezelési napló integritása. A commit-üzenetekbe olykor beszivárognak belső azonosítók, amelyek a nyilvánosan olvasható projekt-történetben félrevezetőek, mert külső hivatkozásnak látszanak, holott belső mutatók. Erre gépi kapu épült, amely a feltöltés előtt ellenőrzi, hogy sem a commit tárgya, sem a törzse nem tartalmaz ilyen szivárgást. Technikai apróságnak tűnik, de az auditálhatóság szempontjából alapvetés: a verziókezelési napló is forrás, és ha az szennyezett, az egész nyomvonal megbízhatatlan.
Egy dologgal tartozom az őszinteségnek. A mentés előtti adattisztítás a beérkező tartalomra garantált, a már korábban eltárolt tartalmak visszamenőleges újravizsgálata viszont egyelőre nyitott kérdés. Egy importszűrő definíció szerint csak azt látja, ami éppen bejön. Ezt a hiányt tudatosan tartom számon, és a következő lépések egyike lesz.
3. Második pillér: a megbízható adat
A látható kapuk csak annyira megbízhatók, amennyire az alattuk lévő adatréteg. Ez nem elvont állítás, hanem konkrét, felderített gyengeségek javításából következik. Ha a kapu beállításai fájlban élnének, és versenyhelyzetben olvasódnának ki, maga a kapu sem lenne megbízható.
Az első ilyen terület az adatbázis egyidejű használata. Egy memória-intenzív, több párhuzamos kérést kiszolgáló rendszernél a "működik egyszálú tesztben" nem elég garancia. Versenyhelyzetben az írási tranzakciók zavarhatják egymást, és a megfelelő hangolás nélkül a rendszer időnként sikertelen írásokat produkál, hibaüzenet nélkül, csendes adatvesztéssel. Ezeket a feltételeket azonosítottam és kezeltem.
A második a konfiguráció adatbázisba mozgatása. Korábban egyes rendszerparaméterek fájlokban éltek. Ez fejlesztés közben rugalmas, éles üzemben viszont auditálhatatlan: ha a beállítás változik, a változás nem kerül a verziótörténetbe, nem látszik a naplóban, és egyidejű olvasáskor akár ellentmondásos állapotot is mutathat. Az adatbázisba emeléssel a konfiguráció ugyanazt az infrastruktúrát kapja, amely a többi rendszeradatot naplózza és védi. A harmadik a feladat-átadások eredetének rögzítése: az ügynökök közötti delegálásnál nemcsak az látszik, ki dolgozik éppen, hanem az is, ki adta ki a feladatot és mikor. Ha egy feladat elveszik vagy rossz eredménnyel zárul, a nyom visszavezethető az eredeti megbízásig.
4. Harmadik pillér: a láthatatlan befektetés
A governance-kapuk és a megbízható adatréteg keveset érnek, ha a mögöttük álló kódot nem lehet biztonságosan változtatni. Ezért a szeptemberi időszak egyik legjelentősebb befektetése éppen a legkevésbé látványos: a backend teszt-lefedettség érdemi emelése.
A kiindulópont nagyjából a kódsorok felét lefedő állapot volt, ami azt jelenti, hogy a végrehajtási útvonalak jelentős részét nem védte automatizált teszt. A mostani szint ennél számottevően magasabb, nagyjából háromnegyed körüli és afölötti. Fontos, hogy ez nem a teljes lefedettség hajszolása, a száz százalék mítosz, nem cél. A lényeg, hogy a kritikus útvonalak, az API-határok, a migrációs logika és a naplóírások mostanra tesztelve vannak.
A puszta százalék önmagában keveset mond. A valódi értéke az, amit lehetővé tesz. Egy átalakítás, ami korábban a "remélem, nem törtem el semmit" érzésével járt, most hibaüzenettel áll meg, ha visszaesést okoz. Az auditnaplóba vetett bizalom csak akkor értelmes, ha magának a naplózó kódnak a módosítása is ellenőrzött feltételek között történik. A lefedettséget nem véletlenszerűen, hanem sorozatos, célzott lépésekben, tudatosan a legmagasabb kockázatú részeket célozva emeltem.
5. Üzemeltetői mérleg
Érdemes kilépni a kódból, és megnézni, mit ér ez üzemeltetési szempontból. A legkisebb jogosultság elve itt kettős terhet visel. Egyrészt védi a rendszert: ha egy ügynök kompromittálódik, akár egy szándékos támadás, akár egy félreértelmezés miatt, a kár szándékosan korlátozott marad. Másrészt fegyelmet kényszerít: ha egy ügynök jogkörét pontosan definiálni kell, az a specifikáció pontosságát is megköveteli. A "majd megoldom, ha kell" hozzáállás egy autonóm rendszernél nem opció, mert a kár akkor keletkezik, mielőtt az ember reagálni tudna.
Az auditálhatóság pedig a megfelelőség alapköve. Egy strukturált nyomvonal, amely megmutatja, ki delegált mit, mikor, ki hagyta jóvá, és mi lett az eredmény, nem csupán utólagos igazolás. Ez az a réteg, amely lehetővé teszi a folyamatos javítást: hol tért el az ügynök a specifikációtól, hol kellett emberi beavatkozás, melyek az ismétlődő döntési minták. Egy megfelelőségi kontextusban, gondoljunk akár a hazai és európai szabályozási elvárásokra, ez nem opcionális extra, hanem a rendszer legitimitásának feltétele. Ebben az olvasatban a governance nem korlátozás, hanem az egyetlen módja annak, hogy egy autonóm rendszer hosszú távon is fenntartható sebességgel működjön.
6. Összefoglalás
| Terület | Korábbi állapot | Mostani állapot |
|---|---|---|
| Veszélyes műveletek | Kontextus alapján megtörténhettek | Fail-closed kapu, a hiba iránya a biztonság |
| Elmaradt műveletek | Láthatatlanok, csendes kimaradás | Auditált események, indoklással |
| Döntés eredete | Nem visszakereshető | Principal-attribúció minden eseménynél |
| Verziókezelési napló | Belső azonosítók szivároghattak | Gépi kapu a feltöltés előtt |
| Konfiguráció | Fájlban, auditálhatatlanul | Adatbázisban, naplózva és védve |
| Adatbázis-egyidejűség | Csendes, hibaüzenet nélküli írásvesztés | Azonosított és kezelt versenyhelyzet |
| Teszt-lefedettség | Nagyjából a kódsorok fele | Háromnegyed körüli, a kritikus utakon |
A három pillér együtt áll össze egésszé. A governance-réteg adja a "mi történt" láthatóságát, az adatréteg-robusztusság adja a garanciát, hogy ez a "mi történt" adat maga megbízható, a teszt-lefedettség pedig azt, hogy az egész rendszer karbantartható marad, tehát nemcsak ma helyes, hanem holnap is az. Az én tanulságom ebből az, hogy az autonómia és az elszámoltathatóság nem egymás ellentétei. Éppen fordítva: minél nagyobb önállóságot adok egy rendszernek, annál inkább a beépített kapukon és a hiánytalan naplón múlik, hogy ez az önállóság érték marad, és nem kockázattá válik.
A cikk a cett/marveen fork governance- és auditálhatóság-rétegének 2026-09-23-i állapotát tükrözi.
Van kérdésed, vagy beszélgetnél a témáról? Írj emailben: info@jonasgergo.hu, vagy keress meg LinkedInen.
English version
A week ago I wrote about where my own AI fleet is heading: I summarised the directions, the quick wins and the larger architectural steps. The time since then has been largely about turning these directions into concrete mechanisms. Not principles but built-in gates, logs and attribution chains. This article is about what it means in practice when an autonomous system does not only act but also accounts for its actions.
1. The promise and its delivery
In the summary of 15 September I set out as a direction that for a system that acts on its own, trust is not a matter of feeling but of traceability. An autonomous agent fleet is not a collection of automated scripts but a distributed decision system in which individual agents have their own authority to act. Seen through the eyes of large-enterprise IT, this is exactly the configuration that, without proper limits, leads to a loss of control.
The question, in my reading, is not whether a person can trust AI, but whether, if something goes wrong, we can say which agent, with what authority, when and under what external influence made that decision. Without this there can be neither incident investigation nor accountability. The September period was about giving the system this capability not as a promise but as a built-in layer. I split it into three pillars: the visible gates, the reliable data layer, and the invisible but indispensable quality investment.
2. First pillar: the visible gates
2.1 The fail-closed principle
The sharpest change is the handling of irreversible operations. Previously the system could attempt dangerous steps, for example deleting files, a forced overwrite of a version (a force-push) or dropping a database schema, if it seemed from the context that this was the requested task. Now these are stopped by a fail-closed gate. The logic is deliberately the reverse of the usual software default: if the checking script of the gate is unavailable, throws an error or stops with a timeout, the result is always a refusal, never an execution. The fail-open option is architecturally excluded.
In my reading this is the most important design decision of the whole. Even a broken check must not open a back door. The direction of failure points towards safety, not towards convenience. This is more expensive to operate, because it comes with more alerts and more manual approvals, but this is exactly the price I pay for verifiability. A fail-open system merely hopes that the exceptional case does not occur.
2.2 Skipped operations are events too
The second layer is about the visibility of the audit log. Previously the log recorded what happened. Now it also records what did not happen, and why. If a process tries to pass on sensitive personal data without the pre-storage scrubbing step, the event goes into the log. If a scheduled task does not run because the targeted session is not alive, that does not silently drop out either; it is recorded. If an approval request expires without a decision, the timeout itself is an audited event.
These skipped runs used to be invisible. It is precisely this kind of missing data that is most dangerous: an operation that did not happen looks from the outside the same as a successful, quiet run. By logging the non-events as well, the whole picture of the system's behaviour becomes visible, not only its successful half.
2.3 Principal attribution and the cleanliness of the log
The third element is attribution to the acting identity, or principal attribution. For every audited event it is recorded which identity initiated it. This is not merely the identifier of the agent, but also the channel the request arrived through and the authorisation context it arrived in. The aim is simple: if a question about the origin of a decision comes up six months later, the trail should say not only what happened but also on whose behalf.
There is also a fourth, rarely mentioned area: the integrity of the version-control log. Internal identifiers sometimes seep into commit messages, which are misleading in the publicly readable project history, because they look like external references although they are internal pointers. An automated gate was built for this, which before upload checks that neither the subject nor the body of the commit contains such a leak. It looks like a technical detail, but for auditability it is fundamental: the version-control log is a source too, and if it is contaminated, the whole trail is unreliable.
I should be candid about one thing. Scrubbing before storage is guaranteed for incoming content; re-checking previously stored content retroactively is, for now, an open question. An import filter, by definition, sees only what is coming in at the moment. I keep this gap consciously in mind, and it will be one of the next steps.
3. Second pillar: reliable data
The visible gates are only as reliable as the data layer beneath them. This is not an abstract claim but follows from fixing concrete, discovered weaknesses. If the settings of the gate lived in a file and were read in a race condition, the gate itself would not be reliable either.
The first such area is the concurrent use of the database. For a memory-intensive system that serves several parallel requests, "it works in a single-threaded test" is not enough of a guarantee. In a race condition, write transactions can interfere with each other, and without proper tuning the system now and then produces failed writes, without an error message, with silent data loss. I identified and handled these conditions.
The second is moving the configuration into the database. Previously some system parameters lived in files. That is flexible during development, but in live operation it cannot be audited: when a setting changes, the change does not go into the version history, does not show in the log, and when read concurrently it can even show a contradictory state. By moving it into the database, the configuration gets the same infrastructure that logs and protects the rest of the system data. The third is recording the origin of task handovers: with delegation between agents it is visible not only who is working at the moment but also who issued the task and when. If a task gets lost or ends with a wrong result, the trail can be traced back to the original assignment.
4. Third pillar: the invisible investment
Governance gates and a reliable data layer are worth little if the code behind them cannot be changed safely. That is why one of the most significant investments of the September period is the least spectacular: a substantial rise in backend test coverage.
The starting point was coverage of roughly half the lines of code, which means that a significant part of the execution paths was not protected by an automated test. The present level is considerably higher, roughly three quarters, or a little more. It matters that this is not a chase after full coverage; the hundred-percent myth is not a goal. The point is that the critical paths, the API boundaries, the migration logic and the log writes are now tested.
The bare percentage says little in itself. Its real value is what it makes possible. A refactoring that used to come with the feeling of "I hope I did not break anything" now stops with an error message if it causes a regression. Trust in the audit log makes sense only if the modification of the logging code itself also happens under controlled conditions. I raised the coverage not at random but in a series of targeted steps, deliberately aiming at the highest-risk parts.
5. The operator's scorecard
It is worth stepping out of the code and looking at what this is worth from an operations point of view. The principle of least privilege does double duty here. On the one hand it protects the system: if an agent is compromised, whether by a deliberate attack or a misunderstanding, the damage is deliberately kept limited. On the other hand it forces discipline: if the authority of an agent has to be defined precisely, that also demands precision of the specification. A "I will sort it out when needed" attitude is not an option with an autonomous system, because the damage occurs before a human can react.
Auditability, in turn, is the cornerstone of compliance. A structured trail that shows who delegated what, when, who approved it, and what the result was is not merely after-the-fact proof. This is the layer that makes continuous improvement possible: where the agent departed from the specification, where human intervention was needed, what the recurring decision patterns are. In a compliance context, think of Hungarian and European regulatory expectations, this is not an optional extra but a condition for the system's legitimacy. In this reading, governance is not a restriction but the only way for an autonomous system to run at a sustainable speed in the long term.
6. Summary
| Area | Earlier state | Present state |
|---|---|---|
| Dangerous operations | They could happen, based on context | A fail-closed gate, the direction of failure is safety |
| Skipped operations | Invisible, a silent omission | Audited events, with a reason |
| Origin of a decision | Not traceable | Principal attribution on every event |
| Version-control log | Internal identifiers could leak | An automated gate before upload |
| Configuration | In a file, unauditable | In the database, logged and protected |
| Database concurrency | Silent write loss without an error message | A race condition identified and handled |
| Test coverage | Roughly half of the lines of code | Around three quarters, on the critical paths |
The three pillars come together into a whole. The governance layer gives the visibility of "what happened", the robustness of the data layer gives the guarantee that this "what happened" data is itself reliable, and test coverage ensures that the whole system stays maintainable, that is, correct not only today but tomorrow too. My lesson from this is that autonomy and accountability are not opposites. Quite the reverse: the more autonomy I give a system, the more it depends on the built-in gates and the complete log whether this autonomy remains an asset rather than turning into a risk.
This article reflects the state of the governance and auditability layer of the cett/marveen fork on 23 September 2026.
Do you have a question, or would you like to talk about the topic? Write to me by email: info@jonasgergo.hu, or find me on LinkedIn.