fix(home): restore off state on home_undo after set_temperature (#455) #646
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Contribution checklist: enforces the CONTRIBUTING.md requirement that every | |
| # PR body documents real-world verification. See CONTRIBUTING.md "Required: | |
| # Real Behavior Proof" for the human-readable spec. | |
| # | |
| # The check is intentionally lightweight: it confirms structure, not content | |
| # quality. Reviewers still have to read what you wrote and decide whether the | |
| # verification path is reasonable for the change. | |
| # | |
| # `pull_request_target` (not `pull_request`) so the workflow runs from the | |
| # base branch's copy of this file — that way the check fires on every PR | |
| # regardless of whether the PR head was branched before this workflow | |
| # existed. Safe because the job only reads `github.event.pull_request.body` | |
| # from the event payload; it never checks out or executes PR-controlled code. | |
| # (The standard `pull_request_target` security caveat is about running | |
| # untrusted PR code with secret access. We do neither.) | |
| name: Contribution | |
| on: | |
| pull_request_target: | |
| types: [opened, edited, synchronize, reopened] | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| pr-body-checklist: | |
| name: PR body checklist | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| steps: | |
| - name: Verify PR body has Real Behavior Proof section | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| if [ -z "${PR_BODY:-}" ]; then | |
| echo "::error::PR body is empty. See CONTRIBUTING.md — every PR must include a 'Real Behavior Proof' section." | |
| exit 1 | |
| fi | |
| # Block AI-attribution footers in PR body. Using Claude Code (or any | |
| # other AI agent) to help draft the PR is fine — but `git log`, | |
| # `git shortlog`, and the PR description record attribution to the | |
| # human contributor, not the tool. Strip the trailer before | |
| # submitting. See CONTRIBUTING.md "Commit hygiene". | |
| if printf '%s' "$PR_BODY" | grep -Eqi 'Generated[[:space:]]+with[[:space:]]+\[?Claude[[:space:]]+Code\]?'; then | |
| echo "::error::PR body contains an AI-attribution footer (e.g. '🤖 Generated with Claude Code'). Strip it before submitting — see CONTRIBUTING.md 'Commit hygiene'." | |
| exit 1 | |
| fi | |
| # Allow Dependabot / Renovate / release automation to skip the | |
| # human-written proof requirement. These are bot PRs whose | |
| # contents are mechanically generated. | |
| case "${PR_TITLE:-}" in | |
| "chore(deps)"*|"chore(deps-dev)"*|"build(deps)"*|"deps:"*|"release:"*|"Release "*) | |
| echo "Bot / release PR — skipping proof check (title prefix matched)." | |
| exit 0 | |
| ;; | |
| esac | |
| # Hard requirement: a "Real Behavior Proof" heading exists. | |
| if ! printf '%s' "$PR_BODY" | grep -Eqi '^##+[[:space:]]+Real Behavior Proof[[:space:]]*$'; then | |
| echo "::error::PR body must include a '## Real Behavior Proof' section. See CONTRIBUTING.md and the PR template." | |
| exit 1 | |
| fi | |
| # That section must not be empty (i.e., the boilerplate must have | |
| # been replaced with actual content). We check for at least one | |
| # non-blank, non-HTML-comment line between the proof heading and | |
| # the next heading (or end of body). | |
| proof_body="$(printf '%s' "$PR_BODY" | awk ' | |
| BEGIN { in_section = 0 } | |
| /^##+[[:space:]]+Real Behavior Proof[[:space:]]*$/ { in_section = 1; next } | |
| in_section && /^##+[[:space:]]/ { in_section = 0 } | |
| in_section { print } | |
| ' | grep -Ev '^[[:space:]]*$' | grep -Ev '^[[:space:]]*<!--' | grep -Ev '^[[:space:]]*-->')" | |
| if [ -z "$proof_body" ]; then | |
| echo "::error::'## Real Behavior Proof' section is empty. Fill in 'What I ran' and 'What I observed' (or the equivalent narrative — see CONTRIBUTING.md)." | |
| exit 1 | |
| fi | |
| # Require at least one of the two acknowledgement checkboxes to be | |
| # ticked. This is the minimum signal that the contributor read the | |
| # template instead of pasting an empty section. | |
| if ! printf '%s' "$PR_BODY" | grep -Eq '^[[:space:]]*-[[:space:]]*\[[xX]\]'; then | |
| echo "::error::At least one checkbox under '## Real Behavior Proof' must be ticked (use '- [x]')." | |
| exit 1 | |
| fi | |
| echo "OK: PR body has a non-empty 'Real Behavior Proof' section with at least one ticked acknowledgement checkbox." |