TenantAtlas/apps/platform/.pnpm-store/v10/files/df/885f728a87fecbd3f75fbe6936605a71898c34dedc19b4b7ba3f11f0797c3fe084b9c189badc3437c7665f5d58f7d83c047aa8317027858d2493c6cbd0db38
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

30 lines
1.5 KiB
Plaintext

import { ObservableInputTuple, OperatorFunction, Cons } from '../types';
import { zip } from './zip';
/**
* Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays.
*
* What is meant by "combine by index": The first value from each will be made into a single array, then emitted,
* then the second value from each will be combined into a single array and emitted, then the third value
* from each will be combined into a single array and emitted, and so on.
*
* This will continue until it is no longer able to combine values of the same index into an array.
*
* After the last value from any one completed source is emitted in an array, the resulting observable will complete,
* as there is no way to continue "zipping" values together by index.
*
* Use-cases for this operator are limited. There are memory concerns if one of the streams is emitting
* values at a much faster rate than the others. Usage should likely be limited to streams that emit
* at a similar pace, or finite streams of known length.
*
* In many cases, authors want `combineLatestWith` and not `zipWith`.
*
* @param otherInputs other observable inputs to collate values from.
* @return A function that returns an Observable that emits items by index
* combined from the source Observable and provided Observables, in form of an
* array.
*/
export function zipWith<T, A extends readonly unknown[]>(...otherInputs: [...ObservableInputTuple<A>]): OperatorFunction<T, Cons<T, A>> {
return zip(...otherInputs);
}