Some checks failed
Main Confidence / confidence (push) Failing after 45s
## 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
36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.LoggerPadding = void 0;
|
|
class LoggerPadding {
|
|
logger;
|
|
constructor({ logger }) {
|
|
this.logger = logger;
|
|
}
|
|
handle(commands) {
|
|
// Sometimes there's limited concurrency, so not all commands will spawn straight away.
|
|
// Compute the prefix length now, which works for all styles but those with a PID.
|
|
let length = commands.reduce((length, command) => {
|
|
const content = this.logger.getPrefixContent(command);
|
|
return Math.max(length, content?.value.length || 0);
|
|
}, 0);
|
|
this.logger.setPrefixLength(length);
|
|
// The length of prefixes is somewhat stable, except for PIDs, which might change when a
|
|
// process spawns (e.g. PIDs might look like 1, 10 or 100), therefore listen to command starts
|
|
// and update the prefix length when this happens.
|
|
const subs = commands.map((command) => command.timer.subscribe((event) => {
|
|
if (!event.endDate) {
|
|
const content = this.logger.getPrefixContent(command);
|
|
length = Math.max(length, content?.value.length || 0);
|
|
this.logger.setPrefixLength(length);
|
|
}
|
|
}));
|
|
return {
|
|
commands,
|
|
onFinish() {
|
|
subs.forEach((sub) => sub.unsubscribe());
|
|
},
|
|
};
|
|
}
|
|
}
|
|
exports.LoggerPadding = LoggerPadding;
|