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.
Files changed (23) hide show
  1. {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
  2. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/__main__.py +3 -1
  3. {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
  4. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/config.py +109 -56
  5. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/loop.py +49 -15
  6. alissa_tools_github_orcloop-0.3.5/src/main/alissa/tools/github/orcloop/version +1 -0
  7. {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
  8. alissa_tools_github_orcloop-0.3.3/src/main/alissa/tools/github/orcloop/version +0 -1
  9. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/MANIFEST.in +0 -0
  10. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/README.md +0 -0
  11. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/requirements.txt +0 -0
  12. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/setup.cfg +0 -0
  13. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/setup.py +0 -0
  14. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/__init__.py +0 -0
  15. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/ghclient.py +0 -0
  16. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/markers.py +0 -0
  17. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/proc.py +0 -0
  18. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/state.py +0 -0
  19. {alissa_tools_github_orcloop-0.3.3 → alissa_tools_github_orcloop-0.3.5}/src/main/alissa/tools/github/orcloop/version.py +0 -0
  20. {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
  21. {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
  22. {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
  23. {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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alissa-tools-github-orcloop
3
- Version: 0.3.3
3
+ Version: 0.3.5
4
4
  Summary: ALISSA-TOOLS-GITHUB-ORCLOOP
5
5
  Home-page: https://alissa.app
6
6
  Author: Fahera
@@ -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. When given, REPLACES the config "
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 dependsOn gate reads).
289
+ # The resolved upstream tasks (statuses the dependency gate reads).
258
290
  dependencies: tuple[Dependency, ...] = ()
259
- # len(dependsOn): may EXCEED len(dependencies) when an upstream is invisible
260
- # to this actor -- the gate treats that mismatch as "not provably clear".
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 dependsOn gate reads upstream statuses. `dependsOn` is the id
546
- # list; `upstreamTasks` is the resolved view (id/title/status). We key
547
- # the gate on the resolved statuses but remember the raw dependsOn
548
- # count so an upstream this actor cannot see (present in dependsOn,
549
- # absent from upstreamTasks) reads as "not provably clear".
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
- depends_on = task.get("dependsOn")
562
- depends_on_count = len(depends_on) if isinstance(depends_on, list) else 0
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
- REPOS SEPARATOR (O7). A repo list written as one string `ALISSA_ORC_REPOS`,
25
- a `--repo a/b|c/d` flag, or a single-element list in the config fileis split
26
- on **both `|` and `,`**, mixed freely. `|` is the daemon **family convention**
27
- (devloop's `ALISSA_DEV_REPOS` has always been pipe-separated); comma stays
28
- accepted for backward compatibility with every orcloop release up to 0.3.0.
29
- The convention matters because the operator points several Railway services at
30
- ONE list through a variable reference `ALISSA_ORC_REPOS=${{dev.ALISSA_DEV_REPOS}}`
31
- which only works if both daemons read the same separator. Entries are
32
- whitespace-stripped, empties from splitting are dropped (so a trailing
33
- separator is harmless), duplicates collapse, and each surviving entry must look
34
- like `owner/repo` (a bare word or a pasted URL is a fatal startup error naming
35
- the offending entry). An allowlist that is empty *after* parsing stays fatal —
36
- fail-closed is unchanged.
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. In an env value they are separator-delimited;
123
- # `repos` accepts the family's `|` as well as `,` (see REPO_SEPARATORS), every
124
- # other list key is comma-separated.
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 a one-string repo list may use, in preference order. `|` is the
128
- # daemon-family convention (devloop's ALISSA_DEV_REPOS), which is what lets one
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
- REPO_SEPARATORS = ("|", ",")
132
- _REPO_SPLIT_RE = re.compile("[" + re.escape("".join(REPO_SEPARATORS)) + "]")
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 split_repo_entries(raw: str) -> list[str]:
209
- """Split one repo-list string into entries on `|` and/or `,`.
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 env layer, the CLI
214
- flag, the config file, and the container's `render_config.py` all route
215
- through it, so no surface can end up accepting a different syntax.
216
-
217
- Splitting only — shape validation is `normalize_repos`, because the config
218
- file may also hand over an already-split JSON list.
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 _REPO_SPLIT_RE.split(raw) if (entry := part.strip())]
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 split_repo_entries(value):
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
- Entries are whitespace-stripped, empties dropped (so a trailing comma is
292
- harmless, matching `repos`), duplicates collapsed EXACTLY, with no
293
- casefolding, because actor ids are opaque: two spellings that differ in case
294
- are two different strings on the wire, and folding them would silently widen
295
- the match. Every survivor must look like an actor id.
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 = value.strip()
307
- if not entry:
308
- continue
309
- _validate_actor_id(entry)
310
- if entry not in seen:
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
- if offending:
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. Leave bow_owners unset to trust this token's own "
366
- f"actor, which needs no id at all."
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
- out[key] = tuple(
407
- item for part in raw.split(",") if (item := part.strip())
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. Ids are opaque and
469
- # compared EXACTLY (unlike `repos`, which casefolds GitHub names).
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 dependsOn gate**: a candidate is releasable only once every upstream
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). An upstream this actor cannot even see counts
37
- as not-clear -- the gate is conservative.
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 dependsOn gate: an upstream task is "clear" (no longer holding 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
- Vacuously true with no dependencies. Conservative on partial visibility: if
501
- the resolved `dependencies` are fewer than the raw `depends_on_count`, some
502
- upstream is invisible to this actor and the gate must NOT pass on the ones
503
- it can see -- an unfinished-but-hidden dependency would otherwise leak."""
504
- if task.depends_on_count == 0:
505
- return True
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 dependsOn gate holds. Below the floor this is a quiet per-poll
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
- deps = ", ".join(f"{d.ref}={d.status or '?'}" for d in task.dependencies) or (
1308
- f"{task.depends_on_count} dependency(ies) not visible to this actor"
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alissa-tools-github-orcloop
3
- Version: 0.3.3
3
+ Version: 0.3.5
4
4
  Summary: ALISSA-TOOLS-GITHUB-ORCLOOP
5
5
  Home-page: https://alissa.app
6
6
  Author: Fahera