Skip to content

fix(store): preserve verified prompt origin after local deletion - #1535

Merged
dnlrsls merged 1 commit into
Gentleman-Programming:feat/prompt-inbox-foundation-trackerfrom
dnlrsls:feat/prompt-pair-tombstone-origin
Sep 29, 2026
Merged

dnlrsls merged 1 commit into
Gentleman-Programming:feat/prompt-inbox-foundation-trackerfrom
dnlrsls:feat/prompt-pair-tombstone-origin

Conversation

@dnlrsls

@dnlrsls dnlrsls commented Sep 29, 2026

Copy link
Copy Markdown
Member

🔗 Linked Issue

Closes #1458

Child of tracker #1464; merge into feat/prompt-inbox-foundation-tracker, not main. This slice does not enable cloud deletes or complete the tracker.

🏷️ PR Type

  • type:bug — Bug fix
  • type:feature — New feature
  • type:question — Question requiring tracked work
  • type:docs — Documentation only
  • type:refactor — Code refactoring
  • type:chore — Maintenance
  • type:breaking-change — Breaking change

📝 Summary

  • Retain the independently verified original local prompt-creation triple when explicitly deleting a prompt or session, in the same SQLite transaction.
  • Read the exact sync ID fail-closed from either a live row or tombstone; imported/pulled tombstones and ordinary tombstone identity cannot mint origin.
  • Test cross-project ownership and negative boundaries; document that local origin is not cloud authorization.

📂 Changes

File Change
internal/store/store.go Nullable origin columns and exact lookup; copy only during local delete.
internal/store/prompt_local_origin_test.go Local delete, import/pull, duplicate, migration, replay and conflict regressions.
docs/codebase/prompt-inbox-provenance.md Clarify retained evidence and unverified remote-delete boundary.

256 changed lines; no generated artifacts.

🧪 Test Plan

  • Focused regression: go test ./internal/store -run 'TestLocalPrompt(Origin|CreationIdentity)' -count=1 — PASS (independent verification).
  • Affected package: go test ./internal/store -count=1 — PASS (independent verification).
  • Other local checks: go vet ./internal/store, git diff --check, CRLF-normalized gofmt comparison of changed Go files — PASS. Native review review-f620950200b1cd1c approved/acknowledged.
  • GitHub full unit/E2E/plugin/lint/Windows and policy checks — pending after push; not inferred from local tests.

🤖 Automated Checks

All GitHub checks pending until they actually run; do not merge if any required check fails.

✅ Contributor Checklist

💬 Notes for Reviewers

Local marker verifies only locally created source under exact stored identity. It cannot authorize registration, a dual-project cloud pair claim or remote deletion; T4b3/T4c remain separate. alpha session with beta prompt is intentional. Please inspect the pre-existing tombstone and pulled-live delete tests in particular. Merge by normal merge into #1464 only after CI and substantive review; #1464 stays out of main merge queue.

@dnlrsls dnlrsls added the type:bug Bug fix label Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c639571e-5de2-4de7-b7bf-78806d8fcb23

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dnlrsls
dnlrsls merged commit d2647d1 into Gentleman-Programming:feat/prompt-inbox-foundation-tracker Sep 29, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant