Skip to content

Commit 5c0dcb5

Browse files
authored
refactor: complete reviewer-bot maintainability remediation stage 1 (#549)
* fix(reviewer-bot): harden GitHub API failure handling * fix(reviewer-bot): harden persistence and projection contracts * test(reviewer-bot): split reviewer bot test suite * test(reviewer-bot): preserve comment routing coverage parity * ci(reviewer-bot): watch reviewer bot library changes * test(reviewer-bot): add importlib-ready test support tree * ci(reviewer-bot): enforce targeted coverage floors * test(reviewer-bot): mirror github api tests under tests * test(reviewer-bot): mirror state store and adapter tests * ci(reviewer-bot): run migrated tests in parallel * test(reviewer-bot): mirror lease lock tests under tests * test(reviewer-bot): mirror overdue tests under tests * test(reviewer-bot): mirror maintenance tests under tests * test(reviewer-bot): extract workflow contract checks * test(reviewer-bot): extract artifact contract checks * test(reviewer-bot): expand workflow file contracts * refactor(reviewer-bot): introduce thin runtime object * refactor(reviewer-bot): add explicit app event context * test(reviewer-bot): extract app event intent tests * test(reviewer-bot): extract app workflow path tests * test(reviewer-bot): extract app execution tests * test(reviewer-bot): extract workflow bookkeeping tests * test(reviewer-bot): extract reviewer board preview tests * test(reviewer-bot): extract app schedule repair tests * test(reviewer-bot): extract closed issue cleanup tests * test(reviewer-bot): extract schedule bookkeeping tests * test(reviewer-bot): extract state unavailable tests * refactor(reviewer-bot): extract reviews projection helpers * test(reviewer-bot): extract reviews api contract tests * test(reviewer-bot): extract reviews live fetch tests * test(reviewer-bot): expand reviews live fetch tests * refactor(reviewer-bot): mark canonical reviews entrypoints * refactor(reviewer-bot): isolate reviews live read helpers * refactor(reviewer-bot): split reviews normalization helpers * refactor(reviewer-bot): add typed deferred reconcile payloads * refactor(reviewer-bot): add typed comment replay context * refactor(reviewer-bot): add typed review replay context * test(reviewer-bot): extract reconcile workflow run tests * test(reviewer-bot): expand reconcile workflow run tests * test(reviewer-bot): expand reconcile replay coverage * test(reviewer-bot): expand reconcile comment replay tests * test(reviewer-bot): expand reconcile fail closed coverage * test(reviewer-bot): extract reconcile privileged command tests * test(reviewer-bot): move sweeper keyed gap tests * test(reviewer-bot): move reconcile helper tests * test(reviewer-bot): move reconcile artifact tests * test(reviewer-bot): move reconcile replay tests * test(reviewer-bot): move remaining sweeper reconcile tests * test(reviewer-bot): retire legacy reconcile file * test(reviewer-bot): move additional sweeper logic tests * test(reviewer-bot): split sweeper download tests * fix(reviewer-bot): stop stale replay from resetting reminders * test(reviewer-bot): retire legacy sweeper file * test(reviewer-bot): retire legacy comment routing file * test(reviewer-bot): retire legacy commands file * test(reviewer-bot): retire legacy project board file * test(reviewer-bot): retire legacy lifecycle file * ci(reviewer-bot): make migrated tests authoritative * test(reviewer-bot): retire legacy reviewer bot tree * ci(reviewer-bot): store coverage artifacts under artifacts * ci(reviewer-bot): finalize migrated test configuration * ci(reviewer-bot): add marker-based test jobs * refactor(reviewer-bot): type comment routing requests * refactor(reviewer-bot): type command request inputs * refactor(reviewer-bot): harden runtime service seams * test(reviewer-bot): add review scenario builders * test(reviewer-bot): add a shared GitHub transport fake * test(reviewer-bot): add a reconcile replay harness * test(reviewer-bot): add an app CLI harness * test(reviewer-bot): add a commands harness * test(reviewer-bot): add a comment routing harness * test(reviewer-bot): streamline review state scenarios * test(reviewer-bot): contract the shared GitHub transport fake * test(reviewer-bot): add sweeper scenario builders * test(reviewer-bot): add a shared app fake runtime * test(reviewer-bot): share fake runtime across harnesses * test(reviewer-bot): contract the shared fake runtime * refactor(reviewer-bot): require typed comment routing inputs * refactor(reviewer-bot): unify command automation seams * refactor(reviewer-bot): narrow app runtime protocols * refactor(reviewer-bot): type reconcile comment replay * test(reviewer-bot): canonicalize fake runtime usage * test(reviewer-bot): centralize fixture env and recorder helpers * test(reviewer-bot): initialize fake runtime lease context * refactor(reviewer-bot): centralize env request builders * refactor(reviewer-bot): extract comment application service * refactor(reviewer-bot): extract public review state surface * refactor(reviewer-bot): route comment application through review state * refactor(reviewer-bot): compose runtime from explicit services * test(reviewer-bot): stabilize app runtime test seams * test(reviewer-bot): finish app workflow bookkeeping stabilization * test(reviewer-bot): collapse shared helper imports * test(reviewer-bot): move pure library tests off shim * test(reviewer-bot): move harnessed tests off shim * test(reviewer-bot): move more unit tests off shim * test(reviewer-bot): move reconcile unit tests off shim * test(reviewer-bot): move reconcile unit tests off shim * test(reviewer-bot): move more review tests off shim * test(reviewer-bot): move review projection tests off shim * test(reviewer-bot): move lifecycle cluster off shim * test(reviewer-bot): move sweeper tests off shim * refactor(reviewer-bot): complete import-boundary collapse * test(reviewer-bot): harden authority contracts * test(reviewer-bot): cut over transport fake imports * test(reviewer-bot): isolate low-level HTTP fixtures * refactor(reviewer-bot): tighten fake runtime shape * test(reviewer-bot): add shared typed request builders * refactor(reviewer-bot): make command tests typed-first * refactor(reviewer-bot): make replay tests typed-first * refactor(reviewer-bot): narrow mutable review-state ownership * refactor(reviewer-bot): close review-state ownership gaps * refactor(reviewer-bot): remove privileged command env hydration * refactor(reviewer-bot): centralize lifecycle event decoding * refactor(reviewer-bot): type lifecycle event inputs * refactor(reviewer-bot): clarify reconcile replay scenarios * refactor(reviewer-bot): polish reconcile workflow tests * refactor(reviewer-bot): add narrow protocol foundations * test(reviewer-bot): separate runtime protocol compatibility checks * refactor(reviewer-bot): route event input builders through runtime config * refactor(reviewer-bot): use typed request builders in harnesses * refactor(reviewer-bot): remove ambient env reads from event handlers * refactor(reviewer-bot): read reviewer board settings from runtime config * refactor(reviewer-bot): add typed runtime config accessors * refactor(reviewer-bot): add injectable runtime infra services * test(reviewer-bot): add deterministic infra fakes * refactor(reviewer-bot): inject time and logging into state store * refactor(reviewer-bot): inject time and identity services into lease lock * refactor(reviewer-bot): inject rest transport into github api helpers * refactor(reviewer-bot): inject graphql transport into github api helpers * refactor(reviewer-bot): add shared retry policy primitives * refactor(reviewer-bot): share rest retry policy logic * refactor(reviewer-bot): share graphql retry policy logic * refactor(reviewer-bot): share retry helpers in state store workflows * refactor(reviewer-bot): share retry helpers in lease lock workflows * refactor(reviewer-bot): route command defaults through runtime-backed requests * refactor(reviewer-bot): preserve command parser behavior while narrowing seams * refactor(reviewer-bot): remove ambient env builders from comment routing * refactor(reviewer-bot): use structured logging in comment routing * refactor(reviewer-bot): stabilize reconcile transport seams * refactor(reviewer-bot): inject time and logging into reconcile * refactor(reviewer-bot): inject artifact download transport into sweeper * refactor(reviewer-bot): share retry helpers in sweeper downloads * refactor(reviewer-bot): read sweeper settings from runtime config * refactor(reviewer-bot): add structured logging interfaces * refactor(reviewer-bot): use structured logging in github api helpers * refactor(reviewer-bot): use structured logging in state and lock services * refactor(reviewer-bot): use structured logging in orchestration paths * refactor(reviewer-bot): narrow leaf module protocol dependencies * refactor(reviewer-bot): narrow core module protocol dependencies * refactor(reviewer-bot): compose runtime from explicit services * refactor(reviewer-bot): make bootstrap config services explicit * refactor(reviewer-bot): make bootstrap transport and state wiring explicit * refactor(reviewer-bot): make bootstrap handler wiring explicit * test(reviewer-bot): add focused fake services * test(reviewer-bot): rebalance support-layer ownership contracts * test(reviewer-bot): compose app harness from focused fakes * test(reviewer-bot): narrow command comment and reconcile harnesses * test(reviewer-bot): shrink fake runtime to compatibility shell * test(reviewer-bot): remove module patching from github api tests * test(reviewer-bot): remove module patching from lease lock tests * test(reviewer-bot): use focused fakes in board and sweeper tests * refactor(reviewer-bot): add explicit runtime factory entrypoint * test(reviewer-bot): use runtime factories in integration paths * refactor(reviewer-bot): remove global runtime singleton * test(reviewer-bot): align validation fixes with explicit runtime flow * test(reviewer-bot): add sequenced shared transport fake behavior * test(reviewer-bot): standardize github api tests on shared transport fakes * test(reviewer-bot): standardize sweeper download tests on focused transport fakes * refactor(reviewer-bot): remove ambient env reads from github api assignment helpers * refactor(reviewer-bot): make runtime accessors the primary config authority * refactor(reviewer-bot): require structured logger in core library modules * refactor(reviewer-bot): replace remaining internal prints in command and review flows * refactor(reviewer-bot): separate cli output from internal maintenance logging * refactor(reviewer-bot): replace bootstrap adapter namespace with explicit service * refactor(reviewer-bot): further shrink runtime delegation surface * test(reviewer-bot): reduce fake runtime to mostly delegated compatibility methods * test(reviewer-bot): remove runtime factory patching from app harness * test(reviewer-bot): remove final sleep patch from github api tests * test(reviewer-bot): reduce ad hoc runtime shells in state and maintenance tests * refactor(reviewer-bot): inject transport and logging into members helper * test(reviewer-bot): support direct-url focused transport stubs * test(reviewer-bot): align bookkeeping tests with explicit runtime flow * test(reviewer-bot): realign architecture contracts with authority boundaries * refactor(reviewer-bot): retire broad runtime delegation surface * refactor(reviewer-bot): align command flows with slimmer runtime surface * refactor(reviewer-bot): split bootstrap adapter wiring by responsibility * test(reviewer-bot): reduce fake runtime to a thin compatibility shell * test(reviewer-bot): align integration tests with fake runtime shell * test(reviewer-bot): refine fake runtime compatibility delegation * test(reviewer-bot): converge transport fakes on shared authority * test(reviewer-bot): converge transport fakes on shared authority * test(reviewer-bot): wire fake runtime rest transport through github stub * refactor(reviewer-bot): make state and lock seams strictly runtime-owned * test(reviewer-bot): remove ambient env mirroring from fake config and harnesses * test(reviewer-bot): restore review-state compatibility marker * refactor(reviewer-bot): remove broad runtime github facade * refactor(reviewer-bot): align github services with slimmer runtime facade * refactor(reviewer-bot): remove broad runtime review and queue facade * refactor(reviewer-bot): thin bootstrap compatibility adapters * refactor(reviewer-bot): split bootstrap adapter wiring by responsibility * refactor(reviewer-bot): align callers with split bootstrap adapters * test(reviewer-bot): move handler default ownership into focused fake services * test(reviewer-bot): strengthen focused fake service ownership models * refactor(reviewer-bot): remove remaining optional runtime-owned infra fallbacks * refactor(reviewer-bot): require logger and clock in orchestration helpers * refactor(reviewer-bot): separate state and lock codec ownership * refactor(reviewer-bot): split reconcile by payload and replay concern * refactor(reviewer-bot): implement runbook-driven approval-pending detection * refactor(reviewer-bot): restore reconcile payload exports * test(reviewer-bot): freeze strangler baseline through c1a * refactor(reviewer-bot): complete strangler rewrite execution * refactor(reviewer-bot): complete final rewrite cleanup and proof refresh * refactor(reviewer-bot): align ownership and locality proof Keep reviewer-bot policy, runtime, and migration proof consistent so ordinary changes stay within the right authority boundaries. * refactor(reviewer-bot): localize workflow and review support seams Move payload, read, bookkeeping, and live-review helpers to explicit owners so routine reviewer-bot changes stay local and the proof matches runtime truth. This also narrows schedule and sweeper hotspots around pass- and surface-level seams without widening runtime contracts. * refactor: complete reviewer-bot stage 1 remediation * fix: close remaining reviewer-bot stage 1 gaps * fix: remove stray stage 1 artifact output * chore: refresh spec.lock for current FLS
1 parent 84aa729 commit 5c0dcb5

188 files changed

Lines changed: 43235 additions & 23529 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/reviewer-bot-tests/conftest.py

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)