@@ -2,6 +2,54 @@ |
| 2 | | 2 | |
| 3 | ## Unreleased | 3 | ## Unreleased |
| 4 | | 4 | |
| | 5 | +### Sprint 28 — `tenseleyflow/sway-action` GitHub Action |
| | 6 | + |
| | 7 | +Closes the P2 "GitHub Action" discoverability item from Audit 03 |
| | 8 | +D-path3. The action lives in its own repo |
| | 9 | +([tenseleyFlow/sway-action](https://github.com/tenseleyFlow/sway-action), |
| | 10 | +tagged `v0.1.0`) so consumers can pin via `uses:` without coupling |
| | 11 | +to sway's release cadence. |
| | 12 | + |
| | 13 | +**End-user value:** three lines of YAML to wire sway into any GitHub |
| | 14 | +PR check, with edit-in-place PR comments + cached venv + standardized |
| | 15 | +verdict sticker. The audience is teams who don't use pre-commit but |
| | 16 | +live in GitHub Actions. |
| | 17 | + |
| | 18 | +```yaml |
| | 19 | +- uses: tenseleyflow/sway-action@v0.1.0 |
| | 20 | + with: |
| | 21 | + spec-path: sway.yaml |
| | 22 | +``` |
| | 23 | + |
| | 24 | +**Inputs / outputs.** Inputs cover `fail-on` policy |
| | 25 | +(`fail`/`warn`/`never`), `comment-on-pr`, `upload-artifact`, |
| | 26 | +`sway-version` (defaults to the action's pinned version), and |
| | 27 | +`python-version`. Outputs `sway-score`, `verdict`, and `report-path` |
| | 28 | +are surfaced for downstream workflow steps. |
| | 29 | + |
| | 30 | +**Action layout:** |
| | 31 | +- `action.yml` — composite action, 5 steps (setup-python → cache → |
| | 32 | + entrypoint.sh → upload-artifact → github-script post-comment). |
| | 33 | +- `src/entrypoint.sh` — bootstraps a venv, installs `dlm-sway[hf]` |
| | 34 | + pinned, runs `sway gate` + `sway report --format md`, parses score |
| | 35 | + + verdict from the JSON report into `$GITHUB_OUTPUT`. |
| | 36 | +- `src/post-comment.js` — Node 20 script run via |
| | 37 | + `actions/github-script@v7`. Finds prior sway comments via a hidden |
| | 38 | + `<!-- sway-action:report -->` HTML marker and edits in place. |
| | 39 | + Truncates at 60 KB with a footer pointing to the artifact for |
| | 40 | + full report. |
| | 41 | + |
| | 42 | +**Self-tests** (`smoke.yml` in the action repo): an `actionlint` + |
| | 43 | +`shellcheck` + `node -c` lint job, an `entrypoint-stub` job that |
| | 44 | +validates the bash plumbing against a stubbed `dlm_sway` package, and |
| | 45 | +a `self-test` job that runs the action end-to-end against a tiny |
| | 46 | +random LoRA on SmolLM2-135M (PR-only — needs PR context for the |
| | 47 | +comment-posting step). |
| | 48 | + |
| | 49 | +**Sway README** gains a "GitHub Action" subsection between Pre-commit |
| | 50 | +and the `.dlm` integration with the copy-paste one-liner + a complete |
| | 51 | +workflow example. |
| | 52 | + |
| 5 | ### Sprint 27 — `tool_use_fidelity` probe | 53 | ### Sprint 27 — `tool_use_fidelity` probe |
| 6 | | 54 | |
| 7 | Closes the P1 "tool_use_fidelity probe" backlog item. The probe sway | 55 | Closes the P1 "tool_use_fidelity probe" backlog item. The probe sway |