Expand description
Assisted one-way GHA→QED transformer (R533-F4, W224).
W224 (“import, don’t emulate”) makes a GitHub Actions workflow an import source, not a foreign runtime QED reproduces forever. The onboarding path is a one-way, assisted, lossy-with-warnings transform: map the tier-1/2 ~80% mechanically, and flag the tier-3 steps it deliberately declines to imitate — proposing the native QED replacement for each rather than guessing.
This module is that transform. It sits on top of the yah_qed_gha parser +
the R533-F2 tier classifier and emits native
QedSteps for the runnable compute, paired with a list of human-facing
flags for everything that needs a decision. It is pure — it operates on
an already-parsed Workflow and performs no I/O — so the runner / the
eject materializer (R533-F6) own the file read and the TOML write.
§What maps mechanically, what gets flagged
| Parsed step | Tier (F2) | Result |
|---|---|---|
run: bash | 1/2 compute | native StepKind::Subprocess step |
run: bash reaching gh/api.github.com/GITHUB_TOKEN | 1/2 + service touch | native step and an FlagKind::EmbeddedServiceTouch flag |
run: carrying ${{ … }} | 1/2 compute | native step and an FlagKind::UnresolvedExpression flag |
uses: org/setup-*, dtolnay/rust-toolchain, … | 1/2 toolkit | FlagKind::ToolkitAction — runs via the R533-T7 toolkit executor, no subprocess emitted yet |
uses: actions/checkout, cache, upload-artifact, gh-release, build-push, … | 3 service | FlagKind::ReplaceWithNative carrying the native stanza |
uses: unrecognized | unknown | FlagKind::Unknown — surfaced for review |
§Job DAG → flat pipeline
A native Pipeline is a flat Vec<QedStep> run in
declaration order; GHA workflows are a job DAG. The transform flattens jobs
into a topological linearization (yah_qed_gha::topo_sort) — every job’s
needs: predecessors emit before it — so execution order is honest even
though inter-job parallelism collapses to sequential. Matrix expansion and
the workflow_call port contract are not handled here: target lifting out
of strategy.matrix is R533-F9 (it layers onto the steps emitted here) and
the down/up-port mapping is R533-F5.
Structs§
- Transform
Report - The result of transforming one workflow — the native steps that mapped mechanically, interleaved (in execution order) with the flags the human must resolve. “Assisted / lossy-with-warnings” made concrete: nothing tier-3 is silently run, and nothing un-mappable is silently dropped.
- Transformed
Step - One parsed workflow step after transformation. A clean tier-1/2
run:step hasnative = Some(..)andflags = []; a tier-3 step hasnative = Noneand aFlagKind::ReplaceWithNative; arun:step reaching the service has both a native step (it runs) and a flag (the reach won’t resolve on QED).
Enums§
- Flag
Kind - Why a parsed step couldn’t be imported as clean native compute — the assisted half of the transform. Each variant proposes what to do instead.
- Flag
Severity - How loud a
FlagKindis, for preflight summaries and reports.
Functions§
- transform_
workflow - Transform a parsed workflow into native QED steps + assisted flags.
- transform_
workflow_ src - Convenience: parse raw workflow YAML and transform it in one call. Still
pure (no file I/O) — the caller supplies the bytes. Used by
eject(R533-F6) and the tests here.