Persisted formats
This document is the authoritative list of every format that a krabka broker writes to disk or to an object store, and the compatibility contract that covers them from 1.0.0 on.
The contract covers krabka-broker and the persisted crates of krabka-protocol: krabka-metadata, the record, metadata-envelope and checkpoint codecs of krabka-protocol, and every type in krabka-ids, krabka-voters and krabka-security that a persisted MetadataRecord contains. The other krabka repositories keep their greenfield rule.
Design Goals
- A 1.x broker reads all 1.x data. Any 1.x broker reads every on-disk artifact that any earlier 1.x broker wrote. An operator never reformats a node or restores from a backup to move from 1.x to 1.y.
- A rolling upgrade works. A cluster moves from 1.x to 1.y one node at a time. Mixed-version nodes exchange the krabka-private records of the controller-forwarding RPCs during the roll, so those records are under the same contract as the disk.
- A downgrade works until the operator finalizes. A new broker writes the old format until the operator finalizes the feature level that introduces the new format. Until then, the operator can roll the cluster back to the earlier build.
- The Kafka semantics are the model. The gating follows Kafka’s
metadata.versionmodel from KIP-584 and KIP-778, so an operator who knowskafka-featuresknows the procedure.
Architecture Overview
The contract
- Read compatibility. A 1.y broker reads every format in the tables below as any 1.x broker with x less than or equal to y wrote it. This covers partition logs and their sidecars, metadata log segments and snapshots,
quorum-state,meta.properties, the bootstrap files, the internal-topic record formats, the krabka-private wincode records insideNoOpRecordtags, and the object-store formats: tiered segments, WORM manifests, diskless WAL objects, and backup captures. - Gated writes. A change to a persisted format ships behind a
metadata.versionlevel or another feature level. A broker that supports the new format keeps writing the old format until the operator finalizes that level, as Kafka’s KIP-584 and KIP-778 semantics require. - Downgrade. Before finalization, the operator can downgrade to any earlier 1.x build, because nothing on disk uses the new format yet. After finalization, a downgrade follows Kafka’s rules for the feature in question. For
metadata.version, krabka implements the KIP-1155 snapshot path. - No promise for 0.x data. Data that a broker before 1.0.0 wrote gets no promise. An operator reformats a 0.x data directory with
krabka-formatand restores the topic data.
What the contract does not cover
- The Kafka wire protocol. The Kafka compatibility rules in
CLAUDE.mdare unchanged. A request or a response follows Kafka’s version negotiation, not this document. - The Rust API. The contract is about bytes. It does not promise semver stability for a Rust type, a function or a crate interface.
- Caches.
remote-log-index-cache/is emptied at startup. It is not durable state. - Configuration and command-line flags. They follow the normal changelog process.
Key Design Decisions
Rules for a format change
These rules apply to every format in the tables below. CLAUDE.md gives the same rules as instructions to a contributor.
- Wincode values are positional.
wincodewrites an enum variant as its index and a struct as its fields in order, with no field names. So the order of theMetadataRecordvariants, and the field layout of every type a variant contains, is part of the on-disk format. Add a new variant at the end only. Do not reorder, remove or insert a variant, and do not change the fields of a persisted wincode type. To change the shape of a record, add a new variant at the end and keep the old variant readable. NoOpRecordprivate tags are permanent. The tags 1001, 1003, 1004, 1005 and 1006 each carry one krabka-private record. Tag 1002 is a gap in the numbering. Never reuse it. A new private record takes a new tag above 1006.- A new or changed format carries a version marker. Its reader decodes every earlier 1.x version of that format.
- A new writer behavior is gated. The broker writes the new format only after the operator finalizes the feature level that introduces it.
- A golden-bytes fixture pins each format. A test decodes bytes that an earlier release wrote and compares the result with the expected value.
Gating
A metadata.version level is the gate when a krabka format change happens at the same level as a Kafka change. The metadata.version table mirrors Kafka’s MetadataVersion enum exactly, because a JVM client throws on a level that its enum does not know. So krabka cannot add a metadata.version level of its own.
A krabka-only format change is gated on krabka.version, the feature that krabka owns (krabka_metadata::krabka_version in krabka-protocol). Levels 0 and 1 both mean the 1.0.0 formats: Kafka advertises a feature only when its highest supported level is above 0, so a 1.0.0 node advertises krabka.version at [0, 1], and level 1 can never carry a new format. The first krabka-only format change takes level 2: at level 2 a broker writes a diskless WAL object reservation before each upload (see the diskless index row below). Level 2 shipped in krabka-broker 1.1.3, so a later format change cannot join it. Level 3 turns on two: the OCSF 1.3.0 activity ids of __krabka_audit records (OCSF_ACTIVITY_IDS_LEVEL) and the normalized tiered-storage key prefix (TIERED_KEY_PREFIX_NORMALIZED_LEVEL). See the __krabka_audit and tiered segment rows below. A fresh cluster carries no krabka.version record: krabka-format bootstraps it at level 0, which means the same formats as level 1, unless --feature krabka.version=N overrides it. Once every node is krabka, an operator finalizes level 1 with kafka-features upgrade --feature krabka.version=1. The level stays at 0 until then because a cluster can mix in Kafka nodes, which support only level 0: a bootstrapped level 1 crashes a JVM standby controller and keeps a JVM broker from joining. The controller refuses a level that a registered node does not support and accepts a safe or unsafe downgrade, as Kafka’s FeatureControlManager does for a feature other than metadata.version and kraft.version. kafka-features upgrade --release-version does not move it, because that walks only Kafka’s production features.
Partition log directory
Each partition directory is <log_dir>/<topic>-<partition>/.
| Artifact | Location | Encoding | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|---|
| Log segment | <base>. |
Kafka Record v2 |
magic byte |
A magic other than 2 is refused with Unsupported. |
Kafka’s rules |
| Transaction marker | Control batch in . |
Kafka End |
Key version and value version, both i16 0 |
As Kafka’s Control and End: a negative version, a key shorter than 4 bytes or a marker value shorter than 6 bytes is refused, and a higher version is read as version 0. Append, recovery and compaction all check. |
Kafka’s rules |
| Barrier marker | Control batch in ., control type 1000 |
krabka, big-endian | Key version and value version, both i16 0 |
parse_ refuses any other key or value version. |
None |
| Offset index | <base>. |
Kafka, fixed width | None, as in Kafka | Not applicable | Kafka’s rules |
| Time index | <base>. |
Kafka, fixed width | None, as in Kafka | Not applicable | Kafka’s rules |
| Transaction index | <base>. |
Kafka | i16 0 per entry |
A version other than 0 is refused. | Kafka’s rules |
| Producer snapshot | <offset>. |
Kafka, with CRC | i16 1 |
A version other than 1 is refused. | Kafka’s rules |
| Stamp index | <base>. |
krabka, a header, then 24-byte big-endian entries {base_ |
STAMP_, i16 0, at the front of the file |
A file without the header, which a 0.x broker wrote, or with another version is refused. | None |
| Leader epoch checkpoint | leader-epoch-checkpoint |
Kafka text | Header line 0 |
A header other than 0 is refused, as Kafka’s Checkpoint refuses it. |
Kafka’s rules |
| Log start offset checkpoint | log-start-offset-checkpoint |
krabka text, 0 then the offset, one file per partition |
Header line 0 |
A header other than 0 is refused as corrupt. |
None |
| Replica move directory | <topic>-<partition>-future |
krabka naming | None | Not applicable | None |
Kafka names a replica move directory <topic>-<partition>.<uuid>-future. format-divergences.md records the difference. The broker writes no recovery-point, replication-offset or cleaner-offset checkpoint, and no partition.metadata.
A sealed .log file is always exactly as long as the batches in it, and so is an active one unless preallocate=true. With preallocate=true, Kafka sets a new segment’s length to segment.bytes and trims it when the segment closes, so after a crash its file can end in zeros. krabka reserves the blocks with fallocate(FALLOC_FL_KEEP_SIZE) without changing the length, and writes the active segment through O_DIRECT, which writes whole blocks: the active segment’s file can run up to one block (at most 4 KiB on the filesystems the broker runs on) of zeros past its last batch. Sealing the segment, turning preallocate off, and a clean shutdown cut the zeros. From 1.0.4, several of a segment’s direct writes can run at the same time and finish in any order, so a crash can also leave zeros between batches that were not yet synced, as page-cache writeback can. In both cases the tail recovery of every 1.x release cuts the file at the first bytes that do not decode as a batch, as Kafka cuts its own preallocated tail. recovery_cuts_the_padding_a_crash_leaves in crates/log/src/log/direct_writes.rs holds that reader to it.
Log directory root
| Artifact | Location | Encoding | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|---|
meta. |
<log_ |
Kafka V1 properties | version=1 |
A version other than 1 is refused. | None |
| Bootstrap records | <metadata_ |
krabka: a header, then for each record a u32 little-endian length and a wincode Metadata |
BOOTSTRAP_, i16 0, at the front of the file |
A file without the header, which a 0.x krabka-format wrote, or with another version is refused. The node must be formatted again. |
None |
| Bootstrap manifest | <metadata_ |
krabka JSON | version: 1 |
No reader exists. The broker never reads the file. | None |
| Incarnation id | <log_ |
krabka UUID text | None, on purpose | Written by earlier 1.x releases only. A broker now draws a new id for every process, as Kafka does, and neither reads nor writes the file; a file an earlier release left is ignored, and an earlier release that finds none generates one. The id is outside the strict contract. | None |
| Clean-shutdown proof | <log_ |
Kafka JSON {"version":0,"broker |
version 0 |
A missing, unreadable or other-version file makes the restart unclean, as Kafka’s Clean does. |
None |
Kafka writes bootstrap.checkpoint instead. The bootstrap checkpoint at offset zero of the metadata log, described below, replaces bootstrap.records.bin for a controller of a dynamic quorum.
Metadata log directory
The metadata partition directory is <metadata_log_dir>/__cluster_metadata-0/.
| Artifact | Location | Encoding | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|---|
| Metadata log segment | <base>. |
Kafka Record v2. Each value is the KIP-631 Api frame: frame, api, api, body. |
frame 1 and the per-record api |
A frame other than 1 is refused, as Kafka’s Metadata refuses it. On a controller, a committed record that does not decode (an unknown api, an api above the supported one, a bad frame or private record, or a field value that no build accepts) stops the controller, in live replay, startup recovery and the image walk alike, as Kafka’s fatal fault handler does. On a broker-only node the observer logs it at error, counts it in metadata-load-error-count and stops reading that batch, as Kafka’s Metadata does. A record that decodes but names a topic or ACL that is gone, or fails validation, is skipped on every replica, because a krabka leader validates against committed state and two racing writes can both commit. |
metadata. selects the api of each record, for example DIRECTORY_ 17, ELR_ 23 and CORDONED_ 30. |
| Metadata snapshot | <end>-<epoch>. |
Kafka KIP-630 snapshot with the same record frame | As the log segment | Any record that does not decode or translate, an unknown api included, stops the load with an error. |
As the log segment |
| Bootstrap checkpoint | 00000000000000000000-0000000000. |
Kafka KIP-630, with KRaft and Voters |
As the snapshot | As the snapshot | As the snapshot |
| Observer snapshot | observer/, on a broker-only node |
Kafka KIP-630 | As the snapshot | The observer discards a checkpoint it cannot read and fetches the metadata again. | As the snapshot |
| Quorum state | quorum-state |
Kafka Quorum JSON |
data_ 0 or 1 |
A file that does not parse, a missing data_ or one other than 0 or 1 stops the node, as Kafka’s File throws. A missing file means the node has not voted. |
kraft. selects data_ |
| High watermark | high-watermark |
krabka text, 0 then the offset |
Header line 0 |
A file without the header (0.x) or with another version stops the node. A damaged version-0 file makes the broker use the log start offset: the file is only a restart shortcut, and Kafka keeps none. | None |
FeatureLevelRecord persists the finalized metadata.version and the other feature levels. A metadata.version downgrade writes a snapshot at the lower level and discards the incompatible log prefix, as KIP-1155 describes.
The audit topic stores krabka.audit.placement.epoch.<broker-id> as ordinary
topic config records. Each value is the decimal broker registration epoch
that received a partition. Reassignment keeps the marker, so a controller
restart does not undo an evacuation. Only the controller writes these keys;
both topic-config alter paths preserve them and refuse client writes.
Krabka-private metadata records
KIP-631 has no schema for some krabka records. Each one rides as the only tagged field of a Kafka NoOpRecord (apiKey 20), and the field body is a wincode MetadataRecord. Kafka’s tools read the record as a NoOpRecord and keep the tag as an unknown tagged field. crates/metadata/src/kraft_translate.rs in krabka-protocol defines the tags.
| Tag | Variant | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|
| 1001 | V1Features |
PRIVATE_, i16 0, before the wincode body |
A version other than 0, a variant that belongs to another tag, or bytes after the record is a decode error. See the metadata log segment row. | None |
| 1002 | None. The number is a gap. Do not reuse it. | Not applicable | Not applicable | Not applicable |
| 1003 | V1Partition |
As tag 1001 | As tag 1001 | None |
| 1004 | V1Topic |
As tag 1001 | As tag 1001 | None |
| 1005 | V1Break |
As tag 1001 | As tag 1001 | None |
| 1006 | V1Delete |
As tag 1001 | As tag 1001 | None |
The reader checks that each tag carries the variant assigned to it, and refuses a tag of 1001 or above that the table does not assign. A golden-bytes test in krabka-protocol pins the wincode encoding of every MetadataRecord variant and of every enum its fields reach.
bootstrap.records.bin holds wincode MetadataRecord values too, so every variant is on disk, not only the five above.
The broker also reads the topic config key krabka.elr, which a 0.x broker wrote, and removes it from the topic config. No 1.x broker writes it.
Internal topics
| Topic | Encoding | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|
_ |
Kafka 4.3.1 coordinator record schemas, field for field: Metadata is Kafka’s compute/compute, and KIP-1331’s trunk-only streams tags 2 and 3 are written only while group. is set. Replay follows Kafka’s Group. |
Key version (the record type) and value version | As Kafka’s Coordinator: a record type the broker does not know is logged at warn and skipped, value or tombstone, since it can be left over from an aborted upgrade. A known type with an unsupported value version, a key that does not decode, a missing key or a corrupt value fails the load. |
Kafka’s rules |
_ |
Kafka | Key version and value version | As Kafka’s Transaction: an unknown key version or value version is logged at warn and skipped. Any other error is logged at error, and the transactions loaded before it are installed. |
Kafka’s rules |
_ |
Kafka Share and Share |
Key type and value version | As _: an unknown record type is skipped, and any other bad record fails the load. |
Kafka’s rules |
_ |
Kafka Remote. Custom holds a krabka JSON Worm. |
Kafka’s per-record version. Worm has a required version, 0. |
A Worm of another version is refused. It uses deny_, so a new field needs a new version, gated on a feature level. JSON without version is not a chain record: another backend wrote it. |
None for Worm |
_ |
krabka, big-endian | i16 0 |
A version other than 0 is refused. | None |
_ |
krabka. Keys are fixed-width binary; values are wincode. | Each key starts with an i16 key version that names its type: 0 for a range key, 1 for a delete-floor key. Each value starts with an i16 version: 2 for Wal, 0 for Wal. |
An unknown key version or value version is refused, and the live index marks its projection invalid. A delete-floor key on partition i32:: whose topic id is a UUIDv8 is an object reservation: the object’s UUIDv4 with its version nibble set to 8, and a floor of 0. A 1.x reader that predates reservations replays it as an inert floor on a partition no topic has. |
krabka. 2 writes reservations; below it none are written. |
_ |
OCSF 1.3.0 JSON, with hash-chain headers and signed checkpoints in the signing domain krabka-audit-ckpt-v1 |
The OCSF schema version, the signing domain, and metadata.: absent in a record of the 1.0.0 shape, "2" in a record of the level-3 shape |
krabka-audit verify hashes each record’s bytes and does not parse the OCSF body, so a chain that mixes both shapes verifies. A SIEM tells them apart by metadata.. |
krabka. 3 writes the level-3 shape: Application Lifecycle reports a start as activity 3 (Start), a stop as 4 (Stop), and a config apply or TLS reload as 99 (Other), and carries an app object with the product name and version; Authorize Session reports an ACL denial as 99 (Other), named Deny, with status 2; API Activity reports an admin operation as 1 Create, 2 Read, 3 Update or 4 Delete where one applies, and 0 otherwise. Below level 3 a broker writes the 1.0.0 shape: a start as 1, a config apply and a TLS reload as 3, a denial as 2 and every admin operation as 0. A record keeps the shape it had when the writer first serialized it, so a spooled record replays unchanged. |
The group coordinator writes a __consumer_offsets group record only where Kafka 4.3.1’s GroupMetadataManager writes it. So a reader of the topic must accept two shapes that a write on every transition did not make:
- A group can exist without a group metadata record. A new consumer or share group starts at Kafka’s group epoch 1, and the first
ConsumerGroupMetadataValue(type 3) orShareGroupMetadataValue(type 11) comes only with the first epoch bump. A member that joins without a change to the subscribed topic names writes its member record and its current assignment (types 5 and 8 for a consumer group) and no type 3. Replay creates the group from the first child record, as Kafka’sgetOrMaybeCreatePersistedConsumerGroupdoes, at epoch 1. - A target assignment can be empty.
ConsumerGroupTargetAssignmentMemberValue(type 7),ShareGroupTargetAssignmentMemberValue(type 13) andStreamsGroupTargetAssignmentMemberValue(type 21) can hold an empty assignment. That is a member with no target, which is not the same as a tombstone: the tombstone removes the member’s target, and the empty value keeps it.
Other local state
| Artifact | Location | Encoding | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|---|
| WAL quorum membership | <log_ and its . |
krabka JSON {version, voters} |
version 0 |
A missing or other version, in the file or its ., stops the shard from opening. |
None |
| WAL durable offset | . and its . |
krabka text, 0 then the two offsets |
Header line 0 |
A missing or other version, in the file or its ., stops recovery with an error. |
None |
| Audit spool | <log_ by default |
krabka: magic KAUD, a version, then big-endian length-prefixed frames |
FORMAT_, i16 0, after the magic |
A file without the header (0.x) or with another version is refused. A torn last frame is still the end of the data. | None |
| Audit spool state | audit., audit., audit. |
krabka, with the same header | As the audit spool | As the audit spool | None |
| RLMM snapshot | <log_ by default |
krabka envelope over the Metadata codec |
SNAPSHOT_ 0, u16 |
A version other than 0 is refused, and the broker replays _ from the start. |
None |
Object store
| Artifact | Location | Encoding | Version marker | Unknown-version behavior | Gating |
|---|---|---|---|---|---|
| Tiered segment | KIP-405 layout, under the configured prefix of remote_ or remote_ |
Kafka segment, index and checkpoint files | Kafka’s | Kafka’s rules. A reader looks an object up under the key of the current write form first and under the other form when that is absent, at every level, and a delete removes both. krabka-worm-verify --prefix, given the prefix exactly as the broker was configured with it, lists both forms and joins one partition’s manifests across them. |
krabka. 3 trims spaces and slashes from the prefix before the key is built (normalize_, as for diskless WAL objects), so tier/ writes under tier/. Below level 3 a broker writes the key with the prefix exactly as configured. object_ already drops an empty path segment, so the two forms differ only for a prefix with surrounding whitespace or control characters, or one of only whitespace. |
| WORM manifest | <segment>. |
krabka JSON, and a canonical big-endian layout that the chain hashes | format_ 2 |
A version other than 2 is refused. | None. The writer always writes 2. Its object keys, and its own key, follow the tiered segment’s prefix form. |
| Diskless WAL object | Absolute WAL object key, including the configured bucket prefix for new cloud objects | krabka binary, magic CKWL |
OBJECT_ 1, u16 little-endian |
A version other than 1 is refused. Existing unprefixed keys remain readable as recorded. With a prefix configured, the reclaimer lists only <prefix>/ and never deletes a root-level object. |
None |
| Backup capture manifest | restore-inputs/ |
krabka JSON | version 0 |
A missing or other version is refused. | None |
| Captured metadata checkpoint | restore-inputs/ |
Kafka KIP-630 | As the metadata snapshot | As the metadata snapshot | As the metadata snapshot |
| Captured RLMM snapshot | restore-inputs/ |
As the RLMM snapshot | As the RLMM snapshot | As the RLMM snapshot | None |
| Captured group offsets | restore-inputs/ |
krabka JSON | version 0 |
A missing or other version is refused. | None |
| Captured diskless WAL index | restore-inputs/ |
krabka JSON Diskless |
format_ 1 |
A version other than 1 is refused. | None |
Rolling-upgrade RPCs
These records are not on disk, but nodes of two 1.x versions exchange them during a rolling upgrade. The contract covers them.
| RPC | API key | Body | Version marker | Unknown-version behavior |
|---|---|---|---|---|
Submit |
1003 | wincode Vec<Metadata. The response carries a wincode Submit. |
The request header api_, 0 |
A request of another version is answered with UNSUPPORTED_ (35) and not applied. |
Metadata |
1004 | Kafka record batches of _, with the KIP-631 record frame |
The request header api_, 0 |
As Submit. The records are then read as the metadata log segment. |
Delegation |
1005 | wincode Vec<Delegation |
The request header api_, 0 |
As Submit. |
crates/raft/src/wire.rs defines the three codecs. Their versions are negotiated through krabka.version, as Kafka’s inter-broker protocol versions follow metadata.version: the controller’s ApiVersions answer stays Kafka’s table, byte for byte. A sender sends the version that krabka_metadata::private_rpc_version gives for the level finalized in its metadata image, and v0 with no image or no finalized level. Because the controller finalizes only a level that every registered node supports, every peer serves that version. A receiver serves 0 up to the version at its own highest supported level and answers anything else with UNSUPPORTED_VERSION. Levels 0 and 1 give v0 for all three, so a new RPC version arrives with a new level.
Known gaps
The items below are true of the code at 1.0.0.
Fixture coverage
Every krabka-owned format in the tables above has a golden-bytes test that encodes a value, compares it with fixed bytes and decodes the bytes back. The Kafka-owned formats rely on the Kafka differential suites instead. The replay-fence key __krabka_diskless_replay_fence in __diskless_wal_index is a fixed literal with an empty value and has no version.
Unknown tagged fields in group records
Kafka 4.3.1 builds each group record that it writes from its in-memory group, not from the record it replayed. So it drops the unknown tagged fields at the top level of a replayed record when it writes that record again, and krabka drops them too. KIP-1331’s streams tags 2 and 3, which Kafka 4.3.1 does not know, follow the same rule: krabka writes them only while group.streams.topology.description.plugin.class is set.
Kafka keeps two nested structs of a replayed record as the generated objects, with their unknown tagged fields: ConsumerGroupMemberMetadataValue.ClassicMemberMetadata, with each of its ClassicProtocol entries, and StreamsGroupMemberMetadataValue.Endpoint. A member record that Kafka writes from a copy of the member, such as the record of a static member’s replacement, carries those fields again. And because the generated equals compares them, a classic rejoin or a streams heartbeat that sends the same values as the replayed record still writes the member record again, and for the streams heartbeat also bumps the group epoch. krabka decodes these structs into its own types and drops their unknown tagged fields, so it writes the member record without them, and it writes no record and bumps no epoch for such a heartbeat. Kafka 4.3.1 defines no tagged field in these structs, so only a record from a later Kafka version can carry one.
Tiered DeleteRecords floors from before #1481
The log-start checkpoint does not say who raised a floor. A follower of a
tiered partition lowers an established floor to a lower start its leader
reports only while the archive does not enforce it, that is while a finished
segment still lies wholly below it. A broker with the fix for #1481 marks those
segments DeleteSegmentStarted before it raises a DeleteRecords floor, so
its floors are enforced from the start. An earlier broker left them finished
until its next remote-retention pass. Such a floor, in that window, is
indistinguishable from the restarted leader’s local start that a broker without
the fix for #1444 reported, which is the floor the lowering exists to repair.
Deploying gives the procedure that keeps
a roll out of the window.
Integration
CLAUDE.mdgives the rules above as instructions to a contributor.- Deploy gives the operator procedure for a rolling upgrade and for the finalization of a feature level.
- Releasing says how a release that changes a persisted format records the change.
format-divergences.mdlists where the files thatkrabka-formatwrites differ from the files thatkafka-storage formatwrites.
Kafka / KIP Compliance
- KIP-584 and KIP-778 define finalized feature levels and the
metadata.versionupgrade. The gating rule follows them. - KIP-631 defines the metadata record frame, and KIP-630 defines the snapshot format.
- KIP-1155 defines the
metadata.versiondowngrade that the controller implements. - KIP-482 tagged fields let a Kafka tool read a krabka
NoOpRecordand keep the private tag as an unknown tagged field. - KIP-405 defines the tiered-segment layout in the object store.
Testing
crates/metadata/src/kraft_translate.rsin krabka-protocol pins the private tag list and the bytes of each private record, andcrates/metadata/src/wincode_contract.rspins the wincode encoding of everyMetadataRecordvariant and nested enum, so a test fails when a tag or a layout changes.- Each krabka-owned format has a golden-bytes test next to its codec, and a table of refused versions, including the layout a 0.x broker wrote.
crates/audit/src/ocsf/tests.rspins the bytes of every__krabka_auditrecord shape that a 1.1.x broker writes and of its level-3 shape, andcrates/remote-storage/src/s3/keys.rspins the tiered object keys under both prefix forms.- Verification lists the model checks and proofs, including the
quorum-stateload decision.