<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Palimpsests notes</title>
  <link>https://palimpsests.dev/notes/</link>
  <atom:link href="https://palimpsests.dev/notes/feed.xml" rel="self" type="application/rss+xml" />
  <description>Short notes on audit logs for AI systems, the EU AI Act and running language models on your own hardware.</description>
  <language>en</language>
  <lastBuildDate>Fri, 04 Dec 2026 09:00:00 +0000</lastBuildDate>
  <item>
    <title>EU AI Act log retention: who keeps the logs, and for how long</title>
    <link>https://palimpsests.dev/notes/eu-ai-act-log-retention/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/eu-ai-act-log-retention/</guid>
    <pubDate>Fri, 04 Dec 2026 09:00:00 +0000</pubDate>
    <category>eu-ai-act</category>
    <category>log-retention</category>
    <category>record-keeping</category>
    <description>The EU AI Act&#x27;s record-keeping rules for high-risk AI systems, read article by article: six months is a floor, it falls on whoever controls the logs, and it starts in December 2027.</description>
    <content:encoded><![CDATA[<p>The EU AI Act says high-risk AI systems must keep logs. Ask how long, and most answers say "six months". That is true and leaves out most of what matters: six months is the least, not the most; it falls on two different parties; and it covers only the logs each of them actually holds.</p>
<p>This note reads the record-keeping rules for high-risk AI systems article by article. It was checked against the consolidated text of the Act on 4 December 2026. It is not legal advice.</p>
<h2 id="the-short-answer">The short answer</h2>
<ul>
  <li><b>How long:</b> for a period that fits what the system is for, and <b>at least six months</b>.</li>
  <li><b>Who:</b> the provider of the system, and the organisation that deploys it. Each keeps the logs that are under its own control.</li>
  <li><b>Unless:</b> another EU or national law says otherwise. The Act names data protection law in particular.</li>
  <li><b>From when:</b> 2 December 2027 for high-risk systems listed in Annex III, 2 August 2028 for AI built into products covered by Annex I.</li>
  <li><b>Only for high-risk systems.</b> These articles do not apply to other AI systems.</li>
</ul>
<h2 id="three-articles-three-different-duties">Three articles, three different duties</h2>
<p>People quote "Article 12" for all of this. The retention period is not in Article 12.</p>
<p><b>Article 12 is about the system.</b> A high-risk AI system must technically allow events to be recorded automatically, over the whole lifetime of the system. The logs must make the system's working traceable enough for three purposes: to spot situations where the system may present a risk or has been substantially modified, to support the provider's monitoring after the system is on the market, and to let the deployer monitor how it operates. Article 12 says what the system must be able to do. It does not say who keeps the result, or for how long.</p>
<p><b>Article 19 is about the provider.</b> The provider keeps the automatically generated logs, as far as those logs are under its control, for a period appropriate to the intended purpose of the system and for at least six months, unless other applicable EU or national law provides otherwise.</p>
<p><b>Article 26(6) is about the deployer.</b> The deployer, meaning the organisation that uses the system, keeps the logs under the same terms: as far as they are under its control, for a period appropriate to the intended purpose, at least six months, unless other law provides otherwise.</p>
<p>So there are two keepers, and the same sentence written twice.</p>
<h2 id="six-months-is-a-floor">Six months is a floor</h2>
<p>The wording is "a period appropriate to the intended purpose of the high-risk AI system, of at least six months". The first half is the rule. The second half is the minimum.</p>
<p>A system whose decisions can be challenged a year later, or whose effects show slowly, has an appropriate period longer than six months. The Act does not give a number for those cases. The provider and the deployer have to choose one and be able to explain it.</p>
<p>Two things can move the period:</p>
<ul>
  <li><b>Other law can set a different one.</b> Rules for a particular sector may require records for years. Where they do, they decide.</li>
  <li><b>Data protection law pulls the other way.</b> If the logs hold personal data, keeping them "just in case" for longer than needed is its own problem. The Act says so in the same sentence, by pointing at data protection law.</li>
</ul>
<p>Financial institutions get a line of their own in both articles: they keep the logs as part of the records they already keep under financial services law.</p>
<h2 id="under-their-control-decides-who-holds-what">"Under their control" decides who holds what</h2>
<p>Both duties cover logs only "to the extent such logs are under their control". Where the system runs decides what that means.</p>
<ul>
  <li><b>The deployer runs the system on its own machines.</b> The logs are written there and stay there. The deployer holds them and has the retention duty. The provider may hold nothing.</li>
  <li><b>The provider runs the system as a service.</b> The logs are written on the provider's side. The provider holds them. The deployer has to make sure it can get what it needs, because its own duties (monitoring, reporting incidents) depend on those logs.</li>
  <li><b>Both hold a part.</b> Then both keep their part.</li>
</ul>
<p>This is worth settling in the contract before the first log line is written. "Who holds the logs, for how long, and how does the other side get a copy" is a question with a different answer for every deployment.</p>
<h2 id="logs-are-not-among-the-ten-year-documents">Logs are not among the ten-year documents</h2>
<p>Article 18 makes providers keep certain documents for ten years after the system is placed on the market: the technical documentation, the quality management documentation, the declaration of conformity, and the decisions of notified bodies. Logs are not in that list. Their period is the one in Article 19.</p>
<p>So a provider keeps a description of how the system logs for ten years, and the logs themselves for the appropriate period.</p>
<h2 id="who-can-ask-to-see-them">Who can ask to see them</h2>
<p>Under Article 21, a competent authority can make a reasoned request, and the provider must then give it access to the automatically generated logs, again as far as they are under the provider's control. What the authority learns is covered by the Act's confidentiality rules.</p>
<p>A log that has to be shown to an authority should be in a state you are willing to show. That is a practical reason to keep content out of it, which the last sections come back to.</p>
<h2 id="when-the-duties-start">When the duties start</h2>
<p>The dates were moved in 2026. Regulation (EU) 2026/1744, known as the Digital Omnibus on AI, was published on 24 July 2026 and entered into force on 27 July 2026. As amended, Article 113 says the rules for high-risk systems apply from:</p>
<ul>
  <li><b>2 December 2027</b> for systems that are high-risk under Article 6(2) and Annex III;</li>
  <li><b>2 August 2028</b> for systems that are high-risk under Article 6(1) and Annex I.</li>
</ul>
<p>Articles 12, 19 and 26 sit in the part of the Act that these dates govern. The consolidated text published by the Commission marks which provisions the Omnibus changed. It marks no change in Article 12, Article 19 or Article 26(6): the dates moved, the record-keeping duties read as they did.</p>
<p>Two more things from Article 111:</p>
<ul>
  <li>A high-risk system already on the market before its date falls under the Act only if its design is significantly changed after that date.</li>
  <li>Systems intended for use by public authorities must comply by 2 August 2030 in any case.</li>
</ul>
<p>The duty to keep logs starts on those dates. Nothing asks for six months of history on the first day. The calendar is still shorter than it looks, because a retention setup can only be tested by running it: the first deletion under a six-month period happens six months after the first record. A team that wants to have seen one full cycle, from writing through deleting to checking what is left, before 2 December 2027 has to be logging by the start of June 2027.</p>
<h2 id="what-the-act-does-not-say">What the Act does not say</h2>
<ul>
  <li><b>It gives no format.</b> Nothing in these articles says how a log is structured or stored. That is left to standards, which were still drafts when we <a href="https://palimpsests.dev/notes/ai-logging-standards-24970-18229/">last looked at them</a> in October 2026.</li>
  <li><b>It lists events for one kind of system only.</b> Article 12(3) names what must be logged for remote biometric identification: the period of each use, the reference database, the input data that led to a match, and who verified the result. For every other high-risk system the Act gives the purposes and leaves the list to the provider.</li>
  <li><b>It does not say what happens at the end of the period.</b> Deleting is allowed; how to do it so that the rest of the record can still be trusted is not addressed.</li>
</ul>
<h2 id="keeping-less-makes-the-period-easier">Keeping less makes the period easier</h2>
<p>The two pressures above look like a conflict: keep logs for at least six months, and do not keep personal data longer than needed. Most of the conflict comes from logs that hold content, such as prompts, replies and the data a tool was given.</p>
<p>A log that records what happened without the content is easier on both sides. It can be kept for the whole appropriate period, shown to an authority, and handed to an auditor, because there is little in it to protect. What it loses is the ability to show the content by itself. That is recovered by keeping a fingerprint of the content in the log: whoever still has the content can prove it is the one that was used.</p>
<p>Three properties matter when the period ends:</p>
<ul>
  <li><b>Deletion is declared.</b> When old records are removed, the log says that a part was removed and what came before it. A reader can tell a planned deletion from a hole.</li>
  <li><b>The rest still verifies.</b> Removing the oldest part does not break the check of what remains.</li>
  <li><b>The period is written down.</b> The log itself states how long it is meant to be kept, so the answer does not depend on someone's memory.</li>
</ul>
<h2 id="how-palimpsests-does-this">How Palimpsests does this</h2>
<p><a href="https://palimpsests.dev/">Palimpsests</a> is an open-source audit log for AI agents and local models. On retention it does four things:</p>
<ul>
  <li>it cuts its log into parts by size or age, and each new part opens with a record of what came before, so old parts can be deleted and the rest still verifies;</li>
  <li>it lets the operator state a retention period, which is written into the log;</li>
  <li>it records fingerprints of tool arguments and results, not the content, and from version 0.16 makes them with a key that stays with the operator;</li>
  <li>it lets the operator destroy that key for an old part, and writes into the log that the key was destroyed.</li>
</ul>
<p>The steps are in two runbook pages: <a href="https://palimpsests.dev/runbook/rotate-a-hash-chained-log/">keep a log for six months without filling the disk</a> and <a href="https://palimpsests.dev/runbook/erase-data-from-an-ai-audit-log/">erase what an AI log can prove</a>.</p>
<p>It is a logging tool, not a compliance product. Choosing the appropriate period, settling who holds the logs, and every other obligation for high-risk systems remain with the provider and the deployer.</p>
<h2 id="the-text-to-read-yourself">The text, to read yourself</h2>
<p>The Commission's AI Act Service Desk publishes the consolidated text with the 2026 amendments marked:</p>
<ul>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-12">Article 12: Record-keeping</a></li>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-18">Article 18: Documentation keeping</a></li>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-19">Article 19: Automatically generated logs</a></li>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-21">Article 21: Cooperation with competent authorities</a></li>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-26">Article 26: Obligations of deployers</a></li>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-111">Article 111: Systems already on the market</a></li>
  <li><a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-113">Article 113: Entry into force and application</a></li>
</ul>
<p>What the Act asks of a log, set beside what a Palimpsests log records, is on one page: <a href="https://palimpsests.dev/eu-ai-act-article-12/">EU AI Act Article 12</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>AI on small devices, and the log they keep</title>
    <link>https://palimpsests.dev/notes/ai-on-small-devices-and-the-log-they-keep/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/ai-on-small-devices-and-the-log-they-keep/</guid>
    <pubDate>Sun, 22 Nov 2026 09:00:00 +0000</pubDate>
    <category>iot</category>
    <category>edge-ai</category>
    <category>audit-log</category>
    <category>pala-1</category>
    <description>A device that decides things alone needs a record someone else can check later. What makes that hard on a device, what PALA-1 does about each part, and what it does not do yet.</description>
    <content:encoded><![CDATA[<p>A camera at a gate decides whether to open it. A box in a workshop listens to a motor and decides when to stop the line. A robot in a warehouse chooses its own route. In each of them a model makes the decision, and nobody is standing next to it.</p>
<p>Later someone asks what the device decided, and why. The owner asks, or an insurer, or an inspector. The answer comes from whatever the device wrote down. So the real question is whether that record can be trusted by a person who did not write it.</p>
<p>This note is about that record: why it is harder to keep on a device than on a server, and why we think PALA-1 is the right shape for it.</p>
<h2 id="what-is-hard-about-a-device">What is hard about a device</h2>
<p>A server sits in a room with power, a network, a clock and an administrator. A device has none of these for certain.</p>
<ul>
  <li><b>It does not know the time.</b> A small computer without a clock battery starts in 1970. The network that would correct it may not be there.</li>
  <li><b>It loses power in the middle of a sentence.</b> Somebody pulls the plug while a record is half written.</li>
  <li><b>It restarts often,</b> and each restart is a chance to lose the thread.</li>
  <li><b>It has little storage.</b> Old records have to go, or the device stops.</li>
  <li><b>It gets overloaded,</b> and then something is dropped.</li>
  <li><b>It is offline,</b> for hours or for good. There is no cloud to send the log to as it is written.</li>
  <li><b>Its owner holds it in their hands,</b> with the storage and everything on it.</li>
  <li><b>What it sees is private.</b> A camera sees faces. A device in a home hears the home.</li>
  <li><b>It outlives its software.</b> A machine works for ten years or more. The company that wrote its log code may not.</li>
</ul>
<p>A log format made for servers assumes most of this away. A plain text file, or one line of JSON per event, says nothing about any of it: a wrong date looks like a right one, a missing hour looks like a quiet hour, and anyone with the file can edit it.</p>
<h2 id="what-pala-1-does-about-each">What PALA-1 does about each</h2>
<p>PALA-1 is a format for a log: the exact bytes of each record, and the rules for checking them. Every record carries the hash of the one before it, so a change anywhere shows up in everything after. That part is common. The rest was designed around the list above.</p>
<p><b>Time.</b> Each record has two clocks: a counter since the device started, which is always there, and the date, which may not be. Next to the date is a field saying how far to believe it: unknown, free-running, a battery clock, or set from outside. A device that does not know the date writes zero and says so, and a reader must report a date written next to "unknown" as an error. Order never depends on the date; it comes from the record's number.</p>
<p><b>Power cuts.</b> By default the writer returns only after the record is on storage. If the last record was cut in half, the next start removes the half and writes down that it did.</p>
<p><b>Restarts.</b> Each start writes a record that links to the last record of the previous run. The chain goes through a power cycle unbroken, and a reader can count the restarts. Since version 0.15 a writer also records its own opening and closing, so a run that ended without closing is visible as such.</p>
<p><b>Little storage.</b> The log can be cut into pieces, and old pieces can be deleted. The first record of each new piece states what came before it and what the keeping period was. A reader who has only the recent pieces sees a log whose beginning is gone and which says why, not a log that looks tampered with.</p>
<p><b>Overload.</b> If records are dropped, a record is written saying how many and of what kind. That record is never itself dropped. A gap you can see is survivable. A gap you cannot see is a log that lies.</p>
<p><b>Offline.</b> Checking needs the file and nothing else: no account, no service, no network. The checker's core uses only the Python standard library.</p>
<p><b>The owner.</b> A chain alone cannot stop its owner from writing a new one. What can is a copy of the latest hash kept somewhere the owner cannot change. That copy is 32 bytes, small enough for almost any link a device has.</p>
<p><b>Privacy.</b> The chain is checked from the record headers alone. The contents can be encrypted, and the check does not need the key. So an inspector can confirm that nothing was changed or removed without seeing a single face. If the contents must be erased, the key is destroyed, the contents become noise, and the chain still holds.</p>
<p><b>Ten years.</b> The format is frozen at version 1.0 and published with no rights reserved, together with test files that say byte for byte what a correct reader must produce. Five readers have been written independently, three of them outside this project. A log written today does not depend on our code still running.</p>
<h2 id="why-this-format-and-not-another">Why this format and not another</h2>
<p>Four properties matter more on a device than anywhere else.</p>
<p>It is <b>binary and fixed.</b> A record starts with 156 bytes laid out in a table, and the hash is taken over those bytes as they are. There is no text to normalise and no numbers to round, so two programs cannot disagree about what was hashed. On small hardware that is also simply less work.</p>
<p>It <b>says what it does not know.</b> The time may be unknown. The level of trust is a field, not a promise. A dropped record is counted. A tool result the recorder could not see is marked as unseen. A log that admits its limits survives questions that a confident one does not.</p>
<p>It <b>separates the envelope from the meaning.</b> The chain, the clocks and the checks are the core. What an event means lives in a profile on top. Today there is one profile, for AI systems: tool calls, incidents, human oversight, declared deletions. A profile for sensor readings or actuator commands could be added without touching the core or breaking any reader.</p>
<p>It <b>can be checked by the other side.</b> The point of a record is the person who doubts it. They can use their own reader, written from the document.</p>
<h2 id="what-it-does-not-do-yet">What it does not do yet</h2>
<p>We would rather say this here than have you find it.</p>
<ul>
  <li><b>There is no writer for a microcontroller.</b> The writer in this project is Python. It fits a gateway or a single-board computer running Linux, not a chip with kilobytes of memory. What the format asks of such a chip is small: SHA-256 twice per record, a fixed header, a counter that survives a restart, and storage that can be appended to. Nobody has built it and run it, so we claim nothing about it.</li>
  <li><b>Nothing ties the log to the hardware out of the box.</b> The format has a level for a hardware root of trust. This project can keep the anchor in a hardware token, and that path has been tested against a software token only. Saying that one particular device wrote a log needs a real token on that device, and we have not run one. Until then a log proves it was not changed; it does not prove which device wrote it.</li>
  <li><b>The log is not the truth.</b> It proves what the device recorded, unmodified. If the model was wrong, the log keeps the wrong answer faithfully.</li>
  <li><b>There is no device profile.</b> The record kinds that exist are about AI systems.</li>
</ul>
<h2 id="a-shape-that-works-today">A shape that works today</h2>
<p>Put the recorder on the gateway, next to the model: the single-board computer that already runs it. Let the gateway write the chain. Send the latest hash, those 32 bytes, somewhere else on a schedule — to the owner's server, to a second device, to paper. Cut the log by size and delete old pieces by the rule you declared. When someone asks, hand them the file and the command:</p>
<pre><code>palimpsests pala verify device.pala --anchor-file head.txt</code></pre>
<p>They do not need to trust the device, or us.</p>]]></content:encoded>
  </item>
  <item>
    <title>Protecting an audit log from being rewritten from scratch</title>
    <link>https://palimpsests.dev/notes/protecting-an-audit-log-from-being-rewritten/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/protecting-an-audit-log-from-being-rewritten/</guid>
    <pubDate>Thu, 05 Nov 2026 09:00:00 +0000</pubDate>
    <category>audit-log</category>
    <category>tamper-evident</category>
    <category>security</category>
    <category>anchors</category>
    <description>A hash chain catches an edited record but not a log rebuilt from the first record. What closes that gap, from which record on, and what stays open.</description>
    <content:encoded><![CDATA[<p>A hash-chained audit log catches the obvious attack. Change one record and every record after it stops matching, and the check points at the first broken link. That makes it easy to forget the attack the chain can't see on its own: throwing the log away and writing a new one.</p>
<p>This note is about that attack. It explains why the chain alone doesn't catch it, what does, from which record on, and what remains possible however the log is set up.</p>
<h2 id="why-the-chain-alone-can-t-see-it">Why the chain alone can't see it</h2>
<p>Each record holds the hash of the one before it. That proves the records are in order and unchanged <i>relative to each other</i>. It doesn't prove they are the records that were written.</p>
<p>Rebuilding a chain needs no secret. Whoever can write the file can start from the first record, change whatever they like, and recompute every hash. The new chain is internally perfect. Every link verifies, because every link was made for it. A verifier that only reads the file has nothing to compare it with, so it reports the chain as consistent. That is true, and it isn't enough.</p>
<p>The same goes for two quieter versions of the attack: cutting records off the end, and restoring an old copy of the file over a newer one. Both leave a chain whose links all hold.</p>
<h2 id="what-closes-it-a-head-kept-somewhere-else">What closes it: a head kept somewhere else</h2>
<p>The hash of the latest record, the head, is 32 bytes. Copy it to a place the writer of the log can't change, and every later check can compare the chain's end with that copy. In PALA-1 that copy is called the anchor, and comparing with it is the completeness check.</p>
<pre><code>palimpsests pala verify audit.pala --anchor-file head.txt</code></pre>
<p>A rebuilt chain ends in a head the anchor has never seen. The verifier says so in words, not only in its exit code:</p>
<pre><code>completeness: FAILED — the anchored head names no record in this chain —
the log was replaced, rolled back, or truncated</code></pre>
<p>A chain that simply grew past the anchor gets a different sentence, because the anchored head is still in it:</p>
<pre><code>completeness: FAILED — chain extends 2 record(s) beyond the anchored head —
an unanchored tail, not a replacement</code></pre>
<p>Both exit with code 1. The difference matters to whoever investigates. The first means the history you hold isn't the history that was anchored. The second usually means the writer stopped between writing records and copying out the head, for example after a crash.</p>
<p>Without an anchor the check can't answer the question at all. It exits with code 2 and says that completeness wasn't checked. A scheduled check that treats code 2 as a pass doesn't detect a rewrite.</p>
<h2 id="the-window-that-stays-open">The window that stays open</h2>
<p>An anchor protects the records up to the head it holds. Records written after the last copy are protected by nothing yet, and someone who can write the file can still change them. To the check, that looks like an unanchored tail, the same as after a crash.</p>
<p>So how often the head is copied out sets the size of that window. Copying it after every record shrinks the window to the record being written, and costs a write elsewhere each time. Copying it hourly leaves up to an hour of records exposed. Either choice is fine if it is stated. It isn't fine to leave it unstated.</p>
<h2 id="where-the-copy-lives-decides-who-it-stops">Where the copy lives decides who it stops</h2>
<p>An anchor stops anyone who can rewrite the log but can't also rewrite the anchor. That is the whole question when choosing where to keep it.</p>
<ul>
  <li><b>A file or the operating system's keychain on the same machine</b> stops a careless process and a user without full rights. It doesn't stop someone with administrator access, who can change both.</li>
  <li><b>A hardware token</b> (PKCS#11) puts the head where reading it needs a PIN, and where a second object planted under the same name makes the read fail instead of being picked. To get past it, the attacker has to defeat the token too.</li>
  <li><b>A transparency service</b> (SCITT) takes the head outside your organisation. It countersigns a statement over the head with its own key and clock. After that, nobody on your side, administrators included, can make the old head go away. The service's record says it existed, and when.</li>
</ul>
<p>The <a href="https://palimpsests.dev/notes/anatomy-of-a-tamper-evident-audit-log/">anatomy note</a> walks through these three layers together.</p>
<h2 id="old-records-you-delete-on-purpose">Old records you delete on purpose</h2>
<p>Logs aren't kept forever. Deleting expired segments under a retention policy removes the start of the chain, and without more information that looks exactly like a rewrite: the first remaining record isn't the first record ever written.</p>
<p>PALA-1 handles this with a record that declares the cut. When a writer starts a new segment, the segment's first record states which head it continues from, under what retention period, and the root of everything before it. A verifier then reports a declared continuation and checks it against the segments manifest, instead of reporting an unexplained missing start. A whole set of segments can be checked at once. The result keeps two answers apart: whether everything present is consistent, and whether anything is missing. Retention makes a set incomplete. It never makes it inconsistent.</p>
<h2 id="showing-the-history-only-grew">Showing the history only grew</h2>
<p>An anchor answers "is this the chain I anchored?". A second question comes up as soon as you publish heads regularly: does today's chain extend last quarter's?</p>
<p>Since construction v3 a published statement carries the root of the whole chain up to its head. Two such statements and a short consistency proof show that the later chain contains the earlier one unchanged, without handing anyone the records. Someone who kept last quarter's statement can check this quarter's in seconds.</p>
<h2 id="what-none-of-this-proves">What none of this proves</h2>
<ul>
  <li>That the records were true when they were written. The chain proves what was recorded, not that it was right.</li>
  <li>Anything about records written after the last head left the machine.</li>
  <li>Anything against an attacker who controls both the log and every copy of its head. The point of a token or a transparency service is to make that set of copies impossible for one party to hold.</li>
</ul>
<h2 id="further-reading">Further reading</h2>
<ul>
  <li><a href="https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/">Tamper-evident audit logs: how they work and how to build one</a></li>
  <li><a href="https://palimpsests.dev/notes/anatomy-of-a-tamper-evident-audit-log/">Anatomy of a tamper-evident audit log</a></li>
  <li><a href="https://palimpsests.dev/pala-1/">The PALA-1 format</a></li>
  <li><a href="https://palimpsests.dev/verify-without-reading/">Verifying a log without reading it</a></li>
</ul>]]></content:encoded>
  </item>
  <item>
    <title>Can a coding agent implement a binary format from its spec alone?</title>
    <link>https://palimpsests.dev/notes/can-a-coding-agent-implement-a-spec/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/can-a-coding-agent-implement-a-spec/</guid>
    <pubDate>Tue, 27 Oct 2026 09:00:00 +0000</pubDate>
    <category>verification</category>
    <category>specification</category>
    <category>coding-agents</category>
    <description>A small, strict test for coding agents. Give one a frozen specification and its test vectors, no reference code, and ask it to reproduce eleven values byte for byte in a language it chooses.</description>
    <content:encoded><![CDATA[<p>Coding agents now write whole programs from a short description. Most of the tasks they are tested on are forgiving, though. A web page that looks roughly right is fine. A function that passes the tests someone wrote for it is fine.</p>
<p>Here is a less forgiving task. Give an agent the specification of a binary file format and a set of test vectors. No reference implementation, nothing to copy. Ask it to write a verifier in a language of its choice and reproduce eleven published values exactly, down to the last byte of a SHA-256 hash. Then ask it to break the format seven different ways and confirm that the verifier notices each one.</p>
<p>We would like to know how far agents get with that, in which languages, and where they stop. We have a reason to ask, and a format to ask about.</p>
<h2 id="who-we-are-and-why-this-matters-to-us">Who we are and why this matters to us</h2>
<p>We are a small team in Kyiv. We maintain PALA-1, a format for audit logs written by AI systems: an append-only hash chain that can be checked without a key and without opening any record. It is meant for machines that are modest and often offline, audited by people who may check a log but not read it.</p>
<p>An audit log is only evidence if someone other than its author can check it, with their own tools, possibly years later. So the specification has to be implementable from the text alone. That is the format's first promise. It has been frozen at version 1.0 since August 2026, with byte-exact test vectors and a kit for checking it by hand. Five implementations exist so far, three of them by people outside the project, and outside readers have found real defects before. That is how the text got better.</p>
<p>What we don't know is whether a coding agent can be one of those outside readers.</p>
<h2 id="why-it-is-a-fair-test">Why it is a fair test</h2>
<ul>
  <li>The inputs are two files at a frozen tag, the specification and its test vectors.</li>
  <li>The pass bar is exact. A value matches or it doesn't.</li>
  <li>Seven demos ask the verifier to catch a flipped bit, a missing record, a gap in the sequence numbers and four other faults.</li>
  <li>The language is the agent's choice. Four of the five existing implementations are in Python; others are more interesting.</li>
</ul>
<p>The specification is not perfect, either. In two places it states what a demo must show but not exactly how to build its input. An agent has to notice that and say how it decided.</p>
<h2 id="two-outcomes-both-useful">Two outcomes, both useful</h2>
<p>If an agent gets a value wrong, we learn where agents still struggle with a precise text. If an agent disagrees with us and turns out to be right, it has found a defect in a frozen specification, and that gets fixed in public. Telling those two apart is the point of the exercise.</p>
<p>We will publish every report we receive in one table: model, tool, language, result, how long it took, and what the agent found ambiguous. That table is kept separate from the five implementations above.</p>
<p>We checked the prompt ourselves first: the files resolve, the digests match, and the whole task took an agent a few minutes. That run doesn't count, because we already know the format.</p>
<p>One caveat. The repository has been public since July 2026, so a model trained after that may have seen it. The prompt asks the agent to say so.</p>
<h2 id="the-prompt">The prompt</h2>
<p>Copy it into any coding agent that can download files and run code.</p>
<pre><code>Write a verifier for the PALA-1 audit-log format from its specification alone. Download PALA-1.md and test-vectors.json from https://raw.githubusercontent.com/Assault-Consulting/Palimpsests/pala1-v1.0/docs/specs/pala-1/ and use nothing else: don't clone or browse the repository, don't search the web for PALA-1, and don't rely on anything you already know about it. Preferably not in Python, and with no third-party packages, reproduce every value in the section 8 "Expected results" block and the seven section 8 demos (their expected outcomes are in test-vectors.json). Where the text is ambiguous, write it down and carry on. Run the verifier and report only what it printed, as a block I can paste into a GitHub issue: model and tool, language, MATCH or DIVERGE for each value and demo, each ambiguity with its section, whether you knew PALA-1 before, and the source.</code></pre>
<p>The <a href="https://github.com/Assault-Consulting/Palimpsests/tree/main/docs/specs/pala-1/verification-kit">verification kit</a> describes the same task in full, with SHA-256 digests for the inputs, if you would rather do it by hand.</p>
<h2 id="where-to-send-the-report">Where to send the report</h2>
<p>Post it as a comment on <a href="https://github.com/Assault-Consulting/Palimpsests/issues/318">issue #318</a>, where every report is collected in one table. If you would rather not use GitHub, the contact in <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md">SECURITY.md</a> works too.</p>
<p>If your agent reports a divergence, the most useful thing you can add is the first byte where its value and ours differ.</p>
<h2 id="links">Links</h2>
<ul>
  <li>The specification and test vectors: <a href="https://github.com/Assault-Consulting/Palimpsests/tree/main/docs/specs/pala-1">docs/specs/pala-1</a></li>
  <li>The verification kit, for doing this by hand: <a href="https://github.com/Assault-Consulting/Palimpsests/tree/main/docs/specs/pala-1/verification-kit">verification-kit</a></li>
  <li>The record of every run so far: <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/specs/pala-1/INDEPENDENT-VERIFICATION.md">INDEPENDENT-VERIFICATION.md</a></li>
  <li>The format is also described in an Internet-Draft, <a href="https://datatracker.ietf.org/doc/draft-sparysh-pala-audit/">draft-sparysh-pala-audit</a>. It is an individual submission, not an IETF standard.</li>
  <li>More about the format: <a href="https://palimpsests.dev/pala-1/">palimpsests.dev/pala-1</a></li>
</ul>]]></content:encoded>
  </item>
  <item>
    <title>Anatomy of a tamper-evident audit log: PALA-1, a PKCS#11 anchor and SCITT</title>
    <link>https://palimpsests.dev/notes/anatomy-of-a-tamper-evident-audit-log/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/anatomy-of-a-tamper-evident-audit-log/</guid>
    <pubDate>Fri, 23 Oct 2026 09:00:00 +0000</pubDate>
    <category>tamper-evident</category>
    <category>pkcs11</category>
    <category>scitt</category>
    <description>The three layers of a Palimpsests audit log taken apart: the PALA-1 hash chain, the chain head on a PKCS#11 token and SCITT receipts. What each one proves alone, and what they prove together.</description>
    <content:encoded><![CDATA[<p>A tamper-evident audit log has to answer three separate questions. Was any record changed, removed or reordered? Is this the whole log, or was the end cut off? Did this history exist before a given time?</p>
<p>No single mechanism answers all three. Palimpsests uses a separate layer for each: the PALA-1 chain, a copy of the chain's head on a PKCS#11 token, and receipts from a SCITT transparency service. This note takes them apart one at a time and then puts them back together. The general idea behind each layer is in <a href="https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/">tamper-evident audit logs: how they work</a>.</p>
<h2 id="layer-1-the-pala-1-chain">Layer 1: the PALA-1 chain</h2>
<p><a href="https://palimpsests.dev/pala-1/">PALA-1</a> is the record format, frozen at v1.0. Every record has a header and a body. The header holds a sequence number, the hash of the previous record and a SHA-256 digest of the body. The body holds the content and can be encrypted with AES-256-GCM.</p>
<p>A verifier walks the headers in order and checks each body against its digest. It never decrypts anything, so it never needs the key.</p>
<p>What it proves: nothing inside the file was altered, removed or moved, and if something was, which record is the first bad one.</p>
<p>What it can't prove: that the file is complete. A chain with its last records deleted is still a valid chain. It also says nothing about time, because whoever writes the log also controls its clock.</p>
<p>What it costs: one hash per record. The check is described on <a href="https://palimpsests.dev/verify-without-reading/">verify without reading</a>.</p>
<h2 id="layer-2-the-head-on-a-pkcs-11-token">Layer 2: the head on a PKCS#11 token</h2>
<p>The head is the hash of the latest record, 32 bytes. Keep a copy of it somewhere else, compare the chain's end with that copy, and a cut-off end or a swapped file shows up. That copy is the anchor.</p>
<p>A file or the operating system's keychain can hold the anchor, and both are supported. Their weakness is that they sit inside the same machine as the writer, so whoever takes over the host takes over the anchor too. A PKCS#11 token or HSM moves the anchor onto separate hardware. Palimpsests stores the head there as a private data object, and the writer updates it as the chain grows. A verifier with the token's PIN reads it and checks the chain against it.</p>
<p>Version 0.12 tightened this after a problem we found ourselves. Reading the anchor now requires the PIN. If a second object appears under the same name, the read fails with an error instead of picking one. A planted decoy is treated as evidence, never filtered away.</p>
<p>What it proves: the chain ends where the token says it should, so records cut from the end or a wholesale replacement are detected unless the attacker can also rewrite the token.</p>
<p>What it can't prove: anything about time.</p>
<p>Limits worth stating: CI runs against SoftHSM, a software token, which proves the code path but not the hardware guarantee. That needs a real token or HSM. If the PIN sits in a config file next to the writer, the gain is smaller than it looks. A signature made by a key that never leaves the token is planned, not shipped. The design record is <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/adr/0004-tier-b-pkcs11-anchor-and-signing.md">ADR-0004</a>.</p>
<h2 id="layer-3-scitt-receipts">Layer 3: SCITT receipts</h2>
<p>For each head you choose to publish, Palimpsests builds a small signed statement: a COSE_Sign1 that holds the head, the range of sequence numbers it covers and the format name. Since version 0.13 the statement can also carry a root computed over every earlier record. That part is still experimental until someone reproduces it independently. The statement goes to a SCITT transparency service, which adds it to its own append-only log and returns a receipt. No record content leaves the machine, only hashes.</p>
<p>What it proves: this head existed by the time the service recorded it, under the service's identity and clock. A receipted head also makes a strong anchor, because it's held by someone outside your organisation. With the roots in the statements and the consistency proofs added in 0.12, two registered heads can be linked without the chain itself. That shows the log only grew between them.</p>
<p>What it can't prove: anything about the content or its quality. The service saw a digest, nothing more, and its receipt is only as trustworthy as the service.</p>
<p>Where it stands: the statement construction has been reproduced byte for byte from the RFCs twice, and one registration with a verified receipt is on record. It was done against the reference implementation, whose receipt format predates the final RFC. A run against a hosted service with final-format receipts is next. The details are in <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/INTEROP-SCITT.md">what a receipt proves and what it doesn't</a>.</p>
<h2 id="what-the-layers-do-together">What the layers do together</h2>
<p>Take someone who controls the host and holds the encryption key, and wants to change record 500.</p>
<p>Editing the record breaks the chain, so they have to rebuild every record after it. With the key, that's possible.</p>
<p>The rebuilt chain ends in a different head. The token still holds the old one, so the check fails unless they also replace the object on the token. That needs the PIN and an authenticated session, and with real hardware it can also need physical access or another person.</p>
<p>If a head covering record 500 was registered with a SCITT service before the change, the rebuilt chain can't produce that head again. The service's log and its receipt still show the original existed by a certain time. The forgery is detectable even when the attacker holds the host, the key and the token.</p>
<p>So with all three layers, the records someone could still rewrite unnoticed are only those written after the last registered head. How often you register decides how small that window is. A successful forgery stops being a matter of editing a file. It needs the host, the key, the token and the transparency service's log.</p>
<p>Two more things come from the combination. None of the layers needs the content, so the whole log can be checked by someone who isn't allowed to read it. And the first two layers work fully offline. The SCITT step needs a link out only when you register a head.</p>
<h2 id="choosing-a-setup">Choosing a setup</h2>
<p>Not every deployment needs all three:</p>
<ul>
  <li>the chain alone is enough when you trust the storage and only need to catch edits;</li>
  <li>the chain with a file or keychain anchor also catches a cut-off end, as long as the host itself is trusted;</li>
  <li>the chain with a token moves the completeness check off the host;</li>
  <li>the chain with a token and SCITT adds proof of time and an anchor held outside your organisation.</li>
</ul>
<h2 id="what-none-of-the-layers-proves">What none of the layers proves</h2>
<p>Together they show that the record wasn't changed after it was written, that it's complete up to an anchor, and that it existed by a given time. They don't show that the recorded events were true, or that a tool a client reported actually ran. The threat model and the known limits are in <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md">SECURITY.md</a>, and the offline side of anchors is on <a href="https://palimpsests.dev/air-gapped/#anchors">air-gapped</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>AI logging standards in draft: ISO/IEC 24970, prEN 18229-1 and how we map them</title>
    <link>https://palimpsests.dev/notes/ai-logging-standards-24970-18229/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/ai-logging-standards-24970-18229/</guid>
    <pubDate>Tue, 20 Oct 2026 09:00:00 +0000</pubDate>
    <category>ai-logging</category>
    <category>iso-iec-24970</category>
    <category>eu-ai-act</category>
    <description>Where the AI logging standards stand in October 2026, why they matter for the EU AI Act, and how Palimpsests maps their requirements to code while the text is still moving.</description>
    <content:encoded><![CDATA[<p>Article 12 of the EU AI Act says high-risk AI systems must record events automatically. It doesn't say which events, in what format, or how a record should be protected. That level of detail is meant to come from harmonised standards. Once a standard is harmonised and its reference is published in the Official Journal, following it gives a presumption of conformity with the parts of the Act it covers.</p>
<p>In October 2026, the two documents that matter most for logging are both still drafts.</p>
<h2 id="the-two-drafts">The two drafts</h2>
<p>ISO/IEC 24970, "Artificial intelligence — AI system logging", comes from ISO/IEC JTC 1/SC 42. It describes common logging capabilities, requirements and an information model, and it's meant to be used together with a risk management system. It has reached the final draft stage, the last step before formal approval. A European adoption, prEN ISO/IEC 24970, is going through CEN/CENELEC JTC 21 and adds an annex that links it to the AI Act.</p>
<p>prEN 18229-1, "AI trustworthiness framework — Part 1: Logging", is a European draft from CEN/CENELEC JTC 21. It covers terminology, concepts, requirements and guidance for logging AI systems, aimed at organisations that place AI systems on the market. Its enquiry draft was published in mid-2026 and the vote on it closed in August.</p>
<p>Neither text is final. Clause numbers and details can still change, and the final versions will be sold like any other standard.</p>
<h2 id="why-map-against-a-moving-target">Why map against a moving target</h2>
<p>Waiting for the final text sounds safer. In practice the obligations start on 2 December 2027 for systems listed in Annex III, and a logging setup has to run for months before anyone can show six months of retained records.</p>
<p>The 24970 draft already sets out the broad shape. Events are chosen by risk. The system logs them automatically and keeps the logs intact and available. The organisation documents what its logging covers. That was enough to start mapping, as long as the mapping couldn't be mistaken for a conformity claim.</p>
<h2 id="how-the-mapping-works">How the mapping works</h2>
<p>The <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/compliance/24970-MAPPING.md">ISO/IEC 24970 mapping</a> and the <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/compliance/EU-AI-ACT-MAPPING.md">EU AI Act Article 12 mapping</a> sit in the repository, next to the code they describe. Each requirement gets a row with one of four statuses:</p>
<ul>
  <li>Shipped, with the release it shipped in;</li>
  <li>Planned, for scheduled work that only adds to the format;</li>
  <li>Deployer, where the obligation belongs to the organisation running the system;</li>
  <li>N/A, where it's outside what an inference runtime does.</li>
</ul>
<p>The Deployer rows matter as much as the Shipped ones. Deciding which events are worth logging is a risk decision for the organisation, and so is documenting the logging programme. A runtime can't make those decisions, and a mapping that suggested it could would be misleading.</p>
<p>Both documents also say where their clause references come from: the public draft structure, to be checked against the final text before anyone relies on them.</p>
<h2 id="one-example-limited-storage">One example: limited storage</h2>
<p>The 24970 draft deals with logs that run out of space, including logs that overwrite their oldest entries. For a hash-chained log, overwriting in place isn't possible. Every record carries the hash of the one before it, so rewriting an old record would break every link after it.</p>
<p>We took another route. Since version 0.13, <a href="https://palimpsests.dev/">Palimpsests</a> rotates its log into segments. Each new segment opens with a continuation record that names the previous segment's last hash, its own number, the retention period in force and a root that commits to every earlier record. Old segments can then be deleted under the retention policy, and what's left still explains itself. A reader can tell a declared deletion from a missing beginning that nobody accounted for.</p>
<p>That's the general approach. Where a draft describes an outcome, we look for a way to reach it that keeps the log checkable. Where the requirement belongs to the deployer, the mapping says so plainly.</p>
<h2 id="what-happens-next">What happens next</h2>
<p>When ISO/IEC 24970 is published, every row will be checked against the final text and its references updated. The same will happen for prEN 18229-1 once it moves past the enquiry stage. Until then, read the mapping as our reading of a draft.</p>
<p>The legal side of Article 12 is summarised in <a href="https://palimpsests.dev/notes/eu-ai-act-article-12-self-hosted-ai/">EU AI Act Article 12: what it asks of AI you run yourself</a>. What makes the log itself trustworthy is in <a href="https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/">what makes an audit log tamper-evident</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>Keeping the audit log on your own machine when your agents use cloud models</title>
    <link>https://palimpsests.dev/notes/audit-log-for-agents-on-cloud-models/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/audit-log-for-agents-on-cloud-models/</guid>
    <pubDate>Tue, 20 Oct 2026 09:00:00 +0000</pubDate>
    <category>ai-agents</category>
    <category>integrations</category>
    <category>audit-log</category>
    <description>Agents that call hosted models can still keep their tool-call record locally. How Palimpsests records Claude Code, Codex, OpenTelemetry and LiteLLM tool calls, and what that record proves.</description>
    <content:encoded><![CDATA[<p><a href="https://palimpsests.dev/">Palimpsests</a> started as a runtime for models that run on your own hardware, often on networks with no internet at all. Many teams work differently. Their agents run on their own servers or laptops, while the model behind them is a hosted one reached through an API. The prompts leave the building. The question is whether the record of what the agent did has to leave with them.</p>
<p>It doesn't. The way we put it: the audit record stays on your machine, even when the model doesn't.</p>
<h2 id="why-keep-a-separate-record">Why keep a separate record</h2>
<p>The model provider keeps its own logs, and they may well be good. They're still the provider's logs. You can't verify them independently and you don't decide how long they're kept. They also record what the model said, not what your agent then did with your files and systems.</p>
<p>The EU AI Act asks deployers of high-risk systems to keep the automatically generated logs that are under their control. For an agent, the part that's fully under your control is its tool loop: which tools it called, with what input, and what came back. That's what these integrations record.</p>
<h2 id="what-gets-recorded">What gets recorded</h2>
<p>A local Palimpsests server receives each tool call and its result from the client and writes them into a PALA-1 chain. Arguments and results are stored as SHA-256 digests of a canonical form, never as content. Each pair is marked as reported by the client, so it can't be confused with a call the runtime made itself.</p>
<p>Since version 0.13 each result also states what its recorder could see. Where a client reports failures, the result is recorded as ok or error. Where it can't tell a failed call from a successful one, the result is recorded as unobserved. An ok means a result came back. It never means the action succeeded.</p>
<h2 id="coding-agents-claude-code-and-codex">Coding agents: Claude Code and Codex</h2>
<p>Claude Code can send its hooks over HTTP. You add three entries to its settings file, pointing PreToolUse, PostToolUse and PostToolUseFailure at the local server, and there's nothing to install. Claude Code reports failures, so its results are recorded as ok or error.</p>
<p>Codex only runs command hooks, so a small forwarder script passes each event to the server. Codex has no failure hook, which means its results are recorded as unobserved. One thing to watch: Codex skips an untrusted hook without any warning, and the tools then run with nothing recorded. The README explains how to check for it.</p>
<p>Both adapters were written against what the hooks actually send, measured on Claude Code 2.1.288 and Codex CLI 0.160.0. The details are in the <a href="https://github.com/Assault-Consulting/Palimpsests/tree/main/integrations/agent-hooks">agent hooks README</a>.</p>
<h2 id="frameworks-with-opentelemetry">Frameworks with OpenTelemetry</h2>
<p>Many agent frameworks already emit OpenTelemetry traces, with one span per tool execution under the GenAI conventions. Point the trace exporter at the server and those spans become recorded tool calls:</p>
<pre><code>export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:11435/v1/traces
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf</code></pre>
<p>A span with an error status is recorded as an error. To get digests of the arguments and results, turn on content capture in the instrumentation. Without it the pair is recorded with no digests, which makes a weaker record. This path was tested against a real framework's export from pydantic-ai 2.57.0. Setup is in the <a href="https://github.com/Assault-Consulting/Palimpsests/tree/main/integrations/otel">OpenTelemetry README</a>.</p>
<h2 id="gateways-and-tool-servers">Gateways and tool servers</h2>
<p>If your agents reach hosted models through LiteLLM, its callback reports every structured tool loop that passes through it. If they use MCP servers over standard input and output, a small proxy in front of each server records both the request and the response of every tool call. Both are covered in <a href="https://palimpsests.dev/notes/recording-agent-tool-calls/">recording the tool calls your agent already makes</a>.</p>
<h2 id="limits">Limits</h2>
<p>A reported record shows what the client said happened and that nobody changed the report later. It doesn't prove the tool ran, and it can't see a tool the client never reports. Hook interfaces change between client versions, so we probe them regularly and note the version each claim was checked on. The record is only as trustworthy as the chain it sits in, and what makes that chain trustworthy is covered in <a href="https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/">what makes an audit log tamper-evident</a>.</p>
<p>The full list of integrations is on <a href="https://palimpsests.dev/integrations/">integrations</a>.</p>
<p>Step by step: <a href="https://palimpsests.dev/runbook/log-claude-code-tool-calls/">log Claude Code tool calls</a>, and if nothing arrives, <a href="https://palimpsests.dev/runbook/claude-code-hooks-not-working/">find where the reports go missing</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>OpenSSF Gold software and the Cyber Resilience Act</title>
    <link>https://palimpsests.dev/notes/openssf-gold-cyber-resilience-act/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/openssf-gold-cyber-resilience-act/</guid>
    <pubDate>Tue, 20 Oct 2026 09:00:00 +0000</pubDate>
    <category>cyber-resilience-act</category>
    <category>openssf</category>
    <category>supply-chain</category>
    <description>What the EU Cyber Resilience Act asks of products built from open-source components, what an OpenSSF Gold badge shows about a component, and what it doesn&#x27;t.</description>
    <content:encoded><![CDATA[<p>If you sell software or connected hardware in the EU, the Cyber Resilience Act now applies to you in stages. Regulation (EU) 2024/2847 entered into force in December 2024. Since 11 September 2026, manufacturers have had to report actively exploited vulnerabilities and severe incidents. Most of the rest arrives on 11 December 2027, when the essential requirements, technical documentation and CE marking become mandatory.</p>
<p>Products today are built largely from open-source components. The CRA puts the responsibility for those components on the manufacturer that ships them, not on the people who wrote them. So when you choose a library, you're also choosing the evidence you'll need about it later. This note looks at what an OpenSSF Best Practices Gold badge tells you about a component, using our own project as the example.</p>
<h2 id="who-the-cra-applies-to">Who the CRA applies to</h2>
<p>Free and open-source software developed outside any commercial activity is outside the regulation. Once software is placed on the market in the course of a commercial activity, the company doing that is treated as a manufacturer and carries the full set of obligations. There's also a lighter role, the open-source software steward: an organisation that supports open-source software intended for commercial use without selling it itself. Stewards have limited duties, and their reporting only starts in December 2027.</p>
<p>Palimpsests is free and licensed under Apache-2.0. If you build it into a product you sell in the EU, your company is the manufacturer of that product, and the CRA's questions about its components are yours to answer.</p>
<h2 id="what-the-cra-asks-about-components">What the CRA asks about components</h2>
<p>Several parts of Annex I touch on this directly:</p>
<ul>
  <li>a software bill of materials in a common machine-readable format, covering at least the top-level dependencies;</li>
  <li>a process for handling vulnerabilities, with a published way to report them and security updates delivered without delay;</li>
  <li>protection of the integrity of data, commands and configuration;</li>
  <li>recording and monitoring of relevant internal activity, such as access to or changes of data, services or functions, with an opt-out for the user.</li>
</ul>
<p>The last point is easy to miss. A product has to be able to show what happened inside it, and a log nobody can check is weak evidence of that. That's the subject of a separate note on <a href="https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/">what makes an audit log tamper-evident</a>.</p>
<h2 id="what-the-gold-badge-says">What the Gold badge says</h2>
<p>The OpenSSF Best Practices badge has three levels: passing, silver and gold. The project answers each criterion publicly on bestpractices.dev, with a justification anyone can read, and a few answers are checked automatically. Most of it is self-assessment. Its value is that every answer is specific and can be checked against the repository. OpenSSF also maintains the OSPS Baseline, a shorter list of security controls written with the CRA in mind.</p>
<p>For <a href="https://palimpsests.dev/">Palimpsests</a>, the Gold level rests on things you can open and inspect:</p>
<ul>
  <li>every change goes through a pull request approved by someone other than its author, and the organisation requires two-factor authentication;</li>
  <li>CI refuses to merge if statement coverage drops below 90% or branch coverage below 80%;</li>
  <li>coverage-guided fuzzing and static analysis run in CI;</li>
  <li>releases go to PyPI through Trusted Publishing with Sigstore attestations, and each GitHub release carries a CycloneDX SBOM of the base install;</li>
  <li>the v0.10.0 wheel was rebuilt from source and matched the published file byte for byte;</li>
  <li>the security policy explains how to report a vulnerability privately and lists the risks we know about and haven't fixed yet.</li>
</ul>
<p>The full list, criterion by criterion, is in the <a href="https://www.bestpractices.dev/projects/13534">public registry entry</a> and in our <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/BADGE-STATUS.md">badge status file</a>.</p>
<h2 id="what-it-doesn-t-say">What it doesn't say</h2>
<p>A badge isn't a CE mark, and the project isn't certified under the CRA or any other scheme. The badge says nothing about your product, your configuration or the way you deploy a component. It doesn't replace a security review either. Ours so far has been an internal one, done with AI assistance, and the audit log implementation hasn't had an independent penetration test.</p>
<p>What a manufacturer gets from it is a set of facts for the technical file, each with a link, instead of a vendor questionnaire answered from memory.</p>
<h2 id="using-it-in-practice">Using it in practice</h2>
<p>If Palimpsests is one of your components, these are the documents to collect:</p>
<ul>
  <li>the SBOM attached to the release you ship;</li>
  <li>the Sigstore provenance of the wheel, which shows the repository and workflow that built it;</li>
  <li><a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md">SECURITY.md</a>, with the reporting channel and the accepted risks;</li>
  <li>the <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/RELEASING.md">release process</a>, which explains how to verify the attestations yourself.</li>
</ul>
<p>The same reasoning works for any open-source component. Ask whether its claims point to evidence you can open, and whether its known weaknesses are written down somewhere. The logging side of the AI rules is covered in <a href="https://palimpsests.dev/notes/ai-logging-standards-24970-18229/">AI logging standards in draft</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>Tamper-evident audit logs: how they work and how to build one</title>
    <link>https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/what-makes-an-audit-log-tamper-evident/</guid>
    <pubDate>Tue, 20 Oct 2026 09:00:00 +0000</pubDate>
    <category>audit-log</category>
    <category>tamper-evident</category>
    <category>security</category>
    <description>What makes an audit log tamper-evident: hash chains, anchors and witnesses, what each one proves, how to build such a log, and what to ask before trusting the claim.</description>
    <content:encoded><![CDATA[<h2 id="what-is-a-tamper-evident-audit-log">What is a tamper-evident audit log?</h2>
<p>A tamper-evident audit log is a record in which any later change — an edited, removed or reordered entry — can be detected by someone who did not make it. It does not make the change impossible. It makes it visible, and says where.</p>
<h2 id="what-the-word-should-mean">What the word should mean</h2>
<p>"Tamper-evident" appears on a lot of logging products. For an audit log it should mean something specific: if someone changes the log, a person who didn't make the change can detect it later. It doesn't mean the change is impossible. That would be tamper-proof, and no log stored on a computer someone controls can promise that.</p>
<p>Detection relies on several separate mechanisms. Each one answers its own question, and a log can have one without the others.</p>
<h2 id="the-hash-chain">The hash chain</h2>
<p>Each record stores the hash of the record before it. Change a record and its hash changes, so the next record's link stops matching. Remove a record from the middle and the link to the next one breaks. Reorder records and both the links and the sequence numbers go wrong.</p>
<pre><code>header 1  &lt;-- prev_hash --  header 2  &lt;-- prev_hash --  header 3   = head
   |                           |                           |
digest(body 1)             digest(body 2)             digest(body 3)</code></pre>
<p>The check itself is short. Here's a toy version in Python. It isn't the PALA-1 wire format, only the idea:</p>
<pre><code>import hashlib

def verify(records):
    prev = bytes(32)  # the first record points at zeros
    for r in records:
        if r["prev_hash"] != prev:
            return None  # a link is broken here
        if hashlib.sha256(r["body"]).digest() != r["body_digest"]:
            return None  # the body no longer matches its header
        prev = hashlib.sha256(r["header"]).digest()
    return prev  # the head, to compare with the anchor</code></pre>
<p>A chain answers the question "was anything inside this file altered?" Anyone with the file and the specification can check it, and the check needs no key. In PALA-1 the record bodies can even stay encrypted during the check, because each header carries a digest of its body. That part is explained in <a href="https://palimpsests.dev/notes/checking-an-ai-log-without-reading-it/">how to check an AI log without reading it</a>.</p>
<h2 id="the-anchor">The anchor</h2>
<p>A chain has one blind spot. If the last records are deleted, what remains is still a valid chain, only shorter. The same is true when a whole file is swapped for another consistent chain.</p>
<p>To catch that, the latest hash has to be kept somewhere else, such as a separate file, the operating system's keychain or a hardware token. That copy is the anchor. Checking the chain against it answers a second question: "is this the whole log?" An anchor only helps if whoever could rewrite the log can't rewrite the anchor as well. That's why a hardware token is stronger than a file on the same disk.</p>
<h2 id="the-witness">The witness</h2>
<p>The third question is about time. Did this history exist before a certain moment? Nothing inside the log can prove it, because whoever controls the log also controls its clock. Someone outside has to sign a statement.</p>
<p>In Palimpsests that witness can be a SCITT transparency service. Palimpsests registers one signed statement per published head. The statement holds a hash and no record content. The receipt shows that the head existed by the time it was registered, and since a head commits to every record before it, so did those records.</p>
<h2 id="proofs-that-travel">Proofs that travel</h2>
<p>Two more tools help when you can't hand over the whole log. An inclusion proof shows that a particular record belongs to a tree whose root you already trust, using a handful of hashes. A consistency proof shows that an older head is a prefix of a newer one, so the log only ever grew. Both use the same construction as Certificate Transparency (RFC 6962 and RFC 9162).</p>
<h2 id="deletion-that-explains-itself">Deletion that explains itself</h2>
<p>Logs can't grow forever. Retention rules say how long records stay, and after that they're deleted. In a hash chain, deleting the oldest records leaves a gap at the start, and a gap normally looks like tampering.</p>
<p>Since version 0.13, Palimpsests opens each new segment with a continuation record. It names the previous segment's last hash and the retention period that applied, and it commits to every earlier record. When old segments are removed under that policy, the rest of the log still explains where its beginning went. The standards background for this is in <a href="https://palimpsests.dev/notes/ai-logging-standards-24970-18229/">AI logging standards in draft</a>.</p>
<h2 id="how-to-make-an-audit-log-tamper-evident">How to make an audit log tamper-evident</h2>
<p>Put together, the pieces above make a short list for building a tamper-evident audit log. Which items you need depends on what you'll have to prove later:</p>
<ul>
  <li>give every record a sequence number and the hash of the record before it;</li>
  <li>keep a digest of each record's content in its header, so the log can be checked without being read;</li>
  <li>store the latest hash somewhere the writer can't quietly change, such as a separate file or a hardware token, and check the log against it;</li>
  <li>when you need to show when the log existed, have an outside party sign the head from time to time;</li>
  <li>write retention into the log itself, so deleted segments are declared rather than simply missing;</li>
  <li>publish the format and test it with a verifier someone else wrote.</li>
</ul>
<h2 id="other-approaches">Other approaches</h2>
<p>Hash chains aren't the only way to do this. Signed syslog (RFC 5848) signs batches of messages. The systemd journal can seal its files with forward-secure keys, so an attacker who takes over a machine can't rewrite what was sealed before. Some storage systems simply refuse to change data once it's written. Each of these puts the trust somewhere different: in a signing key, a sealing key or a storage vendor. For any of them it's worth asking who you have to trust, and whether that's the same party you're worried about.</p>
<h2 id="questions-to-ask-before-trusting-the-claim">Questions to ask before trusting the claim</h2>
<ul>
  <li>Can someone outside the team check the log with a published specification, without your software?</li>
  <li>Does the check need the decryption key, or can it run without reading the content?</li>
  <li>What does the check report when it has no anchor? It should say completeness wasn't checked.</li>
  <li>Where is the anchor kept, and who can change it?</li>
  <li>What happens to the log when old records are deleted?</li>
  <li>What isn't covered? A tamper-evident log shows the record wasn't changed. It doesn't show the recorded events were true.</li>
</ul>
<h2 id="further-reading">Further reading</h2>
<p>The ideas here are older than AI agents. Bruce Schneier and John Kelsey described hash-chained audit logs on untrusted machines in "Secure Audit Logs to Support Computer Forensics" (ACM Transactions on Information and System Security, 1999). Scott Crosby and Dan Wallach showed how to make such logs efficient to audit in "Efficient Data Structures for Tamper-Evident Logging" (USENIX Security, 2009). Certificate Transparency put Merkle-tree logs into wide use, specified in <a href="https://www.rfc-editor.org/rfc/rfc6962">RFC 6962</a> and <a href="https://www.rfc-editor.org/rfc/rfc9162">RFC 9162</a>. Signed syslog is <a href="https://www.rfc-editor.org/rfc/rfc5848">RFC 5848</a>.</p>
<p>The format behind all of this is <a href="https://palimpsests.dev/pala-1/">PALA-1</a>. The reasoning behind its design is in <a href="https://palimpsests.dev/notes/pala-1-three-design-principles/">three design principles for verifiable audit logs</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>PALA-1: three design principles for verifiable audit logs</title>
    <link>https://palimpsests.dev/notes/pala-1-three-design-principles/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/pala-1-three-design-principles/</guid>
    <pubDate>Fri, 09 Oct 2026 09:00:00 +0000</pubDate>
    <category>pala-1</category>
    <category>audit-log</category>
    <category>design</category>
    <description>Verification without disclosure, integrity through a hash chain, and checking a log with no remote service: the ideas behind the PALA-1 format and where each one stops.</description>
    <content:encoded><![CDATA[<p>An audit trail should stay verifiable when the system is offline, when the hardware is limited, and when the records hold information an auditor must not read. <a href="https://palimpsests.dev/pala-1/">PALA-1</a>, the Portable Append-only Log for Audit, is designed around those conditions.</p>
<p>AI systems now often run where keeping a record isn't enough. A team has to be able to show that the record hasn't changed and that its order is intact. It also has to let an outside party check this without handing over the data inside.</p>
<p>Air-gapped deployments, embedded systems and strict data-residency rules make that harder. A remote verification service may be unavailable by design. Signing every event costs computation that a small device may not have to spare. Giving an auditor full access to the record can expose information that should stay private.</p>
<p>PALA-1 answers with three principles: verification without disclosure, integrity through chaining, and verification with no external dependency.</p>
<h2 id="1-verification-must-not-require-disclosure">1. Verification must not require disclosure</h2>
<p>An audit shouldn't force an organization to reveal everything it records.</p>
<p>Traditional reviews often tie access to evidence to access to the underlying information. For an AI system that can mean exposing prompts, responses, personal data, internal instructions or operational details, just to show that a log hasn't been modified.</p>
<p>PALA-1 keeps these apart. Each record has a header and a body, and the body can be encrypted. The header carries a SHA-256 digest of the body. Verification checks the headers and compares each body with its digest, without decrypting anything. The auditor gets the evidence needed to validate the chain and nothing more. The check is described step by step on <a href="https://palimpsests.dev/verify-without-reading/">verify without reading</a>.</p>
<p>This matters in healthcare, finance, industrial systems and anywhere else data minimization is a requirement rather than a preference. The right to verify a record shouldn't come bundled with the right to read it.</p>
<p>A successful check doesn't prove that every recorded event was true, though. It establishes properties of the evidence in front of the verifier. Whether the runtime behaved honestly before or during recording is a separate question.</p>
<h2 id="2-integrity-should-come-from-the-chain">2. Integrity should come from the chain</h2>
<p>A pile of individually stored records doesn't add up to a trustworthy history. If someone can edit, delete, reorder or replace records without detection, the file may still look plausible while no longer matching what happened.</p>
<p>PALA-1 links records into an append-only hash chain. Each record carries the hash of the one before it, so a verifier checks the sequence instead of trusting how individual entries look:</p>
<ul>
  <li>if a record is modified, its hash no longer matches the link stored in the next record;</li>
  <li>if a record in the middle is removed, the link to the next one breaks and the sequence numbers show a gap;</li>
  <li>if records are reordered, the links and the sequence numbers no longer line up.</li>
</ul>
<p>Verification is portable too. The specification and its <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/specs/pala-1/test-vectors.json">test vectors</a> are public domain, and anyone can reproduce the checks without our software. Five independent implementations have done exactly that, and the <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/specs/pala-1/INDEPENDENT-VERIFICATION.md">verification runs</a> are on record.</p>
<p>One limit needs stating. A valid chain doesn't prove its last record is the last one that ever existed. If someone presents an earlier prefix that is still internally valid, only an anchor kept outside the log can reveal it. Integrity and completeness are related, but they are different properties.</p>
<h2 id="3-verification-must-work-without-a-remote-witness">3. Verification must work without a remote witness</h2>
<p>Many security designs assume another service is around to confirm, sign or register events. That isn't true everywhere. An air-gapped computer may have no network route at all. An embedded controller may have a tight power budget. A deployment policy may forbid outbound connections even where a network exists.</p>
<p>PALA-1 is built for those conditions. Its chain can be checked offline, and the integrity check needs no key material. Records are linked by hashing rather than by an asymmetric signature on every record, which keeps routine verification cheap and needs no remote service just to confirm internal consistency.</p>
<p>External witnessing still has a place. If an organization needs evidence that a particular chain head existed by a particular time, it can register that head with a transparency service. Since version 0.11, Palimpsests can send one signed statement per published head to a SCITT service, and no record content leaves the device. <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/INTEROP-SCITT.md">What a receipt proves and what it doesn't</a> is written up separately. The anchor can also stay local, in a file or on a hardware token, as described on <a href="https://palimpsests.dev/air-gapped/#anchors">air-gapped</a>.</p>
<p>So offline verification is the core capability, and external witnessing is an extra layer of trust on top of it.</p>
<h2 id="what-this-means-in-practice">What this means in practice</h2>
<p>A deployment can keep its records locally, let an independent verifier check their integrity without giving that verifier the content, and run routine checks without depending on a live external service.</p>
<p>PALA-1 defines the record format and the verification procedure. <a href="https://palimpsests.dev/">Palimpsests</a> is the reference implementation, built for local-first language-model inference where requests and tool calls need an auditable record and the data must not leave the machine.</p>
<p>The format is described in an Internet-Draft, <a href="https://datatracker.ietf.org/doc/draft-sparysh-pala-audit/">draft-sparysh-pala-audit</a>. It's an individual submission with Informational status, a work in progress and not an approved IETF standard. The <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/specs/pala-1/PALA-1.md">specification</a> in the repository is the normative text.</p>
<p>None of this replaces a threat model, access controls, encryption, retention policies or other deployment-specific measures. The limits of the current implementation are listed in its <a href="https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md">security policy and threat model</a>. A consistent log is evidence about a sequence of records. It isn't a guarantee about the system that produced them.</p>
<h2 id="check-it-yourself">Check it yourself</h2>
<p>The most useful way to judge an audit format is to run its verification and try to break it. The <a href="https://github.com/Assault-Consulting/Palimpsests/tree/main/docs/specs/pala-1/verification-kit">verification kit</a> has the inputs and a run-record template. The quickest local try is:</p>
<pre><code>pip install palimpsests
palimpsests demo
palimpsests pala verify palimpsests-demo.pala</code></pre>
<p>Then change one byte in the middle of the file and run the check again.</p>
<p>For teams that run AI systems locally, on restricted networks or on modest hardware, the useful test is whether their logs stay independently verifiable under the conditions the system actually works in. The source code and all verification material are on <a href="https://github.com/Assault-Consulting/Palimpsests">GitHub</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>EU AI Act Article 12: what it asks of AI you run yourself</title>
    <link>https://palimpsests.dev/notes/eu-ai-act-article-12-self-hosted-ai/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/eu-ai-act-article-12-self-hosted-ai/</guid>
    <pubDate>Sun, 04 Oct 2026 09:00:00 +0000</pubDate>
    <category>eu-ai-act</category>
    <category>logging</category>
    <category>compliance</category>
    <description>Which systems the logging rules cover, what the articles require, when they start and how the fines work, in plain language.</description>
    <content:encoded><![CDATA[<p>Running a language model on your own servers keeps the data at home. It doesn't change what the EU AI Act asks of the system itself. If the system is classed as high-risk, it has to keep logs, and those logs have to last.</p>
<p>This note goes through the parts of the Act that matter for logging. It's a summary, not legal advice.</p>
<h2 id="which-systems-are-covered">Which systems are covered</h2>
<p>The logging rules apply to high-risk AI systems. Annex III of the Act lists them by area of use, including hiring, credit scoring, education, access to essential services and critical infrastructure. AI built into products that are already regulated, such as some medical devices, comes under Annex I instead.</p>
<p>The classification is yours to make. The test is in Article 6 and Annex III, and if the answer isn't clear, get a lawyer to settle it before any engineering work starts.</p>
<h2 id="what-the-articles-require">What the articles require</h2>
<p>Article 12 says a high-risk system must be able to record events automatically for as long as it's in use. The system writes its own logs. Notes kept by a person don't count.</p>
<p>Two other articles say how long the logs stay. Article 19 covers the provider, meaning the company that builds or supplies the system. Article 26(6) covers the deployer, the company that uses it. Both must keep the logs they control for at least six months.</p>
<p>Nowhere does the text say the logs must be tamper-proof. It does expect them to be useful later, when someone tries to reconstruct what happened. A log that could have been edited without leaving a trace is weak for that job.</p>
<h2 id="when-the-rules-start">When the rules start</h2>
<p>The Digital Omnibus on AI, Regulation (EU) 2026/1744, moved the dates. For systems listed in Annex III the obligations apply from 2 December 2027. For AI inside products covered by Annex I, they apply from 2 August 2028.</p>
<p>That sounds like plenty of time. It's less than it looks, because logs can only be shown once they exist, and six months of retention means six months of the system running with logging switched on.</p>
<h2 id="how-the-fines-work">How the fines work</h2>
<p>Article 99 sets the ceilings. Breaking the obligations for high-risk systems, logging included, can cost up to €15 million or 3% of worldwide annual turnover. A large company faces the higher of the two figures. A small or medium-sized company, start-ups included, faces the lower one.</p>
<p>There are two other levels. Prohibited practices can cost up to €35 million or 7%, and they have nothing to do with logging. Giving authorities incorrect or misleading information can cost up to €7.5 million or 1%.</p>
<p>All of these are maximums. National authorities set the actual amount case by case and take into account things like cooperation and what was done to limit harm.</p>
<h2 id="what-a-usable-log-looks-like">What a usable log looks like</h2>
<p>A few properties make a log much easier to rely on when the question finally comes:</p>
<ul>
  <li>every request, model action and tool call is written automatically;</li>
  <li>each entry is linked to the one before it, so an edit or a deletion shows up when the log is checked;</li>
  <li>the latest link is also stored somewhere else, which is the only way to notice records removed from the end;</li>
  <li>someone can check all of this without reading the content, which matters when prompts contain personal data.</li>
</ul>
<p>Logging is a single obligation. Risk management, human oversight, data governance and technical documentation are separate ones, and no logging tool covers them for you.</p>
<p>The articles, dates and fine levels are collected on one page: <a href="https://palimpsests.dev/eu-ai-act-article-12/">EU AI Act Article 12</a>. Our own runtime handles the logging part for models running on your hardware: <a href="https://palimpsests.dev/">palimpsests.dev</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>How to check an AI log without reading it</title>
    <link>https://palimpsests.dev/notes/checking-an-ai-log-without-reading-it/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/checking-an-ai-log-without-reading-it/</guid>
    <pubDate>Sun, 04 Oct 2026 09:00:00 +0000</pubDate>
    <category>audit-log</category>
    <category>security</category>
    <category>verification</category>
    <description>Why the person who checks an AI system&#x27;s log often shouldn&#x27;t read it, and how a hash-chained format makes that possible.</description>
    <content:encoded><![CDATA[<p>Prompts sent to a language model often contain things people would rather keep private, such as names or medical details. When someone later needs to confirm that the log of those prompts is intact, they usually don't need to see any of it. Most of the time they shouldn't.</p>
<p>The common way to protect a log is to encrypt it. Then, to check it, you hand over the key. It works, but it gives the person doing the check far more than they asked for.</p>
<h2 id="two-permissions-instead-of-one">Two permissions instead of one</h2>
<p>In PALA-1, the format Palimpsests writes, every record has a header and a body. The body holds the content and can be encrypted. The header holds a SHA-256 hash of the body and the hash of the previous record.</p>
<p>To check the log you only need the headers. You go through them in order and confirm two things for each record: that its body still matches the hash in its header, and that it points to the record before it. If anything was changed, removed or moved, one of those links breaks. The bodies are never decrypted.</p>
<p>So reading the log and checking it become separate permissions. You can give one without giving the other.</p>
<h2 id="what-a-check-can-tell-you">What a check can tell you</h2>
<p>From the file alone, a check answers one question. Was anything inside it altered? If so, it names the first record where the chain breaks.</p>
<p>It can't tell you whether records were removed from the end. A shortened chain is still a valid chain. To notice that, the latest hash has to be kept somewhere outside the log, for example in a file you control or on a hardware token. That stored copy is called an anchor. With it, the check can also confirm that the log is complete.</p>
<p>Proving that the log existed by a certain date needs something else again: a signed statement from an outside witness.</p>
<p>A good verifier keeps these answers apart. If it was given no anchor, it should say completeness wasn't checked. A green result in that situation invites people to believe something nobody verified.</p>
<h2 id="trying-it">Trying it</h2>
<p>The Palimpsests package has a demo that writes a small log and checks it:</p>
<pre><code>pip install palimpsests
palimpsests demo
palimpsests pala verify palimpsests-demo.pala</code></pre>
<p>Without an anchor, the last command reports that completeness wasn't checked and exits with code 2. Pass the right hash with <code>--anchor</code> and it exits with 0. Change one byte in the middle of the file and it exits with 1, naming the records where the chain broke.</p>
<h2 id="where-this-stops">Where this stops</h2>
<p>Someone who holds both the encryption key and write access to the anchor can rebuild the chain and the anchor together. That's why the format is called tamper-evident and not tamper-proof, and why it helps to keep the anchor off the machine that writes the log.</p>
<p>The format, its specification and its independent implementations are described on <a href="https://palimpsests.dev/pala-1/">PALA-1</a>. A longer explanation of the check is on <a href="https://palimpsests.dev/verify-without-reading/">verify without reading</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>Recording the tool calls your agent already makes</title>
    <link>https://palimpsests.dev/notes/recording-agent-tool-calls/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/recording-agent-tool-calls/</guid>
    <pubDate>Sun, 04 Oct 2026 09:00:00 +0000</pubDate>
    <category>ai-agents</category>
    <category>litellm</category>
    <category>mcp</category>
    <description>Adapters for LiteLLM, MCP servers and OpenCode that put tool calls on a tamper-evident log, and what such a record proves.</description>
    <content:encoded><![CDATA[<p>When an agent calls a tool, it does something real. It might read a file or send a message on someone's behalf. Those calls are what people look at first when something goes wrong, and they're often the worst-recorded part of the system.</p>
<p>Most agents already send their tool calls through something you run. That might be a gateway like LiteLLM, an MCP server or a coding agent like OpenCode. Version 0.12 of Palimpsests added small adapters for these. Each one passes the tool calls it sees to a local Palimpsests server, which writes them into a hash-chained log.</p>
<h2 id="setting-up-the-server">Setting up the server</h2>
<pre><code>pip install 'palimpsests[serve]'
palimpsests serve</code></pre>
<p>By default the server listens on 127.0.0.1:11435. It stores hashes of the arguments and results, not the content itself. If you start it with an API key, give the adapters the same key in the PALIMPSESTS_SERVE_API_KEY variable.</p>
<h2 id="litellm">LiteLLM</h2>
<p>The LiteLLM adapter is one Python file, registered as a callback. It sees the tool calls the model asks for and the results that come back into the conversation:</p>
<pre><code>import litellm
from palimpsests_audit import PalimpsestsAudit
litellm.callbacks = [PalimpsestsAudit()]</code></pre>
<p>It never sees the tool itself run, so since version 0.13 its results are recorded as unobserved: it can't tell a failed call from a successful one.</p>
<h2 id="mcp-servers">MCP servers</h2>
<p>For MCP servers that talk over standard input and output, the adapter is a small proxy. You put it in front of the server command in your client's configuration. Sitting in the middle, it sees both the request and the response of every tool call. It passes every byte through unchanged and never blocks a call.</p>
<h2 id="opencode">OpenCode</h2>
<p>OpenCode gets a plugin: a single JavaScript file you copy into .opencode/plugins/ for one project, or ~/.config/opencode/plugins/ for all of them. It reports the tools OpenCode actually runs. That includes calls the model wrote as plain text, which a server on its own wouldn't recognise.</p>
<h2 id="what-these-records-prove">What these records prove</h2>
<p>Records from an adapter are marked as reported by the client. They show what the client said happened and when, and that nobody changed the report afterwards. They don't prove the tool actually ran. The server keeps them apart from the calls it handled itself, so anyone reading the log can tell the two kinds apart.</p>
<h2 id="where-things-stand">Where things stand</h2>
<p>The LiteLLM and MCP adapters have been tested against a live server with made-up tool calls. Neither has been run on real traffic yet. For OpenCode 1.18.31, one reported call from a real session has reached the log. It was a failed file read, and it was recorded correctly. We haven't yet seen a successful result arrive the same way.</p>
<p>Client hook interfaces change between versions, so each adapter's README says which version its behaviour was checked on.</p>
<p>Setup details and limits for all three are on <a href="https://palimpsests.dev/integrations/">integrations</a>. How to check the resulting log without the key is on <a href="https://palimpsests.dev/verify-without-reading/">verify without reading</a>.</p>
<p>Step by step: <a href="https://palimpsests.dev/runbook/mcp-tool-call-logging/">log MCP tool calls with a one-file proxy</a> and <a href="https://palimpsests.dev/runbook/log-claude-code-tool-calls/">log Claude Code tool calls</a>.</p>]]></content:encoded>
  </item>
  <item>
    <title>Running a language model on an isolated network, with a log you can prove</title>
    <link>https://palimpsests.dev/notes/llm-on-an-isolated-network/</link>
    <guid isPermaLink="true">https://palimpsests.dev/notes/llm-on-an-isolated-network/</guid>
    <pubDate>Sun, 04 Oct 2026 09:00:00 +0000</pubDate>
    <category>air-gapped</category>
    <category>llm</category>
    <category>audit-log</category>
    <description>What changes when an LLM runs with no network at all: installing it, timestamps, anchors and checking the log offline.</description>
    <content:encoded><![CDATA[<p>Some networks are cut off from the internet on purpose. Hospitals and defence sites are the usual examples. If a language model has to work inside one, it can't call a hosted API, and the services that normally back up a log aren't there either. You lose cloud logging, public time servers and any online way to timestamp a record.</p>
<p>Palimpsests was built for exactly this. The model, its working state and the log all stay on the machine that holds the data. Here's what that looks like in practice.</p>
<h2 id="getting-the-software-in">Getting the software in</h2>
<p>The machine has no internet, so the packages travel on a drive. On a connected computer, download them with pip. Then install from that folder on the isolated machine:</p>
<pre><code>pip download palimpsests -d ./wheels
pip install --no-index --find-links ./wheels palimpsests</code></pre>
<p>Releases are signed and ship with a list of their dependencies (an SBOM). You can check what you're carrying in before it crosses over.</p>
<h2 id="time-you-can-t-fully-trust">Time you can't fully trust</h2>
<p>Isolated machines drift. Some have no reliable clock at all, and the log doesn't pretend otherwise. Each record carries a time trust level: UNKNOWN, UNSYNCED, HW_RTC or NTP_SYNCED. A record marked UNKNOWN contains no wall-clock time at all.</p>
<p>The order of events doesn't depend on the clock. It comes from sequence numbers in the chain, so even if every timestamp were wrong you could still see what happened before what.</p>
<h2 id="keeping-the-anchor">Keeping the anchor</h2>
<p>A hash chain shows that nothing inside the log was changed. To also notice records removed from the end, you keep a copy of the latest hash somewhere else. Offline, that can be a file outside the log. Since version 0.11 it can also be a PKCS#11 hardware token, which the host can read but can't quietly overwrite.</p>
<p>If your rules ever allow a single link outside, the latest hash can also be sent to a SCITT transparency service as a signed statement. Only the hash leaves the machine.</p>
<h2 id="checking-without-the-network">Checking without the network</h2>
<p>Verification works on the same machine or any other one, with no connection. It doesn't need the decryption key, because all it does is compare stored hashes:</p>
<pre><code>palimpsests pala verify serve.pala --anchor &lt;latest-hash&gt;</code></pre>
<p>Verification was measured on a test chain of one million records. On an Intel Core Ultra 9 machine running Windows 11, verifying with version 0.11 needed 4.77 GB of memory. Version 0.12 brought that down to 0.57 GB. On an integrated Intel Arc GPU, the engine's tool loop runs as fast as a hand-tuned llama-server, without a separate server process.</p>
<p>There's no measurement on a discrete GPU yet. The log implementation also hasn't had an independent penetration test.</p>
<p>More detail, including what we don't claim, is on <a href="https://palimpsests.dev/air-gapped/">air-gapped</a>. The project itself is at <a href="https://palimpsests.dev/">palimpsests.dev</a>.</p>
<p>Step by step: <a href="https://palimpsests.dev/runbook/local-openai-compatible-server/">run a local LLM behind an OpenAI-compatible API</a> and <a href="https://palimpsests.dev/runbook/chat-longer-than-context-window/">keep a long chat going on a small local model</a>.</p>]]></content:encoded>
  </item>
</channel>
</rss>
