Commit Graph
100 Commits
Author SHA1 Message Date
weichenandCursor 2f0a1b337c fix(docduty): treat assigned duty as authoritative on heal
Align document slots to project document_duty even when the wrong ID is
an active member, and fail generate/list instead of returning stale
placeholder duties. Owner author backfill now picks creator, else lowest ID.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:16:36 +00:00
weichenandCursor 60e2b1adf2 docs(ops): mark reviewer duty-sync commits complete
Keep the short-term checklist aligned with the four atomic commits on this branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:58:02 +00:00
weichenandCursor c1bdfe3920 feat(web): persist exclusive reviewer duty on project create
Keep project_role as member/viewer, send document_duty=reviewer for USER_B, and clear the seed 李主管 reviewer so the assigned reviewer is the one that syncs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:57:53 +00:00
weichenandCursor 6a68e04f1f feat(docduty): resolve project reviewer onto controlled docs
Stop inventing reviewer_id=2. Use project document_duty as the authority, heal missing or non-member placeholders, and keep write paths rejected for reviewer and outsiders.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:57:44 +00:00
weichenandCursor 6cd3991bad feat(db): store document duty on project members
Project access roles cannot carry reviewer. Persist a separate exclusive document_duty so later controlled docs can inherit the assigned reviewer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:57:43 +00:00
weichenandCursor dd24105742 docs(ops): register reviewer duty-sync task
UI-13a now proves USER_B is viewer despite UI-01 assigning reviewer; claim a new mutex and document the 6145 ledger gap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:57:22 +00:00
weichen 639969ff7e merge: fix/document-revision-duty-cell-assertion 2026-09-13 21:29:26 +00:00
weichenandCursor 5183d2866d docs(ops): record tightened duty-cell test count
UI-13a reviewer contract now has 6 unit cases; keep the short-term note aligned without rewriting the already-reviewed fix commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:28:55 +00:00
weichenandCursor c86e229303 fix(e2e): require exact reviewer duty, reject viewer fallback
USER_B is assigned reviewer in UI-01. Accept only role=reviewer on
the duty control, and reject assignable or enabled selects.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:28:15 +00:00
weichenandCursor c8318e8551 fix(e2e): read duty from select value, not row option text
UI-13a treated concatenated select options as the current role.
Assert the control value or badge role for that doc instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:26:23 +00:00
weichen dd5671e542 merge: fix/document-revision-workflow-category-navigation 2026-09-13 21:06:37 +00:00
weichenandCursor ba4bb41e1c fix(e2e): switch to workflow category before opening controlled docs
UI-13a stayed on private after upload, so the doc menu had no
doc_proj* entries. Always use the category trigger first, then exact id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 21:03:23 +00:00
weichen 48a4dcb86d merge: fix/document-revision-fast-completion-observation 2026-09-13 20:44:26 +00:00
weichenandCursor f0ab254ed1 fix(e2e): accept already-completed squad turns without waiting inflight
UI-11 can finish before the waiter sees pending. Treat success terminals
as done, keep upload/correspondence/error checks, and cover both timelines.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 20:43:33 +00:00
weichen 339e871242 merge: fix/document-revision-quality-repair-workspace-contract 2026-09-13 20:21:05 +00:00
weichenandCursor 01c5972ead fix(squad): void quality repair rounds on backend or containment failure
Promote root output.md only when the runner succeeded, protected parents
were untouched, and the local target is trusted. Restore errors abort
instead of being ignored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 20:20:13 +00:00
weichenandCursor b7cfb28217 fix(squad): keep quality repair inside a local snapshot workspace
Repair TASK.md told the model to edit ../../output.md, so the local
target never appeared and UI-03 stayed quality_failed. Snapshot parent
inputs locally, restore them on containment violations, and promote
only a trusted repair/output.md before revalidate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 20:15:54 +00:00
weichen 8b1a531947 merge: fix/document-revision-editor-hydration-race 2026-09-13 20:02:09 +00:00
weichenandCursor 9b43bd6a73 fix(web): bind editor saves to the opened doc and real PATCH
Drop test-only ETag helpers. App now calls saveControlledBlockEdit,
which PATCHes once on the bound editor docId or fail-closes. Resume
hydrate after a blocked first load, and refuse silent doc switches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 20:00:47 +00:00
weichenandCursor 1b04d962d1 fix(web): keep block ids and drafts across editor hydration races
Background GET rebuilt markdown AST with Math.random ids and dropped
head_block_map, so save closed the modal without PATCH. Align hydrate
to the ledger map, gate in-flight responses, and fail-closed on stale ids.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:54:36 +00:00
weichen 4c465d2cb0 merge: fix/document-revision-pi-runner-module 2026-09-13 19:30:05 +00:00
weichenandCursor 21c8a0063b docs: claim pi-agent settle-policy image COPY hotfix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:29:34 +00:00
weichenandCursor 369fe7bf51 fix(pi-agent): copy settle-policy into the runner image
runner.mjs imports ./settle-policy.mjs but the Dockerfile only copied
runner.mjs, which crashed shuimu-pi-agent-dev on import. COPY the
runtime module and assert every relative import is in the image set.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:29:34 +00:00
weichen 55a4f399fa merge: fix/document-revision-prelim-output 2026-09-13 19:26:50 +00:00
weichenandCursor 051e69ccd1 fix(pi-agent): clear recovered SDK transients before settle
auto_retry_end success=true now drops providerTransient and lastErr so
a later agent_settled can succeed when the in-process retry landed a
real target. A new error after recovery still fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:25:41 +00:00
weichenandCursor becd295c9d fix(service): keep explicit backend failure fail-closed
A this-invocation output.md is preserved and never retried over, but
Success=false stays a step failure so truncated writes cannot pass.
Prior-round residue without a trusted patch is also not success.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:24:47 +00:00
weichenandCursor d9c1791e56 docs: record dockerignore hole and tightened step retry contract
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:21:56 +00:00
weichenandCursor 6fd685fd47 fix(service): retry only safe transients and keep existing targets
Fresh step invocation is limited to provider terminated/connection plus
a missing target, or an explicit runner failure. A deliverable already
on disk is accepted and never overwritten.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:21:56 +00:00
weichenandCursor 35b2e922bf fix(deploy): keep official templates in the image build context
*.md was excluding templates/docs from Docker context, so COPY and
go:embed could not see prelim_design.md at /app. Un-ignore those trees
and assert the smoke image can cat the official file.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:21:56 +00:00
weichenandCursor 7be683d9c7 docs: record UI-11 write-terminated settled-failure root cause
Separate MiniMax/SDK connection failures from the product gap that
reported process 0 and agent_settled as step success.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:17:09 +00:00
weichenandCursor 11bdba0052 fix(pi-agent): treat exhausted SDK retry plus settle as failure
agent_settled after terminated or auto_retry_end success=false is not a
deliverable. Return retryable for provider transients and keep clean
missing targets permanent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:17:09 +00:00
weichenandCursor ce89939cd8 feat(service): retry transient step failures with a fresh invocation
runOneStep re-executes the backend at most once when the first attempt
is a settled failure or missing target after provider errors, records
each attempt honestly, and fail-closes after the bound.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:17:09 +00:00
weichenandCursor 98619c7b56 feat(agent): classify settled-failure as bounded retryable
Treat process-0 plus terminated/Connection error/auto_retry_end as a
provider transient. Permanent missing deliverables stay fail-closed and
are never reconstructed from truncated write arguments.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:16:46 +00:00
weichenandCursor 32cf9ad4fc docs: claim UI-11 prelim output contract gap in_progress
Record the missing-output.md failure, embed/path-mapping tradeoffs, and CURRENT mutex without marking the task done.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:09:48 +00:00
weichenandCursor 333c7a604f fix(pi-agent): do not settle success without a deliverable
agent_settled after exhausted retries is not success; missing or empty target files must return ok:false instead of an empty patch list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:09:48 +00:00
weichenandCursor 4a97ff5dd1 fix(agent): map runner patch paths and require real targets
Normalize absolute, ./, and duplicated step prefixes onto output.md, and fail closed when the runner reports ok without a non-empty deliverable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:09:48 +00:00
weichenandCursor e04829ee8e fix(template): embed official doc templates for container cwd
App images have no templates/ checkout, so GetDocTemplate fell back to a two-section stub and prelim_design lost its real contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 19:09:48 +00:00
weichen 2a58674299 merge: fix/document-revision-second-doc-routing-lease 2026-09-13 18:47:14 +00:00
weichenandCursor 4dcc5011ac docs: record UI-11 prelim_design card title vs prompt alias
Keep the routing/lease task in_progress and document why the second-doc locator must use the registered doc id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:46:21 +00:00
weichenandCursor bebe1e3690 test(e2e): open UI-11 prelim_design by registered doc_proj id
Card title is 系统初步设计方案, not 系统设计输入; select doc_proj*_prelim_design so the template slot cannot be mistaken for the generated document.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:46:21 +00:00
weichenandCursor 9a9e25806c docs: claim UI-11 routing and lease gap in_progress
Record the tenth-round routing/lease failure, request-scoped release tradeoff, and CURRENT claim without marking the task done.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:42:44 +00:00
weichenandCursor bdd1b35b86 test(e2e): require UI-11 task run 202 before completion
Arm tasks/runs waiter before send and assert HTTP 202 so a sync DOC_BUSY completed turn cannot pass as a new document run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:42:44 +00:00
weichenandCursor 9f6401847d fix(docgov): release human lease after PATCH request
Request-scoped defer release after authorized acquire so success/409/projection failure cannot leave a 15m residual that blocks squad runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:42:44 +00:00
weichenandCursor 56e052f3cb fix(web): prefer named deliverable over negated 需求
Explicit aliases (including 系统设计输入) must win before keyword fallback so UI-11 does not route to intake.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:42:44 +00:00
weichen 77f5db1e90 merge: fix/document-revision-e2e-overlay-transition 2026-09-13 18:25:05 +00:00
weichenandCursor 59dc73ec7c docs: claim UI-07 transition sampling gap in_progress
Link the archived ninth-round mid-transition failure; do not mark
the task done before a real UI rerun.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:24:27 +00:00
weichenandCursor 9f676273df test(e2e): wait for overlay CSS transition to settle
Poll pane document-block computed styles until two frames match.
Pure requires transparent background and box-shadow none; manual/all
require a real overlay mark without hard-coded theme colors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:24:27 +00:00
weichen 58ae25444d merge: fix/document-revision-e2e-overlay-selector 2026-09-13 18:07:46 +00:00
weichenandCursor 18a5457c07 docs: claim UI-07 overlay selector gap in_progress
Link the archived eighth-round failure; do not mark the task done
before a real UI rerun.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:06:53 +00:00
weichenandCursor 20b6092cf0 test(e2e): sample overlay styles on pane document-blocks
UI-07 reads every active-pane document-block after the real overlay
fetch. Pure must stay unmarked; manual/all may share amber on the
same human hunk. UI-10 waits for history to auto-close.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 18:06:53 +00:00
weichen 1b020790da merge: fix/document-revision-e2e-save-selector 2026-09-13 17:47:28 +00:00
weichenandCursor 5705f99fdc docs: claim UI-06 save-selector gap in_progress
Link the archived seventh-round failure; do not mark the task done
before a real UI rerun.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:46:37 +00:00
weichenandCursor 5c42ba7c45 test(e2e): save inside editor dialog with exact 保存修改
UI-06/13b click 保存修改 only inside 编辑受控块; UI-13a asserts
the dialog is absent instead of a page-wide /保存/ match.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:46:37 +00:00
weichenandCursor a42895ccdc feat(web): give block editor an accessible dialog label
Expose role=dialog and a stable aria-label so save can be scoped
without changing the modal's visuals or save behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:46:37 +00:00
weichen 4a4fbcf2a6 merge: fix/document-revision-e2e-block-selector 2026-09-13 17:25:41 +00:00
weichenandCursor bb9f347fc9 docs: claim UI-06 block selector gap in_progress
Link the archived sixth-round failure; do not mark the task done
before a real UI rerun.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:24:54 +00:00
weichenandCursor faaacae5f6 test(e2e): locate pane blocks by document-block testid
UI-06 and UI-13b reuse the pane-scoped helper; stop clicking overlay
or native heading/paragraph tags that the renderer does not emit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:24:54 +00:00
weichenandCursor 9e0901ce25 feat(web): mark real document blocks without overlay
Add data-testid=document-block plus block id on every wrapper so
pure-mode editors stay addressable without changing visuals.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:24:54 +00:00
weichen 61905e99c1 merge: fix/document-revision-e2e-reject-routing 2026-09-13 17:09:42 +00:00
weichenandCursor d45efa2ff1 docs: record fail-closed ETag and viewer comment hardening
Keep the reject-routing task in_progress; no real UI rerun this round.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:08:35 +00:00
weichenandCursor cf3d126436 feat(web): never name-escalate server controlled zero duty ids
Mark server summaries dutiesAuthoritative so id 0 stays fail-closed
viewer instead of matching names like a legacy local document.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:08:35 +00:00
weichenandCursor d5ce81228c feat(web): keep viewer comments read-only
Hide add-comment affordances and reject submit for viewer; keep
author/reviewer/approver comment roles unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:08:35 +00:00
weichenandCursor 4dbd9eecb9 feat(web): fail-closed controlled save without hydrate ETag
Reject revision-state network/5xx and missing ledger on controlled
hydrate; never PATCH 0:0 unless the document is freeform.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:08:35 +00:00
weichenandCursor 0a34daf4b5 docs: record duty forgery and ETag overwrite risks
Document the privilege-escalation and silent-overwrite hazards; keep
the reject-routing task in_progress pending real UI rerun.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:02:23 +00:00
weichenandCursor be33409297 test(e2e): open both editors before UI-13b first save
Require matching r/etag on both windows and keep A2's editor filled
before A1 saves so the conflict is a real race.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:02:23 +00:00
weichenandCursor eefdd4c4fd feat(web): keep server duties and PATCH with hydrate ETag
Retain ledger author/reviewer/approver, fail-closed unknown users to
viewer, and send the opened revision ETag instead of a fresh GET.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:02:23 +00:00
weichenandCursor 79797cab7c feat(docgov): project document summary returns authoritative duties
ListWorkflowDocumentsByProject now projects author/reviewer/approver
id+name so clients cannot invent the current user as author.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:02:23 +00:00
weichenandCursor 52c0292ff7 docs(ops): keep pending-flow in_progress and split its mutex
UI-05b has not reached reject yet, so pending-flow cannot be done; move it to pending-report-ui so reject-routing can keep document-revision-runtime-ui.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 16:50:58 +00:00
weichenandCursor 5571e93922 test(e2e): pin UI-05b to intake and tighten history/conflict paths
Require 当前受控文档 deixis plus tasks/runs task_key/doc_id checks so reject stays on intake; compare inside 版本历史, hide the project from non-member C, and split UI-13 into reviewer-readonly plus dual-author conflict.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 16:50:02 +00:00
weichen 3157a66f2d merge: fix/document-revision-e2e-pending-flow 2026-09-13 16:26:19 +00:00
weichenandCursor ca01a1cf9d test(e2e): open pending change report before confirm or reject
UI-04 must close via the dialog 关闭 button; UI-05a/05b must click 待确认报告 and assert panel actions so leftover first-round reports cannot hide the decision path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 16:25:39 +00:00
weichen e6cd7bef9e merge: fix/document-revision-quality-context 2026-09-13 16:11:14 +00:00
weichenandCursor 75345431e4 fix(squad): require action-plan table separator and equal columns
Reject 待续 status-cell exemptions unless the same contiguous table has a header immediately followed by a valid separator and the data row width matches the header.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 16:10:24 +00:00
weichenandCursor dee18d7fc0 fix(squad): exempt only action-plan status cells for 待续
Treat structured 阶段/状态/进度 cells as workflow state, not hedging, while still failing body, lists, and non-status columns.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:59:56 +00:00
weichen 40526773be merge: fix/document-revision-active-doc-routing 2026-09-13 15:44:48 +00:00
weichenandCursor 6f0057c014 fix(docgov): pin task routing to active controlled doc on current-doc deixis
When the user refers to the current document, keep task_key/doc_id on the selected registered doc_proj instead of rerouting by domain keywords.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:43:42 +00:00
weichen 86598e7d0e merge: fix/document-revision-sse-idempotency 2026-09-13 15:22:59 +00:00
weichenandCursor f4aa0da14f test(docgov): lock quality projection, stage halt, and uncontrolled auto-repair
补齐 QualityReport 拦截投影与阶段停链断言,并证明 CLI 非受控路径 AutoRepair=false 不会追加 repair 步。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:20:42 +00:00
weichenandCursor 2d86d330e5 fix(docgov): keep squad AutoRepair/Success semantics; force repair only on controlled docs
小队修复预算只认 AutoRepair,Success 只表示执行完成;bizdev 在解析出 docRec 后强制开启修复,投影与阶段停链仍以 QualityReport 为准。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:19:20 +00:00
weichenandCursor 9e50bc0543 fix(docgov): stop ExecuteStage on quality_failed without absorbing facts
阶段链在 ExecuteTask err=nil 后同时检查质量门禁与 Success;失败立即停链并保留 artifact,不注入 ExtractedData/PriorDoc,不宣称阶段成功。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:17:40 +00:00
weichenandCursor 107f898362 fix(docgov): tighten prohibited-phrase exemption; lock stage request fields
自检豁免改为同行且须 meta+否定紧邻或引号引用,避免正文「无」误放过;buildBizdevStageRequest 单测锁住身份/职责字段与 AutoRepair 契约。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:16:12 +00:00
weichenandCursor 92488b327a fix(docgov): short-circuit quality_failed before controlled doc projection
质量门禁未过时在 SetDocumentWorkDir/Materialize/哈希更新/完成活动之前返回,保留隔离工作区与失败摘要,不改正式 head。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:14:55 +00:00
weichenandCursor 900af79e14 fix(docgov): quality gate self-pollution, server repair budget, quality_failed UI
受控小队任务服务端启用修复预算;否定性自检引用不再误报;quality_failed 保持失败且不激活未过门禁稿。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 15:00:50 +00:00
weichenandCursor 43e03e4969 fix(docgov): idempotent lookup before busy; SSE write deadline heartbeat
Return existing task run 202 for the same turn before scope/preflight so
SSE disconnect retries do not hit DOC_BUSY or duplicate chat. Extend
task-run events write deadlines with heartbeats without dropping global
HTTP WriteTimeout. Reconnect subscribeTaskRunEvents on EOF via after_seq.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 14:37:18 +00:00
weichen f3e4eeb42b merge: fix/document-revision-runtime-ui03 2026-09-13 14:08:21 +00:00
weichenandCursor 020712dfbd fix(e2e): UI-11 send upload to register freeform doc-free
Chip assert after setInputFiles, wait POST /freeform-documents 2xx on
send, then pin doc-free pane id and drain this-turn assistant before
leaving UI-11.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 14:07:41 +00:00
weichenandCursor c33a6d8406 fix(e2e): strict squad terminal and doc-free upload selectors
Only completed/pending_author_confirmation pass waitForSquadCompletion;
category trigger/data-category for private open; UI-11/16 pin exact
doc-free id without global attachment text clicks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 14:05:46 +00:00
weichenandCursor 301e1f401e fix(e2e): stable doc selector and this-turn assistant waits
Add doc-selector-trigger / active-document-pane data attrs; resolve
assistant via virtualizer data-index siblings; UI-02/03 and open-by-id
helpers stop relying on global text or first dropdown-trigger.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 14:01:41 +00:00
weichenandCursor 7466a15319 fix(docgov): harden UI-03 sync poll, reconnectRunId, and E2E status attrs
Use deliverablesRef + limited poll for post-task server docs; pass
reconnectRunId across auto-retry; GetRun reads idempotency_key;
StartClaimedRun fails closed on UpdateRun; MessageBubble/E2E scope
this-turn assistant; correct audit retry/schema19 wording.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 13:54:49 +00:00
weichenandCursor 76e2028761 fix(docgov): UI-03 post-task doc sync, claim idempotency, schema30
Restore controlled-doc merge after task terminal states, prioritize intake
template match, ClaimRun before chat writes, and extend chk for
pending_author_confirmation via goose 00030. Real volume migrate + UI
re-run remain pre-merge gates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 13:39:07 +00:00
weichen e45c2b7d36 merge: fix/document-revision-runtime-task-scope 2026-09-13 13:00:17 +00:00
weichenandCursor 5096581651 fix(projectinstance): resolve pre-activation task scope via governing three-state
Never-activated projects were allowed by access ABAC but rejected with
TASK_SCOPE_UNRESOLVED 409; use GetGoverningInstanceForAccess so nil maps to
ScopePreActivation, live to stage scope, and closed stays unresolved.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 12:59:10 +00:00
weichen aeeb48ba7d merge: fix/document-revision-runtime-ui02-access 2026-09-13 12:36:12 +00:00
weichenandCursor b78574b065 fix(web): lock create-project confirm against double-submit race
React state bootstrapId could be read as null by two concurrent confirms;
use a sync in-flight ref plus submitting UI so create runs once and member
retry stays serial/idempotent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 12:35:46 +00:00
weichenandCursor 1fd500e2b9 docs(audit): record UI-01/02 access, chat authz, and member persist fixes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 12:25:22 +00:00
weichenandCursor c6558bc757 fix(web): persist initial project members after createProject
Create Project no longer treats local member lists as success: non-creator
initialMembers are upserted via the authorized members API, with bootstrap
project id retained for idempotent retry when persistence partially fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 12:25:22 +00:00
weichenandCursor cc394c815c fix(api): require project membership before chat and chat SSE
Unrestricted stage access on projects without a live workflow must not
let arbitrary authenticated users join by project_id. Enforce member or
creator (admin per existing policy) before stage ABAC, and reject chat
streams with JSON 403 before SSE headers/flush.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 12:25:22 +00:00
weichenandCursor f50692be25 fix(projectinstance): distinguish never-activated vs closed governing instances
GetLiveInstance remains active-only; access ABAC now uses
GetGoverningInstanceForAccess so completed/terminated PG rows are not
treated as unrestricted legacy projects, while brand-new projects without
instances stay open for creators.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 12:25:22 +00:00
weichen 0553c48039 merge: feature/herdr-agent-governance 2026-09-13 12:16:29 +00:00
weichen 6544f523f5 docs(ops): finalize Herdr governance integration 2026-09-13 12:16:14 +00:00