Merge origin/main into item-448, passing the label table to the chunk's next-step command
CI / tests (pull_request) Has been cancelled

This commit is contained in:
Lilleman
2026-11-19 17:41:39 +01:00
17 changed files with 227 additions and 65 deletions
+3 -3
View File
@@ -145,13 +145,13 @@ def status_printed(epic: EpicRun) -> Stop:
return Stop(1, lines.reason) if isinstance(lines, Failure) else Stop(0, "\n".join(lines) or f"the epic {epic.key} has no open issue")
def epic_written(key: str, writes: tuple[str, str, tuple[str, ...]] | None, paths: Paths, backend: Backend, stdin: typing.TextIO) -> Stop:
def epic_written(key: str, writes: findings.Write | None, paths: Paths, backend: Backend, stdin: typing.TextIO) -> Stop:
"""Files a finding in the epic or records a decision in its description, as writes says; closes the epic where writes is None. It needs no tmux, so a chunk's worker may run it anywhere."""
config = load(paths.home)
if isinstance(config, Failure):
return Stop(1, config.reason)
store, record = backend(config, key)
done = findings.written(key, *writes, store, config.label_repos, record, stdin, paths.home / scheduler.STATE / key) if writes else finish.closed(key, store, config.label_repos, stdin)
done = findings.written(key, writes, store, config.label_repos, record, stdin, paths.home / scheduler.STATE / key) if writes else finish.closed(key, store, config.label_repos, stdin)
return Stop(1, done.reason) if isinstance(done, Failure) else Stop(0, done)
@@ -447,7 +447,7 @@ def chunk_work(key: str, checkout: str | None, language: str, epic: EpicRun) ->
config = config_located(checkout, epic.paths.home) if checkout else None
if isinstance(config, Failure):
return Stop(1, config.reason)
return chunk_prompt.task(issue, epic.key, checkout, epic.launcher, language, config), RoutingIssue(issue) if "L" in issue.scores else None
return chunk_prompt.task(issue, epic.key, epic.config.label_repos, checkout, epic.launcher, language, config), RoutingIssue(issue) if "L" in issue.scores else None
issues = epic.store.read()
if isinstance(issues, Failure):
return Stop(1, issues.reason)