Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reached
On-demand reviews are free for the next 19 days. After that, they cost $0.25 per reviewed file. Or wait 6 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (32)
Warning Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39137959d9
ℹ️ 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".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07cdbc9a82
ℹ️ 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".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
# Conflicts: # wiki
PR Babysitter statusHead: CI: all required checks green — Rust, Docs, Minimum supported Rust version, Supply chain, CodeRabbit. Mergeable: Fixes pushed this cycle
Review threadsAll 5 Codex-flagged threads replied to in-thread with the fixing commit + validating test, and resolved. 0 unresolved threads remain. No changes-requested reviews. CodeRabbit review-limited but check reports SUCCESS. Test evidenceContract commands ( Next actionReady for |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba85128196
ℹ️ 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".
| chat_id: message.chat_id.clone(), | ||
| parent: message.parent, | ||
| author: message.author.clone(), | ||
| excerpt: excerpt(line, original_offset(line, matched.offset)), |
There was a problem hiding this comment.
Preserve regex offsets when building excerpts
When the regex feature is enabled, score_regex reports an offset in the original text, but this call always treats it as an offset in lowercased text. For example, with 200 İ characters before a /needle/ match, the valid offset 200 is remapped to 100 and the 96-character excerpt ends before the match. Fresh evidence after the prior offset fix is that the new remapping is unconditional even though only literal matching lowercases its input; distinguish the pattern type before applying it.
Useful? React with 👍 / 👎.
| let Some((char, len)) = fence else { continue }; | ||
| match open { | ||
| None => open = Some((start, char, len)), | ||
| Some((from, opener, opener_len)) if opener == char && len >= opener_len => { |
There was a problem hiding this comment.
Require a bare closing fence before parsing directives
When a fenced code block contains a same-length fence with an info suffix, such as a ```rust line inside a backtick block, CommonMark treats that line as content rather than a closing fence, but this branch closes solely on character and run length. A following !pin or !unpin example is consequently parsed as a live directive and can mutate the board. Fresh evidence after the earlier fence-length fix is that the closing predicate still never verifies that the remainder of the line contains only whitespace.
Useful? React with 👍 / 👎.
| | `Pin` | one board entry: target, pinner, `pinned_at`, label, note, excerpt | | ||
| | `read_directives(body, author, sequence)` | the grammar | | ||
| | `fold_pins(rows, limit)` | the pure fold, over a chronological slice | | ||
| | `read_pinboard(log, conversation, limit)` | the fold plus its bounded read | |
There was a problem hiding this comment.
Add the snapshot bound to the documented pinboard API
The public-surface table still advertises read_pinboard(log, conversation, limit), but the exported function now requires a fourth before argument. A host implementing the integration from this module documentation gets a compile error and is not told how to preserve the query snapshot; update this table and the recall specification to show and explain the bound.
AGENTS.md reference: AGENTS.md:L286-L289
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Requesting changes: 1 lane(s) blocking, worst finding is high.
Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.
$0.1260 · 879,855 in / 18,849 out · 132,008 cached (15%) · openrouter/openai/text-embedding-3-small, z-ai/glm-5.2, deepseek/deepseek-v4-flash · 792 embedded
critique: $0.0608 · 440,228 in / 11,574 out · 48,594 cached (11%) · z-ai/glm-5.2, deepseek/deepseek-v4-flash
security: $0.0558 · 324,234 in / 7,070 out · 83,414 cached (26%) · deepseek/deepseek-v4-flash, z-ai/glm-5.2
tests: $0.0050 · 61,833 in / 109 out · 0 cached (0%) · deepseek/deepseek-v4-flash
description: $0.0043 · 53,560 in / 96 out · 0 cached (0%) · deepseek/deepseek-v4-flash
How this change flows0 changed behaviours across 12 relationships. 5 surrounding behaviours are shown (60 graph nodes walked). 42 further behaviours left out to keep the diagram readable. flowchart LR
n0["named_conversation"]:::impacted
n1["...ide_a_thread_and_propagates_read_failures"]:::impacted
n2["initialize_session_with_context"]:::impacted
n3["...hread_index_and_host_notes_beside_history"]:::impacted
n4["OnePage"]:::impacted
n1 -->|calls| n0
n1 -->|tests| n0
n1 -->|calls| n2
n1 -->|tests| n2
n1 -->|calls| n4
n1 -->|tests| n4
n3 -->|calls| n0
n3 -->|tests| n0
n3 -->|calls| n2
n3 -->|tests| n2
n3 -->|calls| n4
n3 -->|tests| n4
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge. |
What and why
A turn reads a bounded window of a desk whose log is unbounded, so the decision
settled two hundred messages ago is invisible and gets re-litigated. Enlarging
the window moves the cliff and charges everyone for it. This lands the other
answer: make the transcript queryable, keep a small pinned working set
arriving regardless, and state the budget each message spends.
Five pieces, no new port and no new stored state:
tinyhivemind_core::select— one fixed-point ranking used by every picker,so an agent search and a desk search cannot disagree about what a better match
is. Tiers (
Exact1000 →Subsequence200) plus a density term worth at most100, so density orders within a tier and never promotes past one.
tinyhivemind_core::find—agents,people,desksover the snapshotsa turn already holds. Retired agents are never offered; a desk description is
scored at half weight.
tinyhivemind::search—search_messagesandsearch_threads, a boundedbackward walk through the existing
SessionLogport. A desk-scoped searchreads the desk's whole interior, thread replies included: the projection is
narrow so a turn stays readable, and search exists to reach the reply buried
three deep.
tinyhivemind::pins—!pin [^N] [#label] [note]/!unpin ^N, foldedout of the log rather than stored beside it, so there is no second journal.
The board rides into every turn through
SessionContext.BrevityPolicy— a stated per-message budget (600 characters against the30-message window), rendered into the briefing next to the pin and search
spellings. Reported, never enforced: nothing here rewrites an authored
message.
Regular expressions are supported behind an off-by-default
regexfeature. Aquery written
/…/is an expression; an expression hit is read onto the sametiers from the span the engine matched, so literal and expression hits rank in
one comparable list. Without the feature a
Regexpattern isError::RegexUnsupported, and one that does not compile isError::InvalidPattern— never a silent literal fallback.Spec:
docs/specs/recall.md. Roadmap: P14, and theentry says why it lands out of order.
Public API and behavior changes
Additive, but not zero:
tinyhivemind_core::{select, find}andtinyhivemind::{search, pins},re-exported from each crate root.
Error::InvalidPatternandError::RegexUnsupported.TeamBriefinggainsbrevity: BrevityPolicyandSessionContextgainspins: Vec<Pin>. Both are#[serde(default)], so an older stored recordstill decodes; struct-literal constructions in host code need the new field.
TeamBriefing::system_text()gains two rule lines (the budget, and the pinspelling).
SessionContext::system_text()renders the board between thethread index and host notes.
initialize_session_with_contextnow performs one additional bounded read(
PIN_SCAN) for the pinboard, and passes the query'sbeforeso the boardis bounded to the same snapshot as the transcript.
initialize_sessionandinitialize_session_with_contexttakebriefingbyvalue and overwrite
briefing.brevity.windowwithquery.window: the budgetthe briefing states must match the window the query actually reads.
read_pinboard(log, conversation, limit, before)carries the exclusivesequence bound as its fourth argument.
regexfeature on both crates, off by default.Validation
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo build --all-targets --all-featurescargo test --all-featurescargo test -p tinyhivemind(no features)RegexUnsupportedpathcargo clippy --all-targets -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features.github/scripts/assert-pure.shcargo llvm-cov --all-featuresDeliberately untested edges: the
whole.max(1)guard inselect::ratioisunreachable through any public path (a matched text is never empty) and exists
so a future caller cannot divide by zero.
Docs
docs/specs/recall.md, module READMEs forsearch/andpins/, aRecallwiki page linked from Home and the sidebar (pushed to the wiki repo; the
pointer bump is in this branch), and a row in
README.md's read-more table.Review round
Five findings from the Codex reviewer, all confirmed and fixed, each with a
regression test written to fail before the fix:
(
beforenow threaded throughread_pinboard/read_desk_rows);character count (offsets are now mapped back to the original string);
directive ordinal, not
pinned_atalone);Also merged
origin/maininto the branch and resolved the resulting conflict(wiki pointer,
README.md).