Repository navigation
feat(hub): score again when a reviewer verifies the work #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
nshki
wants to merge
7
commits into
nshki/feat/hub/observed-outcomes
from
nshki/feat/hub/reviewer-verified-outcomes
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
66a0420
feat(learning): let a score weigh reviewer verification
nshki b987d5a
feat(hub): record when a reviewer verifies a scored commit
nshki e0584ab
feat(hub): treat a reviewer resolving their own thread as verification
nshki c285086
feat(hub): score a verified commit again with the reviewer's confirma…
nshki df700a8
feat(hub): replace a use's score with its reviewer-confirmed score
nshki 9dfad08
feat(hub): label reviewer-confirmed outcomes
nshki 39f20b1
docs(hub): explain reviewer-verified scores
nshki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| model LearningReviewerVerification { | ||
| // ID columns | ||
| id String @id @default(uuid()) @db.Uuid | ||
| repositoryId String @map("repository_id") @db.Uuid | ||
| prototypeId String @map("prototype_id") @db.Uuid | ||
|
|
||
| // Relations | ||
| repository Repository @relation(fields: [repositoryId], references: [id], onDelete: Cascade) | ||
| prototype Prototype @relation(fields: [prototypeId], references: [id], onDelete: Cascade) | ||
|
|
||
| // Attribute columns | ||
| commitSha String @map("commit_sha") @db.VarChar(64) | ||
| verifiedAt DateTime @map("verified_at") @db.Timestamptz(3) | ||
|
|
||
| // Timestamp columns | ||
| createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) | ||
| updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz(3) | ||
|
|
||
| @@unique([prototypeId, commitSha]) | ||
| @@index([repositoryId, commitSha]) | ||
| @@map("learning_reviewer_verifications") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| enum LearningScoreTrigger { | ||
| USAGE | ||
| REVIEWER_VERIFICATION | ||
| } |
36 changes: 36 additions & 0 deletions
36
hub/schema/migrations/20261226090000_reviewer_verified_scores/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| -- CreateEnum | ||
| CREATE TYPE "LearningScoreTrigger" AS ENUM ('USAGE', 'REVIEWER_VERIFICATION'); | ||
|
|
||
| -- DropIndex | ||
| DROP INDEX "learning_evaluation_runs_repository_id_used_learning_id_key"; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "learning_evaluation_runs" ADD COLUMN "trigger" "LearningScoreTrigger" NOT NULL DEFAULT 'USAGE'; | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "learning_reviewer_verifications" ( | ||
| "id" UUID NOT NULL, | ||
| "repository_id" UUID NOT NULL, | ||
| "prototype_id" UUID NOT NULL, | ||
| "commit_sha" VARCHAR(64) NOT NULL, | ||
| "verified_at" TIMESTAMPTZ(3) NOT NULL, | ||
| "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
|
||
| CONSTRAINT "learning_reviewer_verifications_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "learning_reviewer_verifications_repository_id_commit_sha_idx" ON "learning_reviewer_verifications"("repository_id", "commit_sha"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE UNIQUE INDEX "learning_reviewer_verifications_prototype_id_commit_sha_key" ON "learning_reviewer_verifications"("prototype_id", "commit_sha"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE UNIQUE INDEX "learning_evaluation_runs_repository_id_used_learning_id_tri_key" ON "learning_evaluation_runs"("repository_id", "used_learning_id", "trigger"); | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "learning_reviewer_verifications" ADD CONSTRAINT "learning_reviewer_verifications_repository_id_fkey" FOREIGN KEY ("repository_id") REFERENCES "repositories"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "learning_reviewer_verifications" ADD CONSTRAINT "learning_reviewer_verifications_prototype_id_fkey" FOREIGN KEY ("prototype_id") REFERENCES "prototypes"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.