plotroom 0.1.0__py3-none-any.whl
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.
- plotroom/__init__.py +0 -0
- plotroom/__main__.py +8 -0
- plotroom/_secret_file.py +8 -0
- plotroom/adapters/__init__.py +0 -0
- plotroom/adapters/claude_desktop.py +219 -0
- plotroom/adapters/embedding_http.py +175 -0
- plotroom/adapters/github/__init__.py +337 -0
- plotroom/adapters/github/app_credential.py +209 -0
- plotroom/adapters/github/ci.py +738 -0
- plotroom/adapters/github/commit_statuses.py +63 -0
- plotroom/adapters/github/deployments.py +213 -0
- plotroom/adapters/github/details.py +867 -0
- plotroom/adapters/github/issue_details.py +368 -0
- plotroom/adapters/github/junit.py +210 -0
- plotroom/adapters/github/junit_xml.py +162 -0
- plotroom/adapters/github/kodus_review.py +347 -0
- plotroom/adapters/github/pr_details.py +192 -0
- plotroom/adapters/github/pull_comparison.py +108 -0
- plotroom/adapters/github/read.py +530 -0
- plotroom/adapters/github/ticket_tree.py +336 -0
- plotroom/adapters/mcp/__init__.py +5 -0
- plotroom/adapters/mcp/proxy.py +722 -0
- plotroom/adapters/mcp/server.py +931 -0
- plotroom/adapters/openrouter.py +151 -0
- plotroom/adapters/store_sqlite/__init__.py +6 -0
- plotroom/adapters/store_sqlite/actions_sql.py +148 -0
- plotroom/adapters/store_sqlite/asks_sql.py +153 -0
- plotroom/adapters/store_sqlite/backfill_sql.py +138 -0
- plotroom/adapters/store_sqlite/budgets_sql.py +102 -0
- plotroom/adapters/store_sqlite/checklists_sql.py +77 -0
- plotroom/adapters/store_sqlite/claims_sql.py +54 -0
- plotroom/adapters/store_sqlite/embedding_sql.py +275 -0
- plotroom/adapters/store_sqlite/github_sql.py +331 -0
- plotroom/adapters/store_sqlite/goals_sql.py +57 -0
- plotroom/adapters/store_sqlite/human_queue_sql.py +60 -0
- plotroom/adapters/store_sqlite/items_sql.py +129 -0
- plotroom/adapters/store_sqlite/lanes_sql.py +85 -0
- plotroom/adapters/store_sqlite/ledger_sql.py +506 -0
- plotroom/adapters/store_sqlite/migrate.py +194 -0
- plotroom/adapters/store_sqlite/migrations/env.py +36 -0
- plotroom/adapters/store_sqlite/migrations/script.py.mako +19 -0
- plotroom/adapters/store_sqlite/migrations/versions/0001_project_meta.py +23 -0
- plotroom/adapters/store_sqlite/migrations/versions/0002_event_log.py +40 -0
- plotroom/adapters/store_sqlite/migrations/versions/0003_next_items.py +49 -0
- plotroom/adapters/store_sqlite/migrations/versions/0004_actions.py +28 -0
- plotroom/adapters/store_sqlite/migrations/versions/0005_lanes.py +36 -0
- plotroom/adapters/store_sqlite/migrations/versions/0006_work_items.py +22 -0
- plotroom/adapters/store_sqlite/migrations/versions/0007_item_changes.py +33 -0
- plotroom/adapters/store_sqlite/migrations/versions/0008_claude_turn_aliases.py +30 -0
- plotroom/adapters/store_sqlite/migrations/versions/0009_github_projection.py +38 -0
- plotroom/adapters/store_sqlite/migrations/versions/0010_github_pull_freshness.py +37 -0
- plotroom/adapters/store_sqlite/migrations/versions/0011_github_resources.py +27 -0
- plotroom/adapters/store_sqlite/migrations/versions/0012_local_triggers_outbox.py +80 -0
- plotroom/adapters/store_sqlite/migrations/versions/0013_lane_claims.py +22 -0
- plotroom/adapters/store_sqlite/migrations/versions/0015_recurring_triggers.py +45 -0
- plotroom/adapters/store_sqlite/migrations/versions/0016_merge_controller.py +28 -0
- plotroom/adapters/store_sqlite/migrations/versions/0017_lane_checklists.py +36 -0
- plotroom/adapters/store_sqlite/migrations/versions/0018_guardrails.py +33 -0
- plotroom/adapters/store_sqlite/migrations/versions/0019_clerk_import_metadata.py +16 -0
- plotroom/adapters/store_sqlite/migrations/versions/0020_search.py +30 -0
- plotroom/adapters/store_sqlite/migrations/versions/0021_human_queue.py +46 -0
- plotroom/adapters/store_sqlite/migrations/versions/0022_search_records.py +77 -0
- plotroom/adapters/store_sqlite/migrations/versions/0023_operator_goals.py +25 -0
- plotroom/adapters/store_sqlite/migrations/versions/0024_embedding_rejections.py +36 -0
- plotroom/adapters/store_sqlite/outbox_sql.py +78 -0
- plotroom/adapters/store_sqlite/routes_sql.py +26 -0
- plotroom/adapters/store_sqlite/search_sql.py +116 -0
- plotroom/adapters/store_sqlite/store.py +623 -0
- plotroom/adapters/store_sqlite/triggers_sql.py +111 -0
- plotroom/adapters/store_sqlite/work_items_sql.py +36 -0
- plotroom/adapters/switchboard.py +152 -0
- plotroom/adapters/usage_fixture.py +11 -0
- plotroom/adapters/work_items_bmad.py +256 -0
- plotroom/adapters/work_items_github_issues.py +323 -0
- plotroom/app/__init__.py +0 -0
- plotroom/app/bridge.py +162 -0
- plotroom/app/clerk_import.py +349 -0
- plotroom/app/cli.py +290 -0
- plotroom/app/clock.py +12 -0
- plotroom/app/config.py +984 -0
- plotroom/app/daemon_start.py +453 -0
- plotroom/app/lock.py +77 -0
- plotroom/app/logging.py +93 -0
- plotroom/app/portfile.py +218 -0
- plotroom/app/runtime.py +518 -0
- plotroom/app/serve.py +671 -0
- plotroom/app/session_intake.py +51 -0
- plotroom/app/sqlite_floor.py +35 -0
- plotroom/app/tokens.py +265 -0
- plotroom/core/__init__.py +0 -0
- plotroom/core/actions.py +67 -0
- plotroom/core/ask_checks.py +124 -0
- plotroom/core/asks.py +123 -0
- plotroom/core/branch_updates.py +207 -0
- plotroom/core/bridge.py +112 -0
- plotroom/core/briefs.py +83 -0
- plotroom/core/budgets.py +182 -0
- plotroom/core/catalog.py +464 -0
- plotroom/core/checklists.py +151 -0
- plotroom/core/claims.py +296 -0
- plotroom/core/clerk_import.py +379 -0
- plotroom/core/commands.py +85 -0
- plotroom/core/deploy_window.py +21 -0
- plotroom/core/envelope.py +20 -0
- plotroom/core/events.py +227 -0
- plotroom/core/github.py +306 -0
- plotroom/core/github_projection.py +310 -0
- plotroom/core/goal_language.py +374 -0
- plotroom/core/goal_projection.py +146 -0
- plotroom/core/human_queue.py +119 -0
- plotroom/core/intake.py +106 -0
- plotroom/core/kodus_review.py +53 -0
- plotroom/core/lanes.py +281 -0
- plotroom/core/ledger.py +808 -0
- plotroom/core/merge_controller.py +344 -0
- plotroom/core/merge_flakes.py +422 -0
- plotroom/core/merge_gate.py +724 -0
- plotroom/core/merge_lane.py +70 -0
- plotroom/core/merge_overlap.py +76 -0
- plotroom/core/next_items.py +60 -0
- plotroom/core/operator_goals.py +103 -0
- plotroom/core/outbox.py +70 -0
- plotroom/core/pull_overlaps.py +152 -0
- plotroom/core/reports.py +62 -0
- plotroom/core/roles.py +100 -0
- plotroom/core/routing.py +55 -0
- plotroom/core/run_reports.py +53 -0
- plotroom/core/search.py +266 -0
- plotroom/core/search_sources.py +94 -0
- plotroom/core/snapshot.py +204 -0
- plotroom/core/trigger_actions.py +89 -0
- plotroom/core/triggers.py +550 -0
- plotroom/core/unit_of_work.py +541 -0
- plotroom/core/watchers.py +35 -0
- plotroom/core/work_items.py +23 -0
- plotroom/core/writer.py +164 -0
- plotroom/ports/__init__.py +6 -0
- plotroom/ports/clock.py +12 -0
- plotroom/ports/github_write.py +72 -0
- plotroom/ports/search.py +197 -0
- plotroom/ports/session_reader.py +23 -0
- plotroom/ports/store.py +323 -0
- plotroom/ports/usage_meter.py +35 -0
- plotroom/ports/work_items.py +22 -0
- plotroom/py.typed +0 -0
- plotroom-0.1.0.dist-info/METADATA +230 -0
- plotroom-0.1.0.dist-info/RECORD +150 -0
- plotroom-0.1.0.dist-info/WHEEL +4 -0
- plotroom-0.1.0.dist-info/entry_points.txt +2 -0
- plotroom-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Read bounded legacy Commit Status evidence for one exact repository head."""
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
|
|
5
|
+
from plotroom.adapters.github.read import GitHubReadClient, number, obj, string
|
|
6
|
+
from plotroom.core.github import valid_git_sha
|
|
7
|
+
from plotroom.core.github_projection import COMMIT_STATUS_BUCKETS, GitHubRecord, GitHubResource
|
|
8
|
+
|
|
9
|
+
MAX_STATUS_PAGES = 3
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
async def fetch_commit_statuses(
|
|
13
|
+
api: GitHubReadClient,
|
|
14
|
+
client: httpx.AsyncClient,
|
|
15
|
+
token: str,
|
|
16
|
+
sha: str,
|
|
17
|
+
) -> GitHubResource:
|
|
18
|
+
if not valid_git_sha(sha):
|
|
19
|
+
raise ValueError("expected the full GitHub status head SHA")
|
|
20
|
+
endpoint = httpx.URL(f"{api.endpoint}/statuses/{sha}")
|
|
21
|
+
records: list[GitHubRecord] = []
|
|
22
|
+
seen: set[int] = set()
|
|
23
|
+
async for row in api.pages(
|
|
24
|
+
client,
|
|
25
|
+
token,
|
|
26
|
+
f"/commits/{sha}/statuses",
|
|
27
|
+
verify_terminal=True,
|
|
28
|
+
verify_boundaries=True,
|
|
29
|
+
max_pages=MAX_STATUS_PAGES,
|
|
30
|
+
require_full_pages=True,
|
|
31
|
+
):
|
|
32
|
+
identifier = number(row["id"])
|
|
33
|
+
context = string(row["context"])
|
|
34
|
+
state = string(row["state"])
|
|
35
|
+
creator = number(obj(row["creator"])["id"])
|
|
36
|
+
try:
|
|
37
|
+
url = httpx.URL(string(row["url"]))
|
|
38
|
+
except httpx.InvalidURL:
|
|
39
|
+
raise ValueError("invalid GitHub status URL") from None
|
|
40
|
+
if (
|
|
41
|
+
identifier in seen
|
|
42
|
+
or not context.strip()
|
|
43
|
+
or state not in COMMIT_STATUS_BUCKETS
|
|
44
|
+
or url.scheme != endpoint.scheme
|
|
45
|
+
or url.netloc != endpoint.netloc
|
|
46
|
+
or url.userinfo
|
|
47
|
+
or url.query
|
|
48
|
+
or url.fragment
|
|
49
|
+
or url.raw_path.lower() != endpoint.raw_path.lower()
|
|
50
|
+
or not url.path.endswith(f"/{sha}")
|
|
51
|
+
):
|
|
52
|
+
raise ValueError("invalid or wrongly pinned GitHub commit status")
|
|
53
|
+
seen.add(identifier)
|
|
54
|
+
records.append(
|
|
55
|
+
GitHubRecord(
|
|
56
|
+
str(identifier),
|
|
57
|
+
"commit_status",
|
|
58
|
+
{"id": identifier, "context": context, "state": state, "creator_id": creator},
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
return GitHubResource(
|
|
62
|
+
tuple(records), attributes={"repository": api.repository, "head_sha": sha}
|
|
63
|
+
)
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"""Bounded deployment-status polling with durable progress through history."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import logging
|
|
5
|
+
from dataclasses import replace
|
|
6
|
+
from functools import partial
|
|
7
|
+
from typing import TYPE_CHECKING, Any
|
|
8
|
+
|
|
9
|
+
import httpx
|
|
10
|
+
|
|
11
|
+
from plotroom.adapters.github import GitHubRateLimited, GitHubUnavailable
|
|
12
|
+
from plotroom.adapters.github.read import GitHubReadClient, Row, number, obj, rows, string
|
|
13
|
+
from plotroom.core.events import NewEvent
|
|
14
|
+
from plotroom.core.github import FetchCursor
|
|
15
|
+
from plotroom.core.lanes import infer_lane
|
|
16
|
+
from plotroom.core.reports import DEPLOY_STATUS, deploy_fields, validate_report_sha
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from plotroom.core.ledger import Ledger
|
|
20
|
+
from plotroom.core.unit_of_work import UnitOfWork
|
|
21
|
+
|
|
22
|
+
log = logging.getLogger("plotroom.github")
|
|
23
|
+
DEPLOYMENTS = "deployments"
|
|
24
|
+
_PENDING_DEPLOYMENTS = "deployment_pending"
|
|
25
|
+
_HEAD_DEPLOYMENTS = 2
|
|
26
|
+
_PENDING_BATCH = 2
|
|
27
|
+
_PENDING_LIMIT = 64
|
|
28
|
+
_SWEEP_BATCH = 8
|
|
29
|
+
_READ_ERRORS = (
|
|
30
|
+
GitHubUnavailable,
|
|
31
|
+
httpx.RequestError,
|
|
32
|
+
KeyError,
|
|
33
|
+
ValueError,
|
|
34
|
+
TypeError,
|
|
35
|
+
OverflowError,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
async def poll_deployments(
|
|
40
|
+
ledger: Ledger, api: GitHubReadClient, client: httpx.AsyncClient, token: str, as_of: str
|
|
41
|
+
) -> None:
|
|
42
|
+
"""Refresh the newest deployments and visit a bounded slice of older ones per poll."""
|
|
43
|
+
repository = api.repository
|
|
44
|
+
cursor = await ledger.fetch_cursor(repository, DEPLOYMENTS)
|
|
45
|
+
page, offset = (1, 0) if cursor is None else map(int, cursor.watermark.split(":"))
|
|
46
|
+
extra = {"project": ledger.project_id}
|
|
47
|
+
try:
|
|
48
|
+
newest, has_older = await api.page(client, token, "/deployments", 1)
|
|
49
|
+
except GitHubRateLimited:
|
|
50
|
+
raise
|
|
51
|
+
except _READ_ERRORS:
|
|
52
|
+
log.warning("GitHub deployment refresh failed", extra=extra)
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
if not has_older and page > 1:
|
|
56
|
+
page, offset = 1, 0
|
|
57
|
+
current, more = newest, has_older
|
|
58
|
+
if page > 1:
|
|
59
|
+
try:
|
|
60
|
+
current, more = await api.page(client, token, "/deployments", page)
|
|
61
|
+
except GitHubRateLimited:
|
|
62
|
+
raise
|
|
63
|
+
except _READ_ERRORS:
|
|
64
|
+
log.warning("GitHub deployment history refresh failed", extra=extra)
|
|
65
|
+
# A page can disappear when deployments are deleted between polls.
|
|
66
|
+
current, more = [], False
|
|
67
|
+
|
|
68
|
+
end = offset + _SWEEP_BATCH
|
|
69
|
+
pending_cursor = await ledger.fetch_cursor(repository, _PENDING_DEPLOYMENTS)
|
|
70
|
+
queued = rows(json.loads(pending_cursor.watermark)) if pending_cursor else []
|
|
71
|
+
pending = {number(row["id"]): row for row in queued}
|
|
72
|
+
scanned: set[int] = set()
|
|
73
|
+
candidates = [*newest[:_HEAD_DEPLOYMENTS], *queued[:_PENDING_BATCH], *current[offset:end]]
|
|
74
|
+
try:
|
|
75
|
+
for row in candidates:
|
|
76
|
+
try:
|
|
77
|
+
deployment_id = number(row["id"])
|
|
78
|
+
except _READ_ERRORS:
|
|
79
|
+
log.warning("GitHub deployment row was invalid", extra=extra)
|
|
80
|
+
continue
|
|
81
|
+
if deployment_id in scanned:
|
|
82
|
+
continue
|
|
83
|
+
scanned.add(deployment_id)
|
|
84
|
+
try:
|
|
85
|
+
follow = await _poll_statuses(ledger, api, client, token, row, deployment_id, as_of)
|
|
86
|
+
except GitHubRateLimited:
|
|
87
|
+
raise
|
|
88
|
+
except _READ_ERRORS:
|
|
89
|
+
follow = pending.get(deployment_id)
|
|
90
|
+
log.warning("GitHub deployment status refresh failed", extra=extra)
|
|
91
|
+
pending.pop(deployment_id, None)
|
|
92
|
+
if follow is not None:
|
|
93
|
+
pending[deployment_id] = follow
|
|
94
|
+
finally:
|
|
95
|
+
remaining = list(pending.values())[-_PENDING_LIMIT:]
|
|
96
|
+
if remaining != queued:
|
|
97
|
+
progress = FetchCursor(
|
|
98
|
+
json.dumps(remaining), as_of, pending_cursor.generation + 1 if pending_cursor else 1
|
|
99
|
+
)
|
|
100
|
+
await ledger.run(
|
|
101
|
+
"system",
|
|
102
|
+
lambda uow: uow.save_fetch_cursor(repository, _PENDING_DEPLOYMENTS, progress),
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
next_page = page + 1 if more else 1
|
|
106
|
+
watermark = f"{page}:{end}" if end < len(current) else f"{next_page}:0"
|
|
107
|
+
if watermark != (cursor.watermark if cursor else "1:0"):
|
|
108
|
+
progress = FetchCursor(watermark, as_of, cursor.generation + 1 if cursor else 1)
|
|
109
|
+
await ledger.run(
|
|
110
|
+
"system", lambda uow: uow.save_fetch_cursor(repository, DEPLOYMENTS, progress)
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
async def _poll_statuses(
|
|
115
|
+
ledger: Ledger,
|
|
116
|
+
api: GitHubReadClient,
|
|
117
|
+
client: httpx.AsyncClient,
|
|
118
|
+
token: str,
|
|
119
|
+
deployment: Row,
|
|
120
|
+
identifier: int,
|
|
121
|
+
as_of: str,
|
|
122
|
+
) -> Row | None:
|
|
123
|
+
resource = f"deployment_statuses/{identifier}"
|
|
124
|
+
path = f"/deployments/{identifier}/statuses"
|
|
125
|
+
recent, has_history = await api.raw_page(client, token, path, 1)
|
|
126
|
+
cursor = await ledger.fetch_cursor(api.repository, resource)
|
|
127
|
+
page = int(cursor.watermark) if cursor else 2
|
|
128
|
+
history: list[Any] = []
|
|
129
|
+
watermark = "2"
|
|
130
|
+
rate_limit = None
|
|
131
|
+
if has_history:
|
|
132
|
+
watermark = str(page)
|
|
133
|
+
try:
|
|
134
|
+
history, more = await api.raw_page(client, token, path, page)
|
|
135
|
+
except GitHubRateLimited as exc:
|
|
136
|
+
rate_limit = exc
|
|
137
|
+
except _READ_ERRORS:
|
|
138
|
+
log.warning(
|
|
139
|
+
"GitHub deployment status history refresh failed",
|
|
140
|
+
extra={"project": ledger.project_id},
|
|
141
|
+
)
|
|
142
|
+
else:
|
|
143
|
+
watermark = str(page + 1 if more else 2)
|
|
144
|
+
sha = validate_report_sha(string(deployment["sha"]))
|
|
145
|
+
ref = string(deployment.get("ref") or "")
|
|
146
|
+
branch = ref.removeprefix("refs/heads/")
|
|
147
|
+
if branch == sha or branch.startswith("refs/"):
|
|
148
|
+
branch = ""
|
|
149
|
+
|
|
150
|
+
def valid_events(statuses: list[Any]) -> list[NewEvent]:
|
|
151
|
+
events: list[NewEvent] = []
|
|
152
|
+
for row in statuses:
|
|
153
|
+
try:
|
|
154
|
+
events.append(_status_event(api.repository, deployment, identifier, sha, obj(row)))
|
|
155
|
+
except KeyError, ValueError, TypeError, OverflowError:
|
|
156
|
+
log.warning(
|
|
157
|
+
"GitHub deployment status row was invalid", extra={"project": ledger.project_id}
|
|
158
|
+
)
|
|
159
|
+
return events
|
|
160
|
+
|
|
161
|
+
latest = valid_events(recent)
|
|
162
|
+
events = [*latest, *valid_events(history)]
|
|
163
|
+
if events:
|
|
164
|
+
unseen = await ledger.run("system", lambda uow: _unseen(uow, events))
|
|
165
|
+
for event in unseen:
|
|
166
|
+
await ledger.run("system", partial(_record, branch=branch, event=event))
|
|
167
|
+
if rate_limit is not None:
|
|
168
|
+
raise rate_limit
|
|
169
|
+
if watermark != (cursor.watermark if cursor else "2"):
|
|
170
|
+
progress = FetchCursor(watermark, as_of, cursor.generation + 1 if cursor else 1)
|
|
171
|
+
await ledger.run(
|
|
172
|
+
"system", lambda uow: uow.save_fetch_cursor(api.repository, resource, progress)
|
|
173
|
+
)
|
|
174
|
+
if latest and latest[0].fields["finished"]:
|
|
175
|
+
return None
|
|
176
|
+
environment = deployment.get("environment")
|
|
177
|
+
return {
|
|
178
|
+
"id": identifier,
|
|
179
|
+
"sha": sha,
|
|
180
|
+
"ref": ref if len(ref) <= 1024 else "",
|
|
181
|
+
"environment": environment
|
|
182
|
+
if isinstance(environment, str) and len(environment) <= 255
|
|
183
|
+
else "",
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def _status_event(
|
|
188
|
+
repository: str, deployment: Row, identifier: int, sha: str, status: Row
|
|
189
|
+
) -> NewEvent:
|
|
190
|
+
status_id = number(status["id"])
|
|
191
|
+
environment = status.get("environment")
|
|
192
|
+
if environment is None or environment == "":
|
|
193
|
+
environment = deployment["environment"]
|
|
194
|
+
fields = deploy_fields(string(environment), sha, string(status["state"]))
|
|
195
|
+
return NewEvent(
|
|
196
|
+
"deploy",
|
|
197
|
+
DEPLOY_STATUS,
|
|
198
|
+
f"github:{repository}:{identifier}:{status_id}",
|
|
199
|
+
{**fields, "repository": repository, "deployment_id": identifier, "status_id": status_id},
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
async def _unseen(uow: UnitOfWork, events: list[NewEvent]) -> list[NewEvent]:
|
|
204
|
+
return [
|
|
205
|
+
event
|
|
206
|
+
for event in events
|
|
207
|
+
if await uow.find_event(event.source, event.kind, event.upstream_id) is None
|
|
208
|
+
]
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
async def _record(uow: UnitOfWork, branch: str, event: NewEvent) -> None:
|
|
212
|
+
lane = await infer_lane(uow, branch=branch) if branch else None
|
|
213
|
+
await uow.append(replace(event, lane_id=lane))
|