RFC: Store Hyperion Consistency Checks as Exercise Reviews (multi-location) #11342
Replies: 3 comments 3 replies
-
|
ExerciseReviewComment needs suggested_fix and probably an extension of suggested_patch as well! Edit: Ok, suggested_fix could also be simply saved in the attribute text instead. |
Beta Was this translation helpful? Give feedback.
-
erDiagram
Exercise ||--o{ CommentThread : "has threads"
CommentThread ||--o{ Comment : "contains"
Exercise {
long id PK
text test_repository_url
text template_repository_url
text solution_repository_url
text auxiliary_repository_url
}
CommentThread {
long id PK
long group_id
long exercise_id FK
enum target_type "PROBLEM_STATEMENT | TEMPLATE_REPO | SOLUTION_REPO | TEST_REPO | AUXILIARY_REPO"
long auxiliary_repo_id "optional"
text file_path
long line_number
long initial_version_id
long initial_line_number
enum state "ACTIVE | OUTDATED | RESOLVED"
}
Comment {
long id PK
long thread_id FK
long author_id FK
text comment_text
timestamp created_date
timestamp last_modified_date
}
This is what @Elfari1028 and I discussed, that takes into consideration the new versioning system and the focus more on general comments instead of only AI. Explanation: Overall changes:
Specifics: CommentThread:
Comment:
|
Beta Was this translation helpful? Give feedback.
-
erDiagram
Exercise ||--o{ ExerciseVersion : "has versions"
Exercise ||--o{ CommentThread : "has threads"
CommentThread ||--o{ Comment : "contains"
User ||--o{ Comment : "authors"
ExerciseVersion ||--o{ CommentThread : "initial version"
Exercise {
long id PK
text test_repository_url
text template_repository_url
text solution_repository_url
text auxiliary_repository_url
}
ExerciseVersion {
bigint id PK
bigint exercise_id FK
json exercise_snapshot "ExerciseSnapshotDTO with problem statement, commit SHAs, etc."
datetime created_date
}
CommentThread {
long id PK
long group_id
long exercise_id FK
enum target_type "PROBLEM_STATEMENT | TEMPLATE_REPO | SOLUTION_REPO | TEST_REPO | AUXILIARY_REPO"
long auxiliary_repo_id "optional"
text file_path
long line_number
long initial_version_id FK
long initial_line_number
enum state "ACTIVE | OUTDATED | RESOLVED"
}
Comment {
long id PK
long thread_id FK
long author_id FK
long in_reply_to FK
text comment_text
timestamp created_date
timestamp last_modified_date
}
User {
long id PK
}
Yes it makes sense to have a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Status: Draft
Depends on: #10967 (versioning)
Related: #10969 (inline reviews) · #11339 (consistency check UX)
Summary
Treat AI-found consistency issues as first-class review comments so they persist across reloads, drive unresolved counts, and support instructor actions.
Motivation (Why)
Proposal (Approach)
ExerciseReviewfor the activeExerciseVersionwithreview_type = AI_CONSISTENCY.ExerciseReviewCommenton that review.status; unresolved counts derive from status.locationsarray (no extra tables).Schema delta (builds on #10969)
erDiagram Exercise ||--o{ ExerciseVersion : "has versions" ExerciseVersion ||--o{ ExerciseReview : "reviewed in" ExerciseReview ||--o{ ExerciseReviewComment : "contains" User ||--o{ ExerciseReview : "authors" Exercise { long id PK } ExerciseVersion { long id PK long exercise_id FK text problem_statement text template_commit_sha text solution_commit_sha text tests_commit_sha timestamp created_at } ExerciseReview { long id PK long exercise_version_id FK long author_id FK "user who triggered the consistency check" enum review_type "MANUAL | AI_CONSISTENCY" jsonb ai_metadata "model, prompt_version, trace_id (nullable)" timestamp submitted_at "for AI: set at creation" } ExerciseReviewComment { long id PK long review_id FK enum status "OPEN | APPROVED | DISMISSED | RESOLVED" jsonb locations "[] of {component_type, path?, start_line?, end_line?, start_offset?, end_offset?}" enum consistency_issue_severity "LOW | MEDIUM | HIGH (nullable)" enum consistency_issue_category "<CONSISTENCY ISSUE TYPES> (nullable)" text body } User { long id PK }locationsexample[ {"component_type":"PROBLEM_STATEMENT","start_line":10,"end_line":12}, {"component_type":"REPOSITORY_TESTS","path":"test/FooTest.java","start_line":5,"end_line":9} ]Counting & Telemetry
status IN (OPEN, APPROVED); excludeDISMISSED,RESOLVED.ExerciseReview.ai_metadatafor Langfuse/OTel correlation.Feedback welcome.
Beta Was this translation helpful? Give feedback.
All reactions