alissa-tools-github-revloop 0.31.21__tar.gz → 0.31.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {alissa_tools_github_revloop-0.31.21/src/main/alissa_tools_github_revloop.egg-info → alissa_tools_github_revloop-0.31.23}/PKG-INFO +14 -1
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/README.md +13 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/config.py +27 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/loop.py +129 -43
- alissa_tools_github_revloop-0.31.23/src/main/alissa/tools/github/revloop/version +1 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23/src/main/alissa_tools_github_revloop.egg-info}/PKG-INFO +14 -1
- alissa_tools_github_revloop-0.31.21/src/main/alissa/tools/github/revloop/version +0 -1
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/LICENSE +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/MANIFEST.in +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/NOTICE +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/requirements.txt +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/setup.cfg +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/setup.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/__init__.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/__main__.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/alissa.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/alissa_client.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/bows.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/fleet_vitals.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/ghclient.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/janitor.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/loop_events.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/parking.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/proc.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/prompts.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/prreview.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/state.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/trust.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/version.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/__init__.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/__main__.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/auth.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/page.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/server.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/sources.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa/tools/github/revloop/webui/sysinfo.py +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa_tools_github_revloop.egg-info/SOURCES.txt +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa_tools_github_revloop.egg-info/dependency_links.txt +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa_tools_github_revloop.egg-info/entry_points.txt +0 -0
- {alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/src/main/alissa_tools_github_revloop.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alissa-tools-github-revloop
|
|
3
|
-
Version: 0.31.
|
|
3
|
+
Version: 0.31.23
|
|
4
4
|
Summary: ALISSA-TOOLS-GITHUB-REVLOOP
|
|
5
5
|
Home-page: https://alissa.app
|
|
6
6
|
Author: Fahera
|
|
@@ -58,6 +58,19 @@ flag `discovery_review` (`ALISSA_REVIEW_DISCOVERY_REVIEW`, default off) turns
|
|
|
58
58
|
the skip off: every discovery PR is then reviewed like any other. See
|
|
59
59
|
*Discovery PRs* in the repository README.
|
|
60
60
|
|
|
61
|
+
## Integration-check PRs are not reviewed
|
|
62
|
+
|
|
63
|
+
A PR in a plans repository (`plan_repos`, `ALISSA_REVIEW_PLAN_REPOS`) whose
|
|
64
|
+
body carries `<!-- alissa-integration-check v1 -->` on a line of its own and
|
|
65
|
+
whose every changed path is under `integration-check/` gets **no review
|
|
66
|
+
round** either — the same skip, beside the discovery one, with one
|
|
67
|
+
activity-comment line per head. There is no light round. A marked PR that
|
|
68
|
+
touches anything else (or whose file list cannot be read in full) is reviewed
|
|
69
|
+
under the code directive, unchanged. The fleet flag `integration_check_review`
|
|
70
|
+
(`ALISSA_REVIEW_INTEGRATION_CHECK_REVIEW`, default off) turns the skip off:
|
|
71
|
+
every integration-check PR is then reviewed like any other. The two flags are
|
|
72
|
+
independent. See *Integration-check PRs* in the repository README.
|
|
73
|
+
|
|
61
74
|
## Install
|
|
62
75
|
|
|
63
76
|
```sh
|
|
@@ -36,6 +36,19 @@ flag `discovery_review` (`ALISSA_REVIEW_DISCOVERY_REVIEW`, default off) turns
|
|
|
36
36
|
the skip off: every discovery PR is then reviewed like any other. See
|
|
37
37
|
*Discovery PRs* in the repository README.
|
|
38
38
|
|
|
39
|
+
## Integration-check PRs are not reviewed
|
|
40
|
+
|
|
41
|
+
A PR in a plans repository (`plan_repos`, `ALISSA_REVIEW_PLAN_REPOS`) whose
|
|
42
|
+
body carries `<!-- alissa-integration-check v1 -->` on a line of its own and
|
|
43
|
+
whose every changed path is under `integration-check/` gets **no review
|
|
44
|
+
round** either — the same skip, beside the discovery one, with one
|
|
45
|
+
activity-comment line per head. There is no light round. A marked PR that
|
|
46
|
+
touches anything else (or whose file list cannot be read in full) is reviewed
|
|
47
|
+
under the code directive, unchanged. The fleet flag `integration_check_review`
|
|
48
|
+
(`ALISSA_REVIEW_INTEGRATION_CHECK_REVIEW`, default off) turns the skip off:
|
|
49
|
+
every integration-check PR is then reviewed like any other. The two flags are
|
|
50
|
+
independent. See *Integration-check PRs* in the repository README.
|
|
51
|
+
|
|
39
52
|
## Install
|
|
40
53
|
|
|
41
54
|
```sh
|
|
@@ -184,6 +184,7 @@ CONFIG_KEYS = (
|
|
|
184
184
|
"plan_repos",
|
|
185
185
|
"plan_authors",
|
|
186
186
|
"discovery_review",
|
|
187
|
+
"integration_check_review",
|
|
187
188
|
"operators",
|
|
188
189
|
"agent_profile",
|
|
189
190
|
"reviewer_login",
|
|
@@ -281,6 +282,15 @@ PLAN_REPO_OWNER_PLACEHOLDER = "<owner>"
|
|
|
281
282
|
# discovery PR is reviewed under the code directive like any other PR. Same
|
|
282
283
|
# env > file > default precedence and boolean spellings as the janitor's rail.
|
|
283
284
|
DISCOVERY_REVIEW_ENV = "ALISSA_REVIEW_DISCOVERY_REVIEW"
|
|
285
|
+
|
|
286
|
+
# The integration-check fleet flag (issue #181; integration-check design §3.6,
|
|
287
|
+
# IC-4). OFF by default: an INTEGRATION-CHECK PR -- a plans repository, the
|
|
288
|
+
# integration-check marker, every changed path under `integration-check/`
|
|
289
|
+
# (loop.ReviewWatcher._integration_check_skip) -- gets no review round,
|
|
290
|
+
# because its defences are the lint (I3-I6), the evidence it must cite and the
|
|
291
|
+
# person reading the report at Validate. ON, every one is reviewed under the
|
|
292
|
+
# code directive like any other PR. Same rail as the discovery flag.
|
|
293
|
+
INTEGRATION_CHECK_REVIEW_ENV = "ALISSA_REVIEW_INTEGRATION_CHECK_REVIEW"
|
|
284
294
|
DEFAULT_PLAN_REPO_NAME = "alissa-dark-factory-plans"
|
|
285
295
|
DEFAULT_PLAN_REPOS: "tuple[str, ...]" = (
|
|
286
296
|
f"{PLAN_REPO_OWNER_PLACEHOLDER}/{DEFAULT_PLAN_REPO_NAME}",
|
|
@@ -925,6 +935,10 @@ class Config:
|
|
|
925
935
|
# False -- the default -- skips them.
|
|
926
936
|
discovery_review: bool = False
|
|
927
937
|
|
|
938
|
+
# Review integration-check PRs after all (issue #181); see
|
|
939
|
+
# INTEGRATION_CHECK_REVIEW_ENV. False -- the default -- skips them.
|
|
940
|
+
integration_check_review: bool = False
|
|
941
|
+
|
|
928
942
|
# GitHub logins whose re-entry ack may raise a capped PR's effective cap
|
|
929
943
|
# (loop.parse_reentry_ack). Empty -- the default -- means NO ack is ever
|
|
930
944
|
# honoured: the lever fails closed, because anyone who can comment on a PR
|
|
@@ -1309,6 +1323,18 @@ class Config:
|
|
|
1309
1323
|
raise ValueError(
|
|
1310
1324
|
f"discovery_review must be true or false, got {discovery_review!r}"
|
|
1311
1325
|
)
|
|
1326
|
+
# The integration-check flag (issue #181), same layer, same reason.
|
|
1327
|
+
env_ic = _env_bool(INTEGRATION_CHECK_REVIEW_ENV, environ)
|
|
1328
|
+
if env_ic is not None:
|
|
1329
|
+
raw["integration_check_review"] = env_ic
|
|
1330
|
+
integration_check_review = raw.get(
|
|
1331
|
+
"integration_check_review", cls.integration_check_review
|
|
1332
|
+
)
|
|
1333
|
+
if not isinstance(integration_check_review, bool):
|
|
1334
|
+
raise ValueError(
|
|
1335
|
+
"integration_check_review must be true or false, "
|
|
1336
|
+
f"got {integration_check_review!r}"
|
|
1337
|
+
)
|
|
1312
1338
|
|
|
1313
1339
|
source = raw.get("repos_source", cls.repos_source)
|
|
1314
1340
|
if source not in _REPOS_SOURCES:
|
|
@@ -1604,6 +1630,7 @@ class Config:
|
|
|
1604
1630
|
plan_repos=plan_repos,
|
|
1605
1631
|
plan_authors=plan_authors,
|
|
1606
1632
|
discovery_review=discovery_review,
|
|
1633
|
+
integration_check_review=integration_check_review,
|
|
1607
1634
|
operators=operators,
|
|
1608
1635
|
agent_profile=raw.get("agent_profile", "claude"),
|
|
1609
1636
|
reviewer_login=raw.get("reviewer_login"),
|
|
@@ -1276,22 +1276,32 @@ DISCOVERY_MARKER = "<!-- alissa-discovery v1 -->"
|
|
|
1276
1276
|
DISCOVERY_PREFIX = "knowledge-base/"
|
|
1277
1277
|
|
|
1278
1278
|
|
|
1279
|
-
def
|
|
1279
|
+
def plan_repo_marked(config: Config, pr: PullRequest, marker: str) -> bool:
|
|
1280
1280
|
"""The two signals readable without a GitHub call: the plans repository
|
|
1281
|
-
and
|
|
1281
|
+
and `marker` on a line of its own (the plan marker's rule)."""
|
|
1282
1282
|
if not config.is_plan_repo(pr.full_name):
|
|
1283
1283
|
return False
|
|
1284
1284
|
body = pr.body.replace("\r\n", "\n")
|
|
1285
|
-
return any(line.strip() ==
|
|
1285
|
+
return any(line.strip() == marker for line in body.split("\n"))
|
|
1286
1286
|
|
|
1287
1287
|
|
|
1288
|
-
def
|
|
1289
|
-
"""
|
|
1290
|
-
|
|
1291
|
-
|
|
1288
|
+
def discovery_marked(config: Config, pr: PullRequest) -> bool:
|
|
1289
|
+
"""A plans-repository PR carrying the discovery marker."""
|
|
1290
|
+
return plan_repo_marked(config, pr, DISCOVERY_MARKER)
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
def outside_prefix(paths: "list[str]", prefix: str) -> "list[str]":
|
|
1294
|
+
"""The changed paths NOT under `prefix`. An empty diff answers with a
|
|
1295
|
+
placeholder rather than nothing: "every path is confined" must not hold
|
|
1296
|
+
vacuously for a PR that changes no path at all."""
|
|
1292
1297
|
if not paths:
|
|
1293
1298
|
return ["(no changed files)"]
|
|
1294
|
-
return [p for p in paths if not p.startswith(
|
|
1299
|
+
return [p for p in paths if not p.startswith(prefix)]
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
def outside_discovery_prefix(paths: "list[str]") -> "list[str]":
|
|
1303
|
+
"""The changed paths NOT under `knowledge-base/`."""
|
|
1304
|
+
return outside_prefix(paths, DISCOVERY_PREFIX)
|
|
1295
1305
|
|
|
1296
1306
|
|
|
1297
1307
|
def discovery_skip_kind(head_sha: str) -> str:
|
|
@@ -1301,6 +1311,35 @@ def discovery_skip_kind(head_sha: str) -> str:
|
|
|
1301
1311
|
return f"activity-discovery-skip:{head_sha}"
|
|
1302
1312
|
|
|
1303
1313
|
|
|
1314
|
+
# -- the integration-check skip (issue #181; integration-check design §3.6, IC-4)
|
|
1315
|
+
#
|
|
1316
|
+
# An INTEGRATION-CHECK PR is an integration check's report: one run directory
|
|
1317
|
+
# under the plans repository's `integration-check/`. Its defences are the lint
|
|
1318
|
+
# (I3-I6), the evidence the report must cite and the person reading it at
|
|
1319
|
+
# Validate, so a judgment review would only add a session per check -- revloop
|
|
1320
|
+
# starts NO round on it, the discovery skip's v0.1 shape with no light round.
|
|
1321
|
+
#
|
|
1322
|
+
# All THREE signals, or it is not an integration-check PR: the repository is
|
|
1323
|
+
# in `plan_repos`, the body carries the integration-check marker on a line of
|
|
1324
|
+
# its own, and EVERY changed path is under `integration-check/`. Anything
|
|
1325
|
+
# else -- or files that cannot be read in full -- is reviewed under the CODE
|
|
1326
|
+
# directive. The fleet flag `integration_check_review`
|
|
1327
|
+
# (config.INTEGRATION_CHECK_REVIEW_ENV) turns the skip off.
|
|
1328
|
+
INTEGRATION_CHECK_MARKER = "<!-- alissa-integration-check v1 -->"
|
|
1329
|
+
INTEGRATION_CHECK_PREFIX = "integration-check/"
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
def integration_check_marked(config: Config, pr: PullRequest) -> bool:
|
|
1333
|
+
"""A plans-repository PR carrying the integration-check marker."""
|
|
1334
|
+
return plan_repo_marked(config, pr, INTEGRATION_CHECK_MARKER)
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
def integration_check_skip_kind(head_sha: str) -> str:
|
|
1338
|
+
"""The skip's activity-line ledger kind: one line per head, as for
|
|
1339
|
+
discovery (`discovery_skip_kind`)."""
|
|
1340
|
+
return f"activity-integration-check-skip:{head_sha}"
|
|
1341
|
+
|
|
1342
|
+
|
|
1304
1343
|
# -- the light review round (issue #179; build-discovery design §3.6, DS-13) --
|
|
1305
1344
|
#
|
|
1306
1345
|
# v1.1 narrows the skip: a discovery PR whose findings lean on something the
|
|
@@ -2874,12 +2913,12 @@ class ReviewWatcher:
|
|
|
2874
2913
|
# hold a place forever.
|
|
2875
2914
|
self._waiting: dict[tuple[str, int], Waiting] = {}
|
|
2876
2915
|
self._wait_seq = 0
|
|
2877
|
-
# The discovery
|
|
2878
|
-
# head): the changed paths
|
|
2916
|
+
# The discovery and integration-check skips' file reads (issues #171,
|
|
2917
|
+
# #181), keyed by (repo, PR, head): the head's changed paths. A
|
|
2879
2918
|
# skipped PR keeps its review request, so it is re-decided every poll,
|
|
2880
2919
|
# and a head's file list never changes -- one paged read per head, not
|
|
2881
2920
|
# one per poll. Only successful reads are kept; a failed one retries.
|
|
2882
|
-
self.
|
|
2921
|
+
self._changed_paths: "dict[tuple[str, int, str], list[str]]" = {}
|
|
2883
2922
|
# The light round's review-line reads (issue #179), keyed the same
|
|
2884
2923
|
# way: only a SETTLED line (a completed `plan-lint` run) is kept, so
|
|
2885
2924
|
# a pending or unreadable read retries next poll. And the heads whose
|
|
@@ -3369,7 +3408,13 @@ class ReviewWatcher:
|
|
|
3369
3408
|
# cannot be read) passes on to round 1 under the light directive, and
|
|
3370
3409
|
# one with a round already recorded is skipped -- the cap of 1 is
|
|
3371
3410
|
# enforced here, so the cap-out escalation below never fires for it.
|
|
3411
|
+
#
|
|
3412
|
+
# THE INTEGRATION-CHECK SKIP (issue #181) sits with it, for the same
|
|
3413
|
+
# reasons; it has no light round, so a marked, confined PR is skipped
|
|
3414
|
+
# whatever `completed` says.
|
|
3372
3415
|
skipped = self._discovery_skip(pr, completed)
|
|
3416
|
+
if skipped is None:
|
|
3417
|
+
skipped = self._integration_check_skip(pr)
|
|
3373
3418
|
if skipped is not None:
|
|
3374
3419
|
return skipped
|
|
3375
3420
|
|
|
@@ -3549,32 +3594,7 @@ class ReviewWatcher:
|
|
|
3549
3594
|
)
|
|
3550
3595
|
return None
|
|
3551
3596
|
|
|
3552
|
-
|
|
3553
|
-
outside = self._discovery_outside.get(key)
|
|
3554
|
-
if outside is None:
|
|
3555
|
-
try:
|
|
3556
|
-
paths = self.github.pull_request_files(pr.owner, pr.repo, pr.number)
|
|
3557
|
-
except RateLimited:
|
|
3558
|
-
# Throttling is not a fact about the diff (the stability
|
|
3559
|
-
# guard's rule): raised on, so the poll backs off.
|
|
3560
|
-
raise
|
|
3561
|
-
except (CommandError, TruncatedListing) as exc:
|
|
3562
|
-
log.warning(
|
|
3563
|
-
"%s carries the discovery marker but its changed files "
|
|
3564
|
-
"cannot be read in full — reviewing under the code "
|
|
3565
|
-
"directive: %s",
|
|
3566
|
-
pr.slug, exc,
|
|
3567
|
-
)
|
|
3568
|
-
return None
|
|
3569
|
-
outside = outside_discovery_prefix(paths)
|
|
3570
|
-
self._discovery_outside[key] = outside
|
|
3571
|
-
|
|
3572
|
-
if outside:
|
|
3573
|
-
log.info(
|
|
3574
|
-
"%s carries the discovery marker but changes %d path(s) outside "
|
|
3575
|
-
"%s (first: %s) — reviewing under the code directive",
|
|
3576
|
-
pr.slug, len(outside), DISCOVERY_PREFIX, outside[0],
|
|
3577
|
-
)
|
|
3597
|
+
if not self._confined_to(pr, DISCOVERY_PREFIX, "discovery"):
|
|
3578
3598
|
return None
|
|
3579
3599
|
|
|
3580
3600
|
signals = (
|
|
@@ -3584,8 +3604,9 @@ class ReviewWatcher:
|
|
|
3584
3604
|
if completed >= DISCOVERY_LIGHT_CAP:
|
|
3585
3605
|
# No rollup read: whatever the line says now, the PR's one round
|
|
3586
3606
|
# is spent, and its fix head merges on the lint of record (§3.5).
|
|
3587
|
-
return self.
|
|
3607
|
+
return self._skip_marked(
|
|
3588
3608
|
pr,
|
|
3609
|
+
discovery_skip_kind(pr.head_sha),
|
|
3589
3610
|
f"{signals}; {completed} round(s) already recorded and the "
|
|
3590
3611
|
f"light round's cap is {DISCOVERY_LIGHT_CAP} — no second round "
|
|
3591
3612
|
f"(the fix head merges on the `{PLAN_LINT_CHECK}` run of record)",
|
|
@@ -3626,8 +3647,9 @@ class ReviewWatcher:
|
|
|
3626
3647
|
self._discovery_lines[key] = line
|
|
3627
3648
|
|
|
3628
3649
|
if line.level == DISCOVERY_REVIEW_NONE:
|
|
3629
|
-
return self.
|
|
3650
|
+
return self._skip_marked(
|
|
3630
3651
|
pr,
|
|
3652
|
+
discovery_skip_kind(pr.head_sha),
|
|
3631
3653
|
f"{signals}; `{PLAN_LINT_CHECK}` reads `Discovery-Review: none` "
|
|
3632
3654
|
f"— no review round (discovery_review is off)",
|
|
3633
3655
|
)
|
|
@@ -3682,10 +3704,74 @@ class ReviewWatcher:
|
|
|
3682
3704
|
self._discovery_held_logged.add(seen)
|
|
3683
3705
|
log.log(level, "%s: %s", pr.slug, reason)
|
|
3684
3706
|
|
|
3685
|
-
def
|
|
3686
|
-
"""
|
|
3687
|
-
|
|
3688
|
-
|
|
3707
|
+
def _confined_to(self, pr: PullRequest, prefix: str, what: str) -> bool:
|
|
3708
|
+
"""Whether every path the PR's head changes is under `prefix` -- the
|
|
3709
|
+
third signal of the discovery and integration-check skips. False (and
|
|
3710
|
+
a log line saying why) when one is not, or when the files cannot be
|
|
3711
|
+
read in full: the code directive is the safe reading. `what` names
|
|
3712
|
+
the marker in that line."""
|
|
3713
|
+
key = (pr.full_name, pr.number, pr.head_sha)
|
|
3714
|
+
paths = self._changed_paths.get(key)
|
|
3715
|
+
if paths is None:
|
|
3716
|
+
try:
|
|
3717
|
+
paths = self.github.pull_request_files(pr.owner, pr.repo, pr.number)
|
|
3718
|
+
except RateLimited:
|
|
3719
|
+
# Throttling is not a fact about the diff (the stability
|
|
3720
|
+
# guard's rule): raised on, so the poll backs off.
|
|
3721
|
+
raise
|
|
3722
|
+
except (CommandError, TruncatedListing) as exc:
|
|
3723
|
+
log.warning(
|
|
3724
|
+
"%s carries the %s marker but its changed files cannot be "
|
|
3725
|
+
"read in full — reviewing under the code directive: %s",
|
|
3726
|
+
pr.slug, what, exc,
|
|
3727
|
+
)
|
|
3728
|
+
return False
|
|
3729
|
+
self._changed_paths[key] = paths
|
|
3730
|
+
|
|
3731
|
+
outside = outside_prefix(paths, prefix)
|
|
3732
|
+
if outside:
|
|
3733
|
+
log.info(
|
|
3734
|
+
"%s carries the %s marker but changes %d path(s) outside %s "
|
|
3735
|
+
"(first: %s) — reviewing under the code directive",
|
|
3736
|
+
pr.slug, what, len(outside), prefix, outside[0],
|
|
3737
|
+
)
|
|
3738
|
+
return False
|
|
3739
|
+
return True
|
|
3740
|
+
|
|
3741
|
+
# -- the integration-check skip (issue #181) ---------------------------
|
|
3742
|
+
|
|
3743
|
+
def _integration_check_skip(self, pr: PullRequest) -> Decision | None:
|
|
3744
|
+
"""A SKIPPED decision for an integration-check PR, or None to review
|
|
3745
|
+
it under the code directive -- whenever any of the three signals
|
|
3746
|
+
fails, the files cannot be read in full, or the fleet flag
|
|
3747
|
+
`integration_check_review` is on. The cheap signals are read first,
|
|
3748
|
+
so an unmarked PR never costs a files read. One activity line per
|
|
3749
|
+
head, as for discovery (`_skip_marked`)."""
|
|
3750
|
+
if not integration_check_marked(self.config, pr):
|
|
3751
|
+
return None
|
|
3752
|
+
if self.config.integration_check_review:
|
|
3753
|
+
log.debug(
|
|
3754
|
+
"%s carries the integration-check marker but "
|
|
3755
|
+
"integration_check_review is on — reviewing under the code "
|
|
3756
|
+
"directive",
|
|
3757
|
+
pr.slug,
|
|
3758
|
+
)
|
|
3759
|
+
return None
|
|
3760
|
+
if not self._confined_to(pr, INTEGRATION_CHECK_PREFIX, "integration-check"):
|
|
3761
|
+
return None
|
|
3762
|
+
return self._skip_marked(
|
|
3763
|
+
pr,
|
|
3764
|
+
integration_check_skip_kind(pr.head_sha),
|
|
3765
|
+
f"integration-check PR — plans repository, "
|
|
3766
|
+
f"`{INTEGRATION_CHECK_MARKER}` marker, every changed path under "
|
|
3767
|
+
f"`{INTEGRATION_CHECK_PREFIX}`; no review round "
|
|
3768
|
+
f"(integration_check_review is off)",
|
|
3769
|
+
)
|
|
3770
|
+
|
|
3771
|
+
def _skip_marked(self, pr: PullRequest, kind: str, reason: str) -> Decision:
|
|
3772
|
+
"""The SKIPPED decision for a discovery or integration-check PR, with
|
|
3773
|
+
its one activity line per head under the ping-ledger `kind` (see
|
|
3774
|
+
`_discovery_skip`)."""
|
|
3689
3775
|
if not self.state.pinged(pr.full_name, pr.number, kind):
|
|
3690
3776
|
log.info("%s at %s: skipping review — %s", pr.slug, pr.head_sha[:8], reason)
|
|
3691
3777
|
if self._append_activity(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.31.23
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alissa-tools-github-revloop
|
|
3
|
-
Version: 0.31.
|
|
3
|
+
Version: 0.31.23
|
|
4
4
|
Summary: ALISSA-TOOLS-GITHUB-REVLOOP
|
|
5
5
|
Home-page: https://alissa.app
|
|
6
6
|
Author: Fahera
|
|
@@ -58,6 +58,19 @@ flag `discovery_review` (`ALISSA_REVIEW_DISCOVERY_REVIEW`, default off) turns
|
|
|
58
58
|
the skip off: every discovery PR is then reviewed like any other. See
|
|
59
59
|
*Discovery PRs* in the repository README.
|
|
60
60
|
|
|
61
|
+
## Integration-check PRs are not reviewed
|
|
62
|
+
|
|
63
|
+
A PR in a plans repository (`plan_repos`, `ALISSA_REVIEW_PLAN_REPOS`) whose
|
|
64
|
+
body carries `<!-- alissa-integration-check v1 -->` on a line of its own and
|
|
65
|
+
whose every changed path is under `integration-check/` gets **no review
|
|
66
|
+
round** either — the same skip, beside the discovery one, with one
|
|
67
|
+
activity-comment line per head. There is no light round. A marked PR that
|
|
68
|
+
touches anything else (or whose file list cannot be read in full) is reviewed
|
|
69
|
+
under the code directive, unchanged. The fleet flag `integration_check_review`
|
|
70
|
+
(`ALISSA_REVIEW_INTEGRATION_CHECK_REVIEW`, default off) turns the skip off:
|
|
71
|
+
every integration-check PR is then reviewed like any other. The two flags are
|
|
72
|
+
independent. See *Integration-check PRs* in the repository README.
|
|
73
|
+
|
|
61
74
|
## Install
|
|
62
75
|
|
|
63
76
|
```sh
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.31.21
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alissa_tools_github_revloop-0.31.21 → alissa_tools_github_revloop-0.31.23}/requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|