The structured coverage rows link required rules to their scenarios. A covered category has a defined check; executable coverage and successful execution require separate evidence. The category map keeps incomplete lifecycle matrices and other missing checks visible as findings.
A critical protection factor holds admission without stalled failure. Capacity protection does not gate scheduled partition maintenance. The interaction scenarios use the related capabilities' rule references and identify the shared fixture and observable outcome.
Coverage
Rulecovered
Transitiongap: FND-PFM-DJE-079
Validationcovered
Permissioncovered
Edgegap: FND-PFM-DJE-079
Failurecovered
Boundarycovered
Concurrencygap: FND-PFM-DJE-079
Invariantcovered
Interactioncovered
Test Scenarios
11 scenarios proving CAP-PFM-DJE-019; 8 bound to an existing test.
[
{
"do": "Evaluate their pressure levels.",
"expect": "Strictly exceeding configured thresholds produces the corresponding level; an API without a baseline is not classified by latency.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#is constrained when ACU utilization is above 80 %"
}
]
Expected
Strictly exceeding configured thresholds produces the corresponding level; an API without a baseline is not classified by latency.
Prepare alternating and sustained reading sequences.
Steps
[
{
"do": "Evaluate sequential state decisions.",
"expect": "Three supporting readings permit escalation, the spacing interval prevents another immediate transition and scaling alone remains constrained.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#enters constrained on three constrained readings in a row"
}
]
Expected
Three supporting readings permit escalation, the spacing interval prevents another immediate transition and scaling alone remains constrained.
[
{
"do": "Inspect its workload factors.",
"expect": "Constrained halves bulk and heavy; critical stops bulk and quarters heavy while leaving ordinary factors unchanged.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#halves bulk and heavy in constrained and arms the read ceiling"
}
]
Expected
Constrained halves bulk and heavy; critical stops bulk and quarters heavy while leaving ordinary factors unchanged.
Use a staff caller holding another HQ key and a customer administrator.
Steps
[
{
"do": "Attempt a pin mutation as the staff caller and a pin read as the customer administrator.",
"expect": "Both requests receive a forbidden response.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/e2e/capacity-pins.e2e.spec.js#refuses a staff member who holds only another HQ key"
}
]
[
{
"do": "Send unknown states, blank reasons and invalid expiry times.",
"expect": "Each refusal identifies its field and leaves the pin intact.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/integration/services/persistence/capacity-state-pins.integration.spec.js#refuses a state that is not one of the four, naming state"
}
]
Expected
Each refusal identifies its field and leaves the pin intact.
[
{
"do": "Create and release a pin.",
"expect": "Both audit entries describe before and after values.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/integration/services/pins/capacity-pins.integration.spec.js#records the pin and its removal, each with what it was and what it became"
}
]
Expected
Both audit entries describe before and after values.
Prepare switch-off and switch-on cases, prolonged emergency and recovery.
Steps
[
{
"do": "Evaluate decisions and apply stage changes.",
"expect": "Disabled throttling makes no gateway call; enabled prolonged emergency changes declared values and recovery restores them.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#applies the stage throttles after five further minutes of emergency without relief"
}
]
Expected
Disabled throttling makes no gateway call; enabled prolonged emergency changes declared values and recovery restores them.
Prepare previous critical state without a pin and failed signal reads.
Steps
[
{
"do": "Evaluate the first and second failed ticks.",
"expect": "The first holds critical and the second returns normal.",
"provenance": "test",
"source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#keeps the previous state for one tick"
}
]
Expected
The first holds critical and the second returns normal.
Prepare a decided critical state and independent cache and parameter clients.
Steps
[
{
"do": "Fail each publication channel in turn, then fail both.",
"expect": "One failed channel leaves the other carrying the decision; failure of both makes the invocation fail.",
"provenance": "proposed",
"source": "services-platform:docs/workload-governance.md#Capacity sentinel"
}
]
Expected
One failed channel leaves the other carrying the decision; failure of both makes the invocation fail.
Data
Prepare a decided critical state and independent cache and parameter clients.
Prepare a file job with waiting batches and a readable capacity factor of zero.
Steps
[
{
"do": "Attempt admission beyond fifteen minutes, then publish normal capacity and attempt it again.",
"expect": "Zero capacity holds the job without a stalled failure; restored capacity admits work within the remaining ceilings.",
"provenance": "proposed",
"source": "macroservice-libraries:packages/data-jobs/src/tests/integration/bulk-data-jobs.integration.spec.ts#hands over no more batches at once than the budget allows; macroservice-libraries:packages/data-jobs/src/admission-budget.ts:tenantBulkCeiling; macroservice-libraries:packages/data-jobs/src/tests/integration/bulk-data-jobs.integration.spec.ts#fails a job whose ceiling has been held by work that is not moving, rather than waiting for room for ever; services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#stops bulk and quarters heavy in critical, keeping writes and reads whole"
}
]
Expected
Zero capacity holds the job without a stalled failure; restored capacity admits work within the remaining ceilings.
Data
Prepare a file job with waiting batches and a readable capacity factor of zero.
Prepare critical capacity and registered history tables, including one failing table.
Steps
[
{
"do": "Keep bulk admission held while running the scheduled maintenance pass.",
"expect": "History maintenance still prepares eligible storage and reports its failing table; it does not consume bulk admission slots.",
"provenance": "proposed",
"source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#stops bulk and quarters heavy in critical, keeping writes and reads whole; services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#creates the current month and the two after it on the first run, and drops nothing; services-platform:modules/partitions/aws/logic/partitions-maintenance.schedule.ts:createPartitionsMaintenanceSchedule; services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#fails the run as a whole when one table’s pass failed, naming that table"
}
]
Expected
History maintenance still prepares eligible storage and reports its failing table; it does not consume bulk admission slots.
Data
Prepare critical capacity and registered history tables, including one failing table.