Add Forgejo AI pull-request review #1

Merged
nimmo merged 6 commits from pr-review-setup into main 2026-07-21 21:36:35 +01:00
Owner

Summary

  • Add .forgejo/ai-review.yml — Ollama provider config + python3 -m py_compile daily-briefing.py as the deterministic check
  • Add .forgejo/ai-review.md — guidance prioritising concrete defects, secret handling, and env-file parsing robustness
  • Add .forgejo/workflows/ai-review.yml — workflow triggered on PR open/reopen/sync/ready_for_review with workflow_dispatch support for manual runs by PR number

Context

This mirrors the same forgejo-auto-pr-review setup that nixos-config already uses, so this repo gets the same advisory AI review on every pull request. The reviewer is strictly advisory — it never approves, merges, or modifies code; deterministic test failures remain normal CI's responsibility, and humans remain responsible for merge decisions.

The fork-guard (github.event.pull_request.head.repo.full_name == github.repository) prevents the comment token from being exposed to fork-originated pull-request code. The deterministic check is a Python syntax check because there's no test suite in this repo yet; the command lives in the config and can be swapped for whatever check makes sense later.

The AI_REVIEW_FORGEJO_TOKEN secret is already configured user-wide; no additional secret setup is required.

Notes

  • base_url in ai-review.yml points at http://nova.mesh:11434 to match the nixos-config deployment; change it to whatever Ollama endpoint the runner can reach.
  • No application code changed.
## Summary - Add `.forgejo/ai-review.yml` — Ollama provider config + `python3 -m py_compile daily-briefing.py` as the deterministic check - Add `.forgejo/ai-review.md` — guidance prioritising concrete defects, secret handling, and env-file parsing robustness - Add `.forgejo/workflows/ai-review.yml` — workflow triggered on PR open/reopen/sync/ready_for_review with workflow_dispatch support for manual runs by PR number ## Context This mirrors the same `forgejo-auto-pr-review` setup that nixos-config already uses, so this repo gets the same advisory AI review on every pull request. The reviewer is strictly advisory — it never approves, merges, or modifies code; deterministic test failures remain normal CI's responsibility, and humans remain responsible for merge decisions. The fork-guard (`github.event.pull_request.head.repo.full_name == github.repository`) prevents the comment token from being exposed to fork-originated pull-request code. The deterministic check is a Python syntax check because there's no test suite in this repo yet; the command lives in the config and can be swapped for whatever check makes sense later. The `AI_REVIEW_FORGEJO_TOKEN` secret is already configured user-wide; no additional secret setup is required. ## Notes - `base_url` in `ai-review.yml` points at `http://nova.mesh:11434` to match the nixos-config deployment; change it to whatever Ollama endpoint the runner can reach. - No application code changed.
Add Forgejo AI pull-request review
Some checks failed
AI pull-request review / review (pull_request) Has been cancelled
db5096498c
Mirror the nixos-config setup so the same Ollama-backed advisory
reviewer runs on this repo. The deterministic check runs
python3 -m py_compile on daily-briefing.py; the workflow triggers on
PR open/reopen/sync/ready_for_review and supports a manual
workflow_dispatch run by PR number.
Use nova runner for AI review
Some checks failed
AI pull-request review / review (pull_request) Failing after 3s
081e9eff08
Match the nixos-config workflow so the job lands on the same Forgejo
runner that has reachability into the Ollama mesh endpoint.
Land workflow and guidance from pr-review-setup
All checks were successful
AI pull-request review / review (pull_request) Successful in 2m38s
7cba9a6428
The executable configuration now lives on main directly so the
reviewer has a populated base to read. This PR carries the
Forgejo workflow plus the guidance document.
Author
Owner

Automated code review

Reviewed commit: 53aad3c04f49501b62fbd5c0ba06a2038b4a2ac1

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

Adds a Forgejo workflow and AI review guidance document to enable advisory pull-request reviews using an Ollama-backed reviewer. The configuration correctly implements a fork guard, pins the third-party action to a full commit SHA, handles both automatic PR events and manual dispatch inputs with appropriate fallbacks, and configures a deterministic Python syntax check in the guidance text. No application code is modified.

Blocking findings

None.

Important findings

None.

Suggestions

None.

Tests and validation

  • python-syntax-check: success

Questions

  • Has the nova runner been verified to have network reachability to http://nova.mesh:11434 and sufficient memory/CPU to handle the configured 600-second timeout and 65536 context size?
  • Does the target Forgejo instance fully support the actions/checkout@v4 syntax and the concurrency group fallback pattern, or are any Forgejo-specific runner labels or overrides required?

Review limitations

  • Review is strictly limited to the provided workflow YAML and guidance markdown; no application code changes were supplied for analysis.
  • Operational validation (runner availability, Ollama endpoint reachability, secret configuration, and Forgejo compatibility) depends on the target environment and cannot be verified from the diff alone.

Diff coverage

  • .forgejo/ai-review.md: reviewed — included in a context-limited batch
  • .forgejo/workflows/ai-review.yml: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: qwen3.6:35b-a3b-q8_0
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 6
  • Previous automated review: updated
  • Findings: 0
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `53aad3c04f49501b62fbd5c0ba06a2038b4a2ac1` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Adds a Forgejo workflow and AI review guidance document to enable advisory pull-request reviews using an Ollama-backed reviewer. The configuration correctly implements a fork guard, pins the third-party action to a full commit SHA, handles both automatic PR events and manual dispatch inputs with appropriate fallbacks, and configures a deterministic Python syntax check in the guidance text. No application code is modified. ### Blocking findings None. ### Important findings None. ### Suggestions None. ### Tests and validation - python-syntax-check: **success** ### Questions - Has the `nova` runner been verified to have network reachability to `http://nova.mesh:11434` and sufficient memory/CPU to handle the configured 600-second timeout and 65536 context size? - Does the target Forgejo instance fully support the `actions/checkout@v4` syntax and the concurrency group fallback pattern, or are any Forgejo-specific runner labels or overrides required? ### Review limitations - Review is strictly limited to the provided workflow YAML and guidance markdown; no application code changes were supplied for analysis. - Operational validation (runner availability, Ollama endpoint reachability, secret configuration, and Forgejo compatibility) depends on the target environment and cannot be verified from the diff alone. ### Diff coverage - `.forgejo/ai-review.md`: **reviewed** — included in a context-limited batch - `.forgejo/workflows/ai-review.yml`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: qwen3.6:35b-a3b-q8_0 - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 6 - Previous automated review: updated - Findings: 0 </details>
Pin review action SHA and add trailing newlines
All checks were successful
AI pull-request review / review (pull_request) Successful in 2m53s
e163a3410f
Address the two suggestions from the advisory AI review on this PR:

- Forgejo rejects abbreviated action references; pin to the full
  commit SHA on the upstream HEAD (matches the README and the
  action's own self-test).
- Append a trailing newline to the workflow and guidance files so
  POSIX text-file tools don't flag them.
Use event PR number with dispatch fallback
All checks were successful
AI pull-request review / review (pull_request) Successful in 2m59s
1a4a9efce4
inputs.pull_request is empty during pull_request events (the inputs
context is only populated by workflow_dispatch). The action already
falls back to the event payload, but referencing the event explicitly
removes that hidden dependency and mirrors the same fallback pattern
already used by the checkout step above.

Addresses the suggestion from the advisory AI review on PR #1.
Merge origin/main into pr-review-setup
All checks were successful
AI pull-request review / review (pull_request) Successful in 2m26s
53aad3c04f
Pull in the .forgejo/ai-review.yml commit that landed on main so the
PR is no longer out-of-date. No conflicting changes since the two
branches only diverge on disjoint files.
nimmo merged commit a69870e2fe into main 2026-07-21 21:36:35 +01:00
nimmo deleted branch pr-review-setup 2026-07-21 21:36:36 +01:00
nimmo referenced this pull request from a commit 2026-07-21 23:07:14 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/daily-briefing!1
No description provided.