Commit Graph
466 Commits
Author SHA1 Message Date
weichenandCursor 91de320b67 fix(web): mount revision toolbar for registered uploads only
Keep template/legacy gates; allow doc-free uploaded_file toolbars while
blocking unregistered doc-upload orphans.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
weichenandCursor ef0b2645e5 feat(web): await freeform upload register before send
Make InputArea/onSendMessage async; fail closed with an explicit UI error
when createFreeformDoc fails, and persist fileStore under server doc-free IDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
weichenandCursor a3c6df309b feat(api): expose POST /freeform-documents for upload registration
Authorize project members, reject direct project_shared creates, and
cover idempotent client_key plus revision-state after register.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
weichenandCursor 9c7d6d49b2 feat(freedoc): CreateDocument with client_key idempotency
Support direct freeform create for upload fact-source registration while
keeping source_content_sha256 as a content fingerprint only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
weichenandCursor 1e364f17ab feat(db): add freeform client_key for idempotent upload registration
Persist owner-scoped client_key on freeform_documents so upload create
can retry safely without inventing local doc-upload orphans.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
weichenandCursor 9a36e7c896 docs(ops): document UI_PHASE split for Playwright acceptance
Note main vs post-restart runs and credential-safe evidence layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:53:35 +00:00
weichenandCursor bd53984790 test(web): rewrite DOCREV UI acceptance without false PASS paths
Require observed squad start before terminal status, dual high-risk
confirm/reject, computed overlay diffs, real A/B contexts, UI logout,
and UI_PHASE post-restart evidence. Sanitize network paths; no mocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:53:35 +00:00
weichenandCursor fe979fdd21 fix(web): gate DocumentRevisionToolbar to server-backed docs
Skip revision-state for template-only and legacy local mocks; show a
non-error preview hint instead of 「账本未就绪」. Keep generated controlled
and server freeform on the toolbar; leave IndexedDB upload orphans unmounted.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:53:35 +00:00
weichen 5724f4f74e docs(ops): advance document revision slot to real UI e2e 2026-09-13 10:14:07 +00:00
weichen a7bd65b489 docs(docrev): record fresh gates and acquire integration slot 2026-09-13 10:12:45 +00:00
weichenandCursor 353d9fdf33 docs(ops): drop PutChangeProposal from decision-idempotency notes
Record that compensation must not seed memory-only proposal state.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:10:56 +00:00
weichenandCursor 0aae84d0a8 fix(docgov): remove PutChangeProposal memory-seed helper
Do not expose a production path that mutates only the in-memory proposal
index. Cover decision idempotency via ProposeModification+Decide and the
existing package MarkProposalApplied tests instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:10:56 +00:00
weichenandCursor 5f2063ebbe docs(ops): mark Playwright UI acceptance skeleton as checked in
Point the UI checklist at the committed runtime spec and config instead of
a deferred plan-only placeholder.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:09:32 +00:00
weichenandCursor 09488132dd docs(ops): note decision idempotency and Playwright skeleton
Record MarkProposalApplied ordering, CommitAgentVersion retry contract,
and the UI acceptance skeleton paths on the short-term task.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:09:18 +00:00
weichenandCursor 46769467bf chore(web): add Playwright UI-only acceptance skeleton
Add @playwright/test, headless config, and document-revision-runtime specs
gated by RUN_UI_ACCEPTANCE without mocks, routes, or API/DB fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:09:18 +00:00
weichenandCursor 9c8a41982c fix(api): guide idempotent decision retry after governance mark failure
Surface a same-decision retry hint and cover commit-then-MarkProposalApplied
compensation via PutChangeProposal when the proposal index was missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:09:18 +00:00
weichenandCursor 9a9ffa48cc fix(docrevision): allow idempotent commit retry after ledger commit
When a candidate is already committed, matching expected hashes return the
current revision state so projection and MarkProposalApplied can finish;
reject on an already-committed candidate stays an error.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:09:18 +00:00
weichenandCursor 0b5f4997e2 fix(docgov): mark proposal applied after durable DB write
Write applied status to Postgres before mutating memory so a failed UPDATE
cannot leave a false in-memory applied state; treat already-applied as
idempotent success and expose PutChangeProposal for compensation seeding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:09:18 +00:00
weichenandCursor 6fb40af05e docs(ops): note frontend pending_author_confirmation mapping
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:04:14 +00:00
weichenandCursor 7f88b6d882 fix(web): map pending_author_confirmation instead of defaulting completed
History refresh now preserves awaiting-author status and shows a visible
待编制人确认 label; live done path reads run terminal status before paint.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:04:05 +00:00
weichenandCursor 9ed5987104 test(bizdev): drain pending confirmations in full-link stage E2E
Stage chain now stops on high-risk candidates; full-link mirrors the
product path of confirm + re-run until success or DocGov proposal intercept.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:00:45 +00:00
weichenandCursor b5a3b72756 fix(bizdev): stop stage chain on pending agent confirmation
PendingAgentCandidateID must not continue the stage loop or inject
unconfirmed MarkdownBody/ExtractedData as PriorDoc. Return explicit
awaiting-confirmation status; user re-runs the stage after deciding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:57:54 +00:00
weichenandCursor c990bcdb89 fix(bizdev): record delivery activity only after commit; surface proposal mark errors
Move RecordActivity off the pre-Materialize path: pending writes an explicit
awaiting note, failures skip completion, committed records 完成交付物.
MarkProposalApplied failures now return retryable governance/projection errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:55:42 +00:00
weichenandCursor d07d201728 docs(ops): record high-risk fact-source and pending reply gates
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:51:15 +00:00
weichenandCursor 0c6fb090ff fix(chat): show pending confirmation instead of completed for high-risk
Sync coordinator and async CompletionSummary use pending_author_confirmation
with artifact metadata for document entry; completed only after commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:51:15 +00:00
weichenandCursor 4f5a6188a7 fix(docgov): defer fact-source update until high-risk commit
Materialize needs_confirmation restores ledger head to output.md and
document_records hash; only committed heads update DocGov. Decision
handler projects after commit or reject. Stage gates DocGov proposals
via PendingProposal, not bare RequiresAuthorApproval.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:51:15 +00:00
weichenandCursor 87971fc953 docs(test): add high-risk confirm/reject branches to UI acceptance plan
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:38:22 +00:00
weichenandCursor 5caefc887a feat(web): full change-report panel and pending confirm/reject UI
Prefer pending reports on the toolbar, show risk items and impacts, and
call the decision API only when can_decide_pending is true.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:38:22 +00:00
weichenandCursor 79e8349d71 feat(docrevision): expose pending high-risk candidate on revision-state
Surface pending_candidate_id, report id, and risk so NeedsConfirmation
candidates are discoverable before they enter the version list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:38:22 +00:00
weichenandCursor 8594feb6cc docs(ops): note Materialize honesty and lease/projection review fixes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:32:08 +00:00
weichenandCursor 7b48ca2ecc fix(docgov): assert edit duty before lease; project via SaveDocumentContent
Unauthorized actors no longer grab leases; controlled PATCH projects through
DocGov so author_last_edited and audit survive, with idempotent retry on failure.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:32:08 +00:00
weichenandCursor 645c4b67b0 fix(bizdev): surface Materialize failures and block invalid auto-commit
TaskRunResult now fails visibly when ledger/report materialization errors;
invalid or unassessed reports are never auto-committed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:32:08 +00:00
weichenandCursor 4a91105e99 docs(docrev): evidence for materialize, patch order, and UI refresh
Expand the headless UI checklist and record remaining real blockers without
claiming PI narrative or E2E completion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:27:07 +00:00
weichenandCursor ff1a126415 feat(web): refresh revision toolbar after save and expose report entry
Bump revisionRefreshKey on save/hydrate so r and overlay reload; add a
latest change-report button wired to version change_report_id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:27:07 +00:00
weichenandCursor 75ec8785f3 fix(api): assert edit rights before ledger, then project body
Prevent fact-source writes ahead of ledger commit; projection failures return
DOCUMENT_PROJECTION_FAILED while keeping the ledger authoritative.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:27:07 +00:00
weichenandCursor a288dcf0cc feat(docrevision): materialize first-gen agent report without fiction
Open an explicit empty baseline then create a deterministic candidate/report
so the first squad success is visible as fallback analysis, not OpenTemplate-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:27:07 +00:00
weichenandCursor 7f8331f893 fix(docrevision): harden empty docID, per-doc auth, and failed-save honesty
Stage generation without a real document must not panic or enter the ledger.
Unknown orphan IDs are denied, write paths check author/lease/lifecycle, PATCH
no longer returns a fake 200, and overlay matching survives client/server block id drift.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 09:02:54 +00:00
weichenandCursor 95f0ead131 docs(ops): record document-revision-runtime gate evidence and commits
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 08:48:54 +00:00
weichenandCursor fa615fee2a docs(test): add headless UI acceptance plan for document revision runtime
Separate browser-only real acceptance from engineering unit/build gates and record gate evidence on the short-term task.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 08:48:32 +00:00
weichenandCursor d79fdf6ffa feat(web): persist freeform block edits and apply overlay modes
Stop skipping freeform PATCH saves and decorate BlockRenderer for pure/manual/all revision views with clear empty states.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 08:48:32 +00:00
weichenandCursor 46a1fcc945 feat(api): authorize revision routes and project fact-source saves
Resolve controlled/freeform/orphan docs, bootstrap on GET, write output.md or freeform content on PATCH, and wire lineage impacts for agent candidates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 08:48:32 +00:00
weichenandCursor ed1e232022 feat(docrevision): persist ledger in PostgreSQL with bootstrap
Hydrate/mutate against schema 00028, ensure first-access bootstrap, and build deterministic change reports instead of static fiction.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 08:48:32 +00:00
weichenandCursor 7ea686e6ba docs(docrev): audit runtime 404 and claim docgov remediation
Record in-memory ledger root cause, PG persistence plan, and CURRENT mutex claim on fix/document-revision-runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 08:35:19 +00:00
weichen c6c22494f8 merge: docs/release-slot-docrev 2026-09-13 08:14:05 +00:00
weichen 41bbc4049c docs(ops): release integration slot and record dev schema 28 healthy 2026-09-13 08:14:02 +00:00
weichen 17fc510c2c merge: feature/document-revision-management 2026-09-13 08:12:33 +00:00
weichen 501cde7c12 docs(ops): occupy integration slot for document revision merge 2026-09-13 08:12:27 +00:00
weichen 5e1a7e6584 fix(web): pass bearer auth in document revision api and fix ts unused imports 2026-09-13 08:12:19 +00:00
weichenandCursor 4f5bde899a docs(test): archive DOCREV waves and record unit evidence
Update CURRENT/FEATURE-MATRIX, archive short-term tasks, and add
document-revision management test report for Wave 0–6 delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 06:15:20 +00:00
weichenandCursor 9aafe7bd37 feat(web): persist block edits via revision API and compare UI
Remove hardcoded editor actor, add revision toolbar/history/compare
panels, conflict banner, and notification status actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 06:15:20 +00:00