Repair packed agent startup and bound activation metadata retention
This commit is contained in:
@@ -9,7 +9,11 @@ export class CandidateMetadataBudget {
|
||||
private bytes = 0;
|
||||
private scopes = 0;
|
||||
private readonly owners = new Map<string, number>();
|
||||
constructor(limits = { bytes: 512 * 1024 * 1024, ownerBytes: 256 * 1024 * 1024, candidates: 128 }) {
|
||||
// A cutover holds both the serving and proposed installation plus transient
|
||||
// parsing space. The 57-repository reader retains ~133 MiB per installation;
|
||||
// a 256 MiB owner ceiling cannot admit its ordinary atomic replacement.
|
||||
// Keep the aggregate ceiling independent and leave room for parsing overlap.
|
||||
constructor(limits = { bytes: 512 * 1024 * 1024, ownerBytes: 384 * 1024 * 1024, candidates: 128 }) {
|
||||
for (const value of Object.values(limits))
|
||||
if (!Number.isSafeInteger(value) || value < 1) throw Error("INVALID_CANDIDATE_METADATA_BUDGET");
|
||||
if (limits.ownerBytes > limits.bytes) throw Error("INVALID_CANDIDATE_METADATA_BUDGET");
|
||||
|
||||
Reference in New Issue
Block a user