Commit Graph
499 Commits
Author SHA1 Message Date
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
weichen e37a5fa399 docs(ops): close Herdr governance task 2026-09-13 12:16:08 +00:00
weichen 846638197d Merge branch 'dev' into feature/herdr-agent-governance 2026-09-13 12:15:07 +00:00
weichen 187084c517 feat(ops): add Herdr agent routing governance 2026-09-13 12:04:41 +00:00
weichen cd69cfd4d8 test(e2e): select project member by exact visible row 2026-09-13 12:03:16 +00:00
weichen 1d2cecc522 test(e2e): scope project creation selectors to fixed modal 2026-09-13 12:02:01 +00:00
weichen d282b1e526 merge: fix/document-revision-runtime-user-directory 2026-09-13 11:59:19 +00:00
weichen fed7af1982 test(e2e): drive real UI bootstrap and role assignment 2026-09-13 11:59:13 +00:00
weichenandCursor ec8a45a5fe fix(web): sync parent user directory after admin account changes
AdminSettingsModal previously left onRefreshUsers as a dead prop, so newly
created users never reached App allUsers/localStorage and Create Project
member candidates stayed stale (UI-01). Wire syncAdminUserDirectories,
surface refresh errors, and document the residual cross-device directory gap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:58:06 +00:00
weichen 8c5cac17ef merge: fix/document-revision-runtime-auth-ui-evidence 2026-09-13 11:38:02 +00:00
weichenandCursor 4d4ea20e63 chore(e2e): keep Antigravity evidence path and UI harness tweaks
Preserve uncommitted Playwright config/spec adjustments for the ongoing
document-revision runtime acceptance run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:37:03 +00:00
weichenandCursor c70cdf7261 docs(ops): record UI-00 auth snake_case mapping finding
Add audit note and cross-link short-term/checklist/CURRENT for the
admin entry regression found in real browser acceptance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:37:03 +00:00
weichenandCursor d421fba472 fix(api): fail closed when status update cannot set user role
Return the UpdateUserRole error instead of silently continuing when an
admin approves a user with an explicit role_id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:37:03 +00:00
weichenandCursor f189ce9ff9 fix(auth): surface BootstrapAdminFromConfig UpdateUserRole failures
Do not ignore role promotion errors when ensuring the configured admin
account holds role-admin; cover success and failure with unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:37:03 +00:00
weichenandCursor cf28e53308 fix(web): map Go UserAccount snake_case fields at auth API boundary
Normalize role_id/employee_id/must_change_password/created_at into
camelCase for login, me, and admin user mutations so admin UI gates work.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:37:03 +00:00
weichen 0b36a6ede0 merge: document-revision-ui-e2e-slot 2026-09-13 11:15:47 +00:00
weichen 53f988da49 docs(ops): advance document revision follow-up to UI e2e 2026-09-13 11:15:47 +00:00
weichen edbd01e5cc merge: fix/document-revision-runtime-ui-evidence 2026-09-13 11:13:58 +00:00
weichen 2f4d27d28d docs(ops): mark document revision follow-up merge phase 2026-09-13 11:13:53 +00:00
weichenandCursor 00a31e9b8d fix(e2e): require ADMIN_* env for UI acceptance credentials
Drop the hardcoded admin password fallback so secrets never ship in the
spec; missing ADMIN_USERNAME/ADMIN_PASSWORD fails the suite explicitly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:13:22 +00:00
weichenandCursor e5139d980a docs(ops): note upload freeform registration before send
Record client_key create path and no-orphan send contract on the
document-revision-runtime short-term task.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
weichenandCursor 59b6db74bb test(e2e): tighten UI-01 zero revision-state 404 assertions
Match only hyphenated doc-p template paths, reset logs after login, and
expect registered uploads to use server doc-free ledgers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 11:12:03 +00:00
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 d94b0d17f5 merge: fix/document-revision-runtime 2026-09-13 10:12:51 +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