spec_executor.py already consumed read_only_paths from constraints but
work_block_schema.py had additionalProperties:False with the field absent.
Any spec using read_only_paths failed validation before execution reached
the field. One property added; no executor changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
work_block_schema.py: _FAILURE_HANDLER now uses oneOf β accepts both string
shorthands ("abort", "skip", "continue", etc.) and the full object form
{"action": "abort_block"}. Easier spec authoring without breaking existing specs.
spec_executor.py: _handle_failure normalizes string shorthands to dict at
entry so execution works regardless of which form the spec uses.
spec_executor.py: edit_file in _direct_filesystem_op now returns new file
content instead of a confirmation string, enabling contains/not_contains
validation checks on the result of an edit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gap 1: Spec-declared workspace now bypasses tool-level path checks for
filesystem ops. Direct filesystem operations when workspace differs from
default, executor's own PolicyEngine check is sufficient.
Gap 2: shell_allowlist in spec constraints extends PolicyEngine's base
allowlist per-spec. Specs can allow additional commands without weakening
global security.
Gap 3: New edit_file tool β targeted find-and-replace. Reads file, verifies
old_text exists exactly once, replaces with new_text. Safer than full
overwrite for cross-repo work. Wired through PolicyEngine, TOOL_REGISTRY,
facade, and spec schema.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add structured work block spec executor for QB β Codemine handoffβ
New files:
- work_block_schema.py: JSON Schema for WorkBlockSpec with mandatory
validation blocks on every action step and on_failure handlers
- spec_executor.py: Deterministic execution engine β no LLM in the loop,
mechanical step execution using existing TOOL_REGISTRY and PolicyEngine
Five step types: action, gate, condition, loop, group
Variable bindings ($var) for passing results between steps
Constraint enforcement: tool allowlist, max iterations, timeout
Structured execution reports for QB consumption
Also:
- New Spec tab in Gradio UI for executing specs
- Audit trail logged to data/audit/blocks.jsonl
- jsonschema added to requirements
- Dockerfile updated with new files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>