Skip to content

Rank integer factorization for prime-power queries - #2028

Draft
yuelgrace1810-ops wants to merge 1 commit into
mainfrom
agent/factorization-discovery-phrase
Draft

Rank integer factorization for prime-power queries#2028
yuelgrace1810-ops wants to merge 1 commit into
mainfrom
agent/factorization-discovery-phrase

Conversation

@yuelgrace1810-ops

@yuelgrace1810-ops yuelgrace1810-ops commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Problem

On current main, the natural query factor an integer into prime powers ranked three neighboring prime-navigation operations above integer.compute.prime_factorization. The exact factorization operation scored 43 and appeared fourth, even though its contract was the directly applicable operation.

This is a concrete vocabulary gap of the kind discussed in closed issue #1059: maintainers preferred small, held-out metadata fixes over a new search architecture.

Solution

  • State the natural “factor an integer into prime powers” phrase in the owning MathTool description.
  • Add a focused held-out catalog regression requiring factorization to rank ahead of the three unrelated prime-navigation operations.

The property-style regression does not require factorization to remain absolute position zero if a future legitimate factorization operation is added, addressing the maintainer's review concern.

The change affects discovery metadata only. It does not alter factorization mathematics, request bounds, result contracts, or search semantics.

Validation

  • Rebased onto current main after merged Fix references to the moved agent evaluation guide #2029.
  • Focused catalog, snapshot, and number-theory tests: 24 passed.
  • Before: factorization ranked fourth at 43, behind three prime-navigation operations at 45.
  • After: factorization scores 75 and ranks ahead of all three neighboring operations, which remain at 45.
  • Full make check: 1,309 passed; Ruff, formatting, complexity, and mypy passed.

Overlap

@yuelgrace1810-ops

Copy link
Copy Markdown
Collaborator Author

CI note: the failing tooling/coverage/required checks reproduce the missing pre-#2019 documentation path already present on this branch base. Draft PR #2029 fixes that path-only current-main regression and is fully green. I have intentionally not duplicated #2029 into this discovery-only branch; after #2029 lands, updating this branch should clear those unrelated failures.

@morluto morluto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review verdict: no correctness blocker found

This is a narrow discovery fix: the revised description truthfully states that the operation returns a complete prime-power factorization, and the regression exercises the public search result rather than an internal score. It does not alter the factorization kernel or wire contract.

As with #2024, the exact matches[0] assertion is mildly brittle if another legitimate integer-factorization operation is later added with equally strong phrase coverage. A durable property would assert that integer.compute.prime_factorization ranks ahead of unrelated operations for this query. That is nonblocking; the current change correctly fixes the reported discoverability gap.

@yuelgrace1810-ops
yuelgrace1810-ops force-pushed the agent/factorization-discovery-phrase branch from 81f9305 to 74f1fa7 Compare August 19, 2026 05:11
@yuelgrace1810-ops

Copy link
Copy Markdown
Collaborator Author

Addressed the review observation: the regression now checks that factorization precedes the three unrelated prime-navigation operations, without requiring an absolute first position forever. The branch is rebased onto current main after #2029 and make check passes all 1,309 tests.

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.

2 participants