Files
rea/experiments/atomic-codemode/string-facts.mjs
T
1346e97dca fix(experiment): preserve code when encoded native graphs exceed capacity
Bound compact native JSON with the existing writer, keep a valid code facet when the graph cannot fit, and pass the supervised byte budget explicitly. Verify real SQLite Parser/Pragma captures, exact preserved C/mappings/graph facts and public MCP reads. Keep string inventory parsing/projection under its own owner.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-16 06:50:20 +00:00

25 lines
709 B
JavaScript

import { parseKunaStringInventory } from "../../dist/kuna/KunaStringInventory.js";
import { requireResult } from "./fact-error.mjs";
import { freezeFacts, pageFacts } from "./fact-reads.mjs";
export const parseStringFacts = (text, input) =>
freezeFacts(
requireResult(
parseKunaStringInventory(text, input),
"invalid_provider_output",
),
);
export const selectStringFacts = (inventory, input) => ({
...pageFacts(
inventory.items.filter((row) => row.value.includes(input.query)),
input,
),
coverage: {
scope: "native string inventory, minimum 5",
scanned: inventory.scanned,
artifact_discovery: "unknown",
reference_attribution: "not-computed",
},
});