alissa-tools-github-revloop 0.21.0__tar.gz → 0.22.0__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.21.0/src/main/alissa_tools_github_revloop.egg-info → alissa_tools_github_revloop-0.22.0}/PKG-INFO +1 -1
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/alissa.py +72 -6
- alissa_tools_github_revloop-0.22.0/src/main/alissa/tools/github/revloop/version +1 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0/src/main/alissa_tools_github_revloop.egg-info}/PKG-INFO +1 -1
- alissa_tools_github_revloop-0.21.0/src/main/alissa/tools/github/revloop/version +0 -1
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/LICENSE +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/MANIFEST.in +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/NOTICE +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/README.md +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/requirements.txt +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/setup.cfg +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/setup.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/__init__.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/__main__.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/config.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/ghclient.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/loop.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/proc.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/prreview.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/state.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/version.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/__init__.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/__main__.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/auth.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/page.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/server.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/sources.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa/tools/github/revloop/webui/sysinfo.py +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa_tools_github_revloop.egg-info/SOURCES.txt +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa_tools_github_revloop.egg-info/dependency_links.txt +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa_tools_github_revloop.egg-info/entry_points.txt +0 -0
- {alissa_tools_github_revloop-0.21.0 → alissa_tools_github_revloop-0.22.0}/src/main/alissa_tools_github_revloop.egg-info/top_level.txt +0 -0
|
@@ -13,8 +13,36 @@ from .proc import CommandError, run, run_json
|
|
|
13
13
|
|
|
14
14
|
log = logging.getLogger(__name__)
|
|
15
15
|
|
|
16
|
-
#
|
|
17
|
-
|
|
16
|
+
# The seven canonical Alissa task statuses -- `TaskStatusSchema` in the studio
|
|
17
|
+
# repo (`packages/client/src/schemas/common.ts`). Mirrored here for the reason
|
|
18
|
+
# the studio CLI mirrors it into `TASK_STATUSES` rather than importing it: what
|
|
19
|
+
# this module needs is the SET of names, not the schema that validates them.
|
|
20
|
+
#
|
|
21
|
+
# It is the vocabulary the `--status` filter below is allowed to speak. CLI
|
|
22
|
+
# 0.2.0 validates `--status` against exactly these seven client-side and exits 1
|
|
23
|
+
# on anything else BEFORE issuing any request, so a single non-canonical value
|
|
24
|
+
# does not narrow the call slightly less -- it costs the whole narrowed call.
|
|
25
|
+
CANONICAL_TASK_STATUSES = frozenset(
|
|
26
|
+
{
|
|
27
|
+
"draft",
|
|
28
|
+
"committed",
|
|
29
|
+
"in_progress",
|
|
30
|
+
"blocked",
|
|
31
|
+
"pending_validation",
|
|
32
|
+
"validated",
|
|
33
|
+
"cancelled",
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# A review task is "open" while it can still receive a verdict. Every member is
|
|
38
|
+
# canonical, and a test pins that: a status Alissa cannot issue is dead weight
|
|
39
|
+
# in `is_open` and poison in the `--status` filter derived from it.
|
|
40
|
+
#
|
|
41
|
+
# `todo` was such a member until 0.22.0 (issue #97). Alissa has never had that
|
|
42
|
+
# status, so `is_open` could never match it -- but it was still reaching CLI
|
|
43
|
+
# 0.2.0's `--status` validator, which rejects the call over it, which in turn
|
|
44
|
+
# drops this process back to the unnarrowed whole-corpus list for good.
|
|
45
|
+
OPEN_STATUSES = {"committed", "in_progress", "pending_validation"}
|
|
18
46
|
|
|
19
47
|
# -- narrowing the `alissa task list` call (issue #87) ------------------------
|
|
20
48
|
#
|
|
@@ -26,13 +54,48 @@ OPEN_STATUSES = {"committed", "in_progress", "pending_validation", "todo"}
|
|
|
26
54
|
# not evidence, and this daemon turns a non-zero `alissa` exit into a SKIPPED
|
|
27
55
|
# decision, so sending a flag the CLI does not have costs a review.
|
|
28
56
|
|
|
29
|
-
# Statuses a LIVE review task can hold. Deliberately
|
|
30
|
-
# not a hand-written list: `is_review_task_for` already rejects every other
|
|
57
|
+
# Statuses a LIVE review task can hold. Deliberately derived from OPEN_STATUSES
|
|
58
|
+
# and not a hand-written list: `is_review_task_for` already rejects every other
|
|
31
59
|
# status client-side, so filtering server-side on exactly this set cannot change
|
|
32
60
|
# which task the daemon resolves -- it only stops shipping the rows over the
|
|
33
61
|
# wire. Any status added to `is_open` is added here by construction.
|
|
62
|
+
#
|
|
63
|
+
# The canonical guard below does not weaken that invariant, and is deliberately
|
|
64
|
+
# not an INTERSECTION with the canonical set, which would: an intersection makes
|
|
65
|
+
# the filter a strict subset of the open set the moment the two disagree, so the
|
|
66
|
+
# daemon would stop fetching rows `is_open` still accepts -- a skipped review,
|
|
67
|
+
# reported as an empty corpus. The whole derivation is kept or nothing is sent.
|
|
68
|
+
# Sending nothing degrades to the call the daemon has always made: wide, but
|
|
69
|
+
# complete, which is the direction every other failure on this path degrades in.
|
|
34
70
|
TASK_LIST_STATUS_FLAG = "--status"
|
|
35
|
-
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _status_filter(statuses: "set[str] | frozenset[str]") -> str:
|
|
74
|
+
"""The `--status` argument for `statuses`, or `""` when they cannot be one.
|
|
75
|
+
|
|
76
|
+
`""` means "do not narrow by status". It is returned for a set carrying any
|
|
77
|
+
non-canonical value, because such a value is not a filter the CLI serves
|
|
78
|
+
less precisely -- it is one the CLI refuses outright, taking the `--view`
|
|
79
|
+
and `--self` narrowing down with it and pinning this process to the
|
|
80
|
+
whole-corpus list (`list_tasks`). One wide call beats every call being wide.
|
|
81
|
+
|
|
82
|
+
Loud rather than silent: the condition is a code defect (a status added to
|
|
83
|
+
`OPEN_STATUSES` that Alissa cannot issue), and the tests pin against it, so
|
|
84
|
+
this is the last line rather than the first.
|
|
85
|
+
"""
|
|
86
|
+
unknown = sorted(set(statuses) - CANONICAL_TASK_STATUSES)
|
|
87
|
+
if unknown:
|
|
88
|
+
log.warning(
|
|
89
|
+
"not narrowing `alissa task list` by status: %s not canonical "
|
|
90
|
+
"Alissa status(es) -- the CLI rejects the whole call over one "
|
|
91
|
+
"unknown value, so this daemon lists the corpus unnarrowed",
|
|
92
|
+
", ".join(unknown),
|
|
93
|
+
)
|
|
94
|
+
return ""
|
|
95
|
+
return ",".join(sorted(statuses))
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
TASK_LIST_STATUS_FILTER = _status_filter(OPEN_STATUSES)
|
|
36
99
|
|
|
37
100
|
# `--self` drops the SPONSOR's corpus and keeps only the calling actor's rows.
|
|
38
101
|
#
|
|
@@ -375,7 +438,10 @@ class Alissa:
|
|
|
375
438
|
if self._task_list_narrowing_disabled:
|
|
376
439
|
return argv
|
|
377
440
|
flags = self.probe_task_list()
|
|
378
|
-
|
|
441
|
+
# An empty filter is not a filter: `_status_filter` answers `""` when
|
|
442
|
+
# the open set carries a status the CLI would reject, and sending
|
|
443
|
+
# `--status ""` would be that same rejected call with an extra step.
|
|
444
|
+
if flags.status and narrow_status and TASK_LIST_STATUS_FILTER:
|
|
379
445
|
argv += [TASK_LIST_STATUS_FLAG, TASK_LIST_STATUS_FILTER]
|
|
380
446
|
if flags.self_scope and self._task_list_self_scope:
|
|
381
447
|
argv.append(TASK_LIST_SELF_FLAG)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.22.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.21.0
|
|
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
|