Commit Graph
100 Commits
Author SHA1 Message Date
weichenandCursor 39df2d88f7 docs(ops): claim post-restart durable body snippet task
Record that the second restart already restored V3/r2 and that only the stale UI-06 bodySnippet expectation was wrong.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:28:17 +00:00
weichenandCursor 5db2d9a3b1 fix(e2e): persist the winning A1 body snippet for post-restart
UI-13b already made A1 the durable document, but phase-state still expected the UI-06 marker. Record successful saves as the latest snippet, ignore conflict drafts, and write that final value at UI-15-pre without relaxing the restore assertion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:28:17 +00:00
weichen eb85b8a068 merge: fix/document-revision-post-restart-selector 2026-09-13 23:23:59 +00:00
weichenandCursor 1a98c0cdeb docs(ops): record phase-split UI acceptance results JSON
Document that main keeps ui-acceptance-results.json and post-restart writes a sibling ledger so the 18-case main book is not overwritten.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:23:28 +00:00
weichenandCursor 0936a94fdf fix(e2e): write post-restart results to a separate ledger
A successful post-restart recordPass would overwrite the main 18-case ui-acceptance-results.json. Keep that historical name for main and write ui-acceptance-results-post-restart.json after restart, while still sharing phase-state and secrets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:23:27 +00:00
weichenandCursor 8907b61745 docs(ops): claim post-restart project title selector task
Record the schema31 strict-mode failure, the banner/entry locator contract, and phase-split Playwright directories. Do not mark UI-15 passed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:21:09 +00:00
weichenandCursor 3c26fcb2f8 fix(e2e): assert restored project in the banner and isolate phase artifacts
Page-wide project-name text hits both the top bar and the session rail after restart. Click the complementary exact title, then assert the banner exact name. Split Playwright output and HTML reports by UI_PHASE so post-restart cannot wipe main traces.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:21:09 +00:00
weichen b824948a5a merge: fix/document-revision-reviewer-duty-sync 2026-09-13 22:48:05 +00:00
weichenandCursor a0196142a3 docs(ops): record heal lock serialization against duty transfer
Note that HealProjectDocuments now shares pg_advisory_xact_lock(project_id) with member writes so an old reviewer cannot be written back.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:44:40 +00:00
weichenandCursor 09e3581def fix(docduty): serialize heal with the project duty lock
Heal used to resolve and backfill on the pool without the member-write advisory lock, so a stale snapshot of reviewer A could overwrite a committed transfer to B. Lock, resolve, and document updates now share one transaction and the same lock key.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:44:40 +00:00
weichenandCursor d7d656f66f docs(ops): record atomic duty-revoke transaction
Document that lock, holder reads, member writes, and reviewer/approver slot clears share one transaction, with heal after commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:37:27 +00:00
weichenandCursor 0fa4a5784e fix(authz): clear reviewer/approver slots in the member-write transaction
Duty revoke must share the project advisory lock with reading old holders and writing members, so a post-commit service snapshot cannot miss a transfer. Heal still fills the new holder after commit, and sync failure stays ERR_DUTY_SYNC.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:37:24 +00:00
weichenandCursor be394bf617 docs(ops): record final reviewer duty-sync repair round
Sync short-term, checklist, and handoff with remaining 6145 risk and
the isolated PG verification path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:29:53 +00:00
weichenandCursor 8b6bf2cca1 fix(api): sync removed members and fail tasks without a ledger
Remove now reconciles document slots and returns ERR_DUTY_SYNC on
failure. CreateOrGetDocument errors abort the task. The frontend
refreshes workflow docs after add, update, restore, and remove.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:29:53 +00:00
weichenandCursor 9a19bcc12c fix(docduty): revoke inactive slots and explicit duty changes
Empty assigned heal now clears only exited or non-member reviewer/approver
holders and never blanks author. Explicit reconcile uses the pre-update
duty plus a project advisory lock so viewer demotion and transfers are
not left to generic heal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:29:53 +00:00
weichenandCursor ec89b4c8b0 docs(ops): record independent-review duty-sync tighten
Document assigned-authoritative heal, member-change sync, owner
non-demotion, isolated PG command, compatibility, and remaining 6145 risk.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:16:44 +00:00
weichenandCursor c2d4e9a55c test(docduty): add isolated PG heal, backfill, and concurrency fixtures
Require TEST_DATABASE_URL and refuse agent_system_dev. Script creates a
throwaway database, runs packages serially, then drops it.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:16:44 +00:00
weichenandCursor 7ef34a685d fix(web): send document_duty on member add, update, and restore
Post-create role changes were silently dropping reviewer/approver
because only project_role was persisted.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:16:44 +00:00
weichenandCursor 4512132b20 fix(api): keep owner role and sync docs after duty upsert
Omit project_role no longer defaults to member. Exclusive duty writes
take an advisory lock and retry conflicts so last-writer wins without
dual reviewers. Author write tests require err==nil.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:16:43 +00:00
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