Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172) - #183

Merged
100yenadmin merged 9 commits into
mainfrom
feat/fts-prose-mode
Jul 29, 2026
Merged

100yenadmin merged 9 commits into
mainfrom
feat/fts-prose-mode

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Addresses #172 (mechanism half; symbol preservation included). Default-off; flag-off byte-identical (sha-verified probe). The pre-registered paired non-inferiority run — McNemar primary, hit-mix restoration secondary per the gate-proxy lesson — is the gate before any default flip; this PR ships the mechanism dormant for review.

Review per program protocol — findings fixed/refuted/deferred with verdicts.

Summary by CodeRabbit

  • New Features

    • Added optional FTS prose mode for natural-language searches.
    • Prose queries now provide bounded term matching, improved relevance sorting, and better handling of punctuation, quoted phrases, and Unicode symbols.
    • Added configuration through LCM_FTS_PROSE_MODE.
  • Bug Fixes

    • Improved recall for natural-language queries that previously returned no results.
    • Enhanced fallback search ranking and deterministic result ordering.
  • Documentation

    • Documented the new configuration option and its behavior.
  • Tests

    • Added comprehensive coverage for prose mode, fallback behavior, ranking, configuration, and backward compatibility.

…nguage queries (#172)

Default-off (LCM_FTS_PROSE_MODE). Flag-on: prose queries become
stopword-filtered OR disjunctions capped at 12 terms with relevance
ranking — the measured implicit-AND collapse (delivered FTS hit-mix
5,855 -> 1/12,500) gets its rescue path. Keyword, quoted-phrase, and
caller-composed operator semantics unchanged (balanced quotes stay
conjunctive — an explicit precision signal). Unindexed unicode symbols
preserved via literal fallback.

Flag-off byte-identical (sha-verified cross-checkout probe). Paired
non-inferiority run is the pre-registered gate before default-on — this
PR ships the mechanism dormant. Author: codex sol-high; review:
orchestrator.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7e7373d0-19a6-431a-b93f-c4bbe8ac80e5

📥 Commits

Reviewing files that changed from the base of the PR and between d073426 and dc627cc.

📒 Files selected for processing (8)
  • FINDINGS-VERDICTS-PR183.md
  • README.md
  • config.py
  • dag.py
  • search_query.py
  • store.py
  • tests/test_lcm_core.py
  • tools.py

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

Adds opt-in LCM_FTS_PROSE_MODE support for bounded disjunctive FTS5 queries, Unicode-aware LIKE fallback, prose-aware ranking, and propagation through store, DAG, grep, expansion, and recall paths. Existing keyword and operator semantics remain unchanged when disabled.

Changes

FTS prose-mode search

Layer / File(s) Summary
Configuration contract
README.md, config.py, tests/test_lcm_core.py
Adds LCMConfig.fts_prose_mode, parses LCM_FTS_PROSE_MODE, documents the setting, and tests its default and environment override.
Query construction and fallback rules
search_query.py
Classifies prose queries, extracts bounded deduplicated terms, builds disjunctive FTS5 expressions, detects unindexed Unicode symbols, normalizes punctuation, and resolves relevance sorting.
Store and DAG search integration
store.py, dag.py
Propagates prose mode through FTS and SQLite-error fallback paths, uses prose terms for LIKE searches, collapses repeated scoring terms, orders candidates by rowid, and scans bounded candidates before limiting results.
Tool and recall wiring
tools.py
Passes configured prose mode through full-text grep, message and summary searches, query expansion, and prose-aware sort normalization.
Behavioral validation and flag-off parity
tests/test_lcm_core.py, tests/test_lcm_recall.py, tests/probes/*, FINDINGS-VERDICTS-PR183.md
Covers prose recall, operator handling, Unicode symbols, ranking, pagination, embeddings-disabled recall, deterministic flag-off output, and recorded validation rounds.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant MessageStore
  participant SummaryDAG
  participant SearchQuery
  Caller->>MessageStore: Search with fts_prose_mode
  Caller->>SummaryDAG: Search with fts_prose_mode
  MessageStore->>SearchQuery: Build MATCH expression and fallback terms
  SummaryDAG->>SearchQuery: Build MATCH expression and fallback terms
  SearchQuery-->>MessageStore: Bounded prose query
  SearchQuery-->>SummaryDAG: Bounded prose query
  MessageStore-->>Caller: Ranked message results
  SummaryDAG-->>Caller: Ranked summary results
Loading

Possibly related PRs

  • 100yenadmin/hermes-lcm#175: Modifies the same FTS sanitization and LIKE-fallback plumbing used by this prose-mode implementation.

Suggested reviewers: stephenschoettler, tosko4, ai-ag2026

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding default-off prose-mode bounded disjunctive FTS for search queries.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fts-prose-mode

Comment @coderabbitai help to get the list of available commands.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: 418db28bcc85f24581cec6de75d6e8e91073f3b0
Updated: 2026-07-29T10:43:06.126Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: 418db28bcc85f24581cec6de75d6e8e91073f3b0 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~68 min)

Changed Files

File Status Churn Purpose Risk
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +11/-3 Changed file Low
search_query.py modified +109/-7 Changed file Elevated: validated P1 finding
store.py modified +23/-4 Changed file Low
tests/probes/fts_prose_flag_off_probe.py added +83/-0 Changed file Low
tests/test_lcm_core.py modified +93/-3 Test coverage Moderate: validated P2 finding
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +46/-16 Changed file Low

Review Signal

Validated inline findings: 4 (P0: 0, P1: 1, P2: 1, P3: 2).
Dropped findings before posting: 1. High-severity findings: 1.

Risk Taxonomy

  • Auth: 1
  • Proof gap: 1
  • Release regression: 1
  • Runtime correctness: 1

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: bug, docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread search_query.py Resolved
Comment thread tests/test_lcm_core.py Resolved
Comment thread tests/test_lcm_core.py Resolved
Comment thread search_query.py Resolved

@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: 418db28bcc

ℹ️ 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 thread search_query.py Resolved
Comment thread search_query.py Resolved
Comment thread search_query.py Resolved

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@store.py`:
- Around line 1118-1143: Remove injected FTS operator glue from relevance terms
and phrases before directness and fetch-limit scoring, preferably via a shared
helper in search_query.py. Apply the same fix in store.py lines 1118-1143 and
dag.py lines 567-573, then extend tests/test_lcm_core.py lines 1882-1909 with a
fixture row containing “or” to prevent regression.

In `@tests/test_lcm_core.py`:
- Around line 1882-1909: Update
test_search_prose_mode_restores_bounded_disjunctive_recall by adding a
non-target seeded message containing the standalone word “or”, while keeping the
existing target and assertions intact. Ensure the added row can expose
phantom-term ranking from the injected OR separator without becoming the
expected top result.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 618c37be-956f-4b61-984a-9fc4f8a3ccab

📥 Commits

Reviewing files that changed from the base of the PR and between cb92bf4 and 418db28.

📒 Files selected for processing (9)
  • README.md
  • config.py
  • dag.py
  • search_query.py
  • store.py
  • tests/probes/fts_prose_flag_off_probe.py
  • tests/test_lcm_core.py
  • tests/test_lcm_recall.py
  • tools.py
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.13)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.12)
🧰 Additional context used
🪛 ast-grep (0.45.0)
tests/probes/fts_prose_flag_off_probe.py

[info] 75-81: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
{
"bytes": len(raw.encode("utf-8")),
"sha256": hashlib.sha256(raw.encode("utf-8")).hexdigest(),
},
sort_keys=True,
)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

🔇 Additional comments (9)
config.py (1)

377-377: LGTM!

Also applies to: 657-659

README.md (1)

379-379: LGTM!

search_query.py (1)

30-47: LGTM!

Also applies to: 134-157, 159-193, 248-261, 272-307

tests/test_lcm_core.py (1)

32-32: LGTM!

Also applies to: 581-581, 583-660, 1911-1940, 1965-1985, 2008-2028

dag.py (1)

35-35: LGTM!

Also applies to: 49-51, 553-556

store.py (1)

33-33: LGTM!

Also applies to: 47-50, 1104-1105

tools.py (1)

81-85: LGTM!

Also applies to: 2373-2382, 2490-2504, 2524-2534, 5561-5569

tests/probes/fts_prose_flag_off_probe.py (1)

1-84: LGTM! The use-jsonify static-analysis hint is a false positive here — this is a standalone CLI probe, not a web-framework response path.

tests/test_lcm_recall.py (1)

357-388: LGTM!

Comment thread store.py Resolved
Comment thread tests/test_lcm_core.py Resolved
… backends (probe corpus extended over its blind spot); phantom-OR refuted w/ zero-score regression; stoplist/punctuation/quote fixes; tests strengthened
@100yenadmin

Copy link
Copy Markdown
Owner Author

Bot findings dispositioned (FINDINGS-VERDICTS-BOTS.md): the ungated unicode-symbol fallback was REAL — fixed in both search backends, and the flag-off byte-identity probe corpus is extended over the input class it had missed (the probe's blind spot documented as its own finding). The phantom-OR High did NOT reproduce: existing filtering confirmed, zero-score regression added as standing proof. Mediums/Lows fixed per the verdicts table; flag-off outputs re-verified byte-identical (sha d9cf3621…); full replica green.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: af0f14226ee61fc9c18a2abfbab8cf4acbdb8516
Updated: 2026-07-29T13:44:51.757Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@FINDINGS-VERDICTS-BOTS.md`:
- Around line 6-7: Remove the hard-coded machine-local paths from the report’s
“Raw source” and “Logs” entries; replace them with repository-relative artifact
names if available, otherwise omit the path references.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 490879ec-8f27-4830-be16-b21ee109b6cd

📥 Commits

Reviewing files that changed from the base of the PR and between 418db28 and af0f142.

📒 Files selected for processing (6)
  • FINDINGS-VERDICTS-BOTS.md
  • dag.py
  • search_query.py
  • store.py
  • tests/probes/fts_prose_flag_off_probe.py
  • tests/test_lcm_core.py
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.12)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.13)
🧰 Additional context used
🪛 ast-grep (0.45.0)
tests/probes/fts_prose_flag_off_probe.py

[info] 72-97: use jsonify instead of json.dumps for JSON output
Context: json.dumps(
[
lcm_tools.lcm_recall(
{
"query": "What did I say about my dog's vet appointment?",
"limit": 8,
"include": "verbatim",
"detail": "snippets",
"scope_bias": 0.0,
},
engine=engine,
),
lcm_tools.lcm_recall(
{
"query": "licensed ©",
"limit": 8,
"include": "verbatim",
"detail": "snippets",
"scope_bias": 0.0,
},
engine=engine,
),
],
ensure_ascii=False,
separators=(",", ":"),
)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

search_query.py

[warning] 153-153: XPath query is request-/variable-derived; use parameterized XPath to prevent injection.
Context: _WORD_RE.findall(safe)
Note: [CWE-643] Improper Neutralization of Data within XPath Expressions ('XPath Injection').

(xpath-injection-python)

🪛 LanguageTool
FINDINGS-VERDICTS-BOTS.md

[style] ~93-~93: Consider an alternative for the overused word “exactly”.
Context: ...t, and the remaining ranked IDs must be exactly the two seeded distractors. Evidence: ...

(EXACTLY_PRECISELY)

🔇 Additional comments (7)
dag.py (1)

35-35: LGTM!

Also applies to: 49-51, 553-584

store.py (1)

33-33: LGTM!

Also applies to: 47-50, 1097-1143

tests/probes/fts_prose_flag_off_probe.py (1)

2-6: LGTM!

Also applies to: 57-64, 73-97

tests/test_lcm_core.py (1)

17-17: LGTM!

Also applies to: 33-38, 587-587, 625-625, 666-666, 1888-1918, 1920-1938, 1948-1956, 1958-1965, 1967-1976, 1978-1986, 2012-2050, 2081-2092, 3617-3634

search_query.py (2)

26-49: LGTM!

Also applies to: 136-165, 167-201, 256-268, 296-315, 318-322, 343-369


280-285: 🚀 Performance & Scalability

No issue: the helper default is not exercised by current callers. Internal store.py and dag.py call sites pass preserve_unicode_symbols explicitly, so this default does not change the current FTS/LIKE routing.

			> Likely an incorrect or invalid review comment.
FINDINGS-VERDICTS-BOTS.md (1)

1-5: LGTM!

Also applies to: 9-124

Comment thread FINDINGS-VERDICTS-BOTS.md Resolved

@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: af0f14226e

ℹ️ 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 thread search_query.py Resolved
Comment thread search_query.py Resolved
Comment thread search_query.py Resolved

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: af0f14226ee61fc9c18a2abfbab8cf4acbdb8516 into main. Review event: COMMENT.
Provider: GLM/Z.ai through ZCode (zcode-glm, zcode, model GLM-5.2).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
FINDINGS-VERDICTS-BOTS.md added +124/-0 Documentation Low
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +16/-4 Changed file Low
search_query.py modified +120/-7 Changed file Moderate: validated P2 finding
store.py modified +23/-4 Changed file Low
tests/probes/fts_prose_flag_off_probe.py added +112/-0 Changed file Low
tests/test_lcm_core.py modified +176/-3 Test coverage Low
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +46/-16 Changed file Moderate: validated P3 finding

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 3

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread search_query.py Resolved
Comment thread tools.py Resolved
Comment thread search_query.py Resolved
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…ve subject term on stopword-empty fallback; prose filtering on unicode LIKE route; shared sort-promotion helper; possessive-s classification; round-2 verdicts
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: d073426bb149b7da326e97968bd690549b4bd084
Updated: 2026-07-29T18:02:42.981Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: d073426bb149b7da326e97968bd690549b4bd084 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
FINDINGS-VERDICTS-BOTS.md added +170/-0 Documentation Low
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +36/-8 Changed file Low
search_query.py modified +172/-7 Changed file Moderate: validated P3 finding
store.py modified +33/-6 Changed file Moderate: validated P2 finding
tests/probes/fts_prose_flag_off_probe.py added +112/-0 Changed file Low
tests/test_lcm_core.py modified +266/-3 Test coverage Elevated: large change
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +41/-16 Changed file Moderate: validated P3 finding

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • API compatibility: 1
  • Runtime correctness: 2

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread store.py Resolved
Comment thread tools.py Resolved
Comment thread search_query.py Resolved

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
store.py (1)

1140-1144: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve Unicode-symbol fallback when prose mode is disabled.

Passing False here changes the prior default behavior: queries such as licensed © now use FTS and lose the © ranking signal instead of using LIKE. That violates the PR’s flag-off byte-identity contract.

  • store.py#L1140-L1144: retain preserve_unicode_symbols=True for the default-off path.
  • dag.py#L577-L581: apply the same compatibility behavior for summary search.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@store.py` around lines 1140 - 1144, Preserve Unicode-symbol fallback when
prose mode is disabled by keeping preserve_unicode_symbols enabled on the
default-off path in requires_like_fallback within store.py (lines 1140-1144) and
applying the same compatibility behavior in dag.py (lines 577-581) for summary
search.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@store.py`:
- Around line 1140-1144: Preserve Unicode-symbol fallback when prose mode is
disabled by keeping preserve_unicode_symbols enabled on the default-off path in
requires_like_fallback within store.py (lines 1140-1144) and applying the same
compatibility behavior in dag.py (lines 577-581) for summary search.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 542a3ed5-a790-45f2-9202-88596bd5472d

📥 Commits

Reviewing files that changed from the base of the PR and between af0f142 and d073426.

📒 Files selected for processing (6)
  • FINDINGS-VERDICTS-BOTS.md
  • dag.py
  • search_query.py
  • store.py
  • tests/test_lcm_core.py
  • tools.py
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.13)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.12)
🧰 Additional context used
🪛 ast-grep (0.45.0)
search_query.py

[warning] 157-157: XPath query is request-/variable-derived; use parameterized XPath to prevent injection.
Context: _WORD_RE.findall(safe)
Note: [CWE-643] Improper Neutralization of Data within XPath Expressions ('XPath Injection').

(xpath-injection-python)

🪛 LanguageTool
FINDINGS-VERDICTS-BOTS.md

[grammar] ~158-~158: Use a hyphen to join words.
Context: ...regression also passed in the 420-test focused parity run. - Changed-file Ruff:...

(QB_NEW_EN_HYPHEN)

🔇 Additional comments (14)
store.py (1)

44-48: LGTM!

Also applies to: 1106-1133, 1155-1155, 1220-1220, 1261-1270

dag.py (1)

46-50: LGTM!

Also applies to: 557-570, 582-589, 622-629, 668-677

tools.py (1)

84-84: LGTM!

Also applies to: 2373-2377, 2485-2500, 2519-2530, 5556-5564

tests/test_lcm_core.py (6)

36-41: LGTM!


591-591: LGTM!

Also applies to: 629-629, 670-670


1952-2053: LGTM!


2088-2099: LGTM!


2149-2161: LGTM!


3704-3723: LGTM!

search_query.py (3)

154-234: LGTM!


290-348: LGTM!


527-542: LGTM!

FINDINGS-VERDICTS-BOTS.md (2)

3-9: LGTM!


111-170: LGTM!

@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: d073426bb1

ℹ️ 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 thread store.py Resolved
…fication; direct config attribute access; empty-disjunction guard; classification-input invariant documented
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: ac21666393c05bee61ef23c5f29ce90dfe1c91e7
Updated: 2026-07-29T18:11:23.441Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: ac21666393c05bee61ef23c5f29ce90dfe1c91e7 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
FINDINGS-VERDICTS-BOTS.md added +183/-0 Documentation Low
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +44/-8 Changed file Low
search_query.py modified +177/-7 Changed file Moderate: validated P3 finding
store.py modified +43/-6 Changed file Low
tests/probes/fts_prose_flag_off_probe.py added +112/-0 Changed file Low
tests/test_lcm_core.py modified +286/-3 Test coverage Elevated: large change
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +41/-16 Changed file Moderate: validated P3 finding

Review Signal

Validated inline findings: 2 (P0: 0, P1: 0, P2: 0, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Runtime correctness: 2

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread search_query.py Resolved
Comment thread tools.py Resolved

@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: ac21666393

ℹ️ 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 thread dag.py Resolved
…explicit allow_operators=False at grep-level sort promotion
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: stale head

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: edbc3ff71f98fc2cac6c70a2a85c3b5d1c53df40
Updated: 2026-07-29T18:20:39.792Z

evaOS review stopped because this queued head is no longer the live PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

…efore truncating to limit; regression test for best-match-past-first-batch
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: 00b5afda1b61bece0ac7a3a44db1a4e2d465ada3
Updated: 2026-07-29T18:26:34.515Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@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: 00b5afda1b

ℹ️ 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 thread search_query.py Resolved
Comment thread search_query.py Resolved

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: 00b5afda1b61bece0ac7a3a44db1a4e2d465ada3 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
FINDINGS-VERDICTS-BOTS.md added +196/-0 Documentation Low
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +48/-9 Changed file Moderate: validated P2 finding
search_query.py modified +180/-7 Changed file Moderate: validated P3 finding
store.py modified +43/-6 Changed file Low
tests/probes/fts_prose_flag_off_probe.py added +112/-0 Changed file Low
tests/test_lcm_core.py modified +311/-3 Test coverage Elevated: large change
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +45/-16 Changed file Moderate: validated P3 finding

Review Signal

Validated inline findings: 3 (P0: 0, P1: 0, P2: 1, P3: 2).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Release regression: 1
  • Runtime correctness: 2

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread dag.py Resolved
Comment thread tools.py Resolved
Comment thread search_query.py Resolved
…traction-fragment set filtered from disjunctions and counts; never-subject fallback guard; two refutations documented
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@100yenadmin

Copy link
Copy Markdown
Owner Author

Review-round stopping rule for this train (declared per program rule — red-team amendment 9 pattern): round 5 on the new head is the FINAL full round. From round 5 onward, findings are dispositioned as: real delivery-affecting or P1-severity defects → fixed in-PR; latent hardening, future-proofing, and documentation-class items → fork issues for the next train (as #186 was). This PR is default-off infrastructure; its gate-run obligations (none — no measured surface) are unchanged. All prior rounds: every finding fixed, refuted in writing, or issue-filed, with threads resolved.

@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: a7986ae743d083790477ef42d7ab6047a9b21155
Updated: 2026-07-29T18:42:00.283Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: a7986ae743d083790477ef42d7ab6047a9b21155 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
FINDINGS-VERDICTS-BOTS.md added +209/-0 Documentation Elevated: large change
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +48/-9 Changed file Moderate: validated P3 finding
search_query.py modified +216/-7 Changed file Moderate: validated P3 finding
store.py modified +43/-6 Changed file Low
tests/probes/fts_prose_flag_off_probe.py added +112/-0 Changed file Low
tests/test_lcm_core.py modified +349/-3 Test coverage Moderate: validated P2 finding
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +45/-16 Changed file Moderate: validated P3 finding

Review Signal

Validated inline findings: 4 (P0: 0, P1: 0, P2: 1, P3: 3).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • API compatibility: 1
  • Release regression: 1
  • Runtime correctness: 2

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread tests/test_lcm_core.py Resolved
Comment thread search_query.py Resolved
Comment thread dag.py Resolved
Comment thread tools.py Resolved

@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: a7986ae743

ℹ️ 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 thread search_query.py Resolved
Comment thread search_query.py Resolved
Comment thread search_query.py Resolved
Comment thread store.py Resolved
Comment thread tools.py Resolved
…eak closed); total term cap with reserved symbol slots; symbol-aware prose classification; distinct-term prose ranking; ORDER BY rowid pagination; DAG FTS-route test
@100yenadmin

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

100yenadmin added a commit that referenced this pull request Jul 29, 2026
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

evaOS review status: completed

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: b305c948051c4f7da0532257030fc0bad616dd15
Updated: 2026-07-29T19:27:43.561Z

evaOS review completed for this PR head.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #183

Review URL: #183 (review)

@evaos-code-review-bot evaos-code-review-bot 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.

Walkthrough

PR: #183 - feat(search): fts_prose_mode — bounded disjunctive FTS for prose queries (#172)
Head: b305c948051c4f7da0532257030fc0bad616dd15 into main. Review event: COMMENT.
Provider: Unregistered provider id (builtin:zai-coding-plan, zcode (registry miss), model unknown).

Estimated review effort: 5/5 (~70 min)

Changed Files

File Status Churn Purpose Risk
FINDINGS-VERDICTS-BOTS.md added +228/-0 Documentation Elevated: large change
README.md modified +1/-0 Documentation Low
config.py modified +4/-0 Configuration Low
dag.py modified +54/-11 Changed file Low
search_query.py modified +256/-10 Changed file Moderate: validated P3 finding
store.py modified +50/-10 Changed file Low
tests/probes/fts_prose_flag_off_probe.py added +112/-0 Changed file Low
tests/test_lcm_core.py modified +471/-3 Test coverage Elevated: large change
tests/test_lcm_recall.py modified +33/-0 Test coverage Low
tools.py modified +45/-16 Changed file Low

Review Signal

Validated inline findings: 1 (P0: 0, P1: 0, P2: 0, P3: 1).
Dropped findings before posting: 0. High-severity findings: 0.

Risk Taxonomy

  • Auth: 1

Validation and Proof

No required validation recommendation selected; rely on existing GitHub checks and human review.
Proof status: not_applicable - No required behavior proof selected for this changed surface.
Profile validation hints: Prefer correctness, security, data-loss, release, and regression findings over style-only feedback.
Profile proof expectations: Look for focused validation, rollback notes, and evidence appropriate to the changed surface.

Related Context

Related issues/PRs: #172.
Suggested labels: docs, tests.
Suggested reviewers: none from current metadata.

Review Settings Preview

  • Profile: assertive
  • Enabled sections: Review summary (inline_review); Walkthrough (inline_review); Changed-files table (walkthrough); Effort estimate (walkthrough); Related issues/PRs (walkthrough); Review status comment (sticky_status)
  • Path instructions: none
  • Label suggestions: none
  • Reviewer suggestions: none
  • Suggestion behavior: suggestions only; labels and reviewers are not auto-applied.
  • Roadmap-only settings: auto-apply labels; auto-request reviewers; required status checks

Pre-merge checklist

  • Inline comments target current RIGHT-side diff lines.
  • No secret-like content survived into posted inline comments.
  • REQUEST_CHANGES is only used when eligible P0/P1 findings survive validation.
  • Required behavior proof is present or not applicable.
  • Labels and reviewers are suggestions only; the bot did not auto-apply them.

Comment thread search_query.py
)
)
or starts_like_prose
or (len(terms) >= 6 and stopword_count >= 2)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: No-question-mark prose branch (≥6 terms + ≥2 stopwords) lacks a boundary test

should_use_fts_prose_mode has a third return path that fires WITHOUT a trailing '?': len(terms) >= 6 and stopword_count >= 2 (line 209). A declarative keyword query such as kubernetes the database is scaling replicas (6 terms, 'the'+'is' = 2 stopwords, no '?', non-lead first token) classifies as prose and is rewritten to a disjunction kubernetes OR database OR scaling OR replicas with relevance sort promotion. The compact-keyword conjunctive test (test_search_prose_mode_keeps_compact_question_keywords_conjunctive) only covers 2-3 token queries WITH a '?', so this no-'?' disjunctive path is exercised by no assertion. Whether broadening a non-interrogative 6+ token keyword query to OR semantics is desirable is a product decision, but it is currently un-tested at its boundary and could surprise operators enabling the flag expecting only 'natural-language questions' to be rewritten (the README frames the feature as 'raw natural-language queries'). Add a parametrized case asserting the intended polarity (conjunctive or disjunctive) for a ≥6-token, ≥2-stopword, no-'?' query so the contract is pinned.

Category: Auth

Why this matters: The feature is default-off so there is no release regression, but once enabled this path silently changes AND→OR ranking for a class of non-question keyword queries that the README's description does not clearly scope, and no test guards the chosen polarity against future drift.

@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: b305c94805

ℹ️ 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 thread search_query.py
Comment on lines +261 to +263
folded not in _PROSE_LEAD_WORDS
and folded not in _PROSE_FRAGMENTS
and folded not in _PROSE_NEVER_SUBJECT

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 Allow nominal lead words in the subject fallback

When prose mode is enabled and every token is stoplisted, rejecting any fallback token that also appears in _PROSE_LEAD_WORDS conflates its vocabulary entry with its grammatical role. For example, Where is my can? is classified as prose, but extraction returns no terms and falls back to the implicit-AND query Where is my can, so both message and summary search miss a row such as the can is on the blue shelf. Fresh evidence beyond the earlier will fix is that can is both a lead word and an ordinary noun, and this new exclusion still drops it; preserve a final subject-shaped token instead of rejecting it solely by set membership.

Useful? React with 👍 / 👎.

@100yenadmin
100yenadmin merged commit 894f5ae into main Jul 29, 2026
6 of 7 checks passed

@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

https://github.com/100yenadmin/hermes-lcm/blob/dc627cc5d9481a063cb7c51019747a7f5fb3d907/search_query.py#L51-L54
P2 Badge Strip don't and won't fragments contextually

When prose mode receives common contractions such as don't or won't, sanitization produces don t or won t, but this closed fragment set omits don and won because they can also be standalone words. Fresh evidence beyond the earlier didn't finding is that the current head builds don OR deploy for What don't we deploy?; with limit=1, a row repeating the name Don ranks above a row containing the requested deployment evidence. Detect apostrophe-bound n't fragments contextually rather than relying solely on this global token set.

ℹ️ 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".

100yenadmin added a commit that referenced this pull request Jul 30, 2026
…ybench#3) + config-class candidate-generation gap (FTS 0/41 on prose queries, pre-#183 build) + genuine adversarial-attribution weakness; A' cancelled; declared-config re-run next
100yenadmin added a commit that referenced this pull request Aug 6, 2026
The branch had merged the MAINTAINER's upstream (v0.21.0-rc2) and that was
mistaken for being current. It was not current with OUR main, which carried 56
commits this branch had never seen: V1-M instrument (#199, #198), fts_prose_mode
(#183), profile-scoped trajectory embeddings (#182), query views.

Bidirectional, not a catch-up -- both lines developed the same files in parallel
(tools.py ours=11/theirs=9, vector_store.py 6/8, store.py 5/5), and reasoning.py
and requirements_compiler.py do not exist at the merge base at all. 15 files,
52 hunks. Default resolution was BOTH SIDES: ours' security parameter and
theirs' feature parameter, additively.

## The leak that was in no conflict hunk

Main added a resident-int8 full-corpus fast path (`resident_eligible` ->
`_resident_int8_matrix` -> `_rank_resident_int8`) that sits immediately BEFORE
the sign-bit prescreen block ours guards with `access_scope is None`, and mirrors
that block's eligibility conditions -- without the owner guard. Git auto-merged
it CLEANLY. Our guard survived while a bypass around it landed one branch
earlier, with no conflict marker anywhere and nothing for a diff review to catch.

The resident matrix is a whole-identity snapshot pooled and cached on
(identity, data_version) only, so it cannot express a per-row owner predicate.
Filtering inside it is not an option; routing around it is, exactly as ours
already does for the binary prescreen. Both arms now carry `access_scope is None`.

## The trap that WAS in a conflict hunk

Main refactored the message-search call to `**message_search_kwargs`, and that
dict carried every field ours listed EXCEPT `access_scope`. Taking main's side
verbatim silently unscopes message search -- every principal reads every other
principal's memory, with all tests green. Carried into the new form.

## Reconciling two independent models of reasoning.py

`resolve_occurrence_time_with_trust(session_date=...)` served two roles at once:
theirs' caller-DECLARED anchor (the term the sidecar is compared against to
detect disagreement) and the term the occurrence is RESOLVED against. Ours needs
the resolution anchor to be host-derived and a caller's declaration to be
evidence-free. No single ordering satisfies both: map-first defeats the override
check entirely, because tools.py sources that map from
`engine._session_occurrence_dates` -- the sidecar's own attribute -- so anchor
and sidecar were always equal; declared-first lets a caller relabel a stored
observation. Split into two parameters, precedence sidecar > trusted > declared.

Main's `"auto"` interval-unit sentinel is replaced by `interval_unit_fixed`, so
"the plan's unit" and "the reported unit" decouple and both sides' tests hold.

## Verified, not asserted

  real-data battery      16/16, identical to the pre-merge baseline
  default-off A/B        22/22 byte-identical to stock origin/main
  compile                224 files, 0 syntax errors
  suite                  21 failed / 3234 passed (from 35/3008 pre-merge)

The 4b gate also did its job on this merge: it failed closed on six new
resident-invalidation triggers and on a `benchmarking/` harness the exclusion
list had missed (the -ing spelling was never added alongside bench/benchmarks).
Both classified rather than waived.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant