TenantAtlas/apps/platform/.pnpm-store/v10/files/4c/816457e757128432533daa9dacab4f76df4143a470f0877360f2d0fc47b8a7a170192f6fd69aac2ca62bc409f60cb916d4784c4413efd3303bb7628b62ac43
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

64 lines
3.2 KiB
Plaintext

import { entityKind } from "../entity.cjs";
import { GelColumn } from "./columns/index.cjs";
import type { GelDeleteConfig, GelInsertConfig, GelUpdateConfig } from "./query-builders/index.cjs";
import type { GelSelectConfig } from "./query-builders/select.types.cjs";
import { GelTable } from "./table.cjs";
import { type BuildRelationalQueryResult, type DBQueryConfig, type Relation, type TableRelationalConfig, type TablesRelationalConfig } from "../relations.cjs";
import { type DriverValueEncoder, type QueryTypingsValue, type QueryWithTypings, SQL } from "../sql/sql.cjs";
import { type Casing, type UpdateSet } from "../utils.cjs";
import type { GelMaterializedView } from "./view.cjs";
export interface GelDialectConfig {
casing?: Casing;
}
export declare class GelDialect {
static readonly [entityKind]: string;
constructor(config?: GelDialectConfig);
escapeName(name: string): string;
escapeParam(num: number): string;
escapeString(str: string): string;
private buildWithCTE;
buildDeleteQuery({ table, where, returning, withList }: GelDeleteConfig): SQL;
buildUpdateSet(table: GelTable, set: UpdateSet): SQL;
buildUpdateQuery({ table, set, where, returning, withList, from, joins }: GelUpdateConfig): SQL;
/**
* Builds selection SQL with provided fields/expressions
*
* Examples:
*
* `select <selection> from`
*
* `insert ... returning <selection>`
*
* If `isSingleTable` is true, then columns won't be prefixed with table name
* ^ Temporarily disabled behaviour, see comments within method for a reasoning
*/
private buildSelection;
private buildJoins;
private buildFromTable;
buildSelectQuery({ withList, fields, fieldsFlat, where, having, table, joins, orderBy, groupBy, limit, offset, lockingClause, distinct, setOperators, }: GelSelectConfig): SQL;
buildSetOperations(leftSelect: SQL, setOperators: GelSelectConfig['setOperators']): SQL;
buildSetOperationQuery({ leftSelect, setOperator: { type, isAll, rightSelect, limit, orderBy, offset }, }: {
leftSelect: SQL;
setOperator: GelSelectConfig['setOperators'][number];
}): SQL;
buildInsertQuery({ table, values: valuesOrSelect, onConflict, returning, withList, select, overridingSystemValue_ }: GelInsertConfig): SQL;
buildRefreshMaterializedViewQuery({ view, concurrently, withNoData }: {
view: GelMaterializedView;
concurrently?: boolean;
withNoData?: boolean;
}): SQL;
prepareTyping(encoder: DriverValueEncoder<unknown, unknown>): QueryTypingsValue;
sqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithTypings;
buildRelationalQueryWithoutPK({ fullSchema, schema, tableNamesMap, table, tableConfig, queryConfig: config, tableAlias, nestedQueryRelation, joinOn, }: {
fullSchema: Record<string, unknown>;
schema: TablesRelationalConfig;
tableNamesMap: Record<string, string>;
table: GelTable;
tableConfig: TableRelationalConfig;
queryConfig: true | DBQueryConfig<'many', true>;
tableAlias: string;
nestedQueryRelation?: Relation;
joinOn?: SQL;
}): BuildRelationalQueryResult<GelTable, GelColumn>;
}