Cohesion: Python inventory + integration plan + Phase A (auditor→observer+KB) #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "cohesion/python-inventory-and-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What J asked for
What this PR does
docs/PYTHON_INVENTORY.md— every .py file classified. Two confirmed dead in sidecar; 5 overlap with newer TS. Cleanup deferred to a subsequent PR (operator decision).docs/COHESION_INTEGRATION_PLAN.md— 6-phase plan (A-F) for the loop. Each phase adds one wire.source=auditorAND append todata/_kb/outcomes.jsonlwithkind=audit. Observer source type extended frommcp|scenariotomcp|scenario|auditor|bot.Live-verified
After observer restart + re-audit of PR #6:
Not shipping here
Phases B-F of the cohesion plan. Each is its own PR. Phase B (
kb_queryreads prior audit history from the rows Phase A now creates) is the natural next.Three artifacts in one PR: 1. docs/PYTHON_INVENTORY.md — every .py file in the repo classified: Production (sidecar routers + 3 systemd services), Documented (kb_measure, kb_staffer_report), Manual (one-off tools), Dead (sidecar/sidecar/lab_ui.py + pipeline_lab.py are genuinely not imported anywhere). 2. docs/COHESION_INTEGRATION_PLAN.md — the "smarter DB" loop J called out as missing. Six phases A-F. Phase A ships here; B-F are named + sequenced for follow-up PRs. Each phase adds ONE wire of the loop; no single PR does them all. 3. Phase A wire (auditor verdicts → observer + KB): - auditor/audit.ts: after assembleVerdict, fire-and-forget POST to :3800/event with source="auditor" AND append to data/_kb/outcomes.jsonl with kind="audit". Errors log + drop — the verdict is still on disk at _auditor/verdicts/. - mcp-server/observer.ts: extend source union to include "auditor" | "bot" (was "mcp" | "scenario" only, which silently coerced my first auditor POST to source="scenario"). Accept body.ok OR body.success. Accept body.audit_duration_ms as a fallback for duration_ms. Uses body.one_liner as output_summary when set. Live-verified after observer restart: re-audit PR #6 → verdict=request_changes, 4 findings (1 warn) observer: by_source={'auditor': 1} (previously coerced to 'scenario') _kb/outcomes.jsonl tail: kind=audit sig=pr6-7fe47bab pr=6 overall=request_changes The shape of the loop is now visible to downstream consumers. Phase B (auditor's kb_query check reads these audit rows for history) lands in a follow-up PR. Phase C-F similar. NOT in this PR: - Actually deleting lab_ui.py + pipeline_lab.py (operator decision, called out in the inventory doc) - Cleaning up the 5 overlapping Python scripts (same) - Phases B-F of the cohesion plan (separate PRs per wire) - Integration test that asserts "smarter DB" across runs (Phase F) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Auditor verdict: ✅
approveOne-liner: all checks passed (3 findings, all info)
Head SHA:
6e39d8778f4fAudited at: 2026-04-22T22:23:03.481Z
dynamic — 1 findings (0 block, 0 warn, 1 info)
ℹ️ info — dynamic check skipped — skipped by options
skipped by optionsinference — 1 findings (0 block, 0 warn, 1 info)
ℹ️ info — no ship-claims extracted — skipping cloud inference
parser returned empty claim list; nothing to verify against cloudkb_query — 1 findings (0 block, 0 warn, 1 info)
ℹ️ info — KB: 71 recent scenario runs, 210/291 events ok (fail rate 27.8%)
most recent: ?recent failing sigs: 5745bcd5e4c68591, caeeeffc69d36009, pr6-7fe47babMetrics
Lakehouse auditor · SHA
6e39d877· re-audit on new commit flips the status automatically.Closing as stale. 10 days drift, not mergeable, auditor verdict
request_changeswith 4-6/10 alignment scores from KB scrum. Content disposition:docs/PYTHON_INVENTORY.md— partially obsoleted; the dead-code claim aboutlab_ui.py+pipeline_lab.pyis now correctly tracked as dev-only UIs (sidecar drop landedba928b12026-05-02 confirms they are not on the runtime hot path)docs/COHESION_INTEGRATION_PLAN.md— overlapped by today's unified longitudinal session JSONL (gateway + validatord both write to same path withdaemon=field; cross-runtime parity probes lock in equivalence)If you want the Python inventory doc on
main, cherry-pick6e39d87for that file only.Pull request closed