-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs(oauth): scope the inert pool-settings marker to strategy and threshold #3517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -432,6 +432,18 @@ describe("Anthropic account pool strategy management API", () => { | |
| await server.stop(true); | ||
| } | ||
| }); | ||
| test("the inert marker describes strategy/threshold only, never enabled", async () => { | ||
| // `inert: true` used to read as "the whole DTO changes nothing". That stopped being true | ||
| // when reactive and proactive activation were split: `enabled: false` still refuses the | ||
| // pre-dispatch account preference, it just can no longer refuse 429 rotation. A dashboard | ||
| // reading `inert` as covering `enabled` would render a live control as decorative. | ||
| const source = await Bun.file("src/oauth/pool-settings-capability.ts").text(); | ||
| const start = source.indexOf("autoSwitchThreshold: number | null;"); | ||
| const marker = source.slice(start, source.indexOf("inert: true;", start)); | ||
| expect(marker).toContain("strategy"); | ||
| expect(marker).toContain("autoSwitchThreshold"); | ||
| expect(marker).toContain("enabled"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This assertion only requires the word Useful? React with 👍 / 👎.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Make the assertion test the scope, not token presence. Line 445 only proves that Proposed fix- expect(marker).toContain("strategy");
- expect(marker).toContain("autoSwitchThreshold");
- expect(marker).toContain("enabled");
+ const scope = marker.match(/Slice-1 marker for ([^:\n]+) only:/)?.[1] ?? "";
+ expect(scope).toContain("strategy");
+ expect(scope).toContain("autoSwitchThreshold");
+ expect(scope).not.toContain("enabled");🤖 Prompt for AI Agents |
||
| }); | ||
| }); | ||
|
|
||
| describe("generic OAuth pool-settings contract (#695)", () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relative
Bun.filepath is resolved from the process working directory, so invoking the test by absolute path from another directory reads a nonexistentsrc/oauth/pool-settings-capability.tsand fails despite a valid checkout. ImportrepoPathfromtests/helpers/repo-root.tsand use it for this source-oracle read.AGENTS.md reference: AGENTS.md:L20-L23
Useful? React with 👍 / 👎.