Skip to content

feat(world-library): OSS-347 cumulative World Library (OSS-359-OSS-364) - #507

Merged
athNdev merged 10 commits into
mainfrom
codex/world-library-epic
Nov 18, 2026
Merged

athNdev merged 10 commits into
mainfrom
codex/world-library-epic

Conversation

@athNdev

@athNdev athNdev commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Cumulative draft PR for OSS-347 World Library (OSS-359–OSS-364). One PR only. Do not merge until orchestrator review/CI/release audit.

Head: f079ef16ea9137bd51b1e570252e09108846f059 (S17 verdict-gate fix). Commits: a4fe3320 backend · cf89949d proto-lint/authz/knowledge · 07ba6f18 UI · 51dabef1 recovery/concurrency · c1e2ce89 review-fix batch · 8385a49b empty CI trigger · 720f4edc main merge · f079ef16 S17 verdict-gate fix.

S17 browser-QA defect fix

web/carbon-panel/src/lib/features/world-library/presentation.ts now classifies compatibility verdicts separately from field confidence: verdictGatesBinding() returns false only for compatible, true for blocked/incompatible/requires_decision/unknown/missing; bindingGateReason() supplies a verdict-specific warning. compatibilityVerdictPresentation() handles the real backend blocked verdict and keeps incompatible as an alias. The detail route uses these seams instead of isUnknownConfidence(report.overall), so a real compatible verdict enables Bind revision while unknown findings, blocked, requires-decision and missing verdicts still fail closed. Added unit tests for every verdict string plus a route contract assertion that the confidence helper is no longer applied to the overall verdict. Verified in Chromium: 4/4 focused scenarios pass with no console/page errors (evidence below).

Review batch — per-finding resolution

  • B1 (BindWorld non-functional): removed the context-key stub. WorldService.nodeGenerationForServer now reads Node.EndpointGeneration from SQLite (legacy local nodes fall back to 1). Binder.resolveGeneration re-checks against the same DB row, refuses a mismatched request generation, and is the only source of the value. TestBindWorldUsesRealNodeGeneration exercises the real RPC seam with a Node row generation of 7 and asserts the stored binding carries 7; TestBindWorldReportsUnknownOutcomeInsteadOfRetryableError covers the RPC unknown path.
  • B2 (swap unique index): added transactional Store.SwapWorldBinding(previous, next) with optimistic generation/revision checks, unique-violation mapping and an in-place row update. Binder.publish now swaps the binding after family promotion and restores the previous binding on rollback; the old (server_id, level_name) collision is gone. TestBindSwapReplacesBindingAtomically asserts the row id is preserved and exactly one binding remains.
  • B3 (uncertain outcome): added operation.RunJournaledOutcome, which keeps the active server lock and writes an UncertainOutcomeMarker note instead of advancing to failed; operation.DescribeAt now returns OutcomeUnknown/ActionResolve immediately. Binder.Bind returns a BindResult with Outcome="unknown" and the operation id, and WorldService.BindWorld reports it as a normal response (no blind-retry error). TestBindReportsUnknownOutcomeAndKeepsLock, TestRunJournaledOutcomeKeepsLockOnUncertainEffect and the RPC test cover it.
  • B4 (startup recovery): keepsWorldLock now includes world-bind with an explicit "confirm the live level family" next action. A stopped container observation no longer releases the lock; TestRecoverInterruptedWorldBindKeepsLockWhenStopped pins it.
  • B5 (ADR collision): the ADR is now docs/adr/0016-world-library-identity-and-binding.md (0014 is W15 admission, 0015 is PR505 world viewing). knowledge/decisions/adrs.md and every concept link were updated; knowledge-lint regenerates cleanly.
  • B6 (lint/vet): fixed all ten reported issues (errcheck in binding.go, providers/curseforge.go, providers/providers.go, worldgen_test.go; ineffassign in world.go; QF1001/QF1002; unused since). golangci-lint under Go 1.26.11 reports zero findings in files this PR touches; remaining findings are pre-existing in untouched files.

Medium / low also addressed

  • Quiesce now runs before stop (save-off/save-all flush/resume while the JVM is live), then the server is stopped.
  • Bind preflight runs the compatibility Engine.Check and DryRun and a fail-closed disk-budget check (archive + clone + undo + 256 MiB headroom); remote nodes require an injected free-bytes probe. Only genuinely blocked transforms stop a bind; informational unsupported capabilities do not.
  • BuildSchema gates controls on the full (edition, MC version, loader, data version) tuple; unknown dimensions produce partial schemas with reasons.
  • Negative authorization coverage now enumerates all 18 WorldService procedures (scoped reader denied on every one; unscoped read grant permits reads only).
  • ErrWorldRevisionBound, ErrWorldBindingStale and ErrWorldRevisionImmutable map to typed Connect codes; ErrDiskBudget maps to FailedPrecondition.
  • SHA-256 has a unique index (closes the TOCTOU window); request-id replay returns the existing binding; Unbind takes admission before reading and journals its deletion.
  • border-yellow → border-warning; import UI no longer claims manifest verification.

Verification

  • Go 1.26.11 (pinned): go build ./..., go vet touched packages, go test on worldlib, providers, db, operation, rpc, rbac, nodestorage, snapshot — all pass.
  • Frontend: bun run check 0/0, bun run test 301 pass / 0 fail (30 new across the epic), bun run lint clean.
  • Proto: buf lint clean; bun scripts/proto-generate.mjs --check generated outputs match.
  • Knowledge: knowledge-lint -fix then verify → OK: 60 concept(s), indexes current, queries 38/38.
  • CI limitation: no pull_request workflow runs were registered for the new head after two pushes (the only push-triggered run is an unrelated pre-existing editor-dialog.yml failure at 0s). At the previous head all checks were green except Backend Lint & Vet (the B6 issues now fixed); Go Race Detector was green there. Local race testing is impossible (CGO_ENABLED=0, no gcc). mergeable_state is currently dirty because main has advanced (PR503/504/505); orchestrator must resolve shared-file conflicts at integration.
  • Browser retest (head f079ef16): browser-qa-2026-11-18/world-library-final/run-s17-fix.mjs, evidence-s17-fix.json, S17-fix-compatible-verdict-enabled.png, S15-guard-unknown-still-gated.png, S27-fix-bind-confirmation-real-verdict.png — 4 PASS / 0 FAIL, zero console/page errors. S17 renders COMPATIBLE, shows no false unknown gate and enables Bind revision; S15 unknown findings still gate; S16 incompatible still disables; S27 downstream bind works with the real compatible verdict (no synthetic detected override).
  • Evidence limits: fixture-only archive/NBT/API tests; no live platform calls, Minecraft soak or backend RPC/byte-safety proof in this lane.

@athNdev
athNdev marked this pull request as ready for review November 18, 2026 03:46
@athNdev
athNdev merged commit 66a37cf into main Nov 18, 2026
21 checks passed
@athNdev
athNdev deleted the codex/world-library-epic branch November 18, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant