Commit graph

5 commits

Author SHA1 Message Date
adbe3bd911 fix: prevent reweave PR flood — freshen base, cleanup branches on failure
Three fixes for the reweave merge failure cycle:

1. reweave.py: fetch + reset to origin/main before branch creation,
   eliminating the stale-base problem that caused ~75% merge failure rate

2. merge.py: delete remote branch when closing reweave PRs (in reconcile,
   merge failure, and conflict retry paths) — prevents discover_external_prs
   from rediscovering stale branches and creating new PRs every 18 minutes

3. merge.py: skip cherry-pick retry for reweave branches — reweave modifies
   existing files so cherry-pick always fails, go straight to close+delete

Pentagon-Agent: Ship <f3064ef4-c330-4809-ad37-39290b2eaa5b>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:56:03 +00:00
0591c4c0df wire cascade, cross_domain, and review_records into pipeline
- merge.py: import + await cascade_after_merge and cross_domain_after_merge
  after reciprocal edges, before branch deletion. Both non-fatal.
  Added conn.commit() before slow branch deletion (Ganymede Q4).
- db.py: add record_review() helper + migration v18 (review_records table
  with indexes). Schema version 17→18.
- evaluate.py: call record_review() at all 3 verdict points:
  domain_rejected → outcome=rejected
  approved → outcome=approved
  changes_requested → outcome=approved-with-changes
  Notes field captures review text (capped 4000 chars).

Pentagon-Agent: Ship <E2A054E5-A6D6-4AE0-B0A3-F51A3B4DBCA5>
2026-04-07 14:56:03 +00:00
a68f38609d fix: add date_errors to substantive fixer tag routing
date_errors was evaluated but never routed to any fixer, leaving PRs
stuck permanently. Now classified as FIXABLE with targeted prompt guidance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:56:02 +00:00
05d74d5e32 sync: import all VPS pipeline + diagnostics code as baseline
Imports 67 files from VPS (/opt/teleo-eval/) into repo as the single source
of truth. Previously only 8 of 67 files existed in repo — the rest were
deployed directly to VPS via SCP, causing massive drift.

Includes:
- pipeline/lib/: 33 Python modules (daemon core, extraction, evaluation, merge, cascade, cross-domain, costs, attribution, etc.)
- pipeline/: main daemon (teleo-pipeline.py), reweave.py, batch-extract-50.sh
- diagnostics/: 19 files (4-page dashboard, alerting, daily digest, review queue, tier1 metrics)
- agent-state/: bootstrap, lib-state, cascade inbox processor, schema
- systemd/: service unit files for reference
- deploy.sh: rsync-based deploy with --dry-run, syntax checks, dirty-tree gate
- research-session.sh: updated with Step 8.5 digest + cascade inbox processing

No new code written — all files are exact copies from VPS as of 2026-04-06.
From this point forward: edit in repo, commit, then deploy.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 00:00:00 +01:00
2c0d428dc0 Add Phase 1+2 instrumentation: review records, cascade automation, cross-domain index, agent state
Phase 1 — Audit logging infrastructure:
- review_records table (migration v12) capturing every eval verdict with outcome, rejection reason, disagreement type
- Cascade automation: auto-flag dependent beliefs/positions when merged claims change
- Merge frontmatter stamps: last_review metadata on merged claim files

Phase 2 — Cross-domain and state tracking:
- Cross-domain citation index: entity overlap detection across domains on every merge
- Agent-state schema v1: file-backed state for VPS agents (memory, tasks, inbox, metrics)
- Cascade completion tracking: process-cascade-inbox.py logs review outcomes
- research-session.sh: state hooks + cascade processing integration

All changes are live on VPS. This commit brings the code under version control for review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:50:49 +00:00