alissa-tools-github-orcloop 0.3.3__tar.gz → 0.3.5__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_orcloop-0.3.3/src/main/alissa_tools_github_orcloop.egg-info → alissa_tools_github_orcloop-0.3.5}/PKG-INFO +1 -1
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/__main__.py +3 -1
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/alissa_client.py +71 -10
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/config.py +109 -56
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/loop.py +49 -15
- alissa_tools_github_orcloop-0.3.5/src/main/alissa/tools/github/orcloop/version +1 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5/src/main/alissa_tools_github_orcloop.egg-info}/PKG-INFO +1 -1
- alissa_tools_github_orcloop-0.3.3/src/main/alissa/tools/github/orcloop/version +0 -1
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/MANIFEST.in +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/README.md +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/requirements.txt +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/setup.cfg +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/setup.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/__init__.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/ghclient.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/markers.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/proc.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/state.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/version.py +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa_tools_github_orcloop.egg-info/SOURCES.txt +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa_tools_github_orcloop.egg-info/dependency_links.txt +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa_tools_github_orcloop.egg-info/entry_points.txt +0 -0
- {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa_tools_github_orcloop.egg-info/top_level.txt +0 -0
|
@@ -126,7 +126,9 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
126
126
|
action="append",
|
|
127
127
|
metavar="ACTOR_ID",
|
|
128
128
|
help="bow feed only: trust bodies of work OWNED by this Alissa actor "
|
|
129
|
-
"as release feeds; repeatable
|
|
129
|
+
"as release feeds; repeatable, and one flag may carry several ids "
|
|
130
|
+
"separated by `|` (the daemon-family convention) or `,`, the same as "
|
|
131
|
+
"--repo. When given, REPLACES the config "
|
|
130
132
|
"`bow_owners` list. OPTIONAL — left unset, the daemon resolves its own "
|
|
131
133
|
"token's actor at boot and trusts only its own containers; give this "
|
|
132
134
|
"flag only when the containers belong to someone else. Being SHARED a "
|
|
@@ -95,6 +95,38 @@ Body of Work (otherwise 403 ``FORBIDDEN`` on attach/detach) -- an operator setup
|
|
|
95
95
|
step, documented in the README. orcloop never attaches: attaching is the
|
|
96
96
|
operator's trigger, detaching is orcloop's terminal release act.
|
|
97
97
|
|
|
98
|
+
THE DEPENDENCY GATE'S DECLARED COUNT (O10)
|
|
99
|
+
==========================================
|
|
100
|
+
A task detail declares its dependencies in **two** arrays, not one, and the
|
|
101
|
+
split is by dependency TYPE -- verified live against ``api.alissa.app`` while
|
|
102
|
+
implementing issue #26:
|
|
103
|
+
|
|
104
|
+
* ``dependsOn`` -- the ids of the **soft**-typed dependencies.
|
|
105
|
+
* ``hardDependsOn`` -- the ids of the **hard**-typed ones (key ABSENT, not
|
|
106
|
+
empty, when there are none).
|
|
107
|
+
* ``upstreamTasks`` -- the RESOLVED view of both, deduplicated, soft rows
|
|
108
|
+
first. There is no ``softDependsOn``.
|
|
109
|
+
|
|
110
|
+
Reading only ``dependsOn`` -- which is what shipped from O2 through O9 -- sized
|
|
111
|
+
the gate off the soft dependencies alone, so a task blocked purely by hard ones
|
|
112
|
+
declared zero and released (the O4 dry-run finding, repo issue #11 -> #26). The
|
|
113
|
+
count is now the size of the **union of the two id sets**.
|
|
114
|
+
|
|
115
|
+
Why the union of ids and not ``len(upstreamTasks)``, the other option the issue
|
|
116
|
+
offered: ``upstreamTasks`` is the resolved list, so counting it makes
|
|
117
|
+
``loop.dependencies_clear``'s visibility guard (`resolved != declared`)
|
|
118
|
+
tautologically true and an upstream this actor cannot see disappears from the
|
|
119
|
+
gate entirely -- trading one silent release for another. The declared ids are
|
|
120
|
+
the only count that comes from a source the actor's visibility cannot shrink.
|
|
121
|
+
|
|
122
|
+
Why a SET union and not the sum of the two lengths: the same upstream can be
|
|
123
|
+
linked BOTH ways (verified live -- the API accepts a second link of the other
|
|
124
|
+
type and lists that one id in both arrays), while ``upstreamTasks`` reports it
|
|
125
|
+
once. Summing would declare 2 against 1 resolved, and the conservative guard
|
|
126
|
+
would then hold a task whose only dependency is fully validated -- forever,
|
|
127
|
+
eventually paging ``release-blocked``. Deduplicating matches what the resolved
|
|
128
|
+
view actually does.
|
|
129
|
+
|
|
98
130
|
WHO AM I (O8)
|
|
99
131
|
=============
|
|
100
132
|
``GET /v1/ping`` -- ``{"pong", "timestamp", "userId", "actorId",
|
|
@@ -254,10 +286,12 @@ class Task:
|
|
|
254
286
|
criteria: tuple[Criterion, ...]
|
|
255
287
|
priority: str = ""
|
|
256
288
|
created_at: int = 0 # ms since epoch; 0 when the payload omits createdAt
|
|
257
|
-
# The resolved upstream tasks (statuses the
|
|
289
|
+
# The resolved upstream tasks (statuses the dependency gate reads).
|
|
258
290
|
dependencies: tuple[Dependency, ...] = ()
|
|
259
|
-
#
|
|
260
|
-
#
|
|
291
|
+
# How many dependencies the payload DECLARES: |dependsOn ∪ hardDependsOn|,
|
|
292
|
+
# both types, deduplicated (see the module docstring, O10). May EXCEED
|
|
293
|
+
# len(dependencies) when an upstream is invisible to this actor -- the gate
|
|
294
|
+
# treats that mismatch as "not provably clear".
|
|
261
295
|
depends_on_count: int = 0
|
|
262
296
|
|
|
263
297
|
|
|
@@ -542,11 +576,14 @@ class AlissaClient:
|
|
|
542
576
|
)
|
|
543
577
|
)
|
|
544
578
|
|
|
545
|
-
# The
|
|
546
|
-
#
|
|
547
|
-
# the
|
|
548
|
-
#
|
|
549
|
-
# absent from upstreamTasks) reads as "not
|
|
579
|
+
# The dependency gate reads upstream statuses. `dependsOn` (soft) and
|
|
580
|
+
# `hardDependsOn` (hard) are the declared id lists; `upstreamTasks` is
|
|
581
|
+
# the resolved view of BOTH (id/title/status). We key the gate on the
|
|
582
|
+
# resolved statuses but remember the declared count so an upstream this
|
|
583
|
+
# actor cannot see (declared, absent from upstreamTasks) reads as "not
|
|
584
|
+
# provably clear". Both arrays are counted, deduplicated -- see the
|
|
585
|
+
# module docstring for why neither `len(upstreamTasks)` nor a plain sum
|
|
586
|
+
# of the two lengths is the right size.
|
|
550
587
|
dependencies: list[Dependency] = []
|
|
551
588
|
for up in task.get("upstreamTasks") or []:
|
|
552
589
|
if not isinstance(up, dict):
|
|
@@ -558,8 +595,32 @@ class AlissaClient:
|
|
|
558
595
|
else str(up.get("_id") or "")
|
|
559
596
|
)
|
|
560
597
|
dependencies.append(Dependency(ref=up_ref, status=up.get("status") or ""))
|
|
561
|
-
|
|
562
|
-
|
|
598
|
+
declared: set[str] = set()
|
|
599
|
+
unrecognised = 0
|
|
600
|
+
for raw in (task.get("dependsOn"), task.get("hardDependsOn")):
|
|
601
|
+
if not isinstance(raw, list):
|
|
602
|
+
continue # absent (the common case for hardDependsOn) or junk
|
|
603
|
+
for entry in raw:
|
|
604
|
+
if isinstance(entry, str):
|
|
605
|
+
declared.add(entry)
|
|
606
|
+
continue
|
|
607
|
+
# These arrays hold bare id strings today, but they could grow
|
|
608
|
+
# into objects the way `upstreamTasks` already is -- so take the
|
|
609
|
+
# id when there is one, using the same extraction as the loop
|
|
610
|
+
# above. Counting an id we DID parse as unknown would inflate
|
|
611
|
+
# the declared count past the resolved one and hold a finished
|
|
612
|
+
# dependency forever, which is the very outcome the module
|
|
613
|
+
# docstring gives for rejecting a plain sum of the two lengths.
|
|
614
|
+
entry_id = entry.get("_id") if isinstance(entry, dict) else None
|
|
615
|
+
if isinstance(entry_id, str) and entry_id:
|
|
616
|
+
declared.add(entry_id)
|
|
617
|
+
else:
|
|
618
|
+
# Nothing parseable. DROPPING it would shrink the declared
|
|
619
|
+
# count -- exactly the failure this whole change is about --
|
|
620
|
+
# so count it: over-counting only holds the release, and it
|
|
621
|
+
# cannot be deduplicated against anything anyway.
|
|
622
|
+
unrecognised += 1
|
|
623
|
+
depends_on_count = len(declared) + unrecognised
|
|
563
624
|
|
|
564
625
|
created_raw = task.get("createdAt")
|
|
565
626
|
created_at = int(created_raw) if isinstance(created_raw, (int, float)) else 0
|
|
@@ -21,19 +21,36 @@ watch nothing, but boot anyway), an empty orcloop allowlist is **fatal at
|
|
|
21
21
|
startup** — the orchestrator releases work into `alissa:develop` issues and
|
|
22
22
|
closes the loop on merge, so it never runs against an unbounded repo set.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
LIST SEPARATORS (O7, O11). **Every** list-valued key parses the same way. A
|
|
25
|
+
list written as one string — `ALISSA_ORC_REPOS`, `ALISSA_ORC_BOW_OWNERS`, a
|
|
26
|
+
`--repo a/b|c/d` flag, or a single element of the config file's list — is split
|
|
27
|
+
on **both `|` and `,`**, mixed freely, by the one shared splitter
|
|
28
|
+
(`split_entries`). `|` is the daemon **family convention** (devloop's
|
|
29
|
+
`ALISSA_DEV_REPOS` has always been pipe-separated); comma stays accepted for
|
|
30
|
+
backward compatibility with every orcloop release up to 0.3.0. The convention
|
|
31
|
+
matters because the operator points several Railway services at ONE list
|
|
32
|
+
through a variable reference —
|
|
33
|
+
`ALISSA_ORC_REPOS=${{dev.ALISSA_DEV_REPOS}}` — which only works if both daemons
|
|
34
|
+
read the same separator. Entries are whitespace-stripped, empties from
|
|
35
|
+
splitting are dropped (so a trailing separator is harmless), and duplicates
|
|
36
|
+
collapse.
|
|
37
|
+
|
|
38
|
+
What differs per key is the SHAPE check and what an empty result means — never
|
|
39
|
+
the syntax:
|
|
40
|
+
|
|
41
|
+
* `repos` entries must look like `owner/repo` (a bare word or a pasted URL is a
|
|
42
|
+
fatal startup error naming the offending entry), and an allowlist that is
|
|
43
|
+
empty *after* parsing stays fatal — fail-closed is unchanged.
|
|
44
|
+
* `bow_owners` entries must look like an Alissa actor id (see below), and an
|
|
45
|
+
empty result means "not overridden", not "trust everyone" (see FEED
|
|
46
|
+
AUTHORITY).
|
|
47
|
+
|
|
48
|
+
That the two keys once disagreed is the defect O11 closed: through 0.3.4
|
|
49
|
+
`bow_owners` split on `,` only, so an operator following the documented
|
|
50
|
+
convention got a single entry containing a `|`. Since 0.3.2's shape check that
|
|
51
|
+
at least aborted startup, but phrased as though a username had been typed;
|
|
52
|
+
before it, the entry simply matched no actor and the fail-closed feed released
|
|
53
|
+
nothing at all. Both are why the splitter is shared rather than copied.
|
|
37
54
|
|
|
38
55
|
The marker contract (`Autonomous-Dev` / `Autonomous-Scope` issue-body
|
|
39
56
|
trailers) is parsed in `markers.py`; the keys that name those trailers live
|
|
@@ -119,17 +136,17 @@ RELEASE_FEEDS = (FEED_SCAN, FEED_BOW)
|
|
|
119
136
|
# Keys carrying a boolean; env strings for these need real parsing (bool("false")
|
|
120
137
|
# is True, which would silently invert the setting).
|
|
121
138
|
_BOOL_KEYS = frozenset({"dry_run", "close_loop_enabled"})
|
|
122
|
-
# Keys carrying a list of strings.
|
|
123
|
-
#
|
|
124
|
-
#
|
|
139
|
+
# Keys carrying a list of strings. Every one of them is separator-delimited when
|
|
140
|
+
# it arrives as a single string, with the SAME separators (see LIST_SEPARATORS
|
|
141
|
+
# and `split_entries`) — a per-key syntax is exactly the drift O11 removed.
|
|
125
142
|
_LIST_KEYS = frozenset({"repos", "bow_owners"})
|
|
126
143
|
|
|
127
|
-
# The separators
|
|
128
|
-
# daemon-family convention (devloop's ALISSA_DEV_REPOS), which is what lets
|
|
129
|
-
# Railway variable reference feed both daemons; `,` is what orcloop shipped
|
|
144
|
+
# The separators any one-string list value may use, in preference order. `|` is
|
|
145
|
+
# the daemon-family convention (devloop's ALISSA_DEV_REPOS), which is what lets
|
|
146
|
+
# one Railway variable reference feed both daemons; `,` is what orcloop shipped
|
|
130
147
|
# through 0.3.0 and stays accepted. Mixing them in one value is fine.
|
|
131
|
-
|
|
132
|
-
|
|
148
|
+
LIST_SEPARATORS = ("|", ",")
|
|
149
|
+
_LIST_SPLIT_RE = re.compile("[" + re.escape("".join(LIST_SEPARATORS)) + "]")
|
|
133
150
|
|
|
134
151
|
# What an allowlist entry must look like once split: exactly one `/`, a GitHub
|
|
135
152
|
# owner (alphanumerics and hyphens, not leading/trailing) and a repo name
|
|
@@ -205,19 +222,41 @@ def _string_list(value: Any, key: str) -> tuple[str, ...]:
|
|
|
205
222
|
return tuple(value)
|
|
206
223
|
|
|
207
224
|
|
|
208
|
-
def
|
|
209
|
-
"""Split one
|
|
225
|
+
def split_entries(raw: str) -> list[str]:
|
|
226
|
+
"""Split one list-valued string into entries on `|` and/or `,`.
|
|
210
227
|
|
|
211
228
|
Whitespace around an entry is stripped and empties are dropped, so a
|
|
212
229
|
trailing separator, a doubled one, and `a/b | c/d` all behave. This is the
|
|
213
|
-
ONE place the separator set is applied: the library's
|
|
214
|
-
|
|
215
|
-
through it, so
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
230
|
+
ONE place the separator set is applied, for EVERY list key: the library's
|
|
231
|
+
env layer, the CLI flags, the config file, and the container's
|
|
232
|
+
`render_config.py` all route through it, so neither a surface nor a key can
|
|
233
|
+
end up accepting a different syntax (through 0.3.4 `bow_owners` did — see
|
|
234
|
+
the module docstring).
|
|
235
|
+
|
|
236
|
+
Splitting only — the per-key shape check is `normalize_repos` /
|
|
237
|
+
`normalize_bow_owners`, because the config file may also hand over an
|
|
238
|
+
already-split JSON list.
|
|
219
239
|
"""
|
|
220
|
-
return [entry for part in
|
|
240
|
+
return [entry for part in _LIST_SPLIT_RE.split(raw) if (entry := part.strip())]
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
# The 0.3.1-0.3.4 name, kept as an alias rather than deleted. The container's
|
|
244
|
+
# `render_config.py` resolves the splitter through `getattr(cfg, ...)` so that a
|
|
245
|
+
# dist too OLD to carry it dies naming it; an image built from an older
|
|
246
|
+
# docker/claude directory against a NEWER dist would hit that same branch on a
|
|
247
|
+
# pure rename and be told its library is too old, which is both false and the
|
|
248
|
+
# opposite of the fix. One line keeps that message honest. New code uses
|
|
249
|
+
# `split_entries`; there is no second implementation to drift.
|
|
250
|
+
#
|
|
251
|
+
# `REPO_SEPARATORS` — the constant renamed in the same release — deliberately
|
|
252
|
+
# gets NO alias, because the two names fail differently. The function is
|
|
253
|
+
# resolved dynamically, so a missing one produces a MISDIRECTING message; the
|
|
254
|
+
# constant was never resolved at runtime by any shipped renderer (0.3.1-0.3.4
|
|
255
|
+
# only name it in a comment), so a stale import of it is an ImportError naming
|
|
256
|
+
# the symbol — loud and self-explanatory. There is no lie for an alias to
|
|
257
|
+
# prevent there, and a `REPO_*` name for a list-neutral concept would invite the
|
|
258
|
+
# next reader straight back into the drift this release closed.
|
|
259
|
+
split_repo_entries = split_entries
|
|
221
260
|
|
|
222
261
|
|
|
223
262
|
def normalize_repos(values: tuple[str, ...] | list[str]) -> tuple[str, ...]:
|
|
@@ -236,7 +275,7 @@ def normalize_repos(values: tuple[str, ...] | list[str]) -> tuple[str, ...]:
|
|
|
236
275
|
out: list[str] = []
|
|
237
276
|
seen: set[str] = set()
|
|
238
277
|
for value in values:
|
|
239
|
-
for entry in
|
|
278
|
+
for entry in split_entries(value):
|
|
240
279
|
_validate_repo_entry(entry)
|
|
241
280
|
if (key := entry.casefold()) not in seen:
|
|
242
281
|
seen.add(key)
|
|
@@ -288,11 +327,14 @@ def _validate_repo_entry(entry: str) -> None:
|
|
|
288
327
|
def normalize_bow_owners(values: tuple[str, ...] | list[str]) -> tuple[str, ...]:
|
|
289
328
|
"""Turn the raw `bow_owners` layer value into the validated authority list.
|
|
290
329
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
330
|
+
Parsed EXACTLY like `repos`, through the same `split_entries`: an element
|
|
331
|
+
may itself carry a whole `|`- and/or `,`-separated list (that is what
|
|
332
|
+
`ALISSA_ORC_BOW_OWNERS` and a Railway variable reference look like),
|
|
333
|
+
whitespace is stripped and empties dropped, so a trailing separator is
|
|
334
|
+
harmless. Duplicates collapse EXACTLY, with no casefolding — unlike `repos`,
|
|
335
|
+
because actor ids are opaque: two spellings that differ in case are two
|
|
336
|
+
different strings on the wire, and folding them would silently widen the
|
|
337
|
+
match. Every survivor must look like an actor id.
|
|
296
338
|
|
|
297
339
|
Emptiness is fine here and means "not overridden": the boot path resolves
|
|
298
340
|
the authority to this token's own actor (see the module docstring). There is
|
|
@@ -303,13 +345,11 @@ def normalize_bow_owners(values: tuple[str, ...] | list[str]) -> tuple[str, ...]
|
|
|
303
345
|
out: list[str] = []
|
|
304
346
|
seen: set[str] = set()
|
|
305
347
|
for value in values:
|
|
306
|
-
entry
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
seen.add(entry)
|
|
312
|
-
out.append(entry)
|
|
348
|
+
for entry in split_entries(value):
|
|
349
|
+
_validate_actor_id(entry)
|
|
350
|
+
if entry not in seen:
|
|
351
|
+
seen.add(entry)
|
|
352
|
+
out.append(entry)
|
|
313
353
|
return tuple(out)
|
|
314
354
|
|
|
315
355
|
|
|
@@ -353,7 +393,18 @@ def _validate_actor_id(entry: str) -> None:
|
|
|
353
393
|
f"it contains {offending!r}, which no actor id does"
|
|
354
394
|
)
|
|
355
395
|
hint = " — " + " and ".join(problems)
|
|
356
|
-
|
|
396
|
+
parts = entry.split()
|
|
397
|
+
if len(parts) > 1 and all(_ACTOR_ID_RE.match(part) for part in parts):
|
|
398
|
+
# Splitting has already run, so an entry that STILL holds whitespace
|
|
399
|
+
# was never separated at all. Say so ONLY when every part is itself
|
|
400
|
+
# an id, which is the only evidence that this is two ids and not a
|
|
401
|
+
# display name: "Alissa Code PR Review" also contains spaces, and
|
|
402
|
+
# telling its author to fix their separator loses the hint below —
|
|
403
|
+
# the diagnostic O8 added, in the change that is about diagnostics.
|
|
404
|
+
# A mixed `<id> not-an-id` falls through here on purpose: that
|
|
405
|
+
# operator's problem is the entry, not the separator.
|
|
406
|
+
hint += "; separate several ids with `|` or `,`, not a space"
|
|
407
|
+
elif offending:
|
|
357
408
|
hint += "; that looks like a username or a display name"
|
|
358
409
|
raise ValueError(
|
|
359
410
|
f"bow_owners entry {entry!r} is not an Alissa actor id{hint}. Use the "
|
|
@@ -362,8 +413,9 @@ def _validate_actor_id(entry: str) -> None:
|
|
|
362
413
|
f"username or display name: names are renameable, so an ownership "
|
|
363
414
|
f"check against one is a spoof surface, and since no id on the wire "
|
|
364
415
|
f"ever equals a name it would fail as a silently empty feed rather "
|
|
365
|
-
f"than an error.
|
|
366
|
-
f"
|
|
416
|
+
f"than an error. Several ids are separated by `|` (the daemon-family "
|
|
417
|
+
f"convention) or `,`, the same as repos. Leave bow_owners unset to "
|
|
418
|
+
f"trust this token's own actor, which needs no id at all."
|
|
367
419
|
)
|
|
368
420
|
|
|
369
421
|
|
|
@@ -397,15 +449,13 @@ def env_overrides(environ: Mapping[str, str] | None = None) -> dict[str, Any]:
|
|
|
397
449
|
raw = env[env_name]
|
|
398
450
|
if key in _BOOL_KEYS:
|
|
399
451
|
out[key] = _env_bool(env_name, raw)
|
|
400
|
-
elif key == "repos":
|
|
401
|
-
# Separator-tolerant (`|` and `,`); shape-validated in `build`
|
|
402
|
-
# alongside the file and CLI layers, so one bad entry reports the
|
|
403
|
-
# same way wherever it came from.
|
|
404
|
-
out[key] = tuple(split_repo_entries(raw))
|
|
405
452
|
elif key in _LIST_KEYS:
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
453
|
+
# ONE branch for every list key, separator-tolerant (`|` and `,`).
|
|
454
|
+
# `repos` had its own until 0.3.4 while the rest split on `,` alone,
|
|
455
|
+
# which is precisely how the two syntaxes drifted apart. Shape is
|
|
456
|
+
# validated in `build` alongside the file and CLI layers, so one bad
|
|
457
|
+
# entry reports the same way wherever it came from.
|
|
458
|
+
out[key] = tuple(split_entries(raw))
|
|
409
459
|
else:
|
|
410
460
|
out[key] = raw
|
|
411
461
|
return out
|
|
@@ -465,8 +515,11 @@ class Config:
|
|
|
465
515
|
# allowed to OWN a feed container. The title tells the daemon which repo a
|
|
466
516
|
# container targets; it says nothing about who created it, and the daemon
|
|
467
517
|
# lists containers it merely collaborates on, which anyone in the tenant can
|
|
468
|
-
# arrange unilaterally. So provenance is decided here.
|
|
469
|
-
#
|
|
518
|
+
# arrange unilaterally. So provenance is decided here. Entries reach `build`
|
|
519
|
+
# as `|`- and/or `,`-separated text from any layer, exactly like `repos`, and
|
|
520
|
+
# land here split, shape-checked and de-duplicated — but de-duplicated
|
|
521
|
+
# EXACTLY: ids are opaque, so unlike `repos` (case-insensitive GitHub names)
|
|
522
|
+
# nothing here is casefolded, in the comparison or in the collapse.
|
|
470
523
|
#
|
|
471
524
|
# Empty means "not overridden", NOT "trust everyone": the boot path resolves
|
|
472
525
|
# it to this token's own actor and dies if it cannot (O8), and until it does
|
|
@@ -31,10 +31,12 @@ issues the develop daemon can pick up:
|
|
|
31
31
|
open unlabeled trailer match is ADOPTED (ledger row + label, never a
|
|
32
32
|
second issue), an open labeled one is skipped, a closed one follows the
|
|
33
33
|
closed-match rule below. A check that cannot answer holds the release.
|
|
34
|
-
* **The
|
|
34
|
+
* **The dependency gate**: a candidate is releasable only once every upstream
|
|
35
35
|
task it depends on is `pending_validation` or `validated` (an unfinished
|
|
36
|
-
dependency holds the release).
|
|
37
|
-
|
|
36
|
+
dependency holds the release). BOTH dependency types count -- soft
|
|
37
|
+
(`dependsOn`) and hard (`hardDependsOn`); see `dependencies_clear` and the
|
|
38
|
+
declared-count rationale in `alissa_client`. An upstream this actor cannot
|
|
39
|
+
even see counts as not-clear -- the gate is conservative.
|
|
38
40
|
* **Per-repo lane occupancy** bounds how much autonomous work runs at once in
|
|
39
41
|
one repo: at most `repo_parallelism` in-flight released issues, AND -- when
|
|
40
42
|
parallelism > 1 -- their `Autonomous-Scope` globs must be pairwise disjoint
|
|
@@ -245,8 +247,9 @@ from .state import State
|
|
|
245
247
|
|
|
246
248
|
log = logging.getLogger(__name__)
|
|
247
249
|
|
|
248
|
-
# The
|
|
249
|
-
# release) once it has reached validation. Anything earlier holds.
|
|
250
|
+
# The dependency gate: an upstream task is "clear" (no longer holding the
|
|
251
|
+
# release) once it has reached validation. Anything earlier holds. The type of
|
|
252
|
+
# the dependency (soft/hard) does not enter here -- both hold identically.
|
|
250
253
|
DEP_CLEAR_STATES = frozenset({"pending_validation", "validated"})
|
|
251
254
|
|
|
252
255
|
# The close edge only mutates a task it left `committed` (or one mid-transition
|
|
@@ -497,12 +500,27 @@ def priority_rank(priority: str) -> int:
|
|
|
497
500
|
def dependencies_clear(task: Task) -> bool:
|
|
498
501
|
"""Whether every dependency of `task` has reached validation.
|
|
499
502
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
503
|
+
Two conditions, in this order, and the order is the whole point:
|
|
504
|
+
|
|
505
|
+
1. The declared count must match what was RESOLVED. `depends_on_count` is
|
|
506
|
+
what the payload declared (soft + hard, deduplicated); `dependencies` is
|
|
507
|
+
what came back resolved. Fewer resolved means an upstream is invisible to
|
|
508
|
+
this actor, and the gate must NOT pass on the ones it can see -- an
|
|
509
|
+
unfinished-but-hidden dependency would otherwise leak.
|
|
510
|
+
2. Every resolved upstream must have reached validation.
|
|
511
|
+
|
|
512
|
+
Vacuously true with no dependencies: 0 declared and 0 resolved match, and
|
|
513
|
+
`all()` over an empty tuple is True. That is deliberately reached THROUGH
|
|
514
|
+
the visibility guard rather than by an `if depends_on_count == 0: return
|
|
515
|
+
True` shortcut ahead of it, which is what made this function release a task
|
|
516
|
+
whose only blockers were hard dependencies (issue #26): `dependsOn` held the
|
|
517
|
+
soft ids only, so a hard-only task declared zero and took the shortcut --
|
|
518
|
+
while `upstreamTasks`, and therefore `dependencies`, listed the blocker the
|
|
519
|
+
whole time. The declared count is fixed in `alissa_client.get_task`; the
|
|
520
|
+
shortcut is gone from here so that a count that ever again understates
|
|
521
|
+
reality is HELD by the mismatch instead of waved through. Do not reintroduce
|
|
522
|
+
an early return above the guard.
|
|
523
|
+
"""
|
|
506
524
|
if len(task.dependencies) != task.depends_on_count:
|
|
507
525
|
return False
|
|
508
526
|
return all(dep.status in DEP_CLEAR_STATES for dep in task.dependencies)
|
|
@@ -1299,14 +1317,30 @@ class Orchestrator:
|
|
|
1299
1317
|
return self._release(task, target, scope, occupancy, bow=bow)
|
|
1300
1318
|
|
|
1301
1319
|
def _release_blocked(self, task: Task) -> tuple[str, Decision]:
|
|
1302
|
-
"""The
|
|
1320
|
+
"""The dependency gate holds. Below the floor this is a quiet per-poll
|
|
1303
1321
|
hold; past `release_blocked_floor_days` (measured on the task's own age)
|
|
1304
1322
|
it pages the operator once. `created_at` is ms since epoch; a task with
|
|
1305
1323
|
no timestamp (created_at 0) is treated as old enough to page, so a stuck
|
|
1306
1324
|
release is never silent forever."""
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1325
|
+
parts = [f"{d.ref}={d.status or '?'}" for d in task.dependencies]
|
|
1326
|
+
hidden = task.depends_on_count - len(task.dependencies)
|
|
1327
|
+
if hidden > 0:
|
|
1328
|
+
# Report the invisible remainder ALONGSIDE the resolved ones: a
|
|
1329
|
+
# partially-visible task holds on something the operator cannot see
|
|
1330
|
+
# in the list, and naming only the resolved deps reads as "these are
|
|
1331
|
+
# all of them" when it is precisely the missing one doing the hold.
|
|
1332
|
+
# When NOTHING resolved there is no list to be a remainder OF, and
|
|
1333
|
+
# "3 more" would be more than what -- so that shape keeps its own
|
|
1334
|
+
# count-only wording. This string goes onto the `release-blocked`
|
|
1335
|
+
# page an operator reads to decide what to unblock.
|
|
1336
|
+
parts.append(
|
|
1337
|
+
f"{hidden} more not visible to this actor" if parts
|
|
1338
|
+
else f"{hidden} dependency(ies) not visible to this actor"
|
|
1339
|
+
)
|
|
1340
|
+
# `parts` is never empty here: this runs only after `dependencies_clear`
|
|
1341
|
+
# returned False, which needs either a count mismatch (hidden > 0,
|
|
1342
|
+
# handled just above) or a resolved dep that has not validated.
|
|
1343
|
+
deps = ", ".join(parts)
|
|
1310
1344
|
floor_seconds = self.config.release_blocked_floor_days * 86400
|
|
1311
1345
|
age_seconds = self._now() - (task.created_at / 1000.0 if task.created_at else 0.0)
|
|
1312
1346
|
if age_seconds >= floor_seconds:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.3.3
|
|
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
|