Skip to content

fix(core): reject timestamp and checkbox-marker observation categories - #1239

Merged
phernandez merged 2 commits into
mainfrom
fix/1219-timestamp-observation-categories
Aug 12, 2026
Merged

fix(core): reject timestamp and checkbox-marker observation categories#1239
phernandez merged 2 commits into
mainfrom
fix/1219-timestamp-observation-categories

Conversation

@phernandez

@phernandez phernandez commented Aug 11, 2026

Copy link
Copy Markdown
Member

Closes #1219. Closes #1241.

Two sibling false-positive classes in the observation recognizer, one PR: the bracket
regex accepted any [x] content line whose bracket text had no brackets or parentheses,
so (a) transcript timecodes and (b) extended checkbox markers both minted junk
observations.

Commit 1 — timestamp-shaped categories (#1219)

[00:00:11] Speaker: ... minted an observation with category 00:00:11 — one junk graph
row per spoken transcript line, which matters more now that harness hook capture writes
transcripts into notes. A shared _observation_category_match helper rejects bracket
prefixes that are pure clock values (MM:SS, HH:MM:SS, optional ./, fractional
seconds) in both recognition paths:

  • is_observation: a bare or list-item timecode line is not an observation.
  • parse_observation: a hashtag-promoted transcript line (- [00:00:11] ... #meeting)
    stays an observation via its tag, but keeps the timecode in content with
    category=None.

Commit 2 — extended checkbox markers (#1241)

The task exclusion only knew GFM's [ ]/[x]/[-], so Obsidian's extended vocabulary
leaked: - [/] task → category /, [>]>, [?]?, and GFM-legal [X]X.
The helper now also rejects single-character non-alphanumeric bracket prefixes plus
x/X — the checkbox-marker family — as categories. This is the interim guard until
first-class task extraction (#1242) owns these lines.

Deliberately narrow throughout: [2024], [10:30am], [v1:2], [a], [1], [q] all
still parse as categories (each pinned by test). Lineage: #247/#269, #738/#769.

Verification

  • Regression tests for both classes: the [BUG] Timestamp-prefixed transcript lines are parsed as observations #1219 repro, timestamp shapes across formats,
    the hashtag-promotion path, all five extended markers, and single-char alphanumeric
    control cases. tests/markdown/: 84 passed.
  • Broad sweep tests/services/ + tests/repository/: 1081 passed.
  • just typecheck, just lint: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CPdSXDbYyhyZ1TwgFnpEv8

Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez phernandez changed the title fix(core): reject timestamp-shaped observation categories fix(core): reject timestamp and checkbox-marker observation categories Aug 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b9b2ff730

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +36 to +37
if _TIMESTAMP_CATEGORY.match(category) or _is_task_marker_category(category):
return None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude tagged extended-checkbox tasks

When an extended checkbox task also has a tag, such as - [/] task #work or - [X] done #work, returning no category match is insufficient: is_observation() subsequently detects the hashtag and still emits an observation with category=None. The existing [ ], [x], and [-] checks exclude tagged tasks entirely, so these newly recognized markers should receive the same observation-level exclusion rather than falling through to tag-only promotion.

Useful? React with 👍 / 👎.

@phernandez
phernandez merged commit b799b0c into main Aug 12, 2026
28 checks passed
@phernandez
phernandez deleted the fix/1219-timestamp-observation-categories branch August 12, 2026 03:08
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.

Extended checkbox markers ([/], [>], [?], [X]) mint junk observation categories [BUG] Timestamp-prefixed transcript lines are parsed as observations

1 participant