code-to10 reconcile: fix pre-existing worker F821 in playwright skipped-modified log branch

Target-line bug, not introduced by the replay: Worker._tenant_dirs
only receives project_id, yet the script_skipped_modified log line
used task.get("project_id"), raising NameError whenever seeding
reported a tenant-modified script (the refreshed sibling branch was
already fixed to project_id with its own regression test; this test
only covered the refreshed branch, so the full suite stayed green).
Fix mirrors the sibling (project_id) plus a regression test for the
skipped branch. Ruff F821 in worker.py is thereby cleared.
This commit is contained in:
host committed 2026-11-03 02:49:27 +00:00
1 parent 34b9a34896
commit 055da3c2dd
2 files changed
+21 -1

No files matched your search

+5 -1
View File
@@ -3026,10 +3026,14 @@ class Worker:
project_id,
",".join(_seeded["script_refreshed"]))
if _seeded.get("script_skipped_modified"):
# Sibling of the refreshed branch above: _tenant_dirs
# only receives project_id, there is no task in scope;
# the pre-existing task.get() here raised NameError
# whenever seeding reported a tenant-modified script.
self.logger.warning(
"playwright MCP scripts skipped (tenant-modified, "
"left untouched, see audit) for project %s: %s",
task.get("project_id"),
project_id,
",".join(_seeded["script_skipped_modified"]))
if self.seed_skills:
# 技能播种失败绝不阻塞任务:技能是可选的流程