30 lines
2.5 KiB
Markdown
30 lines
2.5 KiB
Markdown
# Step 6: the digest step
|
|
|
|
Built 2026-10-13.
|
|
|
|
## What was built
|
|
|
|
- **`sources` on `ExecutionEngine.start`**, and on `/generate` and A2A message metadata: files by name. The Workflow's `digest` reads the ones it knows and returns a `Digested`: the spec's fields, the sources it used, and a note per field of where it was read from. A Workflow with no `digest` reads none.
|
|
- **`scope.merged`**: the digested spec with what the caller supplied laid over it, field by field. What the caller wrote wins.
|
|
- **A new provenance, `digested`.** It stands as a supplied value does: the scope analyst cannot overwrite it, and only the customer's own answer changes it. The completed spec's `provenance` and `readiness`, and the information register, count digested values apart. `readiness` has the `digested` key only when something was digested, so a spec that was not is recorded as before.
|
|
- **Sources are kept as supplied,** under the Customer case's `intent/NNN.sources/`, each with its hash in `history.json`, in the Execution's state and in `execution.json`.
|
|
- **A source code did not read is a document** for the Specialist that completes the spec, in its context as `source_documents`, up to 60,000 characters each.
|
|
- **Refused before anything runs or is written:** a source whose name is not a safe relative path, sources that are not text by name, and a source of a kind the Workflow knows and cannot read.
|
|
|
|
## Differed from the plan
|
|
|
|
- The plan had the inventory travel as a separate data file to the Specialists that use it. It still travels in the spec's data file, to every Specialist. That needs the engine to let a Workflow say which of a spec's fields are shown to whom, and is not built.
|
|
- A Workflow still cannot name the spec's two files; they are `scope.yaml` and `scope.json`.
|
|
|
|
## Tests
|
|
|
|
`tests/toy/test_digest.py`: eight tests on the toy Workflow with a small catalogue and a digest of a made-up format. 529 pass in all.
|
|
|
|
## Verified
|
|
|
|
`pytest -q`: 529 passed. `ruff check .`, `ruff format --check .`, `mypy .`: clean.
|
|
|
|
## A guard added after, 2026-10-14
|
|
|
|
In an Execution with nobody to answer, a Specialist that ends three runs running without submitting its Deliverable now stops the Execution with a warning (`MAX_UNFINISHED_RUNS` in `nodes/execution_nodes.py`). Each such run is answered automatically and run again; with no guard it went on until the Orchestrator's turn limit. An operating model evaluation case looped this way for about two and a half hours. A submission resets the count. Two tests on the toy Workflow; 531 pass.
|