Skip to content

docs(search): mentions by rules on one person's messages, totals only - #44

Open
leemour wants to merge 2 commits into
mainfrom
perf/mentions-rebuild
Open

leemour wants to merge 2 commits into
mainfrom
perf/mentions-rebuild

Conversation

@leemour

@leemour leemour commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Why: cli-messaging now finds phones, e-mail, links and Google documents in message text by rules (the owner chose rules over the 10 MB libphonenumber-js). This measures a full mentions rebuild on a backup copy of the owner's store and records totals only.

  • 4,436 messages: rebuild 0.66 s (≈0.15 ms a message), 861 mentions, 256 kB in the file.
  • Phones: 8 of 8 were phones on a check in place (values not recorded).
  • Links written without http first caught method calls in pasted program code; the rule now skips them.

Page: performance/search/mentions/README.md. Code: WireCatLabs/cli-core#1076.

🤖 Generated with Claude Code

leemour added a commit to WireCatLabs/cli-core that referenced this pull request Oct 13, 2026
…text (store version 7)

Every stored message's text yields its mentions, kept where they were
written in one normalized form, so 'where did anyone send this number'
and 'every link to this site' are one indexed lookup.

- Rules, no model and no phone library (owner): a phone is what looks
  like one — a +, brackets or phone-shaped groups, a bare Russian
  mobile, or a phone word before it; dates, sums, tax and order numbers
  are left out. E-mail lower-cased; a link loses utm_*, fbclid and its
  fragment and gets its site from psl (0.7 MB); a Google Docs/Drive
  link also yields its file id as a document.
- mentions table and mention_pending queue (migration 7). Triggers queue
  new and edited messages; the store's next write finds their mentions,
  as stems do. Messages stored before version 7 wait for one
  mentions rebuild. A linked or dismissed status survives a rebuild.
- mentionsCommand: mentions list (--kind, --status, --domain, --value),
  mentions show <id>, mentions rebuild [--kind]. Reading is the messages
  permission; rebuild has its own key, mentions.rebuild.
- Tests that replay migrations on an older store use rollBackTo, which
  also drops what version 7 created.

On a copy of the owner's store: 4,436 messages rebuilt in 0.66 s, 861
mentions, 256 kB (WireCatLabs/cli-testing#44).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Oct 13, 2026
…text (store version 7)

Every stored message's text yields its mentions, kept where they were
written in one normalized form, so 'where did anyone send this number'
and 'every link to this site' are one indexed lookup.

- Rules, no model and no phone library (owner): a phone is what looks
  like one — a +, brackets or phone-shaped groups, a bare Russian
  mobile, or a phone word before it; dates, sums, tax and order numbers
  are left out. E-mail lower-cased; a link loses utm_*, fbclid and its
  fragment and gets its site from psl (0.7 MB); a Google Docs/Drive
  link also yields its file id as a document.
- mentions table and mention_pending queue (migration 7). Triggers queue
  new and edited messages; the store's next write finds their mentions,
  as stems do. Messages stored before version 7 wait for one
  mentions rebuild. A linked or dismissed status survives a rebuild.
- mentionsCommand: mentions list (--kind, --status, --domain, --value),
  mentions show <id>, mentions rebuild [--kind]. Reading is the messages
  permission; rebuild has its own key, mentions.rebuild.
- Tests that replay migrations on an older store use rollBackTo, which
  also drops what version 7 created.

On a copy of the owner's store: 4,436 messages rebuilt in 0.66 s, 861
mentions, 256 kB (WireCatLabs/cli-testing#44).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Why: cli-messaging finds phones, e-mail, links and documents by rules,
not libraries (owner's choice). On 4,436 messages a full rebuild takes
0.66 s and 256 kB; 8 of 8 phones were phones; a bare-domain rule now
skips method calls in pasted program code that it caught on the first run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour
leemour force-pushed the perf/mentions-rebuild branch from aa12919 to 26b1068 Compare October 13, 2026 22:09
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Oct 13, 2026
…text (store version 7)

Every stored message's text yields its mentions, kept where they were
written in one normalized form, so 'where did anyone send this number'
and 'every link to this site' are one indexed lookup.

- Rules, no model and no phone library (owner): a phone is what looks
  like one — a +, brackets or phone-shaped groups, a bare Russian
  mobile, or a phone word before it; dates, sums, tax and order numbers
  are left out. E-mail lower-cased; a link loses utm_*, fbclid and its
  fragment and gets its site from psl (0.7 MB); a Google Docs/Drive
  link also yields its file id as a document.
- mentions table and mention_pending queue (migration 7). Triggers queue
  new and edited messages; the store's next write finds their mentions,
  as stems do. Messages stored before version 7 wait for one
  mentions rebuild. A linked or dismissed status survives a rebuild.
- mentionsCommand: mentions list (--kind, --status, --domain, --value),
  mentions show <id>, mentions rebuild [--kind]. Reading is the messages
  permission; rebuild has its own key, mentions.rebuild.
- Tests that replay migrations on an older store use rollBackTo, which
  also drops what version 7 created.

On a copy of the owner's store: 4,436 messages rebuilt in 0.66 s, 861
mentions, 256 kB (WireCatLabs/cli-testing#44).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Oct 13, 2026
…text (store version 7)

Every stored message's text yields its mentions, kept where they were
written in one normalized form, so 'where did anyone send this number'
and 'every link to this site' are one indexed lookup.

- Rules, no model and no phone library (owner): a phone is what looks
  like one — a +, brackets or phone-shaped groups, a bare Russian
  mobile, or a phone word before it; dates, sums, tax and order numbers
  are left out. E-mail lower-cased; a link loses utm_*, fbclid and its
  fragment and gets its site from psl (0.7 MB); a Google Docs/Drive
  link also yields its file id as a document.
- mentions table and mention_pending queue (migration 7). Triggers queue
  new and edited messages; the store's next write finds their mentions,
  as stems do. Messages stored before version 7 wait for one
  mentions rebuild. A linked or dismissed status survives a rebuild.
- mentionsCommand: mentions list (--kind, --status, --domain, --value),
  mentions show <id>, mentions rebuild [--kind]. Reading is the messages
  permission; rebuild has its own key, mentions.rebuild.
- Tests that replay migrations on an older store use rollBackTo, which
  also drops what version 7 created.

On a copy of the owner's store: 4,436 messages rebuilt in 0.66 s, 861
mentions, 256 kB (WireCatLabs/cli-testing#44).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Oct 13, 2026
…text (store version 7)

Every stored message's text yields its mentions, kept where they were
written in one normalized form, so 'where did anyone send this number'
and 'every link to this site' are one indexed lookup.

- Rules, no model and no phone library (owner): a phone is what looks
  like one — a +, brackets or phone-shaped groups, a bare Russian
  mobile, or a phone word before it; dates, sums, tax and order numbers
  are left out. E-mail lower-cased; a link loses utm_*, fbclid and its
  fragment and gets its site from psl (0.7 MB); a Google Docs/Drive
  link also yields its file id as a document.
- mentions table and mention_pending queue (migration 7). Triggers queue
  new and edited messages; the store's next write finds their mentions,
  as stems do. Messages stored before version 7 wait for one
  mentions rebuild. A linked or dismissed status survives a rebuild.
- mentionsCommand: mentions list (--kind, --status, --domain, --value),
  mentions show <id>, mentions rebuild [--kind]. Reading is the messages
  permission; rebuild has its own key, mentions.rebuild.
- Tests that replay migrations on an older store use rollBackTo, which
  also drops what version 7 created.

On a copy of the owner's store: 4,436 messages rebuilt in 0.66 s, 861
mentions, 256 kB (WireCatLabs/cli-testing#44).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Oct 13, 2026
…text (store version 7) (#1076)

Every stored message's text yields its mentions, kept where they were
written in one normalized form, so 'where did anyone send this number'
and 'every link to this site' are one indexed lookup.

- Rules, no model and no phone library (owner): a phone is what looks
  like one — a +, brackets or phone-shaped groups, a bare Russian
  mobile, or a phone word before it; dates, sums, tax and order numbers
  are left out. E-mail lower-cased; a link loses utm_*, fbclid and its
  fragment and gets its site from psl (0.7 MB); a Google Docs/Drive
  link also yields its file id as a document.
- mentions table and mention_pending queue (migration 7). Triggers queue
  new and edited messages; the store's next write finds their mentions,
  as stems do. Messages stored before version 7 wait for one
  mentions rebuild. A linked or dismissed status survives a rebuild.
- mentionsCommand: mentions list (--kind, --status, --domain, --value),
  mentions show <id>, mentions rebuild [--kind]. Reading is the messages
  permission; rebuild has its own key, mentions.rebuild.
- Tests that replay migrations on an older store use rollBackTo, which
  also drops what version 7 created.

On a copy of the owner's store: 4,436 messages rebuilt in 0.66 s, 861
mentions, 256 kB (WireCatLabs/cli-testing#44).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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