skillhub/server
FenjuFu d224c5a8ba fix(publish): return deterministic conflict on concurrent coordinate race
Concurrent publishes for the same (namespace_id, slug, owner_id) or
(skill_id, version) coordinate both pass the check-then-create reads and
race on the database unique constraints. The losing request surfaced an
unhandled DataIntegrityViolationException as HTTP 500.

Translate the constraint violation at both insert points into a
deterministic DomainBadRequestException (error.skill.publish.concurrentConflict),
matching the existing idiom in LabelDefinitionService/ReviewService/
PromotionService. No same-transaction re-read is attempted, so the losing
publish rolls back cleanly and returns a retryable conflict instead of a 500.

Add the i18n key (en/zh) and two unit tests covering the skill-insert and
version-insert races.

Closes #617

Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
2026-08-31 14:27:45 +08:00
..
.mvn docs: add Maven mirror config and troubleshooting guide for China developers (#233) 2026-04-07 09:50:07 +08:00
scripts feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00
skillhub-app fix(publish): return deterministic conflict on concurrent coordinate race 2026-08-31 14:27:45 +08:00
skillhub-auth fix(auth): support bearer tokens behind sub-path proxies 2026-08-29 15:05:09 +08:00
skillhub-domain fix(publish): return deterministic conflict on concurrent coordinate race 2026-08-31 14:27:45 +08:00
skillhub-infra refactor(namespace): keep personal provisioning configuration-only 2026-08-28 15:55:29 +08:00
skillhub-notification fix: emit confirm-publish events with permission-aware subscriber fanout 2026-08-27 16:43:32 +08:00
skillhub-search feat(search): index compliance snapshot mappings 2026-08-07 15:46:06 +08:00
skillhub-storage fix(storage): disable chunked encoding for Aliyun OSS compatibility 2026-05-06 13:56:55 +08:00
.dockerignore feat(staging): optimize staging build with local Maven packaging 2026-03-14 14:21:06 +08:00
Dockerfile fix(deploy): preserve storage volume ownership 2026-08-29 15:58:55 +08:00
Dockerfile.dev fix(storage): defer S3 bucket verification until first access (#289) 2026-04-12 15:24:09 +08:00
mvnw feat: initialize Maven multi-module project structure 2026-03-11 22:52:04 +08:00
mvnw.cmd feat: initialize Maven multi-module project structure 2026-03-11 22:52:04 +08:00
pom.xml feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00