dkitchen 0.2.0__tar.gz → 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkitchen
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A multi-agent workflow for research repos, with the ding CLI for messaging and waking agent sessions
5
5
  Author: 917Dhj
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dkitchen"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "A multi-agent workflow for research repos, with the ding CLI for messaging and waking agent sessions"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -61,14 +61,16 @@ def issue_number(url: str) -> int:
61
61
 
62
62
 
63
63
  def role(body: str, config: Config) -> str:
64
- """The executor by its session line; otherwise the station named at the start of the first line; else the user."""
64
+ """The station named at the start of the first line; otherwise the executor by a line starting with its
65
+ session signature; else the user. A session signature quoted inside a line signs nothing."""
65
66
  stations = config.stations
66
- if "Codex session:" in body:
67
- return stations.executor
68
67
  first = next((line for line in body.splitlines() if line.strip()), "")
69
68
  first = re.sub(r"^[\s#*>]+", "", first)
70
- return next((name for name in (stations.designer, stations.verifier, stations.orchestrator)
71
- if first.startswith(name)), stations.user)
69
+ signed = next((name for name in (stations.designer, stations.verifier, stations.orchestrator)
70
+ if first.startswith(name)), None)
71
+ if signed:
72
+ return signed
73
+ return stations.executor if re.search(r"(?m)^[ \t]*Codex session:", body) else stations.user
72
74
 
73
75
 
74
76
  def fields(body: str, config: Config) -> dict[str, str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkitchen
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A multi-agent workflow for research repos, with the ding CLI for messaging and waking agent sessions
5
5
  Author: 917Dhj
6
6
  License-Expression: MIT
@@ -279,3 +279,14 @@ def test_log_issue_must_be_positive(capsys):
279
279
  with pytest.raises(SystemExit) as exc:
280
280
  ding.main(["log", "--item", "a", "--issue", "0"])
281
281
  assert exc.value.code == 2
282
+
283
+
284
+ @pytest.mark.parametrize("text", [None, CHINESE])
285
+ def test_a_quoted_session_signature_signs_nothing(tmp_path, text):
286
+ loaded = settings(tmp_path, text)
287
+ stations = loaded.stations
288
+ verifier = (f"## {stations.verifier}{stations.separator}#272 run request check\n\n"
289
+ "| request body | ok: it starts with the status block and contains `Codex session:` |\n")
290
+ assert watch.role(verifier, loaded) == stations.verifier
291
+ assert watch.role("I checked it; the body has `Codex session:` in it.", loaded) == stations.user
292
+ assert watch.role(executor("Status: done\nWaiting on: none\nKey numbers: 1\nNext: merge"), loaded) == stations.executor
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes