fix(search): drop the undocumented search-title marker override (#881) - #996
Closed
drawmeanelephant wants to merge 2 commits into
Closed
drawmeanelephant wants to merge 2 commits into
drawmeanelephant wants to merge 2 commits into
Conversation
The rendered-search producer let any heading carrying `data-boris-search-title` claim the document title. The rule shipped with the original extractor, was never emitted by a layout, and was never described in rendered-search.md — dead scaffolding that silently overrode the documented first-`h1` rule. Title resolution is now that rule alone. The contract never stated how the title resolves at all, so record it, and pin the removal with a regression test that was verified to fail against the old logic. Note the attribute was read through `attrValue`, so only the valued form ever triggered the override; the test exercises that form. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
The fragment convention keys the filename to the PR number so release assembly sorts correctly; the PR now exists. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
|
SummaryCoverage focused on search document title selection across normal flows and edge cases: first-heading precedence, fallback to document titles or paths, HTML text cleanup, selected content boundaries, repeated indexing, audit recovery, and consistency between build-time and standalone generation. It also exercised published output and confirmed that later headings remain sections rather than replacing the page title. Safe to merge — the run found no regressions or other PR-attributable failures, and all exercised title-selection, fallback, recovery, and publication behaviors passed. No merge-blocking application issue was identified. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Agent Completion Report
Status: complete
Branch and Worktree:
fix/881-search-title-marker./(primary checkout)Commit and PR:
8f5f3959(head;d2fb9005is the fix,8f5f3959the fragment rename)main(this PR is fix(search): drop the undocumented search-title marker override (#881) #996)Linked Issues (auto-close convention):
Closes search_index.zig: undocumented data-boris-search-title extraction marker overrides document title #881
Changed Files:
src/search_index.zig— remove theheading_markedoverride; add a regression testdocs/contracts/rendered-search.md— record the title-resolution rule the producer actually implementsdocs/changelog.d/996-search-title-marker.md— changelog fragmentPreserved Unrelated Files:
stash@{0}entrybelonging to
fix/issue-close-declared-intentand thet3code/cli-reference-currentbranch are untouched. Localmainwas notused or moved.
Implementation Summary:
data-boris-search-titleheading attribute that let any marked heading claim the document
title,overriding the first-
h1rule.a5486126— thesame commit that created the extractor and wrote
rendered-search.md— andthat contract documents every other marker (
root,exclude,ignore,noindex) while omitting this one. Across all history the string appears inexactly one commit's code plus an archived audit report; no layout, reference
theme, fixture, or test ever emitted it. Dead scaffolding, so the override is
removed rather than documented.
titleresolves at all, so the rule is nowwritten down: normalized text of the first
h1inside the extraction root,then the first
<title>, then the pagepath.branch read the attribute through
attrValue, which returns null for avalueless attribute, so a bare
data-boris-search-titlewas inert evenbefore this change — an earlier draft of the test used the bare form and
passed against the broken code.
Known Gaps:
flag (the producer ships through the standalone
tools/search-indexCLI), sothe record in the contract is guarded by the unit test rather than an
end-to-end check.
Exact Commands Run:
zig build testzig test src/search_index.zigzig fmt --check build.ziggit diff --check origin/main...fix/881-search-title-markerExact Gate Results:
zig build test: pass — exit 0, full default suite including the new gate stepzig test src/search_index.zig: pass with the fix; fails as intended with the old logic restored(
test "a data-boris-search-title attribute does not override the document title"... expected First, found Second),which is the evidence that the regression test bites rather than merely passing
zig fmt --check build.zig: passgit diff --check origin/main...fix/881-search-title-marker: cleanDeterminism Result:
section ordering, key order, and the fixed v1 key set are unchanged.
Generated Artifacts:
.zig-cache/scratch trees only (gitignored). Nodist/,rag/, orsource-rag/output was committed.Blockers and Next Card:
wire
tools/search-indexinto a gate so its unit tests run inzig build testrather than only through the standalone-tools gate.