Notify on goal, task and evidence plan edits; stay silent on identity bookkeeping

Field calibration from three supervisor reports: the useful plan-change catch was a worker-ticked task the short-view hash no longer surfaced, while identity-line edits caused duplicate empty reviews. The notify digest keeps goals, tasks and evidence above the Log and drops worker identity lines. Reopening a signed goal still clears its sign-off.

Co-Authored-By: Pi/OpenAI <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-09-11 06:33:59 +08:00
co-authored by Pi/OpenAI
parent 20b145b20c
commit c834237970
4 changed files with 33 additions and 11 deletions
+9 -5
View File
@@ -447,18 +447,22 @@ it.each(["missing", "empty", "directory"])("%s plan snapshots never erase signof
expect(f.changed()).toBe(0);
});
it("ignores post-completion maintenance but reviews a real requirement or manual reopening", async () => {
it("ignores post-completion maintenance but reviews evidence, requirement or manual reopening changes", async () => {
const f = fixture(); await f.draft(); await f.command("ready");
writeFileSync(join(f.ctx.cwd, "proof.log"), "PASS\n");
for (const goal of ["first output", "second output"]) await f.tools.get("CompleteGoal").execute("c", { goal, evidence: ["proof.log"], observation: "PASS" }, undefined, undefined, f.ctx);
const signed = readFileSync(f.path, "utf8");
await f.atomicWrite(signed.replace("## Log", " - evidence: proof.log\n## Log\n- recap: finished"));
await f.atomicWrite(signed.replace("## Log", "## Log\n- recap: finished"));
await delay(250);
expect(f.changed()).toBe(0);
await f.atomicWrite(signed.replace("## Log", "- discriminator: exact bytes and trailing newline\n## Log"));
expect(f.changed()).toBe(0); // Log-only edits are history, not requirements
// Worker-authored evidence above the Log must surface: a supervisor caught a worker's
// contradictory evidence block through exactly this event (LUCID3, 2026-09-10).
await f.atomicWrite(signed.replace("## Log", " - evidence: proof.log\n## Log\n- recap: finished"));
await waitFor(() => f.changed() === 1);
await f.atomicWrite(signed.replace("[x] goal: first", "[ ] goal: first"));
await f.atomicWrite(signed.replace("## Log", "- discriminator: exact bytes and trailing newline\n## Log"));
await waitFor(() => f.changed() === 2);
await f.atomicWrite(signed.replace("[x] goal: first", "[ ] goal: first"));
await waitFor(() => f.changed() === 3);
expect(f.entries.at(-1).data.signoffs["first output"]).toBeUndefined();
});
+13
View File
@@ -20,6 +20,19 @@ it("omits only named worker identity fields from review while retaining them in
expect(planViews(base.replace("[ ]", "[x]")).short).not.toBe(planViews(base).short);
});
it("notifies on goal and task changes but not on identity bookkeeping or log edits", () => {
const base = "# Plan\n- [ ] goal: result\n## Task list\n- [ ] run it\n- worker session: /saved.jsonl\n## Log\nfirst entry";
const baseView = planViews(base).notify;
// identity bookkeeping: silent
expect(planViews(base.replace("/saved.jsonl", "/moved.jsonl")).notify).toBe(baseView);
// log edits: silent
expect(planViews(base.replace("first entry", "second entry")).notify).toBe(baseView);
// worker ticking a task: review event (field catch, LUCID3 2026-09-10)
expect(planViews(base.replace("- [ ] run it", "- [x] run it")).notify).not.toBe(baseView);
// goal edits: review event
expect(planViews(base.replace("[ ] goal: result", "[x] goal: result")).notify).not.toBe(baseView);
});
it("stops at history and preserves a manual goal tick", () => {
const view = planViews("# Plan\n1. [x] goal: result\n## Log\n1. [ ] goal: historical");
expect(view.short).toContain("[x] goal: result");