TenantAtlas/apps/platform/.pnpm-store/v10/files/48/2f53f9eb390b3389e1a2dc5986811149b8ac36680d0ce16bb4c1498f010cfc24e942893b63692b2b001e6f6d04cce8d34364635f7f50fc4bcd1e2533df7320
ahmido 1fec9c6f9d
Some checks failed
Main Confidence / confidence (push) Failing after 45s
feat: compress governance operator outcomes (#253)
## Summary
- introduce surface-aware compressed governance outcomes and reuse the shared truth/explanation seams for operator-first summaries
- apply the compressed outcome hierarchy across baseline, evidence, review, review-pack, canonical review/evidence, and artifact-oriented operation-run surfaces
- expand spec 214 fixtures and Pest coverage, and fix tenant-panel route assertions by generating explicit tenant-panel URLs in the affected Filament tests

## Validation
- `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent`
- focused governance compression suite from `specs/214-governance-outcome-compression/quickstart.md` passed (`68` tests, `445` assertions)
- `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryItemResourceTest.php tests/Feature/Filament/BackupSetUiEnforcementTest.php tests/Feature/Filament/RestoreRunUiEnforcementTest.php` passed (`18` tests, `81` assertions)

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #253
2026-04-19 12:30:36 +00:00

69 lines
2.7 KiB
Plaintext

import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
import { identity } from '../util/identity';
import { timer } from '../observable/timer';
import { innerFrom } from '../observable/innerFrom';
export function retry(configOrCount) {
if (configOrCount === void 0) { configOrCount = Infinity; }
var config;
if (configOrCount && typeof configOrCount === 'object') {
config = configOrCount;
}
else {
config = {
count: configOrCount,
};
}
var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b;
return count <= 0
? identity
: operate(function (source, subscriber) {
var soFar = 0;
var innerSub;
var subscribeForRetry = function () {
var syncUnsub = false;
innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) {
if (resetOnSuccess) {
soFar = 0;
}
subscriber.next(value);
}, undefined, function (err) {
if (soFar++ < count) {
var resub_1 = function () {
if (innerSub) {
innerSub.unsubscribe();
innerSub = null;
subscribeForRetry();
}
else {
syncUnsub = true;
}
};
if (delay != null) {
var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));
var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {
notifierSubscriber_1.unsubscribe();
resub_1();
}, function () {
subscriber.complete();
});
notifier.subscribe(notifierSubscriber_1);
}
else {
resub_1();
}
}
else {
subscriber.error(err);
}
}));
if (syncUnsub) {
innerSub.unsubscribe();
innerSub = null;
subscribeForRetry();
}
};
subscribeForRetry();
});
}
//# sourceMappingURL=retry.js.map