partitioner fix: chain ids lead every rendered line
The partitioner was told to reference chain ids, but no rendered line ever showed one — chainLine emitted bare 'premises → conclusion', so the model re-typed whole rendered lines into submit_partition and every call failed 'unknown chain ids' validation (owner live report, 2026-09-30 evening). The generator's YOUR TARGET block had the same blindness. - chainLine now leads with the chain's id: [arg_x] n_a, n_b → n_c; a bare proposition repeats its own id ([n_y] n_y (no premises)) — mechanically teaching that its chain id IS its proposition id. - PARTITIONER_INSTRUCTIONS rewritten to chains-primary vocabulary (was still 'follows-edges, bijective re-encoding' — pre-chains framing) with the id-only doctrine and singular propositions first-class. - partitionSchema/problemSchema gained field descriptions: ids VERBATIM, never re-type, never invent. - Generator OUTPUT bullet + target-block header say the same. Design ruling en route: partitioner stays an LLM partitioning chains (deterministic partitioning and propositions-as-targets both considered and declined by the owner).
This commit is contained in:
@@ -109,12 +109,15 @@ describe("renderParams — named levels, never a number", () => {
|
||||
});
|
||||
|
||||
describe("rendering (the agent-facing text)", () => {
|
||||
it("renderChains: legend with names + statements, premises → conclusion, singletons marked", () => {
|
||||
it("renderChains: legend with names + statements, chain ids LEAD every line (the referenceable anchor)", () => {
|
||||
const text = renderChains(chains, propositions);
|
||||
assert.match(text, /\[n1\] Self-ownership — Each person owns themself\./);
|
||||
assert.match(text, /\[n2\] Homesteading — Unowned goods are claimed by first use\./);
|
||||
assert.match(text, /n1 → n3/);
|
||||
assert.match(text, /n2 \(no premises\)/);
|
||||
// The chain id precedes every line — the id the submit references.
|
||||
assert.match(text, /\[n3\] n1 → n3/);
|
||||
// A bare proposition: its own id, twice — the chain id IS the
|
||||
// proposition id (owner fix, 2026-09-30 evening).
|
||||
assert.match(text, /\[n2\] n2 \(no premises\)/);
|
||||
});
|
||||
|
||||
it("renderPreviousProblems: numbered statements + chains; empty = first-set line", () => {
|
||||
|
||||
@@ -108,8 +108,11 @@ function targetOf(prompt: string): string[] {
|
||||
const section = prompt.split("THE FULL SET")[0] ?? "";
|
||||
const ids: string[] = [];
|
||||
for (const line of section.split("\n")) {
|
||||
if (line.includes("→")) ids.push(line.split("→")[1]!.trim());
|
||||
else if (line.includes("(no premises)")) ids.push(line.replace("(no premises)", "").trim());
|
||||
// Chain ids now LEAD every line ([arg_x] a, b → c) — strip the anchor
|
||||
// bracket to recover the id the submit must echo.
|
||||
const body = line.replace(/^\[[^\]]+\]\s+/, "");
|
||||
if (body.includes("→")) ids.push(body.split("→")[1]!.trim());
|
||||
else if (body.includes("(no premises)")) ids.push(body.replace("(no premises)", "").trim());
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user