diff --git a/.project-docs/30-worklog/tasks/20260928-consultation-scope-83fa19c2.md b/.project-docs/30-worklog/tasks/20260928-consultation-scope-83fa19c2.md new file mode 100644 index 00000000..a396282b --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260928-consultation-scope-83fa19c2.md @@ -0,0 +1,41 @@ +# Task: Fix consultation topic scope mismatch + +## Identity + +- Task ID: 20260928-consultation-scope-83fa19c2 +- Mode: Feature +- Branch: codex/20260928-consultation-scope-83fa19c2-consultation-scope +- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260928-consultation-scope-83fa19c2 +- Base commit: b26e25c9ed26bf30f4d0bc03869c223f0fe34386 +- Owner: codex +- Status: Ready for Integration + +## Scope + +- Diagnose the reported consultation error: 老师话题与当前项目或编程会话不匹配. Trace project-level topic selection and per-question Pi context in Main; no client product change is needed. + +## Intent And Constraints + +- Concurrent and Planning Gates Passed. Official start/status match this feature task, branch, isolated worktree and b26e25c base. Read agent entry, own record, integrated teacher ADR, architecture/domain, evidence/reflection/commitment context and all 127 peer Scope/Intent/Promotion records. Historical placeholders remain unknown with no concrete dependency. +- The approved client contract stores agent topics per account/project and captures the current Pi source for each question. Preserve Main-only transport, readonly tools, student payment, question identity and frozen read context. No subagents without fresh consent, production calls, installation, merge, push or deployment. +- The observer design implementation task may edit adjacent teacher code; no semantic conflict with project-level manual topics. Other worktrees and the three known main-directory documents remain untouched. Main was unowned/dirty; official isolation from an occupied surviving worktree succeeded without adoption or registry repair. +- Resume gates passed after reading the current 128 peer records. New peer 20260928-agent-single-chat-27da516b proposes cross-project continuity but explicitly requires separate acceptance before implementation; this diagnostic fix continues to follow the accepted project-level topic contract. + +## Outcome + +- Client cloud-runner sends topic.id as the stable cloud thread and currentRequest.sourceConversationId as local_context.scope.source_session_id. Modern routes use sourceId=project. Existing UI project-scoped topic persistence is intentional. +- The screenshot's exact message originates in Yuxi coding_teacher_service.submit. It compares the entire first question scope to every later question, thereby rejecting a changed Pi session within the same project. Related server task: 20260928-consultation-scope-yx-1d836a72, based on master 10941ee. +- Yuxi's deterministic submit regression reproduces the exact 409 twice; project-only admission fixes both while retaining cross-project rejection. Server HTTP/PG/worker verification is tracked by that task. + +## Verification + +- Read-only source trace: modern project topic routes, service-owned store scope, renderer project-scoped state, cloud-runner question payload and existing test binds a project-level question to its captured coding session. No client product/test edits; client tests/build not rerun for this diagnostic record. +- Yuxi fix passed 2260 unit cases (1 skipped), 10 real HTTP/PostgreSQL/checkpoint/native-worker cases and required engineering/docs checks. Authorized fresh readonly review 20260928-consultation-scope-review-c7e4a91b (record cdeae44) independently traced the client contract and reported Standards PASS / Spec PASS, no material findings. + +## Follow-ups + +- Merge and deploy the reviewed Yuxi fix when authorized. Existing client history need not be deleted. Production API deployment is not performed by this task. No client product release is required by this correction. + +## Promotion Candidates + +- No new client contract. The accepted coding-teacher ADR already specifies project-level topics and per-question source snapshots; Yuxi must align admission with it. Avoid resetting topic history as a workaround.