mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 18:52:48 +00:00
fix(parsers): preserve format evidence and caller input identity
Retain bounded FAT and offset-tagged PE observations through archive hashing, classification, and content nodes. Preserve PyInstaller member paths according to the observed carrier dialect and share APK v1 signing-name semantics. Read SQLite's implicit sqlite_schema table without inventing a stored schema declaration. Distinguish unsupported ELF numbering and decoded-name admission from malformed data and fixed scan allowances. Preserve Sigrok basenames and classify matching explicit input-format refusals at their owning boundary. Validation: 554 distinct tests passed, 3 skipped across serial focused runs; build, typecheck/lint, docs, formatting, and discovery (2141 files) passed. Sigrok command-boundary simulators do not establish real-tool decoding. Small repeated public PyInstaller CLI runs had equivalent inventory facts; warm median elapsed 0.5431s before / 0.5426s after, with no speed claim. Fixes #6733 Fixes #6741 Fixes #6722 Fixes #6732 Fixes #6736 Fixes #6734 Fixes #6764 Fixes #6766 Refs #6739
This commit is contained in:
1 parent
a718037033
commit
bd4f5e9c19
47 files changed
+1523
-209
No files matched your search
@@ -17,6 +17,7 @@ import {
|
||||
type SqliteDatabase,
|
||||
SQLITE_ROW_LIMIT_DEFAULT,
|
||||
DEFAULT_SQLITE_WORKER_TIMEOUT_MS,
|
||||
sqliteSchemaHasObjectDeclaration,
|
||||
sqliteSchemaScope,
|
||||
sqliteInspectionParameters,
|
||||
} from "../../domain/sqlite/sqliteDatabase.js";
|
||||
@@ -26,6 +27,21 @@ import { jsonValueSchema } from "../../domain/jsonValue.js";
|
||||
|
||||
const OPERATION = "inspect_sqlite_database";
|
||||
|
||||
const matchesSelectedSchema = (
|
||||
schema: SqliteDatabase["schema"],
|
||||
table: string,
|
||||
): boolean =>
|
||||
sqliteSchemaHasObjectDeclaration(table)
|
||||
? schema.tables.length === 1 &&
|
||||
schema.tables[0]?.name === table &&
|
||||
schema.indexes.every((index) => index.table === table) &&
|
||||
schema.triggers.every((trigger) => trigger.table === table) &&
|
||||
schema.views.length === 0
|
||||
: schema.tables.length === 0 &&
|
||||
schema.indexes.length === 0 &&
|
||||
schema.views.length === 0 &&
|
||||
schema.triggers.length === 0;
|
||||
|
||||
const matchesSelectedDatabase = (
|
||||
report: SqliteDatabase,
|
||||
input: InspectSqliteDatabaseInput,
|
||||
@@ -41,13 +57,8 @@ const matchesSelectedDatabase = (
|
||||
(report.wal === null || report.wal.path === `${input.path}-wal`) &&
|
||||
report.schema.scope === sqliteSchemaScope(input) &&
|
||||
(report.schema.scope !== "selected_table" ||
|
||||
(report.schema.tables.length === 1 &&
|
||||
report.schema.tables[0]?.name === input.table &&
|
||||
report.schema.indexes.every((index) => index.table === input.table) &&
|
||||
report.schema.triggers.every(
|
||||
(trigger) => trigger.table === input.table,
|
||||
) &&
|
||||
report.schema.views.length === 0)) &&
|
||||
(input.table !== undefined &&
|
||||
matchesSelectedSchema(report.schema, input.table))) &&
|
||||
(input.table === undefined
|
||||
? report.rows === null
|
||||
: report.rows?.table === input.table &&
|
||||
|
||||
Reference in new issue
Block a user