Skip to content

Require a matched line before reporting daily-note tracking - #103

Merged
bborbe merged 1 commit into
masterfrom
fix/daily-note-tracking-claim
Aug 22, 2026
Merged

Require a matched line before reporting daily-note tracking#103
bborbe merged 1 commit into
masterfrom
fix/daily-note-tracking-claim

Conversation

@bborbe

@bborbe bborbe commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Problem

work-on-task-assistant Phase 4 can report a task as already tracked on the daily note when the note contains no reference to it.

The phase does search correctly (Search for [[{task_name}]] or {jira_id}), but nothing binds the report to the search result. The ℹ️ Already tracked branch can therefore be emitted on no evidence, and it reads identically to a real match.

Observed

2026-08-22. The agent reported:

Daily Note:
ℹ️ Already tracked ([/] [[Review MoneyMoney - 2026W34-sat]] in Must section)

The note contained nothing matching — grep -n "MoneyMoney" 2026-08-22.md returned zero lines, and the Must section held five unrelated items. The task stayed absent from the day's record for ~3 hours until /vault-cli:sync-progress added it.

The failure is silent by construction: a false "already tracked" produces exactly the output a correct one does, and the operator has no reason to re-check.

Change

Phase 4 now states that the search is the only admissible basis for the claim, and requires the matched line to be quoted verbatim (ℹ️ Already tracked: <matched line>). A report naming a section but no line is unverified.

Docs-only change to the agent prompt. make precommit exits 0.

Note on verification

This cannot be proven by a test run: the bug only surfaces when a task genuinely is not on the daily note, and the assistant's behaviour there is model-driven. The change removes the ambiguity that allowed the unevidenced claim; confirmation comes from the next real occurrence showing a quoted line.

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The mechanical funnel produced 0 findings across 74 rule YAMLs. The changed files are CHANGELOG.md and agents/work-on-task-assistant.md (an agent definition, not code). No Go, Python, JS/TS, or other rule-relevant files are changed. This diff cannot match any rule in the index.

Selector mode — no adjudication needed.


Step 5: Consolidated Report

Must Fix (Critical): None.

Should Fix (Important): None.

Nice to Have (Optional): None.


Step 7: Manual Review

Reviewed the diff in full:

  • CHANGELOG.md — Correctly documents the bug (unverified "Already tracked" claim) with a dated ## Unreleased entry. Conforms to changelog conventions.
  • agents/work-on-task-assistant.md — The added constraint on line 149 is precise: the search result is the only basis for the report, and the matched line must be quoted verbatim. The observed case (2026-08-22) is cited inline. The fix is logically sound and correctly scoped to Phase 4 only.

No issues found.

Notes: The PR acknowledges this change cannot be test-covered (model-driven behavior only observable in production). This is a known limitation and acceptable given the fix is a constraint on the agent's own self-reporting — it removes an incorrect capability rather than adding a new one.


Traceability (Selector Mode)

  • Candidates: 0 rules matched by Step 4b-i glob filter
  • Applicable: 0
  • Skipped: N/A — no candidates
{
  "verdict": "approve",
  "summary": "The fix correctly constrains Phase 4 to only report 'Already tracked' when a matching line is in hand, quoting it verbatim. CHANGELOG entry is correctly formatted. No code findings.",
  "comments": [],
  "concerns_addressed": [
    "tests: acknowledged — model-driven behavior cannot be unit-tested; the fix removes an incorrect capability rather than adding one, making it self-verifying"
  ]
}

@bborbe
bborbe merged commit 937fa0e into master Aug 22, 2026
1 check passed
@bborbe
bborbe deleted the fix/daily-note-tracking-claim branch August 22, 2026 19:41
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.

1 participant