Skip to content

feat: add reverse lookup v0 - #17

Merged
the-Drunken-coder merged 3 commits into
mainfrom
codex/reverse-lookup-v0
Jun 26, 2026
Merged

the-Drunken-coder merged 3 commits into
mainfrom
codex/reverse-lookup-v0

Conversation

@the-Drunken-coder

@the-Drunken-coder the-Drunken-coder commented Jun 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add identifySymbol(input, options?) for deterministic reverse lookup against curated milsymbol SVG renderings.
  • Return ranked candidates with confidence and evidence instead of a single guessed SIDC.
  • Document the v0 scope as clean inline SVG or percent-encoded SVG data URL comparison only.

Validation

  • npm test
  • npm pack --dry-run

Scope limits

  • No screenshot, photo, scan, raster PNG/JPEG, cropped-symbol, map-marker-composite, or arbitrary icon recognition.
  • No exhaustive MIL-STD-2525/APP-6 corpus matching; lookup remains limited to the curated fixture set.
  • No new runtime dependency.

Greptile Summary

This PR adds deterministic reverse lookup for curated clean SVG symbols. The main changes are:

  • New identifySymbol(input, options?) API with ranked candidates.
  • SVG and SVG data URL normalization before matching.
  • Similarity scoring with confidence thresholds and result limits.
  • Tests and README coverage for the new reverse lookup scope.

Confidence Score: 5/5

The reverse lookup API behavior is implemented and exercised for the documented clean SVG inputs.

No code issues were identified. The implementation adds the expected export, returns ranked candidates with confidence and evidence, supports inline SVG and percent-encoded SVG data URLs, and the package validation commands complete successfully.

None.

T-Rex T-Rex Logs

What T-Rex did

  • Reviewed the before-state log trex-artifacts/reverse-lookup-contract-01-before.log and confirmed that base exported keys exclude identifySymbol and the reverse lookup call is unavailable.
  • Reviewed the after-state log trex-artifacts/reverse-lookup-contract-02-after.log and confirmed that inline SVG returns four ranked curated candidates with top SIDC confidence 1 and normalized-svg evidence, and that the percent-encoded data URL returns the matching curated SIDC with confidence 1; tests pass and the pack dry-run succeeds.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix: avoid unnecessary reverse lookup sc..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@the-Drunken-coder, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 minutes and 9 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc9b912a-9618-4bff-8d1c-984f75705deb

📥 Commits

Reviewing files that changed from the base of the PR and between 3b6285b and 501bf65.

📒 Files selected for processing (3)
  • README.md
  • src/index.ts
  • test/sidc-kit.test.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/reverse-lookup-v0

Comment @coderabbitai help to get the list of available commands.

@the-Drunken-coder

Copy link
Copy Markdown
Owner Author

@codex review

@the-Drunken-coder

Copy link
Copy Markdown
Owner Author

@greptileai review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 54dbdd79f2

ℹ️ 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".

Comment thread src/index.ts
Comment thread src/index.ts Outdated
Comment thread src/index.ts
@the-Drunken-coder
the-Drunken-coder marked this pull request as ready for review June 25, 2026 20:06
@the-Drunken-coder
the-Drunken-coder merged commit d8fb7da into main Jun 26, 2026
3 checks passed
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