diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index a1e2ce7e..1da003ef 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -13,9 +13,37 @@ jobs: issues: write pull-requests: write contents: write + # Job-level so the step `if` below can see it: the `secrets` context is not + # available in an `if` expression, but `env` is. + env: + PR_AGENT_API_KEY: ${{ secrets.PR_AGENT_API_KEY }} steps: + # A PR from a fork gets no secrets, so the step below ran with an empty + # key, reviewed nothing, and still went green - a check that says + # "reviewed" when it did not is worse than no check. + # + # Skipping the step alone did not fix that: the only step is skipped, the + # JOB still reports success, and a green required check still reads as a + # pass. So SAY SO, in the one place a reader of the PR looks - the check's + # summary - and make the log line an annotation on the PR itself. + - name: Not applicable - no review key on this PR + if: env.PR_AGENT_API_KEY == '' + run: | + echo "::notice title=PR Agent did not run::No review key is available \ + on this pull request (forks get no secrets), so NOTHING was reviewed. \ + A green check here means the job finished, not that the diff passed." + { + echo "## PR Agent: not applicable" + echo + echo "No \`PR_AGENT_API_KEY\` on this run - a fork PR gets no" + echo "secrets. **No review was performed.** Treat this check as" + echo "absent, not as a pass." + } >> "$GITHUB_STEP_SUMMARY" - name: PR Agent action step - uses: the-pr-agent/pr-agent@main + if: env.PR_AGENT_API_KEY != '' + # Pinned, not @main: this action runs with `contents: write` and a token + # on every PR, and a floating ref means whatever landed upstream today. + uses: the-pr-agent/pr-agent@f6af7d77554ff8d26adffded077e6461329e92fa # v0.42.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Credentials only. The model chain lives in .pr_agent.toml so it is diff --git a/.pr_agent.toml b/.pr_agent.toml index 7368da38..287cc67a 100644 --- a/.pr_agent.toml +++ b/.pr_agent.toml @@ -21,9 +21,13 @@ fallback_models = [ "openai/gpt-oss-120b-medium", ] # Required: an `openai/`-prefixed name is not in PR-Agent's MAX_TOKENS map, and -# get_max_tokens (algo/utils.py:1008) raises rather than defaulting. Effective -# input is still min(this, max_model_tokens=32000). +# get_max_tokens (algo/utils.py:1008) raises rather than defaulting. custom_model_max_tokens = 200000 +# The effective input is min(custom_model_max_tokens, max_model_tokens), and +# max_model_tokens defaults to 32000 - so the 200k above bought nothing and a +# large diff was silently clipped to a third of the review it looked like it +# got. Raise the ceiling to match. +max_model_tokens = 200000 # Inject AGENTS.md as repository context into /review, /improve, /describe, /ask. # NOTE: read from the DEFAULT BRANCH by default, so AGENTS.md only takes effect diff --git a/PRIVACY.md b/PRIVACY.md index 6efb2c43..f364053f 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -64,9 +64,10 @@ because a sideloaded app has no store to tell you a security fix exists. **Barcode lookup for food logging** The food log can read a barcode with the camera and fill in the nutrition -figures for you. Doing that means asking a database, so it is **off until you -turn it on**, and the App asks you before the first lookup ever happens — not -after. +figures for you. Doing that means asking a database, so it is **on by +default**: what leaves is a number the manufacturer printed on the packet, and +nothing about you goes with it. Turn it off and the scan stops asking anybody +anything. - **What is sent is the barcode.** It goes to openfoodfacts.org, the free and open food database. Nothing about you, your meals, your health or your device @@ -157,7 +158,7 @@ moment you tap it: further upload immediately, and the App tells you when the last one was. - **Check for updates** — turning it off stops the App making any network request of its own accord. -- **Look barcodes up online** — off by default; turning it off stops any +- **Look barcodes up online** — on by default; turning it off stops any further lookup immediately, and the food log keeps working by hand. You can also disable AI Coach or Health app integration at any time in Settings diff --git a/README.md b/README.md index 5681a140..93d2c88c 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,8 @@ drawer-bracelet problem can use it, or go dig through the code themselves. ## Checklist -- **WHOOP 4.0 only.** Haven't touched a WHOOP 5, don't know if it even shares a protocol. +- **WHOOP 4.0 is the one that's properly tested.** WHOOP 5 and MG work too, but they're + experimental — see the note further down. - Not affiliated with WHOOP, doesn't talk to their servers. - Not a clone of their algorithms — different math, published methods, cited in the analytics repo. Don't expect identical numbers to what their app shows. @@ -143,9 +144,10 @@ shortcuts, a smart alarm that buzzes the band. against a lab, don't treat any of it as a diagnosis. - Not on the App Store or Play Store yet. iOS is a public TestFlight beta, which is a normal install but still a beta; Android is an APK straight off Releases. -- WHOOP 5.0 / MG support is in progress and **experimental** — the band is detected and - spoken to, but it hasn't been validated against real 5.0 hardware. WHOOP 4.0 is the - only one that's actually tested. +- WHOOP 5.0 / MG support is **experimental**. Both pair, sync and decode, and the work is + checked against real records off real bands — but 4.0 is the one I wear every day, so + it's the one that gets found out when it breaks. Expect rough edges on 5 and MG, and + open an issue when you hit one. ## Run it diff --git a/docs/privacy.html b/docs/privacy.html index d4d14bb8..29c1345d 100644 --- a/docs/privacy.html +++ b/docs/privacy.html @@ -68,9 +68,10 @@

Anonymous diagnostics

Barcode lookup for food logging

The food log can read a barcode with the camera and fill in the nutrition - figures for you. Doing that means asking a database, so it is off - until you turn it on, and the App asks you before the first - lookup ever happens — not after.

+ figures for you. Doing that means asking a database, so it is on + by default: what leaves is a number the manufacturer printed on + the packet, and nothing about you goes with it. Turn it off and the scan + stops asking anybody anything.