feat: move the action model and the action.yml parser here #2

Merged
day01 merged %!d() commits from %!s() into %!s() 2026-08-05 05:26:57 +00:00
Owner

Moves the action model, its reference and the action.yml parser out of the
runner, so everything that reads a workflow or an action definition lives in one
place. Repository URLs and revisions come along because a reference is expressed
in them; the runner re-exports them from runner-source.

The parser moves with the model rather than staying behind an artificial set of
public constructors: it builds the model, and splitting the two would have meant
inventing an API whose only purpose was to keep them apart.

Stays in the runner: fetching an action over git, and the mapping from the
declared node12/node16/node20/node24 to the runtimes the job image
actually ships.

NodeAction and CompositeAction gain an environment() reader; the other two
variants already had one and the worker reached for the field directly.

Verification: cargo fmt --check, clippy -D warnings,
cargo test --workspace --all-targets --all-features, check-architecture.sh,
check-rust-loc.sh.

Moves the action model, its reference and the `action.yml` parser out of the runner, so everything that reads a workflow or an action definition lives in one place. Repository URLs and revisions come along because a reference is expressed in them; the runner re-exports them from `runner-source`. The parser moves with the model rather than staying behind an artificial set of public constructors: it builds the model, and splitting the two would have meant inventing an API whose only purpose was to keep them apart. Stays in the runner: fetching an action over git, and the mapping from the declared `node12`/`node16`/`node20`/`node24` to the runtimes the job image actually ships. `NodeAction` and `CompositeAction` gain an `environment()` reader; the other two variants already had one and the worker reached for the field directly. Verification: `cargo fmt --check`, `clippy -D warnings`, `cargo test --workspace --all-targets --all-features`, `check-architecture.sh`, `check-rust-loc.sh`.
day01 added 3 commits 2026-08-05 05:10:33 +00:00
		The compiler already reads action references, so the model, the reference
and the action.yml parser belong next to it. Repository URLs and revisions
come along because a reference is expressed in them.

Co-authored-by: Cursor <cursoragent@cursor.com>
	
		Both variants already carried it; only the other two had a reader.

Co-authored-by: Cursor <cursoragent@cursor.com>
	
		Co-authored-by: Cursor <cursoragent@cursor.com>
	
day01 reviewed 2026-08-05 05:16:10 +00:00
@@ -0,0 +70,4 @@
}

#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum NodeRuntime {
Author
Owner

min node20

min node20
day01 added 1 commit 2026-08-05 05:21:50 +00:00
		Node 20 is the minimum SynCode ships, so an action declaring node12 or
node16 is rejected instead of being silently upgraded. With the legacy
variants gone the declared runtime and the shipped runtime are one enum.

Co-authored-by: Cursor <cursoragent@cursor.com>
	
day01 merged commit 1dbf765d15 into %!s() 2026-08-05 05:26:57 +00:00
day01 deleted branch feat/action-model 2026-08-05 05:26:58 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: syncode/workflow#2