← Назад к задаче

VERIFICATION.md

Task acceptance

tasks.verification_json is an operator-owned JSON object with a nonempty
checks list. Exit code zero is necessary but insufficient. Missing contracts
fail closed for every real executor. The dummy executor is simulation only.
Executor output cannot supply or replace the contract.

Configuring a contract (operator workflow)

The dispatcher refuses to launch a real executor for a task without a valid
contract: at claim time it records VERIFICATION_CONTRACT_REQUIRED (with the
command below), parks the task in REVIEW, and creates no execution. A contract
that is malformed (unknown kind, missing fields, absolute or .. path, non-list
argv, timeout outside 1..300) is also refused there, and again in verify().

  1. Write the contract as a reviewed JSON file, e.g. config/verification/<TASK>.json.

Write it from the task's acceptance criteria, never from executor output.

  1. Install it (validates it, records VERIFICATION_CONTRACT_CONFIGURED with the

operator name and contract sha256; refuses running tasks and inactive projects):

.venv/bin/python -m control_plane.verification set TASK_KEY config/verification/TASK_KEY.json --operator NAME
.venv/bin/python -m control_plane.verification show TASK_KEY

  1. For a task parked by the gate, add --release to return it to WAITING

(dependencies still apply). --release refuses any other state. Installing a
contract never changes status, result, acceptance or execution history of
FAILED/COMPLETED/REVIEW deliveries; use the owner decision panel for those.

Install contracts before approving tasks to avoid the parking step entirely.
Example: config/verification/LIT-005.json (full pytest suite, a behavioural
CSS check under X-Forwarded-Proto: https, and required files).

Supported checks (all must pass):

Files must be created or changed during this attempt unless changed: false
explicitly allows an existing deliverable. Evidence includes before/after hashes.

expected_rows (JSON arrays). Connections use read-only mode and query-only SQL.

Use a specific test module so empty discovery cannot count as passing tests.

Contracts are trusted configuration: review test commands and API URLs before
installing them. Tests can execute code. A file hash proves file contents, not
semantic correctness; pair required files with task-specific parser/behavior tests.

Every attempted run records a verification artifact and its checksum in SQLite.
Acceptance failures use TASK_OR_VALIDATION, preserving transient retry/fallback
policy and blocking dependent tasks. Owner checkpoints remain REVIEW, with failed
verification rather than an asserted successful deliverable. Existing execution
history is not rewritten.

Codex probes actual workspace write/read access before invocation and uses that
workspace for both -C and --add-dir under workspace-write. This does not grant
access beyond an enclosing sandbox. Lead Engine tasks use the explicitly authorized
/home/iovon/lead-generation workspace and Codex executor.

Deployment requires restarting the host dispatcher after its active workers have
finished. A running Python process does not reload this module automatically.
Other real tasks need reviewed contracts before successful completion is possible.
Do not bypass dependencies to rerun Lead Engine: 001.1 depends on validation task

  1. Verify 001.1 before releasing subsequent tasks; the later tasks currently have

no contracts and therefore fail closed.

Материалы