From 49109ec835526f3c723da9b93877c628f51bbffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E8=96=84=E4=BA=91?= Date: Tue, 4 Aug 2026 11:58:24 +0800 Subject: [PATCH] docs: record EM Planner stage 8 checkpoint --- .../progress/em-planner-progress.md | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/docs/superpowers/progress/em-planner-progress.md b/docs/superpowers/progress/em-planner-progress.md index ed467be..e2bd89e 100644 --- a/docs/superpowers/progress/em-planner-progress.md +++ b/docs/superpowers/progress/em-planner-progress.md @@ -2,10 +2,10 @@ ## Current State -- Current stage: 7 — ST model and longitudinal optimization +- Current stage: 8 — complete trajectory publication and pure one-shot planning service - Stage status: Completed - Current branch: `trajplanner` -- Last checkpoint commit: `510bf97` (last Stage 7 functional commit; this file is the Stage 7 checkpoint) +- Last checkpoint commit: `019b896` (last Stage 8 functional commit; this file is the Stage 8 checkpoint) - Protocol design baseline: `554c84f` - Implementation-plan baseline: `8dd8ff0` @@ -33,6 +33,9 @@ | 7 | `2026-08-03-em-planner-longitudinal-st-implementation.md` | Task 1 — Speed Envelope over Actual PathS | `62ea9db`, correction `25742ab` | RED: `longitudinal-model` first failed with missing longitudinal input/speed-envelope types; the sparse stopping chord and then the discrete jerk-release tail checks also failed before refinement. GREEN: `PASS longitudinal-model` proves actual strictly increasing LS `PathS` consumption, finite curvature/curvature-rate/stopping limits, stopping-distance precheck, dense actual-PathS stations, and discrete deceleration/jerk tail stations. | | 7 | `2026-08-03-em-planner-longitudinal-st-implementation.md` | Task 2 — Time-Knot Layout, Dynamics, Objective, and Hard Constraints | `c01d0d5` | RED: `longitudinal-model` failed with missing ST candidate/layout/constraint types. GREEN: `PASS longitudinal-model` inspects normalized objective coefficients, solver-neutral `QuadraticProgram` assembly, exact constant-jerk dynamics, monotonic progress, finite physical bounds, exact start state, and hard terminal `s_N`/`u_N`. | | 7 | `2026-08-03-em-planner-longitudinal-st-implementation.md` | Task 3 — Longitudinal Outer Loop and Strict Validation | `510bf97` | RED: `longitudinal-integration` failed first with missing optimizer/validator/facade types; focused checks then exposed invalid fallback acceptance, sparse envelope probes, noncanonical endpoints, and loss of a strictly validated initial seed on immediate timeout. GREEN: `PASS longitudinal-integration` covers scripted statuses, strict residual/physical validation, deep-copy last-feasible fallback, complete-primal warm starts, the five-iteration cap, cancellation, and deterministic real OSQP forward/reverse/curvature/jerk-stop/short/zero-start scenarios in a clean copied plugin bundle. | +| 8 | `2026-08-03-em-planner-longitudinal-st-implementation.md` | Task 4 — Complete Trajectory Assembly and Redundant-Field Consistency | `1d58864` | RED: `trajectory` exited 1 with CS0246 for missing `EmTrajectoryAssembler`. GREEN: `trajectory` exited 0 with `PASS trajectory`, checking forward/reverse signed speed, all redundant field identities, unwrapped yaw interpolation, exact terminal anchor, and the `0.20 s` / `0.05 s` hold tail. | +| 8 | `2026-08-03-em-planner-longitudinal-st-implementation.md` | Task 5 — Independent World-Space Publication Validator | `7410654` | RED: `trajectory` exited 1 with missing `EmTrajectoryValidationFailure` / validator contracts. GREEN: `trajectory` exited 0 with `PASS trajectory`, rejecting deterministic mutations for non-finite values, timing/PathS/direction/field inconsistencies, every configured physical limit, terminal anchor/speed/yaw-rate failures, pose and `0.025 m` swept collisions, segment overflow, and reverse-specific speed limits. | +| 8 | `2026-08-03-em-planner-longitudinal-st-implementation.md` | Task 6 — Pure One-Shot EmPlanningService | `019b896` | RED: `em-planning-service` exited 1 with CS0246 for missing `EmPlanningService`. GREEN: `em-core-all` exited 0 twice in the required four-line order; the service checks cover forward/reverse/gear/goal/rolling success, deterministic output, request IDs, invalid/stale/direction/projection/corridor/stopping/LS/ST/solver/timeout/cancellation/publication-validation failures, and debug-sink exception isolation. | ## Current Verification @@ -55,6 +58,8 @@ - Baseline note: invoking the pre-existing `lateral-all` test from the `ClumsyPilot` subdirectory fails its pinned-DLL lookup because that Stage 6 test constructs the source path from `Directory.GetCurrentDirectory()`. Running the documented command from the repository root exits 0. Stage 7 does not modify or bypass the completed LS test. - Normal-project baseline: the historical checkpoint recorded exit 1 from legacy `auto_avoidance/MultiWheelAutoAvoidance.cs` references to `NetTopologySuite` and `OpenCvSharp`. At the Stage 7 final read-only audit that source path is absent from both the working tree and the tracked `HEAD` tree, so `dotnet build ClumsyPilot/ClumsyPilot.csproj --no-restore` exits 0 with only two unrelated obsolete-API warnings. Stage 7 issued no delete/clean command and made no legacy-module change; preserve the observed workspace and do not recreate, delete, hide, or otherwise alter legacy functionality merely to change this baseline. - Verified commits: `104081e`, `2abb465`, `39c1708`, `a957fda`, `61dfa79`, `c225b17`, `f703d41`, `0c48a7d`, `f5c69c2`, `f19df53`, `4d83ed2`, `62ea9db`, `c01d0d5`, `25742ab`, and `510bf97` +- Result: Stage 8 exit commands all exited 0 from the repository root at `019b896`: `em-core-all` twice (each printed `PASS longitudinal-model`, `PASS longitudinal-integration`, `PASS trajectory`, `PASS em-planning-service` in order); then `longitudinal-model`, `longitudinal-integration`, `trajectory`, `lateral-all`, `optimization`, `osqp`, `all-foundation`, and `git diff --check`. The trajectory gate independently verifies physical world-space publication and the service consumes only request snapshots through `IQpSolver` / `QuadraticProgram`; no Stage 8 production P/Invoke, UI, hardware, current-working-directory, dynamic-obstacle, rolling-execution, or controller dependency was added. +- Stage 8 RED commands and exits: Task 4 `trajectory` exit 1 (missing `EmTrajectoryAssembler`); Task 5 `trajectory` exit 1 (missing validator contracts); Task 6 `em-planning-service` exit 1 (missing `EmPlanningService`). Task 4/5 GREEN command was `trajectory` exit 0 / `PASS trajectory`; Task 6 GREEN command was `em-core-all` exit 0 twice with the required four PASS lines. ## Preserved Workspace State @@ -62,6 +67,7 @@ - Use explicit file paths for every `git add`; never stage the whole workspace. - The existing user hunk in `ClumsyPilot/ClumsyPilot.csproj` remains preserved. Do not clean, rewrite, or stage it. - The historical legacy `auto_avoidance/MultiWheelAutoAvoidance.cs` dependency failure is not reproducible in the Stage 7 final workspace because that untracked/unversioned source path is absent. Do not recreate, delete, bypass, or otherwise alter legacy functionality to manufacture a different baseline. +- Remaining observed baseline noise: the first fresh Stage 8 core build printed the existing `Lidar2dDetect2LegTray.LegWidth` and `MultiWheelChassis.GetSteerWheels()` obsolete-API warnings; `git diff --check` emits CRLF conversion advisories for user-owned dirty files but exits 0. Neither is an EM Planner regression. ## Decisions Needed @@ -133,14 +139,14 @@ ## Next Stage -- Stage: 8 — complete trajectory publication and pure one-shot planning service -- Readiness: Ready for Stage 8 entry checks after this checkpoint is committed. -- Plan: `docs/superpowers/plans/2026-08-03-em-planner-longitudinal-st-implementation.md` +- Stage: 9 — rolling coordination and gear-switch execution +- Readiness: Ready after this Stage 8 progress checkpoint is committed. +- Plan: `docs/superpowers/plans/2026-08-03-em-planner-rolling-execution-implementation.md` - Authorized tasks only: - - Task 4 — Complete Trajectory Assembly and Redundant-Field Consistency - - Task 5 — Independent World-Space Publication Validator - - Task 6 — Pure One-Shot EmPlanningService -- Explicit exclusions: rolling execution, controller adaptation, dynamic obstacles, UI/hardware integration, and every later phase. + - Task 1 — Cycle Identity, Scheduling Decision, and Stale-Result Suppression + - Task 2 — Safe Previous-Trajectory Handoff + - Task 3 — Gear-Switch State Machine and Trajectory Executor +- Explicit exclusions: generic control adaptation, plugin packaging, dynamic obstacles, UI/hardware integration beyond the approved execution boundary, and Stage 10 work. ## Next-Window Prompt @@ -149,36 +155,32 @@ 工作目录:D:\Users\Desktop\项目\prakrobot\ParkingRobot -本窗口只执行阶段 8:完整轨迹发布与纯单次规划服务。唯一授权范围是: -docs/superpowers/plans/2026-08-03-em-planner-longitudinal-st-implementation.md 的 Task 4、Task 5、Task 6。 -不要开始滚动执行、控制适配、动态障碍物、UI/硬件集成或任何后续阶段。 +本窗口只执行阶段 9:滚动协调与换向执行。唯一授权范围是: +docs/superpowers/plans/2026-08-03-em-planner-rolling-execution-implementation.md 的 Task 1、Task 2、Task 3。 +不要开始通用控制适配、插件最终发布、动态障碍物、UI/硬件集成或任何 Stage 10 工作。 开始前必须完整读取: 1. docs/superpowers/specs/2026-08-03-em-planner-ls-st-design.md 2. docs/superpowers/specs/2026-08-03-em-planner-windowed-execution-design.md 3. docs/superpowers/progress/em-planner-progress.md -4. docs/superpowers/plans/2026-08-03-em-planner-longitudinal-st-implementation.md +4. docs/superpowers/plans/2026-08-03-em-planner-rolling-execution-implementation.md 使用 executing-plans、test-driven-development 和 verification-before-completion;不要使用子代理。只在 trajplanner 上工作。 -开始 Task 4 前: -- 确认 a957fda、61dfa79、c225b17、f703d41、0c48a7d、f5c69c2、f19df53、4d83ed2、62ea9db、c01d0d5、25742ab、510bf97 以及紧随其后的 Stage 7 进度 checkpoint 均可从 HEAD 追溯。 +开始 Task 1 前: +- 确认 1d58864、7410654、019b896 以及紧随其后的 Stage 8 进度 checkpoint 均可从 HEAD 追溯。 - 保存完整 git status --short 基线,确认暂存区为空,并保留所有既有用户修改。 -- 从仓库根目录运行并确认退出码为 0:longitudinal-model、longitudinal-integration、lateral-all、optimization、osqp、all-foundation。 +- 从仓库根目录运行并确认退出码为 0:em-core-all、trajectory、lateral-all、optimization、osqp、all-foundation。 - 不使用 git add .、git add -A、清理命令或破坏性 Git 命令;每次仅显式暂存计划指定文件。 -- 历史 checkpoint 记录过 auto_avoidance/MultiWheelAutoAvoidance.cs 缺少 NetTopologySuite/OpenCvSharp 的依赖失败;Stage 7 终态中该源文件路径不存在,正常项目构建退出 0。保留当前工作区状态,不要为改变基线而重建、删除、屏蔽或绕过旧功能。 -- 已完成的 Stage 6 lateral-all 测试夹具使用当前工作目录定位固定 DLL,因此必须从仓库根目录运行;不要修改已完成 LS 来改变该基线。 +- Stage 6 lateral-all 测试夹具依赖仓库根目录的当前工作目录定位固定 OSQP DLL;不要修改已完成 LS/ST/OSQP/发布门面来改变该基线。 执行要求: -- 严格逐任务 TDD;Task 4–6 各自独立提交,提交前运行 git diff --cached --check,并用 git diff-tree 核对范围。 -- Task 4 只创建 EMPlanner/Trajectory 下的轨迹组装代码、TrajectoryChecks.cs,并修改验证宿主 Program.cs。必须保证方向符号、速度分量、yaw rate、严格递增时间、不递减 PathS、精确零速终端及 0.20 s hold tail 一致。 -- Task 5 只创建 EmTrajectoryValidator.cs 并修改 TrajectoryChecks.cs。必须独立重算运动学与冗余字段,使用姿态和 0.025 m 最大步长的 swept collision 检查,不得把求解器状态当成发布证据。 -- Task 6 只创建 IEmPlanningService.cs、EmPlanningService.cs、EmPlanningServiceChecks.cs,并修改 Program.cs 与 EMPlanner/README.md。按计划规定的唯一顺序组织纯 Plan(request, cancellationToken) 管线,使用请求时间戳,不读系统时钟,不发布部分求解向量,不修改请求所有的列表。 -- 只能通过 IQpSolver/QuadraticProgram 使用 OSQP;禁止新增 P/Invoke、当前工作目录依赖、UI 或硬件对象。 -- 不修改无关 Map、CoarsePath、PathSmoothing、旧 auto_avoidance、已完成 LS/ST/OSQP 后端;不实现滚动执行、控制适配或动态障碍物。 +- 严格逐任务 TDD;Task 1–3 各自独立提交,提交前运行 git diff --cached --check,并用 git diff-tree 核对范围。 +- 保持单次 EmPlanningService 纯请求边界:协调器只能消费其不可变结果,不能把 UI、硬件或当前工作目录依赖回灌到核心。 +- 不修改无关 Map、CoarsePath、PathSmoothing、旧 auto_avoidance、已完成 Foundation/OSQP/LS/ST/Trajectory/Validation/Facade 文件;不实现动态障碍或控制适配。 阶段结束时: -- 仅在 Task 4–6 均有独立 RED/GREEN 证据和计划出口验证后,连续两次运行 em-core-all,并运行 longitudinal-model、longitudinal-integration、lateral-all、optimization、osqp、all-foundation 及 git diff --check。 +- 仅在 Task 1–3 均有独立 RED/GREEN 证据和阶段出口验证后,运行计划规定的回归和 git diff --check。 - 确认暂存区为空、起始用户修改仍保留;只更新并单独提交 docs/superpowers/progress/em-planner-progress.md。 -- 返回提交、RED/GREEN 证据、命令/退出码、未处理基线问题,并明确停在 Task 6。 +- 返回提交、RED/GREEN 证据、命令/退出码、未处理基线问题,并给出 Stage 10 的精确下一窗口提示词。 ```