[FEATURE] Retain complete runtime policy without a fixed row limit #27

Open
opened 2026-10-24 07:22:37 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Launchd copies each running job's manifest and inherited script ceiling into two fixed 16-row arrays. Valid policies can therefore fail after authenticated preparation even when deployment storage is available. The original manifest scratch is reusable, and the script envelope can retire before the child, so neither can safely serve as the running job's policy backing.

Proposed behavior and scope

Retain the complete immutable policy in separately budgeted job storage until that job retires. Capacity is an explicit signed deployment value, shared by the startup codec, native arena and image producer. Admission depends on actual available bytes rather than a private per-job row count. Coordinate Launchd, LibBootstrap, Rootd and Integration, with matching component and manual documentation.

Authority, security and reliability

The retained policy describes existing authenticated ceilings; allocating storage adds no capability or operation. Each live job owns its exact policy range. Runtime views borrow that range, and successor adoption transfers ownership once. Reject exhausted storage before changing job state. Cancellation, failed attachment and final retirement must release only their original ranges, without stale references, duplicated owners or premature script retirement.

Acceptance criteria

  • Remove the fixed manifest and script-row limits while preserving complete measured policy bytes and original identity.
  • Add explicit deployment storage and migrate all startup, native layout, profile and image consumers together; reject obsolete records without defaults.
  • Retain policy through transaction release, script retirement, successor adoption and final job cleanup, with no copied ownership.
  • Cover policies larger than 16 rows, multiple jobs, exact exhaustion, denied attachment, cancellation and storage reuse through the actual ownership interfaces.
  • Update component contracts, the technical manual and coordinated source selection, and exercise the matching native launch path.

Alternatives and tradeoffs

A larger fixed array would move the same limit and charge every job for unused rows. Borrowing transaction scratch or script-table rows would couple independent lifetimes. A counted byte pool adds explicit storage accounting and compaction work while allowing each job to retain its complete admitted policy.

Tracking and rollout

Follow the immutable broker contract in Launchd #26. Submit the coordinated changes through Launchd PR #2 and Integration PR #12. Migrate producers and consumers together and remove the superseded fixed-array path.

## Problem and motivation Launchd copies each running job's manifest and inherited script ceiling into two fixed 16-row arrays. Valid policies can therefore fail after authenticated preparation even when deployment storage is available. The original manifest scratch is reusable, and the script envelope can retire before the child, so neither can safely serve as the running job's policy backing. ## Proposed behavior and scope Retain the complete immutable policy in separately budgeted job storage until that job retires. Capacity is an explicit signed deployment value, shared by the startup codec, native arena and image producer. Admission depends on actual available bytes rather than a private per-job row count. Coordinate Launchd, LibBootstrap, Rootd and Integration, with matching component and manual documentation. ## Authority, security and reliability The retained policy describes existing authenticated ceilings; allocating storage adds no capability or operation. Each live job owns its exact policy range. Runtime views borrow that range, and successor adoption transfers ownership once. Reject exhausted storage before changing job state. Cancellation, failed attachment and final retirement must release only their original ranges, without stale references, duplicated owners or premature script retirement. ## Acceptance criteria - [ ] Remove the fixed manifest and script-row limits while preserving complete measured policy bytes and original identity. - [ ] Add explicit deployment storage and migrate all startup, native layout, profile and image consumers together; reject obsolete records without defaults. - [ ] Retain policy through transaction release, script retirement, successor adoption and final job cleanup, with no copied ownership. - [ ] Cover policies larger than 16 rows, multiple jobs, exact exhaustion, denied attachment, cancellation and storage reuse through the actual ownership interfaces. - [ ] Update component contracts, the technical manual and coordinated source selection, and exercise the matching native launch path. ## Alternatives and tradeoffs A larger fixed array would move the same limit and charge every job for unused rows. Borrowing transaction scratch or script-table rows would couple independent lifetimes. A counted byte pool adds explicit storage accounting and compaction work while allowing each job to retain its complete admitted policy. ## Tracking and rollout Follow the immutable broker contract in [Launchd #26](https://git.erikinkinen.fi/erix/launchd/issues/26). Submit the coordinated changes through [Launchd PR #2](https://git.erikinkinen.fi/erix/launchd/pulls/2) and [Integration PR #12](https://git.erikinkinen.fi/erix/integration/pulls/12). Migrate producers and consumers together and remove the superseded fixed-array path.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/launchd#27
No description provided.