Skip to content

Fall back to the description when the Hub's title is a fragment - #25

Merged
forrestlinfeng merged 1 commit into
mainfrom
fix/fall-back-when-the-title-is-a-fragment
Sep 23, 2026
Merged

forrestlinfeng merged 1 commit into
mainfrom
fix/fall-back-when-the-title-is-a-fragment

Conversation

@forrestlinfeng

Copy link
Copy Markdown
Contributor

The bug

#24 put short_title in the header. A live session showed what that costs when the Hub's title is truncated:

[Evolution Memory] Object (EvoMap network):
1. Initialize pool with configurable minimum and maximum object capacity limits
2. Provide acquire method that returns available object or creates new if under maximum
…

Object is what got cut off, not what the gene is.

Why a length floor does not work

Forty titles across eight queries. Two are fragments — and a character count cannot tell them from a good title:

title chars verdict
自动化小 4 truncation
智能缓存优化 6 a complete title
Object 6 truncation
Generic Object Pool for Resource Reuse 38 a title

Chinese says as much in six characters as a Latin title says in forty. Any floor that rejects Object also rejects 智能缓存优化.

What it checks instead

A title has to look like a name:

  • Latin script → more than one word
  • CJK → five characters or more

Object fails the first, 智能缓存优化 passes the second, 自动化小 fails it. Whatever fails gives way to nl_summary — present on 39 of the 40 measured — cut to the same 80 characters the title was.

On reintroducing a description to the header

#8 deliberately kept the summary out of the prompt, and test/prime.test.js pinned that. This fallback is bounded to 80 characters: a name-length excerpt standing in for a name, not the 214-character median recitation #8 rejected. The full summary is still never used when a description is available, and the final fallback is the asset type.

Worth flagging for review, since it is a deliberate narrowing of an earlier decision rather than an oversight.

Tests

96/96. Four added: a one-word title stands aside, a short CJK title does not, a truncated CJK title stands aside, and an asset with neither falls back to its type. Removing the fragment check fails two of them.

Three existing assertions updated, since the fallback now names assets that previously showed only their type.

🤖 Generated with Claude Code

#24 put short_title in the header and a live session showed what that costs
when the Hub's title is truncated:

    [Evolution Memory] Object (EvoMap network):
    1. Initialize pool with configurable minimum and maximum object capacity limits
    …

`Object` is what got cut off, not what the gene is.

Measured across forty titles from eight queries, two were fragments and a
character floor cannot find them: `自动化小` is a truncation at four characters,
and `智能缓存优化` is a complete title at six. Chinese says as much in six
characters as a Latin title says in forty, so length is the wrong instrument.

A title now has to look like a name: more than one word if it is Latin,
five characters or more if it is CJK. `Object` fails on the first and
`智能缓存优化` passes on the second. Whatever fails gives way to nl_summary,
present on 39 of the 40 measured, cut to the same 80 characters the title was.

That does put a description in the header, which #8 kept out. The bound is
what makes it different: 80 characters is a name-length excerpt standing in for
a name, not the 214-character median recitation #8 rejected.

Four tests; removing the fragment check fails two of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@forrestlinfeng
forrestlinfeng merged commit 7ac551b into main Sep 23, 2026
4 checks passed
@forrestlinfeng
forrestlinfeng deleted the fix/fall-back-when-the-title-is-a-fragment branch September 24, 2026 14:00
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