Skip to content

Wire consensus panel into engine, add verified execution and evaluation - #1

Open
Kendiukhov wants to merge 1 commit into
mainfrom
consensus-panel-execution-and-evaluation
Open

Wire consensus panel into engine, add verified execution and evaluation#1
Kendiukhov wants to merge 1 commit into
mainfrom
consensus-panel-execution-and-evaluation

Conversation

@Kendiukhov

Copy link
Copy Markdown
Contributor

Summary

Makes the consensus reviewer a live part of the execution loop (previously it existed only as an unused module), adds sandboxed verified execution, and adds a quantitative evaluation of the orchestrator. The PLOS ONE manuscript is updated to match.

Orchestration

  • dsl: compile_loop now compiles a consensus_merger node into one consensus step carrying the full reviewer panel, instead of following only the first always edge and silently dropping the other reviewers. Linear loops compile unchanged.
  • engine: runs the panel concurrently (asyncio.gather), accounts panel tokens/cost, formats merged feedback, and supports an optional advancement gate (blocks convergence while a Critical critique is unresolved). on_flag: edges are now honored from run config.
  • consensus: configurable panel and agreement threshold, deterministic tie-break, optional per-role weighting, and a compute_consensus_report.

Verified execution

  • code_executor: extracts fenced Python from executor artifacts and runs each block in an isolated python -I subprocess (fresh tempdir, wall-clock timeout, output cap). Opt-in via code_execution_enabled; the engine folds the execution report into feedback so reviewers critique executed results.

Mock adapter

  • Role-authoritative detection from the prompt's role variable (fixes a latent misdetection of the executor prompt as idea_generator), differentiated per-lens critique sets with controlled overlap, fixed-iteration determinism, and a runnable snippet in the default executor output.

Evaluation

  • analysis/experiments.py + scripts/: panel-size ablation, reviewer-lens overlap, convergence profile, concurrent-run load benchmark; figure/results generators; and a live-Gemini consensus corroboration probe.

Paper

  • paper/plos/: PLOS ONE manuscript, figures, results data, and cover letter.

Tests

  • Adds test_consensus_wiring.py, test_code_executor.py, test_experiments.py (17 tests). Full suite green: 358 passing (1 pre-existing unrelated asyncio.get_event_loop test deselected).

🤖 Generated with Claude Code

Make the consensus reviewer a live part of the loop and characterise the
orchestrator quantitatively.

Orchestration:
- dsl: compile a consensus_merger node into a single consensus step that
  carries the full reviewer panel instead of dropping parallel fan-out edges.
- engine: execute the panel concurrently, account panel tokens/cost, format
  merged feedback, and support an optional advancement gate that blocks
  convergence while a Critical critique is unresolved. Implement on_flag edges.
- consensus: configurable panel and agreement threshold, deterministic
  tie-break, optional per-role weighting, and a consensus report.

Verified execution:
- code_executor: run fenced Python from an executor artifact in an isolated
  subprocess (timeout, output cap); opt-in via code_execution_enabled. Engine
  folds the execution report into feedback so reviewers see executed results.

Mock adapter:
- role-authoritative detection from the prompt's role variable (fixes a
  misdetection of the executor prompt), differentiated per-lens critique sets
  with controlled overlap, fixed-iteration determinism, and a runnable snippet
  in the executor output.

Evaluation:
- analysis/experiments.py plus scripts: panel-size ablation, reviewer-lens
  overlap, convergence profile, and concurrent-run load benchmark; figure and
  results generators; a live-Gemini consensus corroboration probe.

Paper:
- paper/plos: PLOS ONE manuscript, figures, data, and cover letter.

Adds 17 tests; full suite green (358 passing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant