fix(ten-427): check github-links document as primary issue-matching strategy#17
Merged
lavie merged 1 commit intoMay 6, 2026
Conversation
…trategy The previous code checked title/description text only, ignoring the github-links document which is the authoritative PR→issue mapping. When an agent followed the rule and added a PR to an issue's github-links doc but not to the description, the dispatcher would miss the match. Changes: - manifest: add issue.documents.read capability - findTenIssue: for each text-search candidate, check github-links document first (primary); fall back to title/description only if no github-links match is found. The production server full-text-indexes document content so issues whose github-links doc lists the ref will appear in the text search. - tests: add two new cases — one verifying the github-links primary path succeeds, one verifying the description fallback fires when the github-links doc lists a different PR. buildHarness gains issue.documents.write so tests can seed documents via upsert. The branch/title fallback (from the previous commit) remains as a third-level fallback for cases where neither github-links nor description text contain the ref (e.g. agent never updated either). Co-Authored-By: Paperclip <noreply@paperclip.ing>
08beff9 to
a8100f5
Compare
lavie
approved these changes
May 6, 2026
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.
Summary
Follow-up to #16 (branch/title identifier fallback). Implements the primary matching strategy specified in TEN-427:
manifest.ts: addedissue.documents.readcapabilityfindTenIssueinworker.ts: for each text-search candidate, check itsgithub-linksdocument first (primary path). If theprsarray contains the incoming ref → dispatch immediately. Falls back to title/description text match only when nogithub-linkshit is found.tests/plugin.spec.ts: 2 new tests — (1) github-links primary path succeeds, (2) github-links doc lists a different PR so fallback to description fires.buildHarnessgainsissue.documents.writeso tests can seed documents.Full priority order after this change:
github-linksdocument match (primary — authoritative canonical mapping)Test run: 24/24 pass.
Note on harness vs production: The test harness text search scans title/description/identifier only (document content not indexed). In production, document content is full-text indexed, so issues with only a github-links entry (no description ref) surface in the initial text search and are matched via the github-links check. The harness tests the github-links check logic on text-search candidates. The branch/title fallback covers the pure "agent never updated github-links or description" case in both environments.
🤖 Generated with Claude Code