implement-lazy-evaluation

Implement lazy evaluation and FLIP creation

Metadata

Statusdone
Assignedagent-923
Agent identity6841f97a7a8e6cbc213051ce0ffb3c85c92c80cb61fd699428ab3fed6cb6ba94
Created2026-07-26T10:24:22.633658492+00:00
Started2026-07-28T08:05:41.422959709+00:00
Completed2026-07-28T08:50:50.522295165+00:00
Tokens35495033 in / 47502 out

Description

Objective

Stop eager .flip-*/.evaluate-* graph proliferation. Create bounded evaluation work only after a real source attempt reaches candidate completion and the resolved policy selects it. Create deep-readonly FLIP work only for its separate explicit/high-risk policy.

Scope and ordering

Use the authoritative lifecycle candidate-completion event and the serialized admission-deferral semantics. Do not introduce another coordinator status writer. This task owns lazy selection/minting and hidden-evidence visibility, not Pi process execution or deep-readonly tools.

Requirements

  • Publishing/adding/opening a source task creates no evaluation satellite.
  • A source with no successful run attempt—including spawn failure, admission deferral, cancellation, skip, open/incomplete work, ordinary messages, or dead-agent reconciliation—creates no evaluator/FLIP work.
  • At candidate completion, atomically resolve advisory/hard-gate evaluation policy and, separately, explicit/high-risk FLIP policy; lazily mint only required attempt-bound records/satellites. Repeated ticks/restarts are idempotent.
  • Default policy selects bounded evaluation only. Deep-readonly FLIP is never globally/eagerly inferred merely because evaluation is enabled.
  • Default Viz/list views remain uncluttered; hidden evaluation evidence remains inspectable on demand.
  • Preserve historical graph compatibility and safely retire stale pre-created satellites.

Validation

  • RED tests/live fixture are written first: publish_many_creates_no_evaluation_before_attempt_completion publishes 100 tasks and sees zero satellites, and never_ran_sources_never_evaluate covers deferral, launch failure, cancellation, skip, open, message, and reconciliation paths.
  • Implementation makes the RED cases pass; exactly the selected bounded evaluation or explicit deep-FLIP work appears once after genuine candidate completion.
  • Credential-free Fake-Pi fixtures are used; no provider login/key is required.
  • Restart/replay and duplicate completion create no duplicate work or verdict-consumption opportunity.
  • A real TUI/Viz human-flow smoke (PTY/tmux or equivalent) publishes tasks, observes an uncluttered workspace, completes one fake-executed source, and reveals its evidence only through the intended detail action—not a library/CLI-only substitute.
  • The permanent scenario is added under tests/smoke/scenarios/ and registered with this task in tests/smoke/manifest.toml owners.
  • cargo fmt --check, cargo clippy, focused tests, cargo build, and cargo test pass with no regressions.

Depends on

Required by

Messages 5 messages (5 unread)

  1. #1design-pi-evaluation2026-07-26T20:58:47.874444253+00:00delivered
    Design ready and pushed at docs/design-pi-evaluation-plane.md (8cce460f). Key implementation decisions: serde-defaulted hidden EvaluationRecord projection on source (no graph satellites); lazy predicate requires AttemptRunning + Complete intent + exact CandidateCheckpointed; bundle/verdict CAS; dedicated AgencyEvaluation queue outside worker/build slots; strict Pi RPC with get_state/agent_settled/no-tools; exact route/no cross-executor fallback; serialization order in §10; file seams in §13; Fake-Pi and human-flow scenarios in §15.
  2. #2implement-strong-agent2026-07-27T21:30:11.580213892+00:00delivered
    Strong-agent lane is implemented in b6e71b77. Fresh resolution evaluation seam is  in src/merge_resolution/mod.rs and is explicitly descriptor-bound; replace the credential-free accepted adapter with your lazy evaluation/FLIP interface without changing classifier/route/workspace/CAS authority. Original candidate verdict is not consumed.
  3. #3implement-strong-agent2026-07-27T21:30:20.039915692+00:00delivered
    Correction: Strong-agent lane is implemented in b6e71b77. The fresh resolution evaluation seam is FreshGates.evaluation_receipt_cid in src/merge_resolution/mod.rs and is explicitly descriptor-bound; replace the credential-free accepted adapter with your lazy evaluation/FLIP interface without changing classifier/route/workspace/CAS authority. Original candidate verdict is not consumed.
  4. #4implement-lazy-evaluation2026-07-28T08:05:48.376975210+00:00read
    Acknowledged design guidance — I will implement hidden source-bound lazy records, candidate-checkpoint-only minting, separate explicit/high-risk FLIP selection, CAS/idempotency, and Fake-Pi/TUI coverage.
  5. #5implement-lazy-evaluation2026-07-28T08:05:48.477207255+00:00read
    Acknowledged strong-agent seam — I will preserve merge classifier/route/workspace/CAS authority and expose descriptor-bound lazy evaluation evidence for FreshGates without consuming an original candidate verdict.

Log