- scripts/dba/grant-migration-test-db-ownership.sql: for a DBA to run, fixes the kartsell_migration_test ownership regression blocking DbUpMigrationTests/DbUpRecoveryTests (12 tests) locally. - docs/CURRENT/PHASE-1_APPROVAL_CHECKLIST.md + scripts/phase1/template-approve-versionset.sql: documents/templates the human maker-checker approval steps needed to freeze a VersionSet before Phase 1 shadow run can be re-queued. Does not perform any approval — every placeholder must be filled by a real, named maker and a different named checker. No automation should insert rows into dataset_manifest / model_version_registry / evidence_snapshot / release_evidence_bundle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4.2 KiB
Phase 1 Shadow Run — VersionSet approval checklist
Purpose: PHASE-1-SHADOW-RUN (WBS tracker row, docs/CURRENT/PHASE-1_SHADOW_RUN_STATUS_CORRECTION.md)
is blocked because evaluation.dataset_manifest, governance.model_version_registry,
signal_engine.evidence_snapshot, and governance.release_evidence_bundle contain no
approved/frozen rows. Nothing can be RunId/JobId-enqueued until a human approves a VersionSet.
This document is a checklist, not an approval. It exists so the approval step is fast and
auditable once a real human decides to do it. It does not grant approval, and no automation in
this repository should insert rows into these tables on a schedule or "because the checklist
passed" — every approved_by/checker_id value below must be a real person who reviewed the
evidence, per CLAUDE.md's maker-checker principle and AGENTS.md's guardrail against fabricated
governance records.
Why this can't be scripted away
Each table below enforces maker-checker at the database level (see the CHECK constraints in
db/migrations/0016_continuous_model_operations.sql, 0017_execution_assurance.sql,
0034_dataset_manifest_freeze_contract.sql):
dataset_manifest:FROZENrequiresapproved_by,approved_at,frozen_atall set, and the table is append-only (trigger blocks UPDATE/DELETE — corrections are new rows).model_version_registry:lifecycle_state = 'APPROVED'requiresapproved_by+approved_at.release_evidence_bundle:status IN ('APPROVED','REJECTED')requireschecker_id IS NOT NULL,checker_id <> maker_id(the checker cannot be the maker), anddecided_at.
There is no code path that satisfies these constraints without a named maker and a different named checker actually deciding. That is intentional — do not add one.
Checklist (walk in order)
-
Dataset manifest exists and is content-addressed.
- A
dataset_manifestrow exists for the targetscope_keywithcontent_hashcomputed from the actual dataset (not a placeholder). lineage_hashtraces back to real source ingestion (KRX/OpenDart/KIS viasrc/KArtSell.Modules.ModelOperations/Infrastructure/), not synthetic/test data.- A maker sets
status = 'PROPOSED'. - A different person (checker) reviews the dataset and, if acceptable, updates status to
APPROVEDand laterFROZEN(settingapproved_by,approved_at,frozen_at).
- A
-
Model version registered.
model_version_registryrow exists for the model/scope withcode_shamatching the exact commit that will run,model_card_hashmatching a real ModelCard document.lifecycle_stateprogressed throughRESEARCH → CHALLENGER → SHADOW → CANDIDATEwith real review at each step (not skipped).- Checker sets
lifecycle_state = 'APPROVED'withapproved_by/approved_at.
-
Evidence snapshot frozen.
signal_engine.evidence_snapshotrow references the approveddataset_idandmodel_versionabove, withcontent_hashcomputed from the actual frozen payload.
-
Release evidence bundle.
release_evidence_bundlerow aggregates build/test/migration/security/rollback artifact hashes for the exact code that will run.- Maker (
maker_id) creates it inDRAFT/REVIEW_REQUIRED. - A different checker (
checker_id <> maker_id) reviews and setsstatus = 'APPROVED',decided_at.
-
Only after all four are real and APPROVED/FROZEN:
- Reconcile
shadow_run.check_statusconstraint (already done — seedb/migrations/0032_shadow_run_queued_status_contract.sql,AEG-X-004). - Call
POST /api/shadow-runsreferencing the approved VersionSet. - Record the returned RunId/JobId in
docs/CURRENT/PHASE-1_SHADOW_RUN_STATUS_CORRECTION.mdand updateWBS_PROGRESS_TRACKER.csv'sPHASE-1-SHADOW-RUNrow toRUNNING— only with that real RunId/JobId cited as evidence.
- Reconcile
SQL template
scripts/phase1/template-approve-versionset.sql has the parameterized statements for steps 1-4,
with every value that must be a real human decision left as an explicit placeholder. It is a
template to hand-fill and run interactively (e.g. via psql), not a script to execute as-is.