Skip to content

test(ci): ratchet remaining fetchWithAuth bridge importers and hand-built API URLs by identity (#12363) - #21057

Merged
mrveiss merged 29 commits into
mainfrom
issue-12363-typed-client-layer
Nov 12, 2026
Merged

mrveiss merged 29 commits into
mainfrom
issue-12363-typed-client-layer

Conversation

@mrveiss

@mrveiss mrveiss commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Thinking Path

The typed client layer, the SLM contract hook and the raw-fetch lint ban of #12363 already landed on main through earlier slices. What was left unpinned is the remaining debt: files still importing the fetchWithAuth bridge and code lines still assembling ${getApiBase()}/... URLs by hand. This PR makes that debt shrink-only so the migration (follow-up #21050) is finite.

What Changed

One file, repo_tests/frontend_api_contract_ratchet_test.py:

  • Two new ratchet dimensions, fetch_with_auth_importers and hand_built_urls, gated against the merge base like the existing dimensions.
  • Both are compared by identity, not count: importers by file path, hand-built URLs by (file path, stripped line text) with multiplicity, never a line number. Replacing one site with another at an equal count fails; moving a line within a file does not.
  • The client-class detector now reads the heritage clause only after a bracket-depth scan over the type-parameter list, so class X<T extends ApiClientBase> {} is counted as a client while a class that really extends ApiClientBase is not.
  • Control fixtures: generic-constraint decoy, nested generic params that really extend the base, implements-only, multi-line headers, equal-count swap per dimension, line-shift and duplicate-line contrast.

No baseline file: base identities are measured from the exported merge-base tree, so no new file read is added to the python filter.

Verification

  • No tests were run locally; CI is the gate.
  • Static counts on this branch tree with git grep (main frontend, SLM frontend is 0 in both): 37 files import the fetchWithAuth bridge; 571 non-comment, non-WebSocket lines contain ${getApiBase()}/ after excluding test files, generated and node_modules paths. The earlier claim of 644 for the URL dimension did not reproduce at this head and is dropped; the ratchet compares against the base tree, so it needs no pinned number.

Risks

Test-only change. Rollback: revert the PR.

Model Used

Claude Sonnet 5.5 (claude-sonnet-5-5)

Issue Link

Refs #12363

Changelog fragment

  • N/A (internal change)

Checklist

  • Code follows AutoBot patterns from CLAUDE.md
  • Tests added or updated
  • PR targets main (not release)
  • No secrets or credentials in the diff

@mrveiss mrveiss added the phase:M4.9 One definition per concept label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. There is no cap on open PRs (#19397) -- nothing blocks opening or pushing a PR.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Approved PRs land through the merge train the coordinator sequences (merge commits, never squash) -- check the open chore(merge-train) PR is moving, not each PR on its own
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d8c18a8 and 0673ce6.

Files selected for processing: 1

  • repo_tests/frontend_api_contract_ratchet_test.py
Walkthrough

The frontend API contract ratchet adds client-pattern detection and measures fetchWithAuth importer files and manually assembled API URL lines. Tests cover detector behaviour and compare dimension growth or shrinkage against the base.

Changes: Frontend API contract ratchet

Layer / File(s) Summary
Detectors, measurements, and regression tests
repo_tests/frontend_api_contract_ratchet_test.py
Client detection includes bare ApiClient and ApiService names, excludes ApiClientBase subclasses, and retains mock exclusions. Inline generic detection includes .call<...>. New dimensions count files importing fetchWithAuth and lines assembling ${getApiBase()}/, with comment and WebSocket URL exclusions. Tests cover these patterns and verify that increases are reported against the base while decreases are not.
Merge Risk: Moderate · previous review d8c18

The new frontend API ratchet has two gaps that let new raw-client or bridge usage slip past the guard. Several earlier concerns about the typed client, type generation and docs are still open and should be confirmed fixed before merge. None of these is a runtime outage; they weaken API-contract enforcement and some typed-call behavior.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: it ratchets the remaining fetchWithAuth bridge importers and hand-built API URLs in the frontend API contract ratchet test. The raw summary confirms the change adds bo…
Full details: Title check

Explanation

The title names the main change: it ratchets the remaining fetchWithAuth bridge importers and hand-built API URLs in the frontend API contract ratchet test. The raw summary confirms the change adds both dimensions to the ratchet test, with detectors, advice text and tests. The title is specific and matches the changeset. It does not cover the detector refinements (ApiClientBase exclusion, comment-line exclusion), which is acceptable. The title is long at 103 characters, but it remains a single clear sentence.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mrveiss

mrveiss commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Code review (code-reviewer pass) at a41100c

Verdict: APPROVE-READY — every item from the pre-push review is present at this head and all targeted guards pass (445 passed); one optional low left.

Severity file:line Finding Fix
Verified libs/autobot-ui/src/utils/ApiClientBase.ts:209, autobot-slm-frontend/src/utils/ApiClient.ts:121-133 contractPath hook (identity by default); the SLM override strips ^/api(?=/) once; getContract is a thin view over call. Final-URL tests exist for both bases (ApiClientBase.test.ts, ApiClient.test.ts, ApiClient.transport.spec.ts). The /api/api case is closed. none
Verified ApiClientBase.ts:117-140,177-182 JsonMethodsOf restricts call to JSON 200/201 or 204; 204 returns undefined (void); a non-JSON content type or none throws and points at callRaw. none
Verified ApiClientBase.ts:164-175 fillPathParams throws on a missing value and on unused keys. none
Verified repo_tests/frontend_single_api_client_12363_test.py:163-205, repo_tests/frontend_api_contract_ratchet_test.py:173 The trailing-directive control is present, and the fetchWithAuth import regex takes an optional .js/.ts suffix. none
Verified scripts/audit_api_wiring_args.py, scripts/audit_api_wiring_test.py:280 The argument split exists; --no-websocket-paths is accepted with both --dump-openapi and --dump-slm-openapi (tested for the SLM dumper). none
Verified repo_tests/fixtures/pre_15360_changes_jobs.json:1594, autobot-frontend/src/config/AppConfig.js Only verify-types-run changed in the fixture. changes_job_equivalence_15360_test recomputes digests from the workflow and passes, so it is the computed value, not hand-edited. AppConfig.js is back at 612 lines (one comment line removed); frontend_file_size_ratchet_test passes. none
Low .github/workflows/verify-generated-types.yml:288-303 The SLM job still dumps raw and strips x-websocket-paths in an inline Python snippet, while the main job and gen:types:openapi use --no-websocket-paths. Output is the same, but the strip now exists in two places for SLM. Switch the SLM step to --dump-slm-openapi ... --no-websocket-paths and drop the snippet's pop (optional, can follow in a later slice).

Not checked: Ran repo_tests/*12363*_test.py, changes_job_equivalence_15360_test, frontend_file_size_ratchet_test, frontend_api_contract_ratchet_test and scripts/audit_api_wiring_test.py (445 passed). I ran no vitest, vue-tsc or eslint, so the TS tests were read, not executed. I did not check generated api.ts/openapi.json freshness, and CI status was not assessed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 361d419 and a41100c.

Files ignored due to path filters: 1

  • scripts/python_file_size_known_large.py is excluded by !scripts/python_file_size_known_large.py
Files selected for processing: 30

  • .github/workflows/verify-generated-types.yml
  • .gitignore
  • autobot-frontend/eslint.config.ts
  • autobot-frontend/package.json
  • autobot-frontend/src/components/desktop/DesktopInterface.vue
  • autobot-frontend/src/components/vision/VideoProcessor.vue
  • autobot-frontend/src/composables/useConnectionTester.ts
  • autobot-frontend/src/config/AppConfig.js
  • autobot-frontend/src/config/ServiceDiscovery.js
  • autobot-frontend/src/config/ssot-config.ts
  • autobot-frontend/src/embed/AutobotWidget.ts
  • autobot-frontend/src/utils/ApiClient.ts
  • autobot-frontend/src/utils/RumAgent.ts
  • autobot-frontend/src/utils/__tests__/ApiClient.transport.spec.ts
  • autobot-frontend/src/utils/slmClient.ts
  • autobot-frontend/src/workers/thumbnailWorker.ts
  • autobot-slm-frontend/src/utils/ApiClient.test.ts
  • autobot-slm-frontend/src/utils/ApiClient.ts
  • docs/developer/FRONTEND_API_CLIENTS.md
  • docs/developer/frontend-type-generation.md
  • libs/autobot-ui/index.ts
  • libs/autobot-ui/src/utils/ApiClientBase.ts
  • libs/autobot-ui/src/utils/__tests__/ApiClientBase.test.ts
  • repo_tests/fixtures/pre_15360_changes_jobs.json
  • repo_tests/frontend_api_contract_ratchet_test.py
  • repo_tests/frontend_single_api_client_12363_test.py
  • scripts/audit_api_wiring.py
  • scripts/audit_api_wiring_args.py
  • scripts/audit_api_wiring_test.py
  • scripts/dead_surface.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread autobot-frontend/package.json Resolved
Comment thread autobot-frontend/src/utils/ApiClient.ts Resolved
Comment thread docs/developer/FRONTEND_API_CLIENTS.md Resolved
@mrveiss

mrveiss commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Code review (code-reviewer pass) at 07847eb

Verdict: CHANGES. 31 files, 47 behind main, merge state DIRTY (the no-merge-conflicts check fails; the conflict is in scripts/python_file_size_known_large.py), 11 unresolved threads, none answered in the thread or in code. The head is the last review's head plus an auto-sync merge, so the earlier pass never covered these threads. Refs #12363 is correct.

Sev Where Finding Fix
MEDIUM libs/autobot-ui/src/utils/ApiClientBase.ts withQuery / splitCall An array query value from the contract (for example tags) is sent as String(value), i.e. red,blue, one filter instead of two. call types the query from the contract, so the array is accepted and silently mangled (thread 4502577527; confirmed at this head). Serialise arrays as repeated keys, with a test.
MEDIUM ApiClientBase.ts QueryPart query is always optional, so a required query parameter can be omitted and fail only at the backend (thread 4502577512; confirmed). Make query required when any contract query field is required.
MEDIUM .github/workflows/verify-generated-types.yml The path filters list scripts/audit_api_wiring.py but not the new scripts/audit_api_wiring_args.py; a PR touching only that helper skips both regeneration jobs and the verdict still passes (thread 4502577472; confirmed by grep). Add the helper to both job filters and the push filter.
LOW ApiClientBase.ts buildInit A Blob body is sent raw while Content-Type stays the JSON default, so an upload reaches the backend labelled JSON (thread 4502577504; confirmed). Use blob.type when the caller supplies no content type.
LOW ApiClientBase.ts CallResponse An operation that documents both a JSON 200 and a 204 is typed as the JSON body only, while a 204 resolves to undefined (thread 4502577496). Union with void.
LOW docs/developer/FRONTEND_API_CLIENTS.md The Roles table still says to add domain endpoints to the domain clients, contradicting "do not add endpoints to them" two lines above (thread 4502577490; confirmed). Direct new endpoints to apiClient.call and call the domain clients legacy.
LOW autobot-frontend/src/utils/ApiClient.ts Typed calls use contract keys that start with /api; with a non-default VITE_API_BASE_PATH the typed path does not follow the configured base (thread 4502577482). Not reproduced, so the verdict is "not answered", not "confirmed". Add contractPath here as the SLM client has, or state why the base is always /api.
LOW repo_tests/frontend_api_contract_ratchet_test.py require('./fetchWithAuth') is not counted by the census (thread 4502577532; no require( handling found). Count it and add a fixture.
LOW package.json gen:types; kit test type-check; SLM / and SCIM paths Threads 4502577477, 4502577492, 4502577486: pre-existing script design or tooling suggestions, not answered. Answer each in-thread (accept, or a reason).
LOW verify-generated-types.yml SLM step The SLM job still strips x-websocket-paths in an inline snippet while the main job uses --no-websocket-paths: two copies of one strip. Use the flag for SLM too.
Verified fillPathParams, readCallBody, contractPath Missing and unused path params throw; non-JSON replies point to callRaw; the SLM prefix strip exists once with final-URL tests. none

Threads: 0 resolved by me; no head code answers any of the 11. The required fixes are the merge from main plus the three MEDIUM items and an in-thread answer for each of the rest. Changed-file ceilings: ApiClientBase.ts is 436 lines (was 308), under 600. Not run: vitest, vue-tsc.

@mrveiss

mrveiss commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Review fixes pushed (merge 8096c09, fixes f8c89ab and 6cb4955).

Finding Fix Test
DIRTY vs main merged origin/main; scripts/python_file_size_known_large.py: main's 1145 for repo_tests/sys_modules_leak_guard.py, branch's 855 for scripts/audit_api_wiring.py (both equal the files' line counts) python file-size ratchet
MEDIUM array query as red,blue libs/autobot-ui/src/utils/ApiClientBase.ts withQuery repeats the key; QueryValue type ApiClientBase.test.ts: withQuery repeated keys; call repeated keys
MEDIUM QueryPart made required optional ApiClientBase.ts QueryPart uses {} extends ApiClientBase.test.ts: @ts-expect-error on /api/search (no query; query without tags)
MEDIUM filters miss audit_api_wiring_args.py added in api-wiring.yml, company-os-contract.yml, verify-generated-types.yml (push + both job filters) and the shared .github/filters/backend-python-paths.yml; equivalence fixture re-frozen changes_job_equivalence_15360_test.py 374 passed
LOW Blob JSON Content-Type ApiClientBase.ts buildInit ApiClientBase.test.ts: Blob media type
LOW 204 beside 200 ApiClientBase.ts CallResponse / ReturnsJson union ApiClientBase.test.ts: Item | void
LOW Roles table contradiction docs/developer/FRONTEND_API_CLIENTS.md n/a
LOW ratchet misses require( repo_tests/frontend_api_contract_ratchet_test.py regex + planted control same file, ..._static_dynamic_and_require_imports_only
CR gen:types fresh schema both package.json gen:types chain gen:types:openapi; docs n/a (script)
CR typed calls ignore configured API base autobot-frontend/src/utils/ApiClient.ts contractPath ApiClient.transport.spec.ts
CR SLM paths outside /api autobot-slm-frontend/src/utils/ApiClient.ts SlmApiPaths + throwing contractPath ApiClient.test.ts
CR kit tests not type-checked tracked in #21091 n/a

Local results: pytest batch 569 passed; kit tests 70 passed; both app specs pass with a temporary reka-ui stub (it is not installed here); npm run type-check in both apps shows only the 5 reka-ui TS2307 errors each.

@mrveiss

mrveiss commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Code review (code-reviewer pass) at 6cb4955

Verdict: APPROVE. Delta reviewed from 07847eb; every prior finding is fixed in code with a test, and nothing new blocks.

Prior finding Result Evidence
MED array query as repeated keys Fixed withQuery appends each item (QueryValue allows arrays); tests assert ?a=red&a=blue&n=1 and ?tags=red&tags=blue through call
MED QueryPart keeps required query required Fixed {} extends ParamsOf<Op,'query'> branch; @ts-expect-error on no query and on {limit:1} missing tags; all-optional stays optional
MED args helper in filters, fixture re-frozen Fixed audit_api_wiring_args.py is in api-wiring, company-os-contract, verify-generated-types (push and both job filters) and the shared wiring filter; pre_15360_changes_jobs.json hashes updated
LOW Blob media type Fixed Blob's own type, none when empty, caller header wins; test covers all four cases
LOW 204/200 unions Fixed CallResponse and ReturnsJson union 200, 201 and void for 204; expectTypeOf test `Item
LOW Roles table Fixed domain-client row now says new endpoints use apiClient.call
LOW ratchet misses require( Fixed regex covers require(; positive control cjs.js counted, cjsother.js (look-alike module) not
NEW (non-blocking) type assertions not enforced in CI Open, tracked the kit has no type-check over __tests__, so the @ts-expect-error and expectTypeOf checks run only by hand; tracked in #21091

Hygiene: 0 behind main, mergeable is MERGEABLE (state BLOCKED on checks/approval only); no failing checks at review time; no fixed sleeps or line-number comments in the author's commits; ApiClient.ts 560 and ApiClientBase.ts 450 lines (<=600); audit_api_wiring.py 855 is at its ceiling; new functions are short. Also checked 6cb4955: contractPath honours the configured API base and the SLM client refuses keys outside /api, both tested.

Threads: 2 of 4 open threads resolved on code evidence (configured base, SLM key refusal); the QueryPart thread also resolved. The kit type-check thread stays open until #21091 lands.

@mrveiss

mrveiss commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Verdict: CHANGES @ b47350a

Scope at this head: the typed call/callRaw layer, the SLM contractPath hook, the ESLint raw-fetch ban and the call-site exemptions are already on main (slices 1 to 4 landed via earlier trains). This PR now adds only the ratchet dimensions in repo_tests/frontend_api_contract_ratchet_test.py (+118/-5). The 24 non-merge commits ahead of main are the older slice branch history (type regeneration and auto-sync merges), not part of the net diff. The title and body still describe the whole slice 0 and need rewriting.

Severity Location Finding Required fix
Medium repo_tests/frontend_api_contract_ratchet_test.py:116 (_CLIENT_CLASS_RE + _EXTENDS_KIT_BASE_RE) Still valid. The header capture [^{;]* includes type parameters, so class FreshApiClient<T extends ApiClientBase> {} matches extends ApiClientBase and escapes the client count. Match extends only after the type-parameter list (strip a leading <...> from the header, or anchor on \)?\s*extends), and add that declaration as a positive fixture in test_a_class_extending_the_kit_base_is_not_counted_but_a_bare_service_is.
Medium repo_tests/frontend_api_contract_ratchet_test.py:241 (_measure, _regressions) Still valid. fetch_with_auth_importers and hand_built_urls are compared as counts. Removing one bridge importer or hand-built URL and adding another leaves the count equal, so a new finding passes. Compare identities against the base (importer paths; path:line-text sites for URLs), keep counts for reporting, and add an equal-count replacement fixture per dimension.
Low PR title/body Title and body claim the typed layer, offline generation, ESLint ban and "Kit tests: 67 passed" for work that is not in this diff. Unverifiable evidence. Retitle to the ratchet dimensions; rewrite What Changed and Verification to match the 1-file diff.
Low Test coverage The detectors have control fixtures, but no test covers the layer here (it is covered on main in ApiClient.transport.spec.ts and ApiClientBase.test.ts). Fine for this diff. None.

Checked, no finding: no console.*, hardcoded URLs or UI strings in the diff; the layer is wired on main (12 files call .call('<verb>', 92 files still reference fetchWithAuth, which is the debt the new dimension pins); mergeable against main 6199adc (mergeStateStatus BLOCKED by the paused CI and unresolved threads, no conflict); milestone M4 and label phase:M4.9 present; body headings present.

AC coverage of #12363 (Refs, not Closes): the typed layer, offline generation and ESLint ban are met by main, not by this diff; this diff delivers only the guard dimensions for slices 3 and 5. The migration ACs (remaining raw fetch sites, hand-typed responses) are not met.

Not verified: no test or type-check was run (read-only review); the exact pin values (fetch_with_auth_importers 37, hand_built_urls 644) were not recounted.

@mrveiss mrveiss changed the title feat(frontend): typed call/callRaw over the one kit client, offline type generation, raw-fetch ban (#12363) test(ci): ratchet remaining fetchWithAuth bridge importers and hand-built API URLs by identity (#12363) Nov 12, 2026
@mrveiss

mrveiss commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Round fix for Verdict: CHANGES @ b47350aa57, pushed as a40db9b (one fix commit plus a merge of the branch's own auto-sync head).

Finding Fix
Medium: generic constraint escaped the client count The class regex now captures only the name. _type_params_end does a bracket-depth scan over a possibly nested <...> list (an => is not a closer) and _class_heritage reads the clause after it; extends ApiClientBase must start that clause. Fixtures: class FreshApiClient<T extends ApiClientBase> {} is counted; nested <T extends Foo<Bar>, U = Baz> extends ApiClientBase<T, U> is excluded; implements-only is counted; multi-line headers are covered for both an implements and an extends class.
Medium: count-only comparison _identities / _new_members compare the measured members against the exported merge-base tree: importers by file path, hand-built URLs by (file path, stripped line text) with multiplicity, no line number. New test test_no_new_bridge_importer_or_hand_built_url_even_at_equal_count runs per app and dimension. Fixtures: an equal-count swap in each dimension fails (while the count-only _regressions stays blind to it), a line shift is not a new member, a duplicated identical line is. No baseline file was added, so the python filter is untouched.
Low: title and body Retitled and rewritten to the one-file change.

Counts derived statically with git grep on this tree: 37 importers of the bridge (matches). The hand-built URL count is 571 under the detector's exclusions (582 raw hits), not the 644 the old body claimed; the claim is dropped. The ratchet compares against the base tree, so no pinned number is needed.

Not verified: no tests, type-check or CI were run locally; the detector was not executed.

@mrveiss

mrveiss commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE @ a40db9b

Both earlier findings are fixed in code. The only non-merge commit ahead of main is d47b93b (plus the already-reviewed 633b8be); the net diff is still the one test file, 557 lines (under the 600 ceiling). Nothing was executed; the traces below are by reading.

Fixture trace: FreshApiClient<T extends ApiClientBase> gives an empty heritage and is counted. The nested <T extends Foo<Bar>, U = Baz> extends ApiClientBase<T, U> and the multi-line extends class are excluded. implements-only and the { a: 1 } / () => void multi-line generic are counted. That matches the asserted set.

Severity Location Finding Suggested fix
Low (advisory, not blocking) _hand_built_urls / test_no_new_bridge_importer_or_hand_built_url_even_at_equal_count A moved or renamed file, or any edit of a hand-built URL line's interior text (reformatting, variable rename), reads as a new member; the failure message lists members but does not say what to do. Add one sentence to the two _DIMENSION_ADVICE entries saying that a move or reformat of an existing site must be done in the migration PR that removes it.
Low (advisory) test_a_class_extending_the_kit_base_is_not_counted_but_a_bare_service_is About 31 lines, one over the 30-line core rule. Split the fixtures into a helper.

Break attempts on the class detector (false exclusion = escape; false count = noise):

Case Result Matters?
<T extends Array<() => void>> Depth scan correct (=> skipped) No
> in a string or comparison in a default type Premature close, heritage starts mid-list, so the class is counted Noise only
class X<T> // comment { Comment sits in the heritage text; not an extends start, so counted Noise only
/* c */ extends ApiClientBase Heritage starts with the comment, so counted Noise only
export default class, abstract class, const X = class FooClient { Name found, handled No
const FooClient = class { or an anonymous class Not matched Escape, but a pre-existing blind spot of a name-based detector
extends mixin(ApiClientBase) Counted Conservative, noise only
extends ApiClientBaseExtra Counted (word boundary holds) No
Class name inside a comment or string Counted if a { follows before a ; Noise only

No case produces a false exclusion from a real independent client.

Identity comparison: _new_members is a Counter difference (now - then), so duplicates and swaps register and line shifts do not. The base is _ratchet_base.base_commit: in CI it is the merge-group base_sha, before on a main push, or HEAD^1 for a PR; locally it is the merge-base with origin/main. On main's own push run the base is the previous main tip, so a landed commit that already passed is not re-judged. The two fixture tests do what they claim, including the count-only _regressions staying blind to a swap.

No numeric pin exists for these dimensions (no 644 or 37 in the file or the repo tests; the only 644 hit is an unrelated file-mode test). The body states 37 and 571 as static counts and says the 644 claim is dropped. The new helpers are all underscore-prefixed, the file adds no ast use, no new file is added so the python filter pin is untouched, and the title and body describe the one-file change.

@mrveiss
mrveiss merged commit b346ce9 into main Nov 12, 2026
3 checks passed
mrveiss added a commit that referenced this pull request Nov 12, 2026
@mrveiss
mrveiss deleted the issue-12363-typed-client-layer branch November 12, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

phase:M4.9 One definition per concept

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant