Repository navigation
v0.3.0
ynf v0.3.0
Two new lane settings let you say more about which paths a run may touch, and lanes validate now catches a harness pinned to a branch. Everything is optional and nothing has been removed.
Append-only paths: pr.append_only_paths
A lane can list paths that a run may add to but not change. The diff gate reads how each path changed (added, modified, deleted, type changed; a rename counts as a deletion plus an addition) and allows additions only. A refused run escalates, and the refusal names each path and how it changed:
diff gate refused: <path> (append-only: modified|deleted)
For example: diff gate refused: internal/x/x_test.go (append-only: modified), internal/y/y_test.go (append-only: deleted).
The built-in protected paths and protected_paths are judged first, then allowed_paths. Shadow mode asks the same question, so its gate_accepted agrees with the live gate.
The limit: append-only does not stop a new file from changing how existing tests run. A Go TestMain or init() in a new _test.go, or a new conftest.py, passes the gate. The companion on the harness side is the ynh "test trust" sensors, which check that no tests were lost, that a new test fails before the change, and run mutation testing on the diff.
Review paths: pr.review_paths
Routing only. When a run touches a path matching pr.review_paths, the pull request opens as usual, labelled ynf:review-paths, with a ### Touches review paths section in its body listing the paths. It requests no reviewers and changes no decision. The enforced version is a CODEOWNERS file plus a ruleset that requires code-owner review.
lanes validate refuses a harness pinned to a branch
ynf lanes validate now applies the same check as a run and ynf harness: a harness pinned to a branch is refused, because a branch moves. Use a tag or a commit. To tell a branch from a tag or commit, validate reads the pin repository's refs, so it needs the network for a lane with a pinned harness.
Run record: added and deleted
The run record gains added and deleted lists beside changed. changed is unchanged. A path in changed that is in neither list was modified, and a record without the new lists reads every change as a modification.
Pins
The factory image and CI are tested against:
- ynh 0.12.0
- ynm 0.4.1
- ynr 0.2.2
Upgrading from 0.2.0
Nothing was removed and no existing lane changes behaviour. pr.append_only_paths and pr.review_paths are new, optional lane settings. The one change you may notice is that ynf lanes validate now fails a lane whose pinned harness is a branch (a run already refused it), and it needs the network for pinned lanes.
Install
brew install eyelock/tap/ynfghcr.io/eyelock/ynf-factory:0.3.0