[FEATURE] Retain complete runtime policy without a fixed row limit #27
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/launchd#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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.