pepkit / pepkit/pephub

POPs can have dangling pointers

Open
#248 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug wontfix
Dominant language
TypeScript
Stars
22
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Consider the following scenario:

  1. I make a new PEP called nleroy917/fine-tuning:default
  2. I attach this to a POP called nleroy917/geniml:default
  3. I delete nleroy917/fine-tuning:default

The POP now points to a PEP that doesn't exist. Rust would call this a dangling reference. The POP is just a sample table that points to a list of PEPs. However, there are no safeguards in place if that PEP no longer exists.

@khoroshevskyi and I have talked about this, but there's no clear solution, so it should probably be addressed in the future to prevent weird behavior. Some options:

Option 1 (currently):

Do nothing

Option 2:

Check if that PEP belongs to a POP, and prevent users from deleting it.

Option 3:

Check if that PEP belongs to a POP, and warn users before deleting.

Option 4:

Implement some sort of system that propagates the fact that a PEP has been removed from all POPs that contain that PEP and update their sample tables accordingly.

Option 4 is the most ideal. Options 2 and 3 are a good start, but the query to implement them takes too long. Option 1 is not ideal.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by tracing how PEP deletion and POP sample-table relationships are represented, then compare the proposed deletion safeguards and propagation behavior. Done means deleting a PEP no longer leaves any POP pointing to a nonexistent PEP, with coverage for the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.