Skip to content

Commit b5c0e44

Browse files
committed
feat: validate collaborative review deployment
1 parent 1370f71 commit b5c0e44

26 files changed

Lines changed: 821 additions & 37 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ platform/backend/.m2-repository/
4040
platform/backend/target/
4141
platform/frontend/dist/
4242
platform/frontend/*.tsbuildinfo
43+
platform/campus-deploy/campus.local.env
44+
platform/campus-deploy/本机平台登录信息.txt
45+
platform/campus-deploy/platform.pid
46+
platform/campus-deploy/logs/
4347

4448
# IDE and OS files
4549
.idea/

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ See [Grouped Review Application](docs/GROUPED_REVIEW_APP.md) for the queue contr
8484

8585
The repository now includes a deployable web platform for teams that outgrow the portable desktop reviewer. A Vue 3 + TypeScript client talks to a Spring Boot 4 REST API backed by MySQL and Flyway. JWT authentication, `ADMIN / REVIEWER / AUDITOR` RBAC, project membership, pessimistic task claiming, renewable leases, optimistic versions and immutable audit events prevent duplicate work and stale decisions. The Python bridge streams the existing `review_queue.csv` into the API in bounded, idempotent batches.
8686

87-
![Running multi-user review workspace with a real GT/AUTO review image](docs/assets/platform-review-workspace.png)
87+
![Real multi-user review dashboard](docs/assets/platform-dashboard.png)
8888

8989
<p>
90-
<img src="docs/assets/platform-login.png" width="49%" alt="Role-aware login screen">
91-
<img src="docs/assets/platform-admin-console.png" width="49%" alt="Administrator account and project-member management">
90+
<img src="docs/assets/platform-review.png" width="49%" alt="Real joint-scene web review workspace">
91+
<img src="docs/assets/platform-admin.png" width="49%" alt="Reviewer account and project assignment panel">
9292
</p>
9393

94-
These are captures of the actual Vue + Spring Boot application running against seeded local collaboration data, not design mockups. The workspace shows a claimed task, real review visual, class confidence, constrained decisions and live project progress; the admin view demonstrates account creation and project membership assignment.
94+
These are captures of the actual Vue + Spring Boot application, not design mockups. The workspace shows a claimed task, real review visual, class confidence, constrained decisions and live project progress; the admin view demonstrates account creation and project membership assignment.
9595

9696
```mermaid
9797
flowchart LR
@@ -101,7 +101,9 @@ flowchart LR
101101
A --> R["Read-only review visuals"]
102102
```
103103

104-
See [Collaboration Platform](docs/COLLABORATION_PLATFORM.md) for deployment, API contracts, concurrency design and interview walkthrough.
104+
The workflow has been validated on a trusted campus LAN with two independent reviewer accounts working concurrently. It imported `30,183` tasks and migrated `4,465` historical desktop decisions through an idempotent endpoint while keeping the real review package read-only. This verifies the allocation, migration and audit workflow; it is not a large-scale load-test or model-accuracy claim.
105+
106+
See [Collaboration Platform](docs/COLLABORATION_PLATFORM.md) for screenshots, deployment, API contracts, concurrency design and interview walkthrough.
105107

106108
### Production-scale validation
107109

README.zh-CN.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@
8484

8585
当便携式桌面审核器无法满足多人并行工作时,可以启用仓库内的 Web 协作平台。Vue 3 + TypeScript 前端连接 Spring Boot 4 REST API,使用 MySQL + Flyway 持久化;JWT 登录、`ADMIN / REVIEWER / AUDITOR` 角色、项目成员隔离、悲观锁原子领任务、可续租心跳、乐观版本号和不可变审计事件共同防止重复审核与旧页面覆盖。Python 桥接脚本会把现有 `review_queue.csv` 以有界、幂等批次流式导入。
8686

87-
![真实 GT/AUTO 审核图驱动的多人协作工作台](docs/assets/platform-review-workspace.png)
87+
![真实多人审核进度看板](docs/assets/platform-dashboard.png)
8888

8989
<p>
90-
<img src="docs/assets/platform-login.png" width="49%" alt="支持角色权限的登录界面">
91-
<img src="docs/assets/platform-admin-console.png" width="49%" alt="管理员账号创建与项目成员分配界面">
90+
<img src="docs/assets/platform-review.png" width="49%" alt="真实联合场景 Web 审核工作台">
91+
<img src="docs/assets/platform-admin.png" width="49%" alt="审核账号与项目分配面板">
9292
</p>
9393

94-
以上均为 Vue + Spring Boot 应用连接本地演示协作数据后的真实运行截图,不是设计示意图。工作台同时展示已领取任务、真实审核图、类别置信度、受约束决策按钮和项目实时进度;管理员界面展示账号创建与项目成员分配能力。
94+
以上均为 Vue + Spring Boot 应用的真实运行截图,不是设计示意图。工作台同时展示已领取任务、真实审核图、类别置信度、受约束决策按钮和项目实时进度;管理员界面展示账号创建与项目成员分配能力。
9595

9696
```mermaid
9797
flowchart LR
@@ -101,7 +101,9 @@ flowchart LR
101101
A --> R["只读审核图目录"]
102102
```
103103

104-
部署命令、接口契约、并发原理和面试讲解见[多人协作平台设计](docs/COLLABORATION_PLATFORM.md)
104+
平台已在可信校园网中使用两个独立账号同时领取和审核任务,导入 `30,183` 条候选,并通过幂等接口迁移 `4,465` 条桌面端历史决定;真实审核包始终只读。这证明了任务分配、历史迁移和审计流程可用,但不等同于大规模并发压测或模型精度结论。
105+
106+
真实截图、部署命令、接口契约、并发原理和面试讲解见[多人协作平台设计](docs/COLLABORATION_PLATFORM.md)
105107

106108
### 生产规模验证
107109

docs/COLLABORATION_PLATFORM.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ The original Tk reviewer remains the best zero-dependency choice for one reviewe
88

99
## 2. Running interface / 真实运行界面
1010

11-
![Multi-user workspace with a claimed task and real review image](assets/platform-review-workspace.png)
11+
![Real collaboration dashboard / 真实协作进度看板](assets/platform-dashboard.png)
1212

1313
<p>
1414
<img src="assets/platform-login.png" width="49%" alt="Login and role entry">
15-
<img src="assets/platform-admin-console.png" width="49%" alt="Admin account and membership management">
15+
<img src="assets/platform-admin.png" width="49%" alt="Admin account and membership management">
1616
</p>
1717

18-
The screenshots above were captured from the actual Vue and Spring Boot services with seeded local collaboration records. They demonstrate the real login flow, project progress, atomic task claim, read-only review visual delivery, constrained decisions, account creation and member assignment. They are not UI mockups.
18+
![Real joint-scene review workspace / 真实联合场景审核工作台](assets/platform-review.png)
1919

20-
以上截图由真实运行的 Vue 与 Spring Boot 服务生成,并加载了本地演示协作记录。截图覆盖登录、项目进度、原子领取任务、只读审核图加载、受约束决策、账号创建和成员分配,不是界面示意图。
20+
The screenshots above were captured from the actual Vue and Spring Boot services against a real, user-approved review package. They demonstrate the real login flow, project progress, atomic task claim, read-only review visual delivery, constrained decisions, account creation and member assignment. They are not UI mockups and do not represent model-accuracy evidence.
21+
22+
以上截图由真实运行的 Vue 与 Spring Boot 服务生成,并加载了经许可使用的真实审核包。截图覆盖登录、项目进度、原子领取任务、只读审核图加载、受约束决策、账号创建和成员分配,不是界面示意图,也不作为模型精度证据。
2123

2224
## 3. Architecture / 架构
2325

@@ -42,7 +44,7 @@ flowchart TB
4244
| Web client | Vue 3, TypeScript, Vite | Login, project progress, real-image review, heartbeat, constrained decisions |
4345
| API | Java 21, Spring Boot 4, Spring Security | Authentication, authorization, leasing, decisions, audit and visual access |
4446
| Persistence | MySQL 8.4, JPA, Flyway | Users, projects, memberships, tasks, decisions, schema migrations |
45-
| Delivery | Docker Compose, Nginx | One-command three-service deployment and same-origin API proxy |
47+
| Delivery | Docker Compose or Windows JAR | Containerized three-service deployment, or a trusted-LAN host with optional VM-hosted MySQL |
4648

4749
## 4. Authorization model / 权限模型
4850

@@ -74,6 +76,16 @@ Every task carries JPA `@Version`. The client submits `expectedVersion` with a d
7476

7577
`(project_id, candidate_id)` is unique, so importing the same queue again safely skips existing candidates. `review_decisions.task_id` is also unique, so one task cannot obtain two final decisions even if a client retries.
7678

79+
### Validated concurrent workflow / 已验证的并发流程
80+
81+
The platform was exercised on a trusted campus LAN with two independent accounts reviewing at the same time. The production-shaped project contained `30,183` candidates. A previous desktop review file containing `4,465` decisions was migrated after task import; at migration time this became `4,464` completed tasks and `1` escalated task. Re-running the migration skipped existing decisions instead of duplicating them.
82+
83+
平台已在可信校园网中用两个独立账号同时领取和审核任务。真实规模项目包含 `30,183` 条候选;桌面端已完成的 `4,465` 条历史决定在任务导入后迁移为 `4,464` 条完成和 `1` 条疑难升级。重复迁移时已存在决定会被跳过,不会生成重复结果。
84+
85+
This test verified atomic allocation, lease ownership, historical migration, real-image access and audit attribution. It did not attempt to establish a maximum concurrent-user capacity.
86+
87+
本轮验证覆盖了原子分配、租约归属、历史迁移、真实图片读取和审核人追溯,但没有把双账号试用夸大为最大并发能力测试。
88+
7789
## 6. State and data model / 状态与数据模型
7890

7991
```mermaid
@@ -110,14 +122,17 @@ The queue must contain `candidate_id`, `split`, `image_name`, `class_name`, `con
110122
```powershell
111123
python platform\tools\import_review_queue.py `
112124
D:\review_package\review_queue.csv `
125+
--decisions D:\review_package\company_decisions.csv `
113126
--base-url http://localhost:8088 `
114127
--username admin `
115128
--password "your-admin-password" `
116129
--project-name "2026-08 six-class review" `
117130
--review-root /review-data
118131
```
119132

120-
The importer reads one CSV row at a time and uploads at most 500 rows per request. It does not load the full queue or all images into memory. Re-running the same command is safe because candidate IDs are idempotent.
133+
The importer reads one CSV row at a time and uploads at most 500 rows per request. It does not load the full queue or all images into memory. After tasks exist, `--decisions` migrates historical desktop outcomes in bounded batches. Both phases are idempotent: candidate IDs and existing decisions are skipped safely on retries.
134+
135+
导入器逐行读取 CSV,每次最多上传 500 条,不会把完整队列或全部图片装入内存。任务建立后,`--decisions` 会继续按有界批次迁移桌面审核结果。两个阶段都支持安全重试,已存在的候选和决定会被幂等跳过。
121136

122137
After creating reviewer accounts in the admin drawer, assign each username to the selected project. Reviewers then see only their assigned projects.
123138

@@ -137,6 +152,14 @@ npm run dev
137152

138153
The Vite development server proxies `/api` to `localhost:8080`. Tests use H2 in MySQL compatibility mode; production uses MySQL and Flyway.
139154

155+
### Trusted LAN deployment / 可信局域网部署
156+
157+
For a small team on the same trusted network, the platform can run directly on a Windows host while MySQL runs locally, in VMware, or on another LAN server. The scripts check database reachability, optionally start the VM without a visible window, launch the JAR, poll the health endpoint and expose only a configurable URL and subnet.
158+
159+
同一可信局域网内的小团队可以直接使用 Windows 主机部署,MySQL 可运行在本机、VMware 或局域网数据库服务器。配套脚本会检查数据库、按需无界面启动虚拟机、启动 JAR、轮询健康状态,并通过本机忽略配置指定访问地址和允许网段。
160+
161+
See [campus-deploy/README.md](../platform/campus-deploy/README.md). Local passwords, database addresses, VM paths, logs and PID files are Git-ignored.
162+
140163
## 10. API surface / 主要接口
141164

142165
| Method | Path | Meaning |
@@ -145,21 +168,35 @@ The Vite development server proxies `/api` to `localhost:8080`. Tests use H2 in
145168
| GET | `/api/projects` | List visible projects |
146169
| POST | `/api/projects/{id}/members` | Assign a project member, admin only |
147170
| POST | `/api/projects/{id}/tasks:batch` | Idempotent task import, admin only |
171+
| POST | `/api/projects/{id}/decisions:history` | Idempotent historical-decision migration, admin only |
148172
| POST | `/api/tasks/claim-next?projectId={id}` | Atomically lease one task |
149173
| POST | `/api/tasks/{id}/heartbeat` | Renew current user's lease |
150174
| POST | `/api/tasks/{id}/decision` | Submit constrained decision and expected version |
151175
| GET | `/api/tasks/{id}/visual` | Read an authorized real review image |
152176
| GET | `/api/projects/{id}/audit` | Read project audit trail, admin/auditor |
153177

154-
## 11. Interview walkthrough / 面试讲解顺序
178+
## 11. Reproduce documentation screenshots / 重建文档截图
179+
180+
The screenshot tool uses Chrome DevTools directly and adds no browser-automation dependency to the application. Credentials are supplied only through process environment variables; the script waits for animations and images, captures four pages, and releases the temporary claimed task.
181+
182+
截图脚本直接调用 Chrome DevTools,不给业务项目增加浏览器自动化依赖。账号密码只通过当前进程环境变量传入;脚本会等待动画和图片稳定,拍摄四个页面,并释放临时领取的任务。
183+
184+
```powershell
185+
$env:LABEL_REVIEW_CAPTURE_USERNAME = "admin"
186+
$env:LABEL_REVIEW_CAPTURE_PASSWORD = "<admin-password>"
187+
$env:LABEL_REVIEW_CAPTURE_URL = "http://127.0.0.1:8088"
188+
node platform\tools\capture_platform_screenshots.mjs docs\assets
189+
```
190+
191+
## 12. Interview walkthrough / 面试讲解顺序
155192

156193
1. Start from the data problem: incomplete labels make true objects become false background supervision.
157194
2. Explain why offline inference and online review are separated: GPU jobs are expensive and bursty; human review is concurrent and stateful.
158195
3. Draw the claim transaction and lease timeline; emphasize pessimistic locking for allocation and optimistic locking for stale clients.
159196
4. Explain dual authorization: RBAC handles capability while project membership handles data scope.
160197
5. Show bounded idempotent import and read-only visual mounts as memory-safety and data-safety decisions.
161-
6. Close with evidence: production queue scale, real grouped images, automated Java/Python tests and reproducible Docker deployment.
198+
6. Close with evidence: `30,183` imported candidates, `4,465` migrated decisions, two-account concurrent validation, real screenshots, automated Java/Python tests and two reproducible deployment modes.
162199

163-
## 12. Production hardening / 生产加固
200+
## 13. Production hardening / 生产加固
164201

165202
Before exposing the service beyond a trusted LAN, terminate TLS at a reverse proxy, rotate JWT/database secrets, disable bootstrap admin after first setup, back up MySQL, centralize logs and metrics, and define account disable/password-reset procedures. Docker Compose is an auditable single-host baseline; Kubernetes or managed databases are deployment choices, not prerequisites for the core workflow.

docs/INTERVIEW_STORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Long scans are checkpointed after every committed batch. Resume validates a run
1212

1313
Production review showed that confidence and IoU alone were not enough for automatic writes. I added an exhaustive GT/AUTO gate using IoU, IoS, normalized center distance and area ratio, then separated model evidence, company review and safe apply into three auditable stages. The apply stage blocks unfinished decisions, detects source-label drift and creates a new dataset without changing the original.
1414

15+
When review moved from one person to a team, I added a Vue and Spring Boot collaboration layer rather than forcing concurrent reviewers to exchange CSV files. MySQL row locks allocate different tasks atomically, renewable leases recover abandoned work, optimistic versions reject stale pages, and project membership separates data scope from global roles. In a trusted-LAN validation, two independent accounts reviewed concurrently while `30,183` tasks and `4,465` migrated desktop decisions remained auditable and idempotent.
16+
1517
## Strong technical points
1618

1719
- `6 x N` inference work is accepted as the cost of specialist evidence; peak memory is controlled independently.
@@ -26,6 +28,7 @@ Production review showed that confidence and IoU alone were not enough for autom
2628
- `doctor` and `manifest.json` make environment differences visible instead of leaving CUDA and dependency drift implicit.
2729
- GT/AUTO review makes the authority boundary explicit: models propose evidence, humans authorize label changes.
2830
- Same-target box disagreement is replaced transactionally rather than adding two contradictory boxes.
31+
- The collaboration platform separates offline GPU evidence generation from online stateful review, and validates concurrency with real accounts instead of claiming correctness from UI screenshots alone.
2932

3033
## Honest limitation
3134

docs/PORTFOLIO_GUIDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The difficult part was operational reliability on a long `K x N` scan. I added t
2020
| Reliability | `state.json` and idempotent writes | Batch commit boundary and crash replay semantics |
2121
| MLOps | `doctor` and `manifest.json` | Reproducing CUDA, package and configuration state |
2222
| Human-in-the-loop ML | AUTO/REVIEW/IGNORE routing | Precision-first thresholds and audit evidence |
23+
| Backend and concurrency | Spring Boot collaboration platform | Pessimistic task allocation, renewable leases, optimistic versions, JWT/RBAC and project isolation |
2324
| Evaluation and policy | `calibrate` command | Turning reviewed outcomes into precision/recall-constrained class policies |
2425
| Ensemble policy | `consensus` command | Independent evidence, one-to-one matching and coverage/risk tradeoffs |
2526
| Scalable similarity search | `cluster` command | Perceptual hashes, BK-tree radius search and conservative collision guards |
@@ -38,6 +39,7 @@ The difficult part was operational reliability on a long `K x N` scan. I added t
3839
7. Open `examples/near_duplicates/output/near_duplicate_report.html` to show review compression and split leakage.
3940
8. Open `examples/prioritization/output/prioritization_report.html` to show a limited-budget six-class review queue.
4041
9. Run `yolo-label-recovery doctor` to show environment diagnostics.
42+
10. Open `docs/assets/platform-dashboard.png` and `docs/assets/platform-review.png` to explain the validated two-account web workflow without requiring a live server.
4143

4244
This demonstration works without a GPU or private model weights. A full teacher scan remains an optional second demonstration when suitable public weights and data are available.
4345

docs/assets/platform-admin.png

110 KB
Loading

docs/assets/platform-dashboard.png

166 KB
Loading

docs/assets/platform-review.png

553 KB
Loading

0 commit comments

Comments
 (0)