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

59 lines
1.7 KiB
Python

"""
Exported enums for stamp.
If an enum appears in a contract dataclass field, it belongs here.
Internal-only constants (DB magic values, feature flags) stay in
the implementation (logic/, models.py).
"""
from enum import StrEnum
class ReviewMode(StrEnum):
# Every relevant PR event triggers a review (the default).
ALL = "all"
# Reviews run only for PRs carrying the repo's trigger label (Action-style opt-in).
LABEL = "label"
class ReviewRunStatus(StrEnum):
QUEUED = "queued"
GATED = "gated"
REVIEWING = "reviewing"
COMPLETED = "completed"
FAILED = "failed"
SUPERSEDED = "superseded"
# A run in one of these states is done and must not be superseded or rewritten. GATED is terminal
# too: a deterministic gate block is a completed outcome (completed_at is set), and superseding it
# on the next webhook would rewrite the gate result out of the run history.
TERMINAL_STATUSES = frozenset(
{ReviewRunStatus.COMPLETED, ReviewRunStatus.FAILED, ReviewRunStatus.SUPERSEDED, ReviewRunStatus.GATED}
)
class ReviewVerdict(StrEnum):
NONE = "none"
APPROVED = "approved"
REFUSED = "refused"
ESCALATE = "escalate"
WAIT = "wait"
ERROR = "error"
class DigestRunStatus(StrEnum):
PENDING = "pending"
COMPLETED = "completed"
FAILED = "failed"
class ChannelResolutionSource(StrEnum):
# How a DigestChannel row came to exist.
MANUAL = "manual"
SLACK_NAME_MATCH = "slack_name_match"
# Repo declared its digest channel under digest: in .stamp/policy.yml (logic/digest_config.py).
STAMPFN_CONFIG = "stamp_config"
# Reserved for the future owners.yaml contact.slack step (PR #68872) — not implemented yet.
OWNERS_CONTACT = "owners_contact"