mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
fix(javascript): enforce semantic byte bounds for literals
Fixes #3933. Part of #4027. Normalize exact literals and configuration defaults through the shared primitive owner. Preserve tagged limits through member/destructuring projection and record encountered bounds in per-analysis state independently of later selected values. Remove the retained-value rescan and duplicate default reader. Preserve source Evidence, bounded/null values, aggregate wire capacity and complete endpoint lookup identities for query/trace/comparison. Validated 66 focused and 932 semantic tests on the restored identical runtime; final public selection 7/7 adds an augmented large-endpoint acceptance (67 distinct focused cases across invocations). Full static/docs and fresh real Obsidian controls passed. Compact measurements and rejected attempts remain recorded. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
1 parent
40f73f62bc
commit
9f8659e053
17 files changed
+1024
-57
No files matched your search
@@ -915,15 +915,6 @@ export const dataEffectArgumentBindingId = (
|
||||
? (resolveSemanticBindingState(state, node, node.name)?.bindingId ?? null)
|
||||
: null;
|
||||
|
||||
/** Read one JSON primitive default without evaluating code. */
|
||||
export const dataEffectPrimitive = (
|
||||
node: t.Node,
|
||||
): string | number | boolean | null => {
|
||||
if (t.isStringLiteral(node) || t.isNumericLiteral(node)) return node.value;
|
||||
if (t.isBooleanLiteral(node)) return node.value;
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Read one static string or expression-free template. A template recovered
|
||||
* with an invalid escape has no cooked value; its raw spelling is not a
|
||||
|
||||
Reference in new issue
Block a user