You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #6206 (AMS+ORB synergy epic) and specifically groundwork for #6209 (live-gate-prediction spec, still undecided on detection/exposure/auth model). Independent of how that spec eventually decides AMS should discover and authenticate to this data, it's useful groundwork to build the underlying read-only capability now: an endpoint that returns a repo's CURRENT effective, self-tuned gate thresholds (the output of src/review/auto-apply.ts's self-tune loop), with none of the raw override-audit history.
Requirements
Add a read-only endpoint (e.g. GET /v1/repos/:owner/:repo/gate-config/effective) that returns only the effective, currently-active threshold values — reuse auto-apply.ts's existing loadOverride/loadShadowOverride read paths, but return ONLY the resolved effective values, never the raw audit trail (override_audit rows) or historical override sequence.
This issue does NOT need to decide the auth/access model for who may call this (an external miner, a specific scope, etc.) — gate it behind whatever this repo's most conservative existing precedent already uses for a similar repo-scoped read (check #6154's reviewability-tool pattern, isMcpReadRepoAllowed), and note in the PR that Spec: upgrade AMS's predicted-gate to query ORB's live self-tuned config when both are installed #6209 may need to revisit the access model once its own design lands.
Must remain read-only.
Test Coverage Requirements
99%+ Codecov patch coverage; tests confirming the response never includes raw audit-history fields, only resolved effective values.
Deliverables
A read-only effective-gate-config endpoint, gated behind this repo's existing most-conservative repo-scoped read pattern.
Tests confirming no audit-history leakage.
Expected Outcome
The underlying data-exposure capability #6209 needs already exists and is tested, so that spec's eventual implementation only needs to wire the detection/consumption logic, not also build this read path from scratch.
Context
Part of #6206 (AMS+ORB synergy epic) and specifically groundwork for #6209 (live-gate-prediction spec, still undecided on detection/exposure/auth model). Independent of how that spec eventually decides AMS should discover and authenticate to this data, it's useful groundwork to build the underlying read-only capability now: an endpoint that returns a repo's CURRENT effective, self-tuned gate thresholds (the output of
src/review/auto-apply.ts's self-tune loop), with none of the raw override-audit history.Requirements
GET /v1/repos/:owner/:repo/gate-config/effective) that returns only the effective, currently-active threshold values — reuseauto-apply.ts's existingloadOverride/loadShadowOverrideread paths, but return ONLY the resolved effective values, never the raw audit trail (override_auditrows) or historical override sequence.#6154's reviewability-tool pattern,isMcpReadRepoAllowed), and note in the PR that Spec: upgrade AMS's predicted-gate to query ORB's live self-tuned config when both are installed #6209 may need to revisit the access model once its own design lands.Test Coverage Requirements
99%+ Codecov patch coverage; tests confirming the response never includes raw audit-history fields, only resolved effective values.
Deliverables
Expected Outcome
The underlying data-exposure capability #6209 needs already exists and is tested, so that spec's eventual implementation only needs to wire the detection/consumption logic, not also build this read path from scratch.
Links & Resources
src/review/auto-apply.ts,migrations/0047_self_improve_tunables.sql#6154(theisMcpReadRepoAllowedaccess-control precedent to reuse)