Статус: COMPLETED
Структурированная сводка для этой задачи не записана. Показан сохранённый результат без изменений.
Both audit defects are fixed. php tests/saas-035-regression.php passes (170 assertions) and so does php tests/saas-025-regression.php (74). php tests/builder-handoff-regression.php also passes. Nothing was committed or deployed, and no provider was called (the new test uses a scripted fake engine).
T5, consistency before any model call.
saasBuilderResolveRun() in app/site-workflow.php now runs first in saasProcessRun, before the engine is created. It checks that the run, site, task and handoff all belong to the same user and project, and that the handoff's spec and languages are consistent.Inconsistent Builder run record: … and never falls back to legacy.app/worker.php are now scoped to the run's user and project. The claim query uses LEFT JOIN, so a run whose task row is missing is reported as inconsistent instead of being skipped.T6, concurrent migration.
runs.error_detail and architect_jobs.repaired was check-then-ALTER, so two processes could both pass the check and the loser failed with duplicate column name.saasAddColumn() ignores only that error. Any other ALTER failure still propagates.Tests.
tests/saas-035-regression.php covers 11 corrupt rows, such as another tenant's task, a handoff from another project, language mismatches and a missing task. For each one it checks:ai_usage rows;Negative controls. Restoring the old lookup, or making saasAddColumn() always rethrow, makes the test fail. I restored both files and re-ran everything green. The concurrent stress rounds alone do not catch a reverted migration fix, because the real race window is tiny. A deterministic check, where the column already exists when the ALTER runs, covers that case.
Limitations.
docs/acceptance/SAAS-035.md has the evidence, limitations and rollback. Rollback is reverting app/site-workflow.php, app/architect.php and app/worker.php and deleting the two new files. No data migration was added, so no data needs rolling back.
Ожидает вашего решения: принять, вернуть на доработку или отложить.