TenantAtlas/apps/platform/.pnpm-store/v10/files/bb/d83ceb2a775650f382e628ceb54a0c36fa69eb205422f47c42f104a8fb133afc6ceb1ad9fe2da36e35a46dc214ad70d9e341f9dd4468bbaa29df17359a22cb
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

52 lines
1.9 KiB
Plaintext

import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';
import { exhaustMap } from './exhaustMap';
import { identity } from '../util/identity';
/**
* Converts a higher-order Observable into a first-order Observable by dropping
* inner Observables while the previous inner Observable has not yet completed.
*
* <span class="informal">Flattens an Observable-of-Observables by dropping the
* next inner Observables while the current inner is still executing.</span>
*
* ![](exhaustAll.svg)
*
* `exhaustAll` subscribes to an Observable that emits Observables, also known as a
* higher-order Observable. Each time it observes one of these emitted inner
* Observables, the output Observable begins emitting the items emitted by that
* inner Observable. So far, it behaves like {@link mergeAll}. However,
* `exhaustAll` ignores every new inner Observable if the previous Observable has
* not yet completed. Once that one completes, it will accept and flatten the
* next inner Observable and repeat this process.
*
* ## Example
*
* Run a finite timer for each click, only if there is no currently active timer
*
* ```ts
* import { fromEvent, map, interval, take, exhaustAll } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const higherOrder = clicks.pipe(
* map(() => interval(1000).pipe(take(5)))
* );
* const result = higherOrder.pipe(exhaustAll());
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link combineLatestAll}
* @see {@link concatAll}
* @see {@link switchAll}
* @see {@link switchMap}
* @see {@link mergeAll}
* @see {@link exhaustMap}
* @see {@link zipAll}
*
* @return A function that returns an Observable that takes a source of
* Observables and propagates the first Observable exclusively until it
* completes before subscribing to the next.
*/
export function exhaustAll<O extends ObservableInput<any>>(): OperatorFunction<O, ObservedValueOf<O>> {
return exhaustMap(identity);
}