-
Notifications
You must be signed in to change notification settings - Fork 61
Database Schema Design: October 2023 #787
Comments
Debating on this but still thinking about when we eventually make a command to allow repository maintainers to override the contributor's XP: we will need to create a new column in the We can exclude modifiers from the global leaderboard calculation (globalXP) so that its more difficult to exploit (i.e. collusion between an org and a contributor). We could even make a whistleblower incentive to make sure that people police each other for exploiting the XP system possibly. Since it would be available in the settlements table, that means the |
/start |
Too many assigned issues, you have reached your max of 2 |
/start |
Tips:
|
@pavlovcik There was already a Permit table, guess we should use that instead.. It has all of the fields here and more |
Thanks for highlighting this. The only concern I have with the current implementation is that it has an issue ID associated with every permit, but I want to allow the flexibility for us to issue permits without necessarily associating them to issue IDs. I believe that my specification allows for more flexibility, but I also do not claim to be a database architecture expert. I also just realized that ChatGPT jumbled up some of the rows. It left some permit specific data inside of the credits table. |
Yea, Previous permit table contains repository data and issue id to pinpoint the exact origin of the permit. Are you saying we don't need that anymore. Because none of the tables here refers to a repository (origin) of the payment |
Rfc |
The parent table does. #767 |
Okay then, this issue entail just creating the tables, moving permit data to the new table. Is creating functions to add these data to DB included? @pavlovcik |
The bot should be stable after the database is changed out so yes it includes modifying all the functions that interact with the database. |
/ask how long do you estimate that this task would take, in hours? |
! Error: This model's maximum context length is 16385 tokens. However, you requested 20407 tokens (4023 in the messages, 16384 in the completion). Please reduce the length of the messages or completion. |
@Keyrxng time for compression/prioritization? Not a great first real world attempt lol. Prioritization order:
We should use a tokenization estimator to know how much we should exclude. |
@pavlovcik I'm adding penalties to this too? I see the penalty issue was rolled onto this |
Most likely but let me just get a little time to refine this spec. Sorry I realized after filing the issue that there were some mistakes in my specification. I might break this up into separate tasks. |
/ask how long do you estimate that this task would take, in hours? |
! Error: This model's maximum context length is 16385 tokens. However, you requested 21257 tokens (4873 in the messages, 16384 in the completion). Please reduce the length of the messages or completion. |
@seprintour I broke it down into four subtasks |
Okay, credit depends on permit (because permit is going to be modified and it needs to be linked to the permit id after modification) Settlements depends on credit and debit (If its not merged in this order, the supabase migration will fail to run automatically) |
I noted that as well on the Tables section. |
I also think the amount for debit and credit should be a float or big integer if we are converting decimal to bigint because permit amount is not always in whole numbers |
Lets chat under that issue instead. |
Same as other shout out, you've set the output to be the maximum token amount for that model. max_tokens represents output so you gotta drop the token limit to half or 2/3. the actual context fed into GPT was only 4k tokens |
I set to 8000 max tokens in the org config and it silent crashes |
I finished the schema but i still need to verify the node id situation. I might need to change the ids under 'location' table to track references on github e.g. org/repo/issue/comment ids |
|
Overview
id
,created
,updated
and have foreign keys in the last columns.Schema
my_modified_backup.sql.zip
access
Access control now has a column for JSON arrays, so that any project can set access control for fully customizable labels.
credits
Permits are optional. Perhaps we can assume XP calculations for credits without permits. Alternatively we need to think about other ways to compensate. For Gnosis Safe "permits", what data can do store instead of permits? rfc @rndquu
debits
No remarks
location
Represents where the event occurred. org/repo/issue/comment are all optional fields, because I anticipate that we will track only the most granular level of detail. For example, if we are tracking a comment, we will not need to track the issue or repository.
We are using
node_id
s because GitHub does not allow direct lookup of resources using numerical IDs. Instead, we would have to "search" for those results.I'm unsure if it makes the most sense to consolidate to a single column for the
node_id
or if we should keep them separate. I'm leaning towards keeping them separate, because it will be easier to query for specific events. For example, if we want to see all events that occurred on a specific repository, we can query fornode_id_repository
.I included a URL for easy auditing while we are in development.
logs
I did not put significant thought into this, but I figured we could use it for generic remarks/comments in the database and dump everything into
log_entry
.partners
location_id
is intended to save the partner organization.permits
Foreign keys to recognized tokens, partners, and users (beneficiary)
Just realized but not sure if I need to store the network for the transactions as well or if we should derive from token_id.
tokens
Tokens take a lot of space. Let's make a recognized table of tokens. Perhaps we should also store the token symbol since they are unlikely to change.
users
I am debating on if we should store all their GitHub data. We don't have any planned use for it (other than generating embeddings for their solved issues) but even that isn't included in the original user schema which just had their profile information.
wallets
No remarks.
settlements
No remarks.
Old Spec (For Reference)
Tables
I think it might make sense to do them in reverse order. Here I listed parents then children, but creating the children tables in order to link to the parent tables might be easiest for implementation.
Implementation Notes
Credits
table now has a foreign keypermitId
that can link to thePermits
table, allowing you to associate a credit with a permit if necessary. However, this is optional, so you can have credits without permits as well.creditId
anddebitId
in theSettlements
table.Settlements
entry from having both acreditId
and adebitId
.The text was updated successfully, but these errors were encountered: