From efe23f931a180d0e4d6586f0336acd0ed3f2df14 Mon Sep 17 00:00:00 2001 From: m3taversal Date: Tue, 7 Apr 2026 13:02:07 +0100 Subject: [PATCH] ship: fix evaluator column + correct contributor attribution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add domain_agent and domain_model to pr-lifecycle API response (data was queried but dropped before serialization — evaluator column showed blank) - Show model name tag next to evaluator (Gemini Flash, GPT-4o, etc.) - Re-attribute 1201 "pipeline (self-directed)" PRs to @m3taversal — these were Cory-directed, not autonomous overnight research - Re-attribute 252 NULL PRs to @m3taversal - Fix extract.py defaults: new PRs without proposed_by default to @m3taversal - Fix backfill script defaults: extract/ branches → @m3taversal, not "pipeline (self-directed)" - Only agent-named branches (rio/, theseus/, etc.) from research-session.sh remain as "(self-directed)" Pentagon-Agent: Ship --- ops/diagnostics/backfill_submitted_by.py | 22 ++++++++++++---------- ops/diagnostics/dashboard_prs.py | 14 ++++++++++---- ops/diagnostics/dashboard_routes.py | 2 ++ ops/pipeline-v2/lib/extract.py | 5 +++-- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/ops/diagnostics/backfill_submitted_by.py b/ops/diagnostics/backfill_submitted_by.py index 8c0933582..7e1b44d54 100644 --- a/ops/diagnostics/backfill_submitted_by.py +++ b/ops/diagnostics/backfill_submitted_by.py @@ -97,9 +97,10 @@ def main(): agent = agent_map.get(prefix, prefix) contributor = f"{agent} (self-directed)" elif intake_tier == "directed": - contributor = "directed (unknown)" + contributor = "@m3taversal" else: - contributor = None + # Default: if source exists but no proposed_by, it was Cory's submission + contributor = "@m3taversal" if contributor: conn.execute( @@ -108,14 +109,8 @@ def main(): ) updated += 1 else: - # For extract/ branches, mark as pipeline self-directed - if branch.startswith("extract/") or branch.startswith("ingestion/"): - conn.execute( - "UPDATE prs SET submitted_by = 'pipeline (self-directed)' WHERE number = ?", - (pr["number"],), - ) - updated += 1 - elif branch.startswith(("rio/", "theseus/", "vida/", "clay/", "astra/", "leo/")): + # Agent-named branches from overnight research sessions + if branch.startswith(("rio/", "theseus/", "vida/", "clay/", "astra/", "leo/")): agent = branch.split("/", 1)[0] conn.execute( "UPDATE prs SET submitted_by = ? WHERE number = ?", @@ -128,6 +123,13 @@ def main(): (pr["number"],), ) updated += 1 + else: + # Everything else (extract/, ingestion/, unknown) → Cory directed it + conn.execute( + "UPDATE prs SET submitted_by = '@m3taversal' WHERE number = ?", + (pr["number"],), + ) + updated += 1 conn.commit() conn.close() diff --git a/ops/diagnostics/dashboard_prs.py b/ops/diagnostics/dashboard_prs.py index 0fd21c24f..638ab52a1 100644 --- a/ops/diagnostics/dashboard_prs.py +++ b/ops/diagnostics/dashboard_prs.py @@ -316,12 +316,18 @@ def render_prs_page(now: datetime) -> str: contribClass = 'contributor-self'; } - // Evaluator: domain agent + model tags + // Evaluator: domain agent + model tag var evaluator = ''; if (p.domain_agent) { - evaluator = esc(p.domain_agent); - } else if (p.agent && p.agent !== 'pipeline') { - evaluator = esc(p.agent); + var modelShort = ''; + if (p.domain_model) { + var m = p.domain_model; + if (m.indexOf('gemini') >= 0) modelShort = 'Gemini Flash'; + else if (m.indexOf('gpt-4o') >= 0) modelShort = 'GPT-4o'; + else if (m.indexOf('sonnet') >= 0) modelShort = 'Sonnet'; + else modelShort = m.split('/').pop(); + } + evaluator = esc(p.domain_agent) + (modelShort ? ' ' + esc(modelShort) + '' : ''); } rows.push( diff --git a/ops/diagnostics/dashboard_routes.py b/ops/diagnostics/dashboard_routes.py index df9ae4fb3..2b399a112 100644 --- a/ops/diagnostics/dashboard_routes.py +++ b/ops/diagnostics/dashboard_routes.py @@ -882,6 +882,8 @@ async def handle_pr_lifecycle(request): "review_snippet": snippet_map.get(pr_num), "submitted_by": r["submitted_by"], "source_path": r["source_path"], + "domain_agent": r["domain_agent"], + "domain_model": r["domain_model"], }) # Summary KPIs diff --git a/ops/pipeline-v2/lib/extract.py b/ops/pipeline-v2/lib/extract.py index 0c944d94b..d71fbb076 100644 --- a/ops/pipeline-v2/lib/extract.py +++ b/ops/pipeline-v2/lib/extract.py @@ -525,9 +525,10 @@ async def _extract_one_source( elif intake_tier == "research-task": contributor = f"{agent_name} (self-directed)" elif intake_tier == "directed": - contributor = "directed (unknown)" + contributor = "@m3taversal" else: - contributor = "unknown" + # Default: if no proposed_by and not a research task, Cory submitted it + contributor = "@m3taversal" # Build pipe-separated claim titles for the description field claim_titles = " | ".join(