docs/internal/agenthub-config.md

AgentHub configuration v1

The direct service reads one bounded YAML configuration document. It contains version: 1 and an optional inbound mapping with enabled, listen, and address. Inbound is disabled by default.

When inbound is disabled, listener and public address values are empty. When it is enabled, listen is a canonical local IP:port without a zone, and address is the operator-supplied usable canonical public Hub address. The addresses have independently validated nonzero ports; NAT or container mapping may translate the local listener port to a different public port. The public address may use a hostname. It is not a redirect.

One public address serves first contact, admission, exact-pinned reconnect, directory access, endpoint authorization, and direct application traffic. Pairing and normal-peer TLS use the same public accept owner; nothing may add a listener field, second public port, or redirect. Private AF_UNIX control and configured application sockets remain separate.

Operational commands, supervision ownership, and the single-port NAT/container mapping belong to deployment and supervision. The checked-in inbound and outbound-only files are parsed by the production decoder in TestDeploymentConfigurationExamples. EzAgent's explicit OnStart example belongs to its separate services schema, never this document.

The decoder requires one mapping document, exact field names and YAML scalar types, owner-only file protection, and a size bound. Unknown fields and unsupported versions fail closed. CreateDefault is exclusive and never replaces an existing configuration. No feature-branch format upgrade is offered.

The current literal is configuration.yaml. The foundation fixture's configuration.yaml remains an omitted-limits input and resolves to the same defaults.

Supported configuration

The strict decoder implements version, inbound and optional limits in one closed version-1 document, with no predecessor parser or migration fallback. Missing limit fields use the defaults below. Production startup consumes the expanded limits before constructing runtime owners. Unknown names, duplicate names, aliases, nulls, floats, negative numbers, zero-as-unlimited and overflow fail closed. The YAML file ceiling remains 64 KiB. Do not read, expose or merge auth.yaml.

The private API's configuration is a required fully expanded object with version, inbound and limits. inbound always contains enabled, listen and address, including empty strings when disabled. limits always contains data_bytes, control_bytes, circuit_admission and resources. circuit_admission contains required integer global, per_client and per_endpoint values. Each defaults to 524,288 and accepts positive int64 values. YAML may omit any field to select its default; private replacements contain all three. They are local admission policies, not negotiated circuit wire limits. resources has exactly the keys in the table below. Each resource object has count, bytes, per_key, key_bytes. These are integer byte/count values, not human-readable quantities on the wire. YAML may omit resource objects or fields to select their defaults; the result of decoding is the same complete typed configuration. There is no arbitrary resource map exposed by the API. Canonical encoding emits every field in the table order, decimal integers and LF endings, with no comments.

data_bytes defaults to 17,179,869,184 bytes, 16 GiB. Its compiled viable minimum is config.MinDataBytes, the overlapping retained owners for one maximum routed application operation, not just the payload size. control_bytes defaults to 536,870,912 bytes, 512 MiB, with the operational minimum in config.MinControlBytes. Both class limits can be raised through the positive int64 range. Resource defaults and supported ceilings are distinct. Connection settings can be raised above their defaults where the runtime owners support them. They may be lowered only to their compiled viable minimums from config.MinimumLimits(), which returns the complete finite profile for all 38 resources. These include required overlapping leases and fixed startup owners. Keyed resources require per-key count/bytes within those minimums and no greater than the resource count/bytes or their supported keyed ceilings. Unkeyed resources require both keyed values to be exactly zero. Zero here means no keyed policy, not an unlimited resource. Arithmetic is checked before reserve or allocation.

config.MaximumLimits() separates supported maxima from defaults. Circuit and adapter count/byte limits, connection count/byte/keyed settings and class byte limits can be raised through their supported int64 ranges. Peer connection counts remain capped at 256. circuit_ciphertext and session_registry keep their count-one sentinels but allow larger byte budgets. Other fixed protocol and owner bounds do not grow when these policies increase.

The protected config table owns defaults and validation; service.DefaultBudgetLimits derives the same values rather than maintaining another profile. The configuration dashboard displays minimum, default and maximum profiles separately. A maximum profile describes individually supported values, not a promise that all maxima can coexist within the class budgets or structural bounds. The table uses KiB = 1,024 bytes and MiB = 1,048,576 bytes for readability. Deterministic encoding and private JSON use exact integers. Limits apply at next start only. A saved reduction does not evict active work or hot-shrink budgets.

ResourceCount defaultBytes defaultPer-key count / bytes defaultRuntime consumer
network_connection512256 MiB0 / 0Shared physical descriptor count, reserved before public accept/TLS and outbound dial, retained through close and join
gateway_connection256128 MiB256 / 32 MiBAuthenticated client-entry lifetime, keyed by stable client SPKI
circuit_ciphertext1256 MiB0 / 0Byte-only actual retained payload, queue-node, RX body and adapter allocation; count one is a config sentinel
mux_channel17,15216.75 MiB0 / 0Required/optional/pending/terminal channel liabilities
pending_handshake12832 MiB8 / 2 MiBPublic accept/TLS admission
authenticated_connection2,048256 MiB256 / 32 MiBNested authenticated endpoint TLS owner
invitation_connection324 MiB2 / 256 KiBClient invitation transport
pairing_connection162 MiB2 / 256 KiBInitial/recovery pairing transport
peer_connection3232 MiB2 / 256 KiBNormal-peer TLS manager
peer_mux2563 GiB2 / 24 MiBPeer mux, 12 MiB per session
directory_memory1,024384 MiB0 / 0Local/learned compact catalog owner
directory_control2,336201,359,360 bytes0 / 0256 sync engines plus 32 shared projection/online-repair scratch owners
routing_memory1128 MiB0 / 0Routing table, lookup pool and fixed peer-manager ticket index
routing_runtime256128 MiB1 / 512 KiBExact-link route engines
routing_control2578,454,144 bytes0 / 0Routing global and per-link control
relay_memory4,096402,784,256 bytes0 / 0384 MiB attempts plus one 128 KiB per-Hub Setup owner
relay_control4,09632 MiB0 / 0Relay owner control
circuit_memory524,2882 GiB0 / 0Fixed endpoint owners, 32 KiB each
circuit_control524,288128 MiB0 / 0Endpoint control, 16 KiB each
session_registry164 MiB0 / 0Lifetime metadata allowance for demand-grown session and runtime indexes
audit_reader8256 KiB0 / 0Synchronous protected audit readers, 32 KiB each; control class
endpoint_carrier_memory524,28832 MiB0 / 0SessionConn fixed metadata, 16 KiB each; buffers use circuit_ciphertext
endpoint_carrier_control524,28832 MiB0 / 0SessionConn carrier control, 16 KiB each
pairing_worker2512 KiB0 / 0Bounded passive pairing owner
pairing_queue321 MiB0 / 0Explicit pairing work queue
invitation_worker84 MiB0 / 0Hub-wide invitation workers
invitation_recovery_worker2512 KiB0 / 0Invitation recovery workers
invitation_recovery_queue321 MiB0 / 0Invitation recovery queue
lineage_transfer8338,856 bytes0 / 0Authority-lineage transfers
gateway_capacity4,096512 MiB0 / 0Gateway frames/list ownership, not lifetime count
application_capacity8,192256 MiB0 / 0Application encode/decode ownership
parser_capacity16,384256 MiB0 / 0Public JSONL/parser owners
jsonl_capacity2,048384 MiB0 / 0Application JSONL buffers
local_socket1,02432 MiB1,024 / 32 MiBAuthorized local socket owner
control_connection322 MiB0 / 0Same-user private administration connections
control_frame3216 MiB0 / 0Private codec/projection/terminal/result reservations
restricted_pairing_memory162 MiB0 / 0Restricted routed pairing carrier
restricted_pairing_control16256 KiB0 / 0Restricted pairing control

The directory control default follows the complete engine inventory. Each peersync.Engine can retain nine control owners: four pending deltas, one processing event, two queued events, the reader's next frame and one serialized write. peersync.MaxControlReservationBytes includes nine 64-KiB frames plus 128 bytes of write headroom, totaling 589,952 bytes per engine. At routing.MaxLinks = 256, synchronization needs 2,304 owners and 151,027,712 bytes. Private directory projections and online repair validation each reserve service.RuntimeDirectoryProjectionBytes = 1,572,864 bytes. They share ezhubapi.MaxGlobalHandlers = 32 across connections, with MaxInFlight = 8 per connection. Repair acquires scratch before waiting for the domain writer, so writer serialization does not reduce its scratch overlap. The default adds 32 scratch owners and 50,331,648 bytes to the engine inventory, for 2,336 owners and 201,359,360 bytes. These 32 slots cover any admitted mix of projections and repairs, not 32 of each simultaneously. Direct internal calls still intersect the resource budget; the global handler bound applies to the private server. The minimum remains one engine plus one projection or repair, ten owners and 2,162,816 bytes. It does not promise full peer concurrency.

The viable minima keep control_connection.count at least one and its byte limit at least 64 KiB. control_frame.count is at least four and its byte limit at least 3 MiB. A real control operation can retain the connection base, request decoding, prepaid projection/raw result, and marshaled waiting/write owners. One slot cannot encode or deliver a reply. The control aggregate minimum protects that administration path. It does not promise admission of 32 simultaneous maximum frames. Values below any compiled minimum are rejected by YAML, private DTO decoding and online/offline saving. The dashboard displays the complete minimum profile alongside supported defaults and maxima. Valid reductions below defaults can deny additional concurrent work with resource_limit; the UI warns before saving without silently raising a value or changing a payload ceiling. Per-resource limits intersect aggregate class limits; their byte sums need not fit the aggregate. Startup must either reserve each fixed owner within the effective limits or fail with a bounded configuration error naming the resource. Never bypass a configured ceiling for startup.

The service consumes effective configuration through one validated config.Config.EffectiveLimits conversion and the service's configuredBudget adapter into service.BudgetLimits, before creating workers. The derived gateway_tunnel and fixed invitation_tunnel_frame resources, snapshot budget and TLS staging groups retain their separate finite owner calculations. They are not operator-defined map entries or ignored YAML settings. Existing test-only service.Options.Limits overrides stay test seams, not a second production profile. Every production reservation remains charged to its exact class/resource. Configuration display shows saved values, online get_limits shows active values and usage/peaks, and the token comparison marks restart-required. A config-file comment edit changes its exact conflict token even if every effective limit remains equal.

Admission and connection settings

limits.circuit_admission.global configures the process-wide logical circuit counter and a separate adapter counter with the same limit. Neither allocates an array or channel sized to that limit. per_client counts circuits attributed to the stable authenticated entry client. per_endpoint counts circuits for one EzAgent endpoint. Origin admission uses the locally authorized endpoint and no client identity inferred from relay metadata. Entry and origin each consume one logical owner; transit forwarding consumes no circuit session or replay window. Circuit capacity returns only after workers and relay settlement have joined. All three policies default to 524,288, not structural maxima. Per-Service trusted-key counters, resource budgets and prepaid registry capacity remain independent intersecting limits.

network_connection.count is the shared physical TCP cap, default 512. The public listener reserves it before Accept, before TLS can identify the role. Do not split untrusted incoming sockets into guessed client and Hub quotas. gateway_connection.count and peer_connection.count apply to their identified role owners, defaulting to 256 and 32. Outbound TCP uses the same physical cap. Pending handshakes also have their existing global and observed-source budgets.

The runtime gateway_tunnel allowance follows the combined gateway and authenticated_connection capacities, bounded by each connection budget's fixed-owner bytes and the overall DATA budget. Keyed tunnel capacity follows the corresponding keyed connection budgets. TLS tunnel staging uses that derived allowance too. Raising trusted connection settings therefore does not encounter a separate fixed 64-tunnel client quota.

Gateway and authenticated endpoint TLS keyed defaults are 256 owners and 32 MiB per stable key. Local sockets default to 1,024 owners and 32 MiB both globally and per endpoint. These settings can be raised; peer connections still intersect the actual 256-link routing bound. Untrusted pending admission remains 128 globally and eight per observed source by default. Rolling-source TLS work limits, authorization, signatures and endpoint ACL checks remain separate.

For example, a busier node can raise policy and connection settings explicitly:

yaml
1version: 1
2limits:
3 circuit_admission:
4 global: 1048576
5 per_client: 786432
6 per_endpoint: 1048576
7 resources:
8 network_connection:
9 count: 4096
10 bytes: 536870912
11 gateway_connection:
12 count: 1024
13 per_key: 512
14 key_bytes: 67108864
15 peer_connection:
16 count: 64
17 local_socket:
18 count: 2048
19 bytes: 67108864
20 per_key: 2048
21 key_bytes: 67108864

Omitted fields retain defaults. This example changes saved intent only and leaves inbound disabled unless separately configured. Raise each resource whose count, keyed count or byte budget would otherwise bind first; increasing circuit policy does not override the local-socket budget or gateway lifetime budget. Peer link structures still have a 256-link bound. High logical admission does not prepay a full replay window per possible session. The shared ciphertext budget charges retained allocations as they grow. Class and resource byte limits can bind well before the logical count, even on an otherwise idle node. These defaults support ordinary trusted small-workgroup use without tiny per-client quotas; they are not a simultaneous-capacity or OOM-safety promise. There is no aggressive RSS memory-pressure monitor.

The OS descriptor limit is another independent constraint. Operators may raise it through their shell or service manager. The Hub neither raises it silently nor treats its configured TCP cap as an inventory of every process descriptor. Allow headroom for local application sockets, control sockets, files and the outstanding public accept reservation. A larger OS limit does not bypass Hub budgets, and a larger Hub setting does not guarantee OS admission.

Fixed bounds and supported defaults

The supported operator controls are inbound, circuit admission policy and the complete finite budget table. The following are fixed bounds/defaults consumed by current owners, not omitted tunable fields or a claim of unlimited work:

Fixed bound/defaultValueConsumer
Store document / YAML nodes / endpoints / admissions / invitations64 MiB / 3,000,000 / 1,024 / 4,096 / 4,096Strict Hub store decoder/mutations; exact combined envelope
Pairings / peers / total endpoint ACL rows / per-endpoint ACL rows256 / 256 / 65,536 / 4,096Store and exact authorization owner
Alias / local socket bytes / address-list structural bound256 / 4,096 / 16ACTIVE direct initiators require one address; target/routed relationships zero; saved-client entries can hold 16
Private hello/cancel / ordinary / status line1 KiB / 64 KiB / 512 KiB, including LFEzHub codec
Private JSON depth / values16 / 8,192EzHub strict decoder
Requests per connection / shared handlers8 / 32Shared private Client/Server
Output queue / cancellation reserve16 frames and 1 MiB / 8 frames and 8 KiBPrivate terminal and cancellation delivery
Handler / terminal delivery30 seconds / 5 secondsPrivate request retirement and delivery owners
Hello / partial frame / write / cancel join5 seconds eachPrivate transport lifecycle
Pairing open-screen interval / initial carrier cutoff5 seconds / 5 minutesDashboard view / bounded initial service carrier
Peer concurrent dials / dial / READY exchange / drain8 / 5 seconds / 5 seconds / 5 secondsPeer manager
Route refresh / expiry / maximum path roots20 seconds / 60 seconds / 8Frozen routing engine/table
Audit record / file / retained files1 KiB / 1 MiB / 5Closed bounded audit writer and reader
Peer diagnostics workers / queue4 / 128Best-effort diagnostic dispatcher
Invitation lifetimes600 / 3,600 / 86,400 secondsExplicit invitation creation

The following collection ceilings are separate from a page size. A route table can have 257 origins even though each selected path has at most eight roots. It can store 256 remote origins times 256 exact-link contributions. The 32-candidate bound limits selected/best-alternative projections, not that storage. Endpoint notices can have 1,024 rows per endpoint even though a page has 16. The independent finite-limits checker must compare every source declaration or validator bound below, not just the 38 configurable budget resources. Numeric expressions refer to the current source owners, not new configurable fields.

Source boundValueCollection/owner
store.MaxStateBytes67,108,864Total retained Hub store document
store.MaxYAMLNodes / store.MaxYAMLDepth3,000,000 / 32Streaming decoder preflight and canonical encoding geometry
store.MaxEndpoints1,024All active/retired retained endpoints
store.MaxAdmissions4,096Admission rows
store.MaxInvitations4,096All invitation phases/purposes and retained terminal cards
store.MaxPairings256Pairing rows and alias-sidecar entries
store.MaxPeers256All retained peer rows
store.MaxTotalACLRows65,536Combined endpoint ACL rows
store.MaxEndpointACLs4,096ACL rows per endpoint
store.MaxNotices1,024Retained notices per endpoint
store.MaxAddresses16Addresses per peer; direct joining pairing is exactly one
store.validateTrust.resolutions64Authority resolutions per retained Trust
store.validateTrust.rejectedSuccessors256Total rejected successors per retained Trust, not per resolution
records.MaxTransitionsPerLineage64Authority transitions per Trust, hence at most 65 history records
records.MaxConflictKeys256Retained conflict keys in the shared verified record owner
records.MaxConflictEvidenceBytes8,388,608Aggregate retained conflict evidence bytes
records.MaxConflictBytesPerKey65,828Evidence bytes per conflict key; browse exports digests, not buffers
records.MaxInternedRecords65,536Shared verified records bounding evidence/origin projections
records.MaxLearnedAuthorities257Retained learned authority high-water roots
records.MaxLearnedSelections32,768Retained verified learned selection keys
records.MaxLearnedPairingRequests256Retained learned pairing-request keys
directory.MaxEndpoints1,024Complete learned/local endpoint projection
directory.MaxAuthorities257Distinct stable roots contributing to the directory
directory.MaxRelationships256Learned contributing peers/relationships
directory.MaxRecords21,313Records per compact catalog, 25765 + 1,0244 + 256*2
routing.MaxOrigins257Complete route-table origins, including self
routing.MaxLinks256Table physical-link slots
routing.MaxCandidates32Selected route and bounded best-alternative projection; table has up to 256 link contributions per origin
routing.MaxPathRoots8Roots per selected path, not route collection size
routing.MaxLookupLeases4,096Existing lookup owners; browsing creates none
peer.maxRouteTickets8,192Existing process-wide route admission tickets
peer.maxLinkRouteTickets64Existing per-link route admission tickets
restrictedpairing.MaxOwners16Restricted pairing display/carrier owners

Projection work uses the existing eight per-connection/32 shared handler ceilings and bounded 16-row pages, eight for candidates/session paths, not an unbounded display snapshot registry. Existing owner slots supply generation-scoped display handles; no second route lookup pool is added for browsing. Returned copies remain charged until ReleaseResult, including client-held copies. Directory conflicts/origins/evidence share the existing verified-record/byte ceilings, not an invented eight-origin display cap. Authority resolution/rejection collections are further constrained by their containing Trust and the 64 MiB store document.

Security/consent deadlines, ACK/grace/replay bytes, certificate policy, route ordering and refresh, mux role limits and all inter-Hub wire bounds remain in their existing owning contracts. Configuration does not add a second policy for them. Neither budget reductions nor dashboard polling can alter those semantics. Independent usage/peak samples are owned-storage accounting, not allocator or OS RSS limits. Maximum-payload and concurrent reservation/pressure acceptance must still run with these defaults; freezing defaults does not replace that gate.

Persistence and validation handoff

config.LoadEffectiveContext, config.EncodeCanonical, config.FileToken and config.ReplaceLockedContext are implemented internal interfaces. File token means SHA-256 of exact protected bytes, not YAML semantics. The full replacement contract, conflict and uncertainty outcomes live in private control. No new sidecar, SQLite object, user_version, alternate address or live reload is needed.

Extend configuration.yaml and its independent YAML checker with omitted/default, minimum/ceiling, complete canonical and negative cases before changing parsers. Require table-to-production-resource coverage, checked arithmetic and exact class/consumer mappings. Test the maximum complete JSON/YAML encoding, line/value headroom, stale byte-token races and restart-required display. Do not lock prose wording in tests. See test ownership.

Implemented token and runtime views

Service.Configuration reads saved intent and compares its exact byte token with the startup token. Service.ReplaceConfiguration holds the existing exclusive store administration lock across the revision check, protected token check, staging, final inode/token recheck and rename. Config saves never increment the Hub revision or hot-shrink active owners. A canonical byte-identical replacement is a no-op with no success audit; definite changed bytes get one redacted configuration_replaced audit. Comment-only changes still require restart. Post-rename uncertainty fails the service closed. An external editor is not an atomic participant; undetected edits after the final recheck are outside the cooperating-writer contract, not a filesystem compare-and-swap promise.

Service.ResourceLimits returns independent active budget, snapshot and TLS staging values. SupportedStructuralLimits reports fixed JSON value, wrapper, parser scratch and queue capacities. Circuit and adapter admission are policy, not structural array sizes. Saved configuration, active limits, supported budget ceilings and structural bounds are different values. The configuration/limits private DTO, shared validation, online/offline dispatch and command dashboard adapters are implemented. The dashboard displays the complete viable minimum and default profiles separately from saved and active samples. Durable/runtime/action adapters and their existing command dashboard consumers are also implemented. Service tests and typed library tests own the configuration/limits regressions; focused-check policy governs selection.

Plan targets versus compiled ceilings

Capacity fixtures choose explicit profiles and use allocation-time charging. The connection counts below are test profiles, not shipped defaults or universal configuration maxima. Circuit, relay and routing structures retain their separately stated bounds. The production owner map binds each profile to admission, identity, bytes, release, configuration and tests.

Explicit stress profileProduction owner exercisedRegression scope
2,048 physical network connections, including 128 pre-TLS and eight per observed sourceExact descriptor leases, separate from nested TLS stagingExplicit real TCP capacity and mixed Session profiles; public pending TLS tested separately
1,024 gateways, eight per stable authenticated client SPKIClient-entry lifetime leases, separate from gateway frame/list reservationsAuthenticated application profile with 128 stable clients and eight gateways each
2,048 reliable circuits, 16 per authenticated entry client, 64 per endpointFixed 32 KiB DATA/16 KiB CONTROL owner plus dynamic ciphertext and separately admitted adaptersExplicit authenticated application profile with 2,048 central owners; small configurable admission/settlement component controls and combined ciphertext profile are separate
1,024 local application socketsLocal socket leases, profile population 64 per endpointEndpoint TLS and 1,024 authorized sockets across 16 endpoints; structural AF_UNIX byteflow/join profile remains separate
4,096 relay bindings4,096 attempt-owner slots and service leases, including setup and retiring ownersLive relay/mux component maximum, stalled-bulk control progress, joined teardown and refill
8,192 total mux-channel targetDefault ceiling 17,152 includes required, optional, pair-sibling and terminal chargesLive 8,192-channel component profile; separate 4,096-transit profile holds 17,152 channels including required signals
1 GiB retained circuit ciphertextExplicitly raised shared queue/RX-body/adapter circuit_ciphertext budget inside DATACombined profile with actual retained allocations, Session.Write +1 refusal, borrowed join retention, terminal-slot refill and 2,048/2,048 recovery. Authenticated application profile is separate
256 configured/active peer identitiesExisting store maximum; 256 TLS/mux/routing ownersAuthenticated READY-peer profile with complete private traversal, retirement/replacement and joined reuse

The peak counts intersect, so the target is not also a sufficient default ceiling. Each READY peer link owns three directory/routing channels. With 256 READY links, 768 real channel liabilities are already used. A single-pair relay owner needs two more; a transit owner needs four across both incident pairs. An exact 8,192 total-channel ceiling could not admit 4,096 bound relays. The production default instead admits 4,096 * 4 + 256 * 3 = 17,152 liabilities, with 32 pairs and 128 active/128 terminal slots per link. Its 8,192 route-ticket fallback pool covers both incident pair holds for 4,096 transit owners; each link has 64 ticket slots and at most 512 total joined-lifetime peer leases. The 8,192-channel mandatory target is preserved and signal channels count. Lower operator limits can deny these combinations. The service fixtures distinguish live component and mixed service profiles from authenticated application process profiles. The latter uses 128 client and 64 remote-Hub test executables with production authentication/transport, not 1,024 native TUIs. These are independent legal profiles, not topology × population × cancellation Cartesian maxima. They do not substitute counts for usable owners. Broader validation selection follows the test ownership policy. Production directory transfer and verification staging now derive their finite population from peer_connection.count, through 256. Both retain the existing one-stage-per-peer rule and allocation-time DATA charges. The private DTO, canonical fixtures and checker need no new fields; the existing peer setting now reaches these runtime consumers too.

The 16-GiB DATA and 512-MiB CONTROL defaults cover the sum of default resource byte budgets, including derived tunnel and fixed frame resources. Raised settings need not fit together within a class aggregate. Counts still intersect as above. Snapshot/config parsing and TLS staging have separate finite owners; these totals are not an RSS limit. TestDefaultCeilingsAdmitTogether passes all 40 runtime resource ceilings to the production budget in one atomic reservation, splits keyed resources within their per-key ceilings, and uses zero count for actual ciphertext byte charges. It checks one-byte denials, complete release and reuse. This verifies admission arithmetic without allocating those bytes or creating live transport owners. The correspondence tests compare both complete default and minimum private DTOs and derive both aggregate minima from runtime owners. Minimum profiles admit one supported maximum operation, not all capacity targets. Smaller valid operator settings deliberately reject excess work. State semantic maxima, topology/process journeys and maximum coexistence remain assigned acceptance work; no count-only or padded-YAML result closes them.

Final viable minima and config-parser ownership

The same Config.Validate rules now apply to strict YAML, private typed DTOs, online replacement, offline replacement and startup. Accepted reductions cannot set an application encoder or parser to one simultaneous lease. The complete minimum profile is in config.MinimumLimits() and configuration-minimum.yaml. Key footprints include:

ResourceMinimum countMinimum bytesReason
pending_handshake2524,288Accepted public handshake plus the next pre-Accept network pending slot; per-source minimum remains one
relay_memory1229,376One fixed 128 KiB Setup owner plus one 96 KiB attempt; Setup uses count zero
authenticated_connection2, including per key262,144, including per keyDirect outer entry plus inner endpoint TLS
application_capacity3201,853,960Outgoing wrapper/write plus incoming decode
parser_capacity14210,281,730Fixed queue/line, growth or compaction, incoming compact, metadata, application allocator and direct gateway-frame overlap
jsonl_capacity167,108,864One maximum queue payload
control_frame43,145,728Connection, decoded request, prepaid projection/raw result, marshaled terminal
directory_control102,162,816One 1,572,864-byte projection or online repair plus nine synchronization frame owners and write headroom
routing_memory1134,217,728Fixed startup table, lookup pool and peer-manager ticket index
session_registry14,194,304Minimum lifetime metadata allowance, with lazy rows and indexes

DATA and CONTROL minima are derived in config.MinDataBytes and config.MinControlBytes. Defaults are 17,179,869,184 and 536,870,912 bytes; supported maxima are positive int64, not those defaults. The new physical/gateway minima admit two physical owners and one stable client entry. An idle inbound listener retains one physical/global pending reservation before Accept; the pending minimum leaves room for that slot while one accepted public handshake remains pending. Outbound peer TLS uses its separate preparation pool and does not consume public pending capacity. The observed-source charge starts only after Accept returns. Ciphertext minimum is 12 MiB, separate from the fixed 32 KiB DATA/16 KiB CONTROL circuit owner; mux-channel minimum is seven liabilities. These operational minima do not claim the target capacities. The independent minimum correspondence tests bind the formulas to production owners. Real minimum profile tests start and restart the service, execute configuration/limits calls, exercise all eight directory browse/detail operations and successful online repair through production private dispatch while retaining one sync engine's maximum control overlap, and reject stale repair evidence without a commit or leaked lease. The directory floor includes four retained deltas, one processing event, two queued events, the reader's next frame and one serialized control write. Old reductions below these corrected minima now fail validation rather than starting a service permanently unable to inspect its directory or validate repair. Separate minimum payload tests deliver escaped 64 MiB values in both directions and retain simultaneous maximum input/output on direct and natural one-relay paths. The minimum profile supports one operation, not an unrelated second application. Its one-byte extra queue item is rejected by the configured one-item resource count. Default-profile pressure hits the 64 MiB queue ceiling instead, with no reservation rejection.

Configuration parsing has a separate input-derived capacity owner. A malformed 64 KiB YAML document can build a tree before closed-shape rejection, so the 256 KiB API projection lease cannot cover it. ResolveConfigLimits() reports 150,737,652 bytes per maximum config operation, including two possible YAML trees, read/encode overlap and bounded conversion work. Plain/startup/offline operations use a separate finite pool of eight charges, 1,205,901,216 bytes. Online operations use the existing snapshot budget via reserved config APIs. Denial happens before reads, parsing or replacement effects and maps to private resource_limit. These are conservative admitted capacities, not arenas, allocated-byte or RSS measurements. Retained typed DTOs and encoding belong to the separate API lease.

The dashboard prints this fixed config capacity alongside payload and queue structural ceilings and circuit policy. get_limits samples the main DATA/control owner's 40 rows atomically; its derived tunnel and fixed frame rows are not YAML knobs. Snapshot and local config-fallback pools are separate named owners, not folded into a misleading main-DATA usage total. Whole-process simultaneous-capacity acceptance still belongs to the parent gate.

Public pending isolation

pending_handshake configures public physical ingress only, including the pre-Accept network admission slot and accepted TLS staging. Nested endpoint TLS and outgoing peer/pairing TLS cannot borrow its 128-global/eight-source reserve. They use separate finite service-runtime preparation pools derived from the protected endpoint, peer and pairing connection budgets and their owned-buffer byte allowances. These are not new YAML keys or private JSONL configuration fields. Outgoing descriptors continue to charge the shared configured physical network ceiling, default 512, and retire only after closure and owner join. See runtime ownership.

Public TLS work has a separate compiled scheduling policy in gateway.PreTLSAdmission: eight active workers and 32 starts in a rolling second globally, with two active workers and eight starts per observed source IP. These are policy constants, not memory-derived bounds or configurable fields. The pending pool remains 128 globally and eight per source, intersected with any lower configured pending_handshake bounds. Waiting for a worker or a start does not extend the absolute five-second deadline established at reservation. Public client, pairing and peer TLS share these unauthenticated allowances; requested roles, ALPN and certificate claims do not grant priority.

One source can consume at most one quarter of the workers and rolling starts, leaving six workers and 24 starts for other sources when aggregate capacity is otherwise available. Clients behind one NAT share the observed-source allowance: a legitimate cold-start burst can wait and time out. Source IP is transport metadata, not authenticated identity, and does not key gateway lifetimes or outgoing peer establishment. This is single-source isolation, not distributed DDoS protection, strict fair scheduling or guaranteed progress under aggregate or physical saturation. The entry deadline also does not interrupt a durable security-time snapshot transaction that has passed its last cancellable boundary.