feat(web): open full feature implementation queue
This commit is contained in:
@@ -12,9 +12,9 @@ from pathlib import Path
|
||||
from wbv2_runtime import CONTROL_ROOT, INDEX, QUEUE, ROOT
|
||||
|
||||
|
||||
CURRENT = "WBV2-P1419-001"
|
||||
ROOT_TASK = "WBV2-P1420-000"
|
||||
TASK = "WBV2-P1420-001"
|
||||
CURRENT = "WBV2-P1420-001"
|
||||
ROOT_TASK = "WBV2-P1421-000"
|
||||
TASK = "WBV2-P1421-001"
|
||||
|
||||
|
||||
def read_json(path: Path) -> dict:
|
||||
@@ -40,6 +40,9 @@ def rel(path: Path) -> str:
|
||||
|
||||
|
||||
def main() -> int:
|
||||
backlog = read_json(CONTROL_ROOT / "web-product-backlog.json")
|
||||
pending_tasks = [task for task in backlog.get("tasks", []) if task.get("status") != "implemented"]
|
||||
source_paths = list(dict.fromkeys(path for task in pending_tasks for path in task.get("ownedPaths", [])))
|
||||
index = read_json(INDEX)
|
||||
source_plan_path = ROOT / index["source"]["path"]
|
||||
plan = read_json(source_plan_path)
|
||||
@@ -95,10 +98,11 @@ def main() -> int:
|
||||
"ready": True,
|
||||
"queueMutationAllowed": True,
|
||||
"productBacklog": "tests/golden/WBV2/web-product-backlog.json",
|
||||
"module": {"sourcePaths": source_paths},
|
||||
}
|
||||
product_plan = {
|
||||
**plan,
|
||||
"planId": "BLENDER_WEB_PRODUCT_IMPLEMENTATION_P1420",
|
||||
"planId": "BLENDER_WEB_FULL_FEATURE_IMPLEMENTATION_P1421",
|
||||
"status": "ACTIVE_PRODUCT_IMPLEMENTATION",
|
||||
"verificationPolicy": {
|
||||
"mode": "DEFERRED_TO_USER_OPERATION",
|
||||
@@ -140,7 +144,7 @@ Replace source-symbol verification batches with the user-workflow implementation
|
||||
- commandBudget: one implementation subtask per Codex turn
|
||||
- Implementation entrypoint: `python3 my-tools/run_web_product_migration.py`
|
||||
|
||||
## Goal
|
||||
## 目标
|
||||
|
||||
Complete the implementation tasks in `tests/golden/WBV2/web-product-backlog.json`.
|
||||
The `3745` source-unit inventory is traceability-only and is not the completion denominator.
|
||||
@@ -168,7 +172,7 @@ The `3745` source-unit inventory is traceability-only and is not the completion
|
||||
|
||||
## 交付与回滚
|
||||
|
||||
All 16 workflow modules are implementation-complete. Runtime defects are opened from user operation.
|
||||
All workflow modules are implementation-complete. Runtime defects are opened from user operation.
|
||||
- Backlog: `tests/golden/WBV2/web-product-backlog.json`
|
||||
- Report: `tests/golden/{TASK}/product-implementation-report.json`
|
||||
- Rollback: stop `my-tools/run_web_product_migration.py` and retain the last completed subtask.
|
||||
@@ -180,8 +184,8 @@ All 16 workflow modules are implementation-complete. Runtime defects are opened
|
||||
"operation": "AUTHORIZE_WEB_PRODUCT_IMPLEMENTATION",
|
||||
"status": "PASS",
|
||||
"sourceInventoryRole": "traceability_only",
|
||||
"workflowModuleCount": 16,
|
||||
"implementationTaskCount": 4,
|
||||
"workflowModuleCount": len(backlog.get("workflowModules", [])),
|
||||
"implementationTaskCount": len(pending_tasks),
|
||||
"nextTask": TASK,
|
||||
})
|
||||
write_json(root_manifest, {
|
||||
@@ -207,7 +211,7 @@ All 16 workflow modules are implementation-complete. Runtime defects are opened
|
||||
task_dir.mkdir(parents=True, exist_ok=True)
|
||||
subprocess.run(["node", "tools/web/generate-v2-task-index.mjs", "--plan-path", rel(plan_path)], cwd=ROOT, check=True)
|
||||
subprocess.run(["node", "tools/web/check-task-context.mjs", "--task", TASK, "--write"], cwd=ROOT, check=True)
|
||||
print(f"web-product-queue-activated task={TASK} modules=16 implementationTasks=4")
|
||||
print(f"web-product-queue-activated task={TASK} modules={len(backlog.get('workflowModules', []))} implementationTasks={len(pending_tasks)}")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ def refresh_modules(backlog: dict) -> None:
|
||||
|
||||
|
||||
def finalize_product_task(backlog: dict) -> None:
|
||||
task_id = "WBV2-P1420-001"
|
||||
parent_id = "WBV2-P1420-000"
|
||||
task_id = str(backlog.get("queueTask", "WBV2-P1420-001"))
|
||||
parent_id = str(backlog.get("rootTask", "WBV2-P1420-000"))
|
||||
index = read_json(CONTROL / "task-index.json")
|
||||
plan_path = ROOT / index["source"]["path"]
|
||||
plan = read_json(plan_path)
|
||||
@@ -132,7 +132,7 @@ def finalize_product_task(backlog: dict) -> None:
|
||||
"sourceInventory": backlog.get("sourceInventory"),
|
||||
})
|
||||
status_path.write_text(
|
||||
f"# {task_id} status\n\n- status: `implemented`\n- workflow modules: `16/16`\n- implementation tasks: `{len(backlog.get('tasks', []))}/{len(backlog.get('tasks', []))}`\n- verification: `deferred_until_user_reports`\n- nextTask: `NONE`\n",
|
||||
f"# {task_id} status\n\n- status: `implemented`\n- workflow modules: `{len(backlog.get('workflowModules', []))}/{len(backlog.get('workflowModules', []))}`\n- implementation tasks: `{len(backlog.get('tasks', []))}/{len(backlog.get('tasks', []))}`\n- verification: `deferred_until_user_reports`\n- nextTask: `NONE`\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
artifacts = {
|
||||
@@ -185,6 +185,8 @@ def write_status(backlog: dict, status: str, **extra: object) -> None:
|
||||
|
||||
|
||||
def prompt(task: dict) -> str:
|
||||
backlog = read_json(BACKLOG)
|
||||
queue_task = str(backlog.get("queueTask", "WBV2-P1420-001"))
|
||||
return f"""Implement exactly one Web Blender product workflow task in {ROOT}.
|
||||
|
||||
Task: {task['id']} - {task['title']}
|
||||
@@ -194,7 +196,7 @@ Implementation requirement: {task['implementation']}
|
||||
|
||||
Rules:
|
||||
- Follow the repository AGENTS.md minimal-context instructions first.
|
||||
- The authoritative queue task is WBV2-P1420-001; this product task is one bounded subtask inside it. Run the default task-context check once, and never pass the product subtask id to check-task-context.
|
||||
- The authoritative queue task is {queue_task}; this product task is one bounded subtask inside it. Run the default task-context check once, and never pass the product subtask id to check-task-context.
|
||||
- Preserve all existing dirty changes. Do not revert or rewrite unrelated work.
|
||||
- Read only the owned paths and their direct imported types/helpers.
|
||||
- For scoped searches, pass each owned path explicitly through the batch search runtime option; never pass a bare --runtime flag.
|
||||
|
||||
@@ -48,14 +48,15 @@ def main() -> int:
|
||||
product = status["progress"].get("productMigration", {})
|
||||
product_pid = product.get("pid")
|
||||
product_alive = isinstance(product_pid, int) and (Path("/proc") / str(product_pid)).exists()
|
||||
product_complete = (
|
||||
product.get("workflowTotal", 0) > 0
|
||||
and product.get("workflowImplemented") == product.get("workflowTotal")
|
||||
and product.get("taskImplemented") == product.get("taskTotal")
|
||||
)
|
||||
status["myTools"]["productMigrationAlive"] = product_alive
|
||||
status["unattendedState"] = (
|
||||
"IMPLEMENTING" if product_alive and product.get("status") == "implementing"
|
||||
else "COMPLETE" if product.get("status") == "implementation_complete" or (
|
||||
product.get("workflowTotal", 0) > 0
|
||||
and product.get("workflowImplemented") == product.get("workflowTotal")
|
||||
and product.get("taskImplemented") == product.get("taskTotal")
|
||||
)
|
||||
else "COMPLETE" if product_complete
|
||||
else "BLOCKED" if product.get("status") == "blocked"
|
||||
else "PLANNING" if status.get("state") == "IDLE" and watchdog_alive and watchdog.get("status") == "waiting_for_source_batch"
|
||||
else status.get("state", "UNKNOWN")
|
||||
|
||||
Reference in New Issue
Block a user