Repository navigation
refactor: Untangle valuation types and OpenAPI tool identity - #246
Open
sidneyswift wants to merge 2 commits into
Open
sidneyswift wants to merge 2 commits into
sidneyswift wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
1 issue found across 9 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tests/openapi-tool-order.test.ts">
<violation number="1" location="tests/openapi-tool-order.test.ts:17">
P2: These assertions do not verify the complete parameter contract, so a regression dropping optional search or read parameters would pass this test. Compare each emitted parameter-name list with all keys from the corresponding tool schema.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| const { paths } = websiteOpenAPI(); | ||
| expect(paths["/search"].get.description).toBe(searchRecoupTool.description); | ||
| expect(paths["/read"].get.description).toBe(readRecoupPageTool.description); | ||
| expect(paths["/search"].get.parameters.map(({ name }) => name)).toContain("query"); |
There was a problem hiding this comment.
P2: These assertions do not verify the complete parameter contract, so a regression dropping optional search or read parameters would pass this test. Compare each emitted parameter-name list with all keys from the corresponding tool schema.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At tests/openapi-tool-order.test.ts, line 17:
<comment>These assertions do not verify the complete parameter contract, so a regression dropping optional search or read parameters would pass this test. Compare each emitted parameter-name list with all keys from the corresponding tool schema.</comment>
<file context>
@@ -0,0 +1,19 @@
+ const { paths } = websiteOpenAPI();
+ expect(paths["/search"].get.description).toBe(searchRecoupTool.description);
+ expect(paths["/read"].get.description).toBe(readRecoupPageTool.description);
+ expect(paths["/search"].get.parameters.map(({ name }) => name)).toContain("query");
+ expect(paths["/read"].get.parameters.map(({ name }) => name)).toContain("id");
+});
</file context>
This branch was successfully deployed
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
Move valuation contracts to the valuation domain and bind OpenAPI descriptions to named tools instead of registry array positions.
Verification
39 existing tests plus new ordering regression pass; typecheck and production build pass. All 5 valuation runtime modules emit identical JavaScript. Ordering regression fails old implementation. Independent review completed.
Scope and review
Part of the user-requested Recoup monorepo untangle-codebase workflow. Audit and decision log preceded implementation. Changes stay in this owning repository; no production deployment or main-branch merge requested. No broad comment/test-pruning sweep. Existing local work and retired checkouts preserved.
Each repository PR is independently reviewable; the Mono report will collect the coordinated audit, retained cases and check limitations.
Summary by cubic
Moves valuation contracts into the valuation domain and binds the website OpenAPI search/read descriptions to named tools instead of registry array positions, so reordering the tool discovery list no longer mislabels those endpoints.
lib/valuation/types.ts, shared by request helpers, hooks, and cards.AGENTS.md.Written for commit ce787d6. Summary will update on new commits.