Files
zeekayandHanzo Dev b497511c04 no hogs: stamphog and review_hog are stamp and review
Both are Django apps, and both pin `label` in apps.py — "stamp" and "review".
django_migrations keys a row on (app_label, name), and app_label comes from that
pin and not from the import path, so moving the directory does not orphan a
single migration. All six stay where they are, untouched.

  products/stamphog -> products/stamp     name = products.stamp.backend
  products/review_hog -> products/review  name = products.review.backend
  StamphogScene/ -> StampScene/, and stamphogSceneLogic.ts with it

189 files follow. An earlier attempt at this move failed twice for reasons worth
recording: `git mv A B` where B exists puts A INSIDE B, and a stray
products/stamp/node_modules from an abandoned run was enough to make B exist —
the app ended up nested two deep. And `git ls-files` does not list a file moved
with plain mv and not yet staged, so a pass over "every tracked file" silently
skips it; that is how StampScene.tsx kept importing ./stampSceneLogic after the
file beside it had been renamed back.

bin/check-imports-are-committed: all first-party imports across 15,843 files
resolve.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-09 10:18:18 -07:00

551 lines
21 KiB
TypeScript
Generated

/**
* Auto-generated from the Django backend OpenAPI schema.
* To modify these types, update the Django serializers or views, then run:
* insightscli build:openapi
* Questions or issues? #team-devex on Slack
*
* Insights API - generated
* OpenAPI spec version: 1.0.0
*/
export interface ReviewBlindSpotsConfigApi {
/** Name of the `review-script-blind-spots-*` skill this row represents (the sweep's identity). */
skill_name: string
/** Whether this blind-spots skill runs the sweep on the requesting user's PR reviews on this project. */
active: boolean
/** The blind-spots skill's description, for display in the config UI. */
description: string
/** The blind-spots skill's SKILL.md body, for the read-only skill viewer. */
body: string
}
export interface PatchedReviewBlindSpotsConfigSelectApi {
/** Set true to make this the single blind-spots skill that runs on the user's PR reviews. Only true is accepted — the blind-spot check is single-active, so you switch by selecting a different skill, not by deactivating the current one. */
active?: boolean
}
export interface ReviewPerspectiveConfigApi {
/** Name of the `review-script-perspective-*` skill this row toggles (the perspective's identity). */
skill_name: string
/** Whether this perspective runs on the acting user's PR reviews on this project. */
enabled: boolean
/** The perspective skill's description, for display in the config UI. */
description: string
/** The perspective skill's SKILL.md body, for the read-only skill viewer. */
body: string
}
export interface PatchedReviewPerspectiveConfigUpdateApi {
/** Set true to run this perspective on the user's PR reviews, false to stop running it. */
enabled?: boolean
}
/**
* * `fetching` - fetching
* * `chunking` - chunking
* * `selecting` - selecting
* * `reviewing` - reviewing
* * `deduplicating` - deduplicating
* * `validating` - validating
* * `finalizing` - finalizing
*/
export type ReviewStageEnumApi = (typeof ReviewStageEnumApi)[keyof typeof ReviewStageEnumApi]
export const ReviewStageEnumApi = {
Fetching: 'fetching',
Chunking: 'chunking',
Selecting: 'selecting',
Reviewing: 'reviewing',
Deduplicating: 'deduplicating',
Validating: 'validating',
Finalizing: 'finalizing',
} as const
export interface ReviewProgressApi {
/** How far the in-flight review turn has come: fetching the diff, chunking, picking each chunk's perspectives, reviewing chunks, merging overlapping findings, validating them, or finalizing (building and publishing the review).
*
* * `fetching` - fetching
* * `chunking` - chunking
* * `selecting` - selecting
* * `reviewing` - reviewing
* * `deduplicating` - deduplicating
* * `validating` - validating
* * `finalizing` - finalizing */
review_stage: ReviewStageEnumApi
/**
* Work units finished within the stage; null when the stage has no counter.
* @nullable
*/
done: number | null
/**
* Work units the stage expects in total; null when unknown.
* @nullable
*/
total: number | null
}
export interface ReviewRecentReviewApi {
/** The review report's id, for fetching the review's detail. */
id: string
/** The reviewed repository, as `owner/repo`. */
repository: string
/**
* The reviewed pull request's number; null for a branch target with no PR yet.
* @nullable
*/
pr_number: number | null
/**
* The pull request's title, from the latest reviewed snapshot; null if unknown.
* @nullable
*/
pr_title: string | null
/**
* The pull request author's GitHub login; null if unknown.
* @nullable
*/
pr_author: string | null
/**
* Lines added by the PR; null if unknown.
* @nullable
*/
additions: number | null
/**
* Lines deleted by the PR; null if unknown.
* @nullable
*/
deletions: number | null
/**
* Files the PR changes; null if unknown.
* @nullable
*/
changed_files: number | null
/** The pull request's head branch. */
head_branch: string
/** Where to see the review on GitHub: the pull request when its URL is known, otherwise the head branch. */
github_url: string
/** How many review turns have completed on this report. */
run_count: number
/**
* When the latest review turn completed; null while the first is in flight.
* @nullable
*/
last_run_at: string | null
/** Whether a review has been published back to GitHub. */
published: boolean
/** Whether a review turn is running on this report right now (activity within the last 30 minutes). */
in_progress: boolean
/** The in-flight turn's stage and counters; null unless `in_progress`. */
progress: ReviewProgressApi | null
/** The latest turn's valid findings at must_fix effective priority. */
must_fix_count: number
/** The latest turn's valid findings at should_fix effective priority. */
should_fix_count: number
/** The latest turn's valid findings at consider effective priority. */
consider_count: number
/** All findings the latest turn raised after dedupe, before validation. */
candidate_count: number
/** The latest turn's findings the validator dismissed as not worth publishing. */
dismissed_count: number
/**
* Meaningful files the latest turn actually read, after skipping generated/lock/snapshot files; null if unknown.
* @nullable
*/
files_reviewed: number | null
/**
* Reviewable chunks the latest turn split the PR into; null if unknown.
* @nullable
*/
chunk_count: number | null
/**
* Review perspectives that read each chunk in the latest turn; null if unknown.
* @nullable
*/
perspective_count: number | null
/**
* Raw issues the perspectives raised in the latest turn, before dedupe; null if unknown.
* @nullable
*/
perspective_issue_count: number | null
/**
* Raw issues the blind-spot sweep added in the latest turn, before dedupe; null if unknown.
* @nullable
*/
blind_spot_issue_count: number | null
}
export interface ReviewRecentReviewsPageApi {
/** The scoped reviews: in-progress runs first, then completed newest first. */
results: ReviewRecentReviewApi[]
/** Whether reviews exist beyond this page — drives the list's "Show more" button. */
has_more: boolean
}
export interface ReviewSelectionChunkApi {
/** The chunk this row describes, as numbered by the chunker. */
chunk_id: number
/**
* The chunker's category for the chunk; null on the deterministic single-chunk path.
* @nullable
*/
chunk_type: string | null
/** The chunk's files, from the turn's chunk set. */
files: string[]
/** Perspectives the selector ran on this chunk, in pass order. */
perspectives: string[]
/** Roster perspectives the selector skipped on this chunk, in pass order. */
skipped: string[]
/** The selector's one-line reasoning for this chunk's picks. */
reason: string
}
export interface ReviewPerspectiveSelectionApi {
/** Every enabled perspective the selector chose from, in pass order. */
roster: string[]
/** Per-chunk picks with reasons, in chunk order. */
chunks: ReviewSelectionChunkApi[]
}
/**
* * `must_fix` - must_fix
* * `should_fix` - should_fix
* * `consider` - consider
*/
export type ReviewIssuePriorityEnumApi = (typeof ReviewIssuePriorityEnumApi)[keyof typeof ReviewIssuePriorityEnumApi]
export const ReviewIssuePriorityEnumApi = {
MustFix: 'must_fix',
ShouldFix: 'should_fix',
Consider: 'consider',
} as const
export interface ReviewFindingLineRangeApi {
/** First affected line. */
start: number
/**
* Last affected line; null for a single line.
* @nullable
*/
end: number | null
}
/**
* * `bug` - bug
* * `security` - security
* * `performance` - performance
* * `code_quality` - code_quality
* * `best_practice` - best_practice
* * `documentation` - documentation
* * `testing` - testing
* * `accessibility` - accessibility
* * `compatibility` - compatibility
*/
export type ValidatorCategoryEnumApi = (typeof ValidatorCategoryEnumApi)[keyof typeof ValidatorCategoryEnumApi]
export const ValidatorCategoryEnumApi = {
Bug: 'bug',
Security: 'security',
Performance: 'performance',
CodeQuality: 'code_quality',
BestPractice: 'best_practice',
Documentation: 'documentation',
Testing: 'testing',
Accessibility: 'accessibility',
Compatibility: 'compatibility',
} as const
export interface ReviewFindingApi {
/** One-line summary of the finding. */
title: string
/** Repository-relative path of the affected file. */
file: string
/** Affected line ranges within the file. */
lines: ReviewFindingLineRangeApi[]
/** Description of the problem. */
body: string
/** The specific fix or improvement the reviewer proposes. */
suggestion: string
/** The priority that gates publishing: the validator's override when set, else the reviewer's.
*
* * `must_fix` - must_fix
* * `should_fix` - should_fix
* * `consider` - consider */
effective_priority: ReviewIssuePriorityEnumApi
/** The reviewer's original priority, before any validator override.
*
* * `must_fix` - must_fix
* * `should_fix` - should_fix
* * `consider` - consider */
reviewer_priority: ReviewIssuePriorityEnumApi
/**
* The review skill that produced the finding (perspective or blind-spot sweep).
* @nullable
*/
source_perspective: string | null
/** The validator's category for the finding; null when it didn't set one.
*
* * `bug` - bug
* * `security` - security
* * `performance` - performance
* * `code_quality` - code_quality
* * `best_practice` - best_practice
* * `documentation` - documentation
* * `testing` - testing
* * `accessibility` - accessibility
* * `compatibility` - compatibility */
validator_category: ValidatorCategoryEnumApi | null
/** The validator's argumentation for keeping or dismissing the finding. */
validator_note: string
}
export interface ReviewDetailApi {
/** The review report's id, for fetching the review's detail. */
id: string
/** The reviewed repository, as `owner/repo`. */
repository: string
/**
* The reviewed pull request's number; null for a branch target with no PR yet.
* @nullable
*/
pr_number: number | null
/**
* The pull request's title, from the latest reviewed snapshot; null if unknown.
* @nullable
*/
pr_title: string | null
/**
* The pull request author's GitHub login; null if unknown.
* @nullable
*/
pr_author: string | null
/**
* Lines added by the PR; null if unknown.
* @nullable
*/
additions: number | null
/**
* Lines deleted by the PR; null if unknown.
* @nullable
*/
deletions: number | null
/**
* Files the PR changes; null if unknown.
* @nullable
*/
changed_files: number | null
/** The pull request's head branch. */
head_branch: string
/** Where to see the review on GitHub: the pull request when its URL is known, otherwise the head branch. */
github_url: string
/** How many review turns have completed on this report. */
run_count: number
/**
* When the latest review turn completed; null while the first is in flight.
* @nullable
*/
last_run_at: string | null
/** Whether a review has been published back to GitHub. */
published: boolean
/** Whether a review turn is running on this report right now (activity within the last 30 minutes). */
in_progress: boolean
/** The in-flight turn's stage and counters; null unless `in_progress`. */
progress: ReviewProgressApi | null
/** The latest turn's valid findings at must_fix effective priority. */
must_fix_count: number
/** The latest turn's valid findings at should_fix effective priority. */
should_fix_count: number
/** The latest turn's valid findings at consider effective priority. */
consider_count: number
/** All findings the latest turn raised after dedupe, before validation. */
candidate_count: number
/** The latest turn's findings the validator dismissed as not worth publishing. */
dismissed_count: number
/**
* Meaningful files the latest turn actually read, after skipping generated/lock/snapshot files; null if unknown.
* @nullable
*/
files_reviewed: number | null
/**
* Reviewable chunks the latest turn split the PR into; null if unknown.
* @nullable
*/
chunk_count: number | null
/**
* Review perspectives that read each chunk in the latest turn; null if unknown.
* @nullable
*/
perspective_count: number | null
/**
* Raw issues the perspectives raised in the latest turn, before dedupe; null if unknown.
* @nullable
*/
perspective_issue_count: number | null
/**
* Raw issues the blind-spot sweep added in the latest turn, before dedupe; null if unknown.
* @nullable
*/
blind_spot_issue_count: number | null
/**
* The PR head commit the latest turn reviewed — anchors GitHub links to the exact code.
* @nullable
*/
head_sha: string | null
/** The selector's per-chunk perspective plan for the latest turn; null when the turn ran without a selection (selector unavailable, failed, or the run predates it). */
perspective_selection: ReviewPerspectiveSelectionApi | null
/** The rendered review body published to GitHub, as markdown. */
report_markdown: string
/** The urgency threshold the completed turn's publishing gated on (stamped at finalize from the run's own resolve snapshot); null for turns that predate its recording — readers fall back to the viewer's current setting as an approximation.
*
* * `must_fix` - must_fix
* * `should_fix` - should_fix
* * `consider` - consider */
run_urgency_threshold: ReviewIssuePriorityEnumApi | null
/** The latest turn's validated findings, most urgent first. */
findings: ReviewFindingApi[]
/** The latest turn's findings the validator dismissed, with its reasoning. */
dismissed_findings: ReviewFindingApi[]
}
export interface ReviewPerspectiveStatItemApi {
/** The review skill (perspective or blind-spot sweep) that raised the findings. */
skill_name: string
/** Findings this skill raised across the aggregated reviews (post-dedupe candidates). */
raised: number
/** Of those, findings the validator kept. */
kept: number
/** Of those, findings the validator dismissed. */
dismissed: number
}
export interface ReviewPerspectiveStatsApi {
/** How many recent completed reviews the stats aggregate over. */
report_count: number
/** Per-skill effectiveness across those reviews, most kept findings first. */
perspectives: ReviewPerspectiveStatItemApi[]
}
export interface ReviewTriggerRequestApi {
/** GitHub pull request URL to review, e.g. 'https://github.com/Insights/hanzo.ai/pull/123'. The repository must be accessible to the project's GitHub App installation. */
pr_url: string
}
export interface ReviewTriggerResponseApi {
/** Temporal workflow id for the started review run; empty when no run was started. */
workflow_id: string
/** Run lifecycle marker: 'started' when the review was queued, 'already_reviewed' when the pull request's current commit already has a published review (no new run starts). */
status: string
}
export interface ReviewTriggerErrorApi {
/** Human-readable explanation of why the trigger was rejected. */
error: string
}
/**
* * `consider` - Consider
* * `should_fix` - Should Fix
* * `must_fix` - Must Fix
*/
export type UrgencyThresholdEnumApi = (typeof UrgencyThresholdEnumApi)[keyof typeof UrgencyThresholdEnumApi]
export const UrgencyThresholdEnumApi = {
Consider: 'consider',
ShouldFix: 'should_fix',
MustFix: 'must_fix',
} as const
export interface ReviewUserSettingsApi {
/** Automatically review pull requests opened by self-driving implementations from the user's Inbox: Review reviews each one and posts its findings to the pull request. */
review_inbox_prs?: boolean
/** Also have hosted Stamp review those same Inbox pull requests: an approve-first review that posts a real GitHub approval when the change passes, and a comment when it doesn't. Only takes effect when the project has a synced, enabled Stamp repository (see stamp_connected). */
stamp_review_inbox_prs?: boolean
/** Review the user's pull requests when the trigger label is added on GitHub. On by default; turning it off makes the label trigger skip PRs this user authored. */
review_labeled_prs?: boolean
/** Minimum priority a validated finding needs to be published: 'consider' (default) publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues.
*
* * `consider` - Consider
* * `should_fix` - Should Fix
* * `must_fix` - Must Fix */
urgency_threshold?: UrgencyThresholdEnumApi
/** Whether reviews can be started from this project's Code review page (the UI trigger is limited to the designated Review team while the product is in alpha). */
readonly can_trigger_reviews: boolean
/** Whether this project has at least one synced, enabled Stamp repository. When false, the stamp_review_inbox_prs toggle has nothing to act on and the UI renders it disabled with a pointer to connect the Stamp GitHub App. */
readonly stamp_connected: boolean
}
export interface PatchedReviewUserSettingsApi {
/** Automatically review pull requests opened by self-driving implementations from the user's Inbox: Review reviews each one and posts its findings to the pull request. */
review_inbox_prs?: boolean
/** Also have hosted Stamp review those same Inbox pull requests: an approve-first review that posts a real GitHub approval when the change passes, and a comment when it doesn't. Only takes effect when the project has a synced, enabled Stamp repository (see stamp_connected). */
stamp_review_inbox_prs?: boolean
/** Review the user's pull requests when the trigger label is added on GitHub. On by default; turning it off makes the label trigger skip PRs this user authored. */
review_labeled_prs?: boolean
/** Minimum priority a validated finding needs to be published: 'consider' (default) publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues.
*
* * `consider` - Consider
* * `should_fix` - Should Fix
* * `must_fix` - Must Fix */
urgency_threshold?: UrgencyThresholdEnumApi
/** Whether reviews can be started from this project's Code review page (the UI trigger is limited to the designated Review team while the product is in alpha). */
readonly can_trigger_reviews?: boolean
/** Whether this project has at least one synced, enabled Stamp repository. When false, the stamp_review_inbox_prs toggle has nothing to act on and the UI renders it disabled with a pointer to connect the Stamp GitHub App. */
readonly stamp_connected?: boolean
}
export interface ReviewValidatorConfigApi {
/** Name of the `review-script-validation-*` skill this row represents (the validator's identity). */
skill_name: string
/** Whether this validator is the one that validates the requesting user's PR reviews on this project. */
active: boolean
/** The validator skill's description, for display in the config UI. */
description: string
/** The validator skill's SKILL.md body, for the read-only skill viewer. */
body: string
}
export interface PatchedReviewValidatorConfigSelectApi {
/** Set true to make this the single validator that runs on the user's PR reviews. Only true is accepted — validators are single-active, so you switch by selecting a different one, not by deactivating the current one. */
active?: boolean
}
export type ReviewReviewsListParams = {
/**
* Maximum rows to return. The list grows this instead of paging by offset — in-progress rows reorder the list between refreshes, so offset pages would shift under the reader.
* @minimum 1
* @maximum 100
*/
limit?: number
/**
* Whose reviews to list: `mine` (the default) for reviews the requesting user ran plus reviews of pull requests they authored (matched via their linked GitHub login), `everyone` for every review on this project.
*
* * `mine` - mine
* * `everyone` - everyone
* @minLength 1
*/
scope?: ReviewReviewsListScope
}
export type ReviewReviewsListScope = (typeof ReviewReviewsListScope)[keyof typeof ReviewReviewsListScope]
export const ReviewReviewsListScope = {
Mine: 'mine',
Everyone: 'everyone',
} as const
export type ReviewReviewsPerspectiveStatsRetrieveParams = {
/**
* Whose reviews to aggregate: `mine` (the default) for reviews the requesting user ran plus reviews of pull requests they authored (matched via their linked GitHub login), `everyone` for every review on this project.
*
* * `mine` - mine
* * `everyone` - everyone
* @minLength 1
*/
scope?: ReviewReviewsPerspectiveStatsRetrieveScope
}
export type ReviewReviewsPerspectiveStatsRetrieveScope =
(typeof ReviewReviewsPerspectiveStatsRetrieveScope)[keyof typeof ReviewReviewsPerspectiveStatsRetrieveScope]
export const ReviewReviewsPerspectiveStatsRetrieveScope = {
Mine: 'mine',
Everyone: 'everyone',
} as const