TenantAtlas/apps/platform/.pnpm-store/v10/files/a8/9addddc2e90a2c28ab17ce4dec88ed3df15c56f1c9acb5dc15291e383f586a01a28f56ca885c843a2d0e182889fafd7452d2a887ef217fd6e9588c3f76e98d
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

53 lines
1.8 KiB
Plaintext

'use strict';
var test = require('tape');
var parse = require('../').parse;
test('expand environment variables', function (t) {
t.same(parse('a $XYZ c', { XYZ: 'b' }), ['a', 'b', 'c']);
t.same(parse('a${XYZ}c', { XYZ: 'b' }), ['abc']);
t.same(parse('a${XYZ}c $XYZ', { XYZ: 'b' }), ['abc', 'b']);
t.same(parse('"-$X-$Y-"', { X: 'a', Y: 'b' }), ['-a-b-']);
t.same(parse("'-$X-$Y-'", { X: 'a', Y: 'b' }), ['-$X-$Y-']);
t.same(parse('qrs"$zzz"wxy', { zzz: 'tuv' }), ['qrstuvwxy']);
t.same(parse("qrs'$zzz'wxy", { zzz: 'tuv' }), ['qrs$zzzwxy']);
t.same(parse('qrs${zzz}wxy'), ['qrswxy']);
t.same(parse('qrs$wxy $'), ['qrs', '$']);
t.same(parse('grep "xy$"'), ['grep', 'xy$']);
t.same(parse('ab$x', { x: 'c' }), ['abc']);
t.same(parse('ab\\$x', { x: 'c' }), ['ab$x']);
t.same(parse('ab${x}def', { x: 'c' }), ['abcdef']);
t.same(parse('ab\\${x}def', { x: 'c' }), ['ab${x}def']);
t.same(parse('"ab\\${x}def"', { x: 'c' }), ['ab${x}def']);
t.end();
});
test('expand environment variables within here-strings', function (t) {
t.same(parse('a <<< $x', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']);
t.same(parse('a <<< ${x}', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']);
t.same(parse('a <<< "$x"', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']);
t.same(parse('a <<< "${x}"', { x: 'Joe' }), ['a', { op: '<<<' }, 'Joe']);
t.end();
});
test('environment variables with metacharacters', function (t) {
t.same(parse('a $XYZ c', { XYZ: '"b"' }), ['a', '"b"', 'c']);
t.same(parse('a $XYZ c', { XYZ: '$X', X: 5 }), ['a', '$X', 'c']);
t.same(parse('a"$XYZ"c', { XYZ: "'xyz'" }), ["a'xyz'c"]);
t.end();
});
test('special shell parameters', function (t) {
var chars = '*@#?-$!0_'.split('');
t.plan(chars.length);
chars.forEach(function (c) {
var env = {};
env[c] = 'xxx';
t.same(parse('a $' + c + ' c', env), ['a', 'xxx', 'c']);
});
});