Repository navigation
document and test matched_by on agency-filter diagnostics - #24
Merged
Merged
Conversation
…ostics Tango API 5.9.0 adds `matched_by` to each resolved entry of `meta.resolved_filters`, saying how the token matched: `key`, `code`, `name`, `alias` or `fuzzy`. `PaginatedResponse.meta` is passed through as the API sends it, so the field already reaches callers. This documents it on the `meta` property and in the API reference, and adds a test that it round-trips and leaves the three parsed agency views unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vdavez
marked this pull request as ready for review
October 6, 2026 19:58
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.
What
Tango API 5.9.0 adds
matched_byto each entry ofmeta.resolved_filters.<filter name>[]that resolved, saying how the token matched:key: an organization UUID.code: a 3-digit CGAC or 4-digit FPDS code.name: the organization's name, including a department's everyday name, a spelling variant or a rename.alias: an abbreviation or the organization's own alias.fuzzy: a looser text match, worth checking against the resolved name.An entry that did not resolve has no
matched_by.The change is additive.
Why no behaviour change
PaginatedResponse.metais a plainRecord<string, unknown>passed through as the API sends it, somatched_byalready reaches callers.This PR only documents the field and pins it with a test.
Changes
src/types.ts: themetaTSDoc describesmatched_byand its five values.docs/API_REFERENCE.md: the five values and a short example that flagsfuzzymatches.tests/unit/client.meta-diagnostics.test.ts: one test that a response carryingmatched_byround-trips throughres.meta, and thatunresolvedAgencyTokensandresolvedAgenciesare unchanged by it.CHANGELOG.md: entry under[Unreleased].Testing
npm run lintnpm run typechecknpm run buildnpx vitest run(437 passed)Not in this PR
resolvedAgenciesreturns only the matched organizations, somatched_byis read fromres.metadirectly. A view that exposes it (for example one listing loosely matched tokens per filter) would be new public surface and is left as a follow-up decision.🤖 Generated with Claude Code