mirror of
https://github.com/morluto/rea.git
synced 2026-10-19 04:19:54 -05:00
Replace recursive getter histories with a query-owned worklist and memo. Bound precise expansion at 512 states and widen growing receiver cycles; retain escaped roots and constructed children rather than silently dropping suffixes. Carry the resource limit through semantic coverage, worker transport and graph Evidence while preserving direct writes, imports and unrelated literal facts. The small source probe reduced 65/326 paths to one widened reference for five and six getters. The original large Claude artifact was not rerun. Validate receiver/alias/mutation controls and compiled CLI/MCP consumers. Refs #3839, #3848 Co-authored-by: Yi Han <yhan606@aucklanduni.ac.nz>
14 lines
433 B
TypeScript
14 lines
433 B
TypeScript
/** Dynamic receiver keys enumerate permutations of these getter names. */
|
|
export const getterExpansionSource = (count = 10): string => `
|
|
const shared = { value: 1 };
|
|
class Request {
|
|
${Array.from(
|
|
{ length: count },
|
|
(_, index) => `get field${index}() { return this[key].field${index}; }`,
|
|
).join("\n")}
|
|
get state() { return shared; }
|
|
}
|
|
consume(new Request().field0);
|
|
const result = shared.value;
|
|
`;
|