fix(context): use repo-scoping /scope/context endpoint
Cherry-picked from stale branch codex/wp-0012-scope-context (9709692).
main was still calling the old /repos/{slug}/scope path; repo-scoping now
serves GET /repos/{slug}/scope/context (web_api/app.py:1449). Includes the
resolver test and consistent workplan-doc updates. Test: 2 passed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2f4ef5809b
commit
e4d6222d22
4 changed files with 70 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Registered as source type 'repo-scoping'.
|
||||
Supported queries:
|
||||
- repo_profile: GET {REPO_SCOPING_URL}/repos/{repo_slug}/scope
|
||||
- repo_profile: GET {REPO_SCOPING_URL}/repos/{repo_slug}/scope/context
|
||||
|
||||
5-minute in-process cache keyed by (query, repo_slug). Cache is per-worker-
|
||||
process; not shared across Temporal workers.
|
||||
|
|
@ -36,7 +36,7 @@ class RepoScopingContextResolver(ContextResolver):
|
|||
ts, val = _CACHE[cache_key]
|
||||
if now - ts < _CACHE_TTL:
|
||||
return val
|
||||
url = f"{_REPO_SCOPING_URL.rstrip('/')}/repos/{repo_slug}/scope"
|
||||
url = f"{_REPO_SCOPING_URL.rstrip('/')}/repos/{repo_slug}/scope/context"
|
||||
resp = httpx.get(url, timeout=10.0)
|
||||
resp.raise_for_status()
|
||||
result: dict[str, Any] = resp.json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue