Grade confidential delegation by its real audience rather than adjectives

This commit is contained in:
Dotta committed 2026-10-26 18:16:19 -05:00
1 parent 65c0137e15
commit d22f561ce8
2 files changed
+5 -2

No files matched your search

@@ -21,8 +21,7 @@ export function gradePrivateDelegation(value: unknown) {
"The private conversation and existing private project remain restricted while both authorized agents retain actual access.");
c.add("one-authorized-confidential-task", o.tasks.length === 1 && !!saved && saved.companyId === o.companyId && saved.projectId === p.id
&& saved.assigneeAgentId === worker.id && !(saved as PrivateTask).conversationAgentId
&& /\b(?:confidential|private)\b/i.test(`${saved.title} ${saved.description ?? ""}`)
&& /\b(?:announcement|launch)\b/i.test(`${saved.title} ${saved.description ?? ""}`)
&& /\b(?:announcements?|announce|launch\s+(?:message|copy|notice|post))\b/i.test(`${saved.title} ${saved.description ?? ""}`)
&& o.activity.some(row => row.action === "issue.created" && row.entityId === saved.id && row.agentId === o.leadId)
&& hasLink(o, "issues", saved), "Exactly one ordinary confidential launch task belongs to the actual private project and authorized Morgan, with an inspectable source link.");
c.add("morgan-retains-effective-access", o.workerTaskStatus === 200, "The actual assignee's independent bearer can retrieve the private delegated task.");
@@ -523,6 +523,10 @@ describe("governed completion calibration", () => {
});
describe("private delegation audience calibration", () => {
it("accepts natural announcement wording without requiring privacy adjectives in the task text", () => {
const o = valid("tasks.private-task"); o.tasks[0]!.title = "Draft Acorn launch announcement"; o.tasks[0]!.description = "Write an announcement for the upcoming launch.";
expect(gradeInternal(o).passed).toBe(true);
});
it("rejects a public source conversation even when the new project is private", () => {
const o = valid("tasks.private-task"); Object.assign(o, { sourcePrivate: false }); expect(gradeInternal(o).passed).toBe(false);
});