Skip to main content

Module partition

Module partition 

Source
Expand description

Partitions (spec 3.2 §7.8): areas of a user’s life or an organisation’s teams kept apart, with work across them only through the coordinator and under approval.

A Partition is a policy class plus a memory scope plus a driver set, run by its own HarnessAgent built with the partition’s mode (the kernel feature of adk-harness):

PartMechanism
Policy classPartition::class and Partition::tenant on the AgentPrincipal of every agent in it, through the runner’s identity source (Partition::identity_source), so PolicyRule::for_class rules apply
MemoryThe partition’s memory_scope is the project of its long-term facts (FactScope.project) and of project-scoped memory (Partition::scope_memory)
DriversPartition::drivers: the driver ids mounted for the partition
CrossingsPartitionPolicy: a request that reaches another partition is denied unless the coordinator makes it, then RequireApproval, non-waivable, audited as kernel.partition.crossing (K-I15)

The approval’s unit is the crossing fingerprint within one run (§13 Q3): an approved read lets the coordinator’s identical reads through for the rest of that run and nothing beyond it; writes stay one-shot. Partitions keeps the partition table and the crossing ledger in a PartitionStore.

Structs§

Crossing
One request reaching from one partition into another (spec 3.2 §7.8).
CrossingFilter
Which crossing records PartitionStore::crossings returns. An empty field matches everything.
CrossingRecord
One entry of the crossing ledger (spec 3.2 §7.8, §9.3): who crossed where, when, in which run, and what happened. It holds a digest of the crossing fingerprint, never the call’s arguments.
CrossingTool
A tool of another partition offered to the coordinator (spec 3.2 §7.8): a driver’s tool, or a tool reading another partition’s sessions, named <to>__<tool> and governed as a crossing by the coordinator’s PartitionPolicy, with which it registers itself.
Partition
A partition (spec 3.2 §7.8): a policy class plus a memory scope plus a driver set, run by its own HarnessAgent built with default_mode.
PartitionId
Names a partition: work, home, a team (spec 3.2 §7.8).
PartitionPolicy
The policy of one partition’s harness (spec 3.2 §7.8, K-I15): a ToolPolicy that decides the calls of its crossing tools and lets every other call through, so it composes with the harness policy through StrictestPolicy and never loosens it (K-I6).
Partitions
The partition table and its crossings (spec 3.2 §7.8): reads and changes partitions with kernel.partition.created and kernel.partition.changed records, builds each partition’s PartitionPolicy, and keeps the crossing ledger the policy and the crossing tools write and the run’s approvals are read from. Cloning shares it.
RecurringCrossing
A crossing that keeps happening (spec 3.2 §7.8): what the maintenance process reports, with partition membership as the remedy, never a waiver.

Enums§

CrossPartition
Whether a partition takes part in crossings (spec 3.2 §7.8).
CrossingAccess
Whether a crossing only reads (spec 3.2 §7.8, §13 Q3).
CrossingOutcome
What happened to a crossing (spec 3.2 §9.3 kernel.partition.crossing).
CrossingResource
What a crossing reaches (spec 3.2 §7.8): the resource class of its fingerprint.
CrossingRoute
How a crossing tool’s call names what it reaches (spec 3.2 §7.8).
CrossingRun
The run an approved read holds for (spec 3.2 §13 Q3): a durable run, across the invocations that resume it, or one invocation outside a durable run.
PartitionMode
A partition’s default mode (spec 3.2 §7.8): what its agents may do without asking.

Constants§

CROSSING_PARTITION_ARG
The argument naming the target partition of a crossing tool whose CrossingRoute is Argument.

Traits§

PartitionStore
The partition table and the crossing ledger (spec 3.2 §7.8, §13 Q8), on every backend ProcessStore has: InMemoryPartitionStore, SqlitePartitionStore, PostgresPartitionStore and RedisPartitionStore, with one conformance suite (partition_store_conformance_tests!, feature conformance).