arazzo-executor: retain document identities and load source graphs - #286
Conversation
Add optional owner-scoped source registries, canonical Arazzo identity resolution, bounded loading and located partial-graph diagnostics. Preserve raw documents and redirect metadata through additive loader/fetcher APIs, and expose graph policy in the CLI without changing execution signatures. Assisted-by: Codex Signed-off-by: Sergey Vilgelm <sergey@vilgelm.com>
|
Reviewed at The traversal design holds up well: the retry sweep in Confirmed Issues1.
Measured against a local server returning This is not confined to the new API. Fix: when 2. The CLI prints every source diagnostic twice — Low
The same ~250-character line, twice. Two smaller things show in that output: Fix: pick one channel (keep the stderr loop and let Possible Risks3. A complete document is now resident three or four times — Medium
Each step is individually reasonable and the 4. The root Nice-to-Have Improvements5. The non-hierarchical The old Accurate, but it no longer tells the author what to do. 6. Partial re-export of the loader surface — Low
— Reviewed by Claude Opus 5 |
Preserve requested YAML hints through redirects, render source diagnostics once, and keep legacy-only loads to one full document tree. Share raw documents through graph-backed options, centralize dependency declarations, restore actionable URI errors, and export the loader API at the crate root. Assisted-by: Codex Signed-off-by: Sergey Vilgelm <sergey@vilgelm.com>
|
Re-reviewed at No major issues detected. 1. YAML hint through redirects. The first case is the one that regressed at 2. CLI diagnostics. The stderr loop moved after successful preparation, so a preparation failure carries them only inside the error and a successful run prints them once as warnings, suppressed by 3. Document sharing. This is the substantial one, and the journal approach is sound but load-bearing, so I exercised it rather than reading it. A document with relative refs that change, an already-absolute ref that does not, a fragment-only ref, an empty ref, a non-string
The ordinal scheme holds because 4. Dependency declarations. 5. Non-hierarchical 6. Loader re-exports. — Reviewed by Claude Opus 5 |
Add the optional
source-graphexecutor feature, following the checked preparationwork in #285. Complete documents now retain opaque registry handles, retrieval
locations, resolved Arazzo
$selfidentities, effective reference bases and writtenversions. Supplied Arazzo documents are fully parsed and indexed before resolution;
aliases and source/API-base overrides are scoped to the owning document.
Source traversal uses caller-configured
roas::Loaderfetchers, with shareddocuments, explicit back edges, separate document/depth budgets, root-source selection,
and located errors that preserve readable parts of a graph. Later identity discovery
can repair an earlier unresolved reference, including a newly discovered shorter
path. A qualified operation may prepare with an unrelated source missing; a bare
operation ID still requires enough sources to prove uniqueness.
The loader adds unchanged-document/retrieval-metadata APIs with default methods for
existing sync/async fetchers. HTTP fetchers expose final redirect URLs and retain
caller redirect/timeout policy. YAML sniffing respects explicit content types and,
when absent or generic, either the requested or final URL's extension. Thus
/source.yamlredirecting to/blobretains legacy parsing behavior.Legacy reference readers retain requested-URI rewriting and store only one full
document plus changed-reference strings. A raw view is materialized only on demand,
without another fetch. Shared-document APIs let the loader, graph and cloned Options
retain the same immutable raw value; both full views are retained only if both are
requested. All loader types are also exported at the roas crate root.
Options::sourceremains compatible, and explicit source/base overrides take precedence.The CLI keeps selected-workflow source discovery by default. New flags expose
--source-document,--load-all-sources,--source-max-documents,--source-max-depth, and--allow-source-retrieval-aliases; none enables IO beyondthe existing
--loadpolicy. Canonical Arazzo identities are strict by default;retrieval aliases are an explicit compatibility extension. Fetched unrelated failures
are reported without unnecessarily blocking a qualified checked run. Each diagnostic
is rendered once with its owning document identity, location and source alias, without
opaque registry IDs; quiet mode suppresses optional warnings but retains failure details.
Relative sources under a non-hierarchical
$selfname the two remedies: an absolutesource URL or a hierarchical
$self.crates/roas-cli/tests/fixtures/source-graph/root.jsonlinks JSON/YAML branchessharing
shared.yamlandapi.json, withshared.yamlpointing back to the root.For identity resolution, a document retrieved from
https://example.test/cache/child.jsonwith
"$self":"../identity/child.json"is identified byhttps://example.test/identity/child.json, and resolves its relative sources there.Recognized families are Arazzo 1.0/1.1, OpenAPI 2.0/3.0/3.1/3.2, and AsyncAPI
2.6/3.0/3.1. API documents retain complete raw values with model-checked versions,
not structural/schema validation. Broker execution, external workflow calls,
referenced OpenAPI Path Items and relative API-server resolution remain deferred.
The additive loader/fetcher APIs bump roas to 0.20.1 and roas-http-fetcher to 0.2.5;
the executor remains on unreleased 0.2.0. Those dependency minimums ensure downstream
builds receive the metadata APIs. Consumers inherit the workspace dependency versions
while explicitly preserving their existing feature selections. No existing execution
signatures are changed.