Skip to content

Stop ingestion from manufacturing spurious or auto-trusted tasks#57

Merged
marcelsamyn merged 4 commits into
mainfrom
claude/nice-rubin-arwx0
Jun 8, 2026
Merged

Stop ingestion from manufacturing spurious or auto-trusted tasks#57
marcelsamyn merged 4 commits into
mainfrom
claude/nice-rubin-arwx0

Conversation

@marcelsamyn

Copy link
Copy Markdown
Owner

Problem

A daily-brief conversation ingest (life updates + loose planning) was turned into a Task node titled "Sunday Morning Check-In: Zouk Social, Masterclass, and Weekly Planning" with the conversation summary stuffed into its description — and it landed in the trusted commitment band, not marked tentative.

Two root causes in src/lib/extract-graph.ts:

  1. Nothing stopped task invention. The "CURRENT OPEN TASKS" prompt section told the model to mint a new Task node for "brand-new tasks" with no guidance on what qualifies. So assistant suggestions, recaps, and loose planning got packaged into tasks — including meta "check-in" tasks that just restate that the conversation happened.
  2. Nothing forced the tentative flag. "Tentative" is stored as assertedByKind = 'assistant_inferred' (this splits trusted open commitments from candidate commitments). New tasks never had their provenance pinned, so _resolveAssertedByKind fell back to "user" (trusted).

Changes

Prompt hardening (_formatOpenCommitmentsSection):

  • A task must be a concrete, actionable item with a clear owner.
  • Explicit DO-NOT list: no tasks from assistant suggestions/proposals, recaps/summaries, uncommitted planning/brainstorming, or the existence of the conversation itself (no "check-in" / "weekly planning" / "review" meta-tasks).
  • Task labels must be short imperative actions, never a conversation summary/recap.

Deterministic tentative policy (code):

  • Every brand-new Task node created during document/conversation ingestion is now recorded as assistant_inferred (tentative) — unconditionally, regardless of source type or what the model asserts. Background ingestion never autonomously creates a firm commitment.
  • Status updates against existing tasks are untouched, so the candidate→trusted promotion flow (explicit user confirmation in a later source) and the commitment write APIs still produce firm commitments.

Tests (extract-graph.test.ts): two regression tests — a new task with omitted provenance lands tentative, and a new task the model marks "user" is still forced tentative. All 8 tests in the file pass.

Notes

  • Typecheck + lint clean on the changed files.
  • 3 failures in commitments.test.ts / open-commitments.test.ts are pre-existing — confirmed identical on the pristine tree; they don't touch extraction.
  • This only prevents recurrence; the existing bad task is still in the store.

https://claude.ai/code/session_01ByQzXHcjjLCgUepJn5VER7


Generated by Claude Code

claude added 2 commits June 8, 2026 06:08
The graph-extraction prompt would turn assistant suggestions, recaps, and
general planning chatter into Task nodes, and brand-new tasks could land in
the trusted commitment band without the tentative flag.

- Add explicit do-not clauses to the open-tasks prompt section: no tasks from
  assistant suggestions, recaps/summaries, uncommitted planning, or the
  conversation itself (no meta check-in/weekly-planning tasks). Task labels
  must be short imperative actions, not conversation summaries.
- Pin assertionKind for new tasks to who actually committed.
- Safety net: a newly minted task with unspecified provenance now defaults to
  the tentative (assistant_inferred) band instead of trusted.
- Add regression tests covering both the tentative default and the
  preserved-trusted path.
Background ingestion should never autonomously create a firm commitment, so
make the tentative (candidate) band deterministic for every brand-new task
rather than letting the model's assertionKind decide.

- Force assertedByKind to assistant_inferred for any newly created Task node's
  HAS_TASK_STATUS claim, regardless of source type or model-asserted provenance.
- Status updates to existing tasks (including candidate->trusted promotions via
  explicit user confirmation) are untouched.
- Update the extraction prompt: new tasks are always recorded tentative;
  confirmation must target an existing task node.
- Update the regression test to assert a model-marked user-stated new task is
  still forced tentative.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request ensures that any brand-new tasks created during conversation or document ingestion are deterministically recorded as tentative (using the assistant_inferred assertion kind), preventing passive background ingestion from creating firm commitments. It also updates the graph-extraction prompt instructions to explicitly forbid manufacturing spurious tasks (e.g., from assistant suggestions, recaps, or meta-conversations) and requires task labels to be short imperative actions. Corresponding unit tests have been added to verify this behavior. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@marcelsamyn marcelsamyn merged commit 23faf7f into main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants