fix: Phase 1 pipeline fully operational
- store_traced_faces.py: add --uuid arg for PythonExecutor compat - tkg_builder.py: add --uuid arg + timestamp_secs column fix - release_pack.py: fix pg_dump/psql paths, proper JSON escaping - pipeline_checklist.py: new independent verification tool Phase 1 checklist 8/8 PASS: ASR ✅ ASRX ✅ sentence chunks ✅ vector embeddings ✅ face trace ✅ TKG graph ✅ trace chunks ✅ Phase 1 release ✅
This commit is contained in:
@@ -26,15 +26,19 @@ DB_USER = os.environ.get("USER", "accusys")
|
||||
DB_NAME = "momentry"
|
||||
QDRANT_URL = os.environ.get("QDRANT_URL", "http://localhost:6333")
|
||||
QDRANT_COLLECTION = os.environ.get("QDRANT_COLLECTION", "momentry_dev_rule1_v2")
|
||||
PG_BIN = "/Users/accusys/pgsql/18.3/bin"
|
||||
|
||||
|
||||
def ts():
|
||||
return datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S")
|
||||
|
||||
|
||||
def psql_cmd() -> list:
|
||||
return [f"{PG_BIN}/psql", "-U", DB_USER, "-d", DB_NAME]
|
||||
|
||||
def run_sql(sql: str) -> str:
|
||||
r = subprocess.run(
|
||||
["psql", "-U", DB_USER, "-d", DB_NAME, "-t", "-A", "-c", sql],
|
||||
psql_cmd() + ["-t", "-A", "-c", sql],
|
||||
capture_output=True, text=True, timeout=30,
|
||||
)
|
||||
return r.stdout.strip()
|
||||
@@ -57,7 +61,7 @@ def pack_phase(file_uuid: str, phase: int) -> Path:
|
||||
schema_path = pkg_dir / "schema.sql"
|
||||
with open(schema_path, "w") as fh:
|
||||
subprocess.run(
|
||||
["pg_dump", "-U", DB_USER, "-d", DB_NAME, "--schema=dev", "--schema-only",
|
||||
[f"{PG_BIN}/pg_dump", "-U", DB_USER, "-d", DB_NAME, "--schema=dev", "--schema-only",
|
||||
"-T", "dev.monitor_jobs", "-T", "dev.processor_results"],
|
||||
stdout=fh, text=True, timeout=60,
|
||||
)
|
||||
@@ -141,6 +145,7 @@ def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--phase", type=int, required=True, choices=[1, 2])
|
||||
parser.add_argument("--file-uuid", required=True)
|
||||
parser.add_argument("--uuid", help="UUID for Redis tracking (accepted by executor)")
|
||||
args = parser.parse_args()
|
||||
|
||||
pack_phase(args.file_uuid, args.phase)
|
||||
|
||||
Reference in New Issue
Block a user