Skip to content

feat: restore copy protection and user tags - #533

Closed
Reilley64 wants to merge 2 commits into
integration/mtgscan-273-rust-gpuifrom
feat/collection-tag-use-cases
Closed

Reilley64 wants to merge 2 commits into
integration/mtgscan-273-rust-gpuifrom
feat/collection-tag-use-cases

Conversation

@Reilley64

Copy link
Copy Markdown
Owner

Summary

Native copy menu and user tag picker
  session-authenticated action API
    canonical request/result mapping
      one Rust organization use case and domain policy
        scoped SQLx transaction, RLS and existing audit trigger

Part of MTGSCAN-286. Refs MTGSCAN-286.

  • Restore exact-copy protection and create, rename, delete, restore, attach and detach user tags.
  • Preserve per-owner uniqueness, deleted-name reuse, retained links, restoration conflicts, bulk skips, request limits and field errors.
  • Derive owner and audit actor from verified credentials. AI clients keep tag rights but cannot protect copies or mutate decks/copies.
  • Keep the writer opt-in with server-only ORGANIZATION_DATABASE_URL. Add the scoped role in migration 20270104120000. Do not activate it against hosted data.
  • Invalidate collection copy/query state and tag counts. Keep all storage access outside mobile controls.

Contract, transaction scope and verification limits.

Evidence

  • Before: Protection, tag-create, retained-link lifecycle and contract tracer tests failed on missing behavior. Red logs are retained in the implementation handoff.
    After: mise run rust-check passes: format, compilation, Clippy, dependency boundaries and 37 unit tests across the workspace. New tests use real policy/orchestration with fake external identity and transactions.
  • Before: Removing held-copy refusal, AI refusal, restoration conflicts, restoration persistence, commit enforcement or unknown-field rejection makes the relevant tests fail.
    After: All six mutations are restored and the workspace checks pass.
  • Root TypeScript typecheck and lint pass. Swift formatting and Python syntax checks pass.
  • Native controller and HTTP unit cases are authored, but have not been compiled or executed locally. MTGSCAN-279 still owns the native compiler/device turn. No native compiler, Simulator, device, hosted database, owner data or live provider was used.
  • Real SQL/RLS/constraint/audit behavior and native rendering/accessibility remain unverified. Existing database CI and the reserved native/manual checks remain gates. Mocks are not infrastructure evidence.

Latest integration was fetched and merged into this branch. It remained at 562b8c1cd5c28c0a33d357ad889dbfaa77ac82e7; no concurrent slice had merged at that check. PR 531 composition was inspected; the new writer uses lazy construction and transaction-time role checks. Later integration must preserve its health/telemetry and gallery composition as those slices merge.

Merge Danger

Door: two-way

The route is absent unless its optional server credential is configured. The migration only adds a no-password role and scoped grants/policies. This draft performs no hosted activation or legacy-authority cutover. Provisioning, real SQL/native validation and coordinated writer activation require separate approval and evidence.

Blast Radius: collection

Tag actions affect exact copies and owner-wide tag names/counts. Restore conflicts and partial create-and-attach failure must remain visible. Parent owns independent reviews, merging and issue closure. This draft makes no readiness or Done claim.

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