Commit Graph
622 Commits
Author SHA1 Message Date
weichenandCursor 00737c7d5e fix(web): allow frp-mix.com Host for Vite dev server
FRP reverse-proxy access to :3100 was blocked by Vite host checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 01:30:38 +00:00
weichen 36a59d6700 merge: feature/software-project-bootstrap-plan 2026-09-14 01:13:42 +00:00
weichen 8ce41e101b docs(workflow): design software project bootstrap suite 2026-09-14 01:13:33 +00:00
weichen bad2410994 merge: feature/document-revision-session-close 2026-09-14 00:29:18 +00:00
weichenandCursor 9345109dca docs(ops): archive completed document-revision session files
Move done DOCREV short-terms, checklists, and handoffs into archive/ops and retarget relative links after Round20 close-out.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 00:27:18 +00:00
weichen 4bf8b6d993 merge: fix/document-revision-evidence-count 2026-09-14 00:23:31 +00:00
weichenandCursor bf4f9bdba0 docs(test): split 21 screenshots from 21 results
Record top-level screenshots as 20 main/pre plus 1 post, and the full-package race as FAIL 109.279s instead of a cached ok line.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 00:23:11 +00:00
weichen 5d79da60fc merge: feature/document-revision-runtime-ui-final-report 2026-09-14 00:21:23 +00:00
weichenandCursor 07507c7c24 docs(test): correct runtime UI final-report facts
Rename the close-out branch to feature/*, record 20 screenshots, and state rebuild-then-app-restart so the environment notes match Round20.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 00:20:56 +00:00
weichenandCursor 89163d2d18 docs(test): close document revision runtime UI Round20
Record the official Playwright headless pass for project 6159 and release the runtime integration slot without claiming the whole system production-ready.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 00:17:47 +00:00
weichen b258ab86a5 merge: fix/document-revision-pg-id-remap 2026-09-13 23:48:18 +00:00
weichenandCursor acf62a23d0 docs(audit): separate candidate 175 from output snapshot 250
The 6158 field ledger wrote candidate id=175 and report id=175; 250 is the output snapshot, not the candidate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:45:14 +00:00
weichenandCursor 4e0951fe70 docs(ops): record PG ledger ID remap milestone
Claim the document-revision mutex and document the 6158 first-generation not-found root cause without calling UI-03 done.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:43:56 +00:00
weichenandCursor 2d0fcb94bc fix(docrevision): keep PG snapshot IDs ahead of in-memory counters
Opening a template stored database IDs without advancing nextSnapID, so the next temporary snapshot could overwrite and then delete the real baseline. Adopt helpers now bump every counter and only drop a map entry when it still points at the same object.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:43:56 +00:00
weichen fa6a033c95 merge: fix/document-revision-post-restart-final-snippet 2026-09-13 23:28:53 +00:00
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