ci: fix double CI runs on PR pushes #75

Merged
TapTap merged 2 commits from fix/ci-double-trigger into main 2026-07-20 17:32:04 +02:00
Owner

Changes 'on: [push, pull_request]' to only trigger push on main, while keeping pull_request for all PRs. Prevents double workflow runs when pushing to a branch with an open PR.

Changes 'on: [push, pull_request]' to only trigger push on main, while keeping pull_request for all PRs. Prevents double workflow runs when pushing to a branch with an open PR.
TapTap added 1 commit 2026-07-20 17:27:13 +02:00
ci: only trigger push on main to avoid double CI runs
CI / lint (pull_request) Successful in 7s
CI / sanitizers (address) (pull_request) Successful in 15s
CI / sanitizers (undefined) (pull_request) Successful in 15s
CI / fuzz-build (pull_request) Successful in 14s
CI / build-and-test (pull_request) Successful in 56s
CI / coverage (pull_request) Successful in 10s
CI / valgrind (pull_request) Successful in 12s
00b6f2064b
TapTap added 1 commit 2026-07-20 17:27:35 +02:00
chore: load AGENTS.md as instructions and block direct pushes to main
CI / lint (pull_request) Successful in 7s
CI / sanitizers (address) (pull_request) Successful in 19s
CI / sanitizers (undefined) (pull_request) Successful in 14s
CI / fuzz-build (pull_request) Successful in 13s
CI / build-and-test (pull_request) Successful in 54s
CI / coverage (pull_request) Successful in 9s
CI / valgrind (pull_request) Successful in 13s
e7634f6581
Author
Owner

=== PR REVIEW SUMMARY ===
Branch: fix/ci-double-trigger → main
PR: #75
Files reviewed: 2 (own commits)
Dimensions checked: code, build, CI, docs, quality

=== COMMITS REVIEWED ===
[1/2] 00b6f20 — ci: only trigger push on main to avoid double CI runs
[2/2] e7634f6 — chore: load AGENTS.md as instructions and block direct pushes to main

=== FINDINGS ===

[INFO] .gitea/workflows/ci.yaml — CI trigger change (commit 00b6f20)
Change: on: [push, pull_request]on: push: { branches: [main] } + pull_request
Analysis: Correctly avoids double CI runs when pushing to a branch with an open PR.
Edge cases verified:

  • Push to feature branch without PR → no CI triggered (push excluded), correct
  • Push to feature branch with open PR → only pull_request triggers, correct
  • Merge PR to main → both push (main branch) + pull_request (close) trigger, expected
  • Opening new PR → pull_request triggers, correct
    No edge cases missed. The Gitea Actions YAML syntax is valid.

[INFO] opencode.json — AGENTS.md as instructions (commit e7634f6)
Change: Added "instructions": ["AGENTS.md"] and changed "git push main": "deny"
Analysis:

  • AGENTS.md exists on the PR branch and contains actionable instructions for AI agents:
    dependency installation rules, CI conventions, branch strategy, build/test commands.
    Correct and useful. The file is directly usable as agent instructions.
  • "git push main": "ask""deny" blocks direct pushes to main entirely.
    Combined with the existing "git push origin main": "deny", both variants are now blocked.
    Aligns perfectly with branch strategy: "Never push directly to main."
  • The "instructions" key uses correct OpenCode JSON schema position (under $schema, before permission).

[MINOR] AGENTS.md — Stale CI image version reference
File: AGENTS.md (from merged PR #27, not this PR's own change)
Detail: Line 7 says CI uses gitea.tap-tap.win/taptap/fastsync-ci:v7, but CI now uses
gitea.tap-tap.win/taptap/fastsync-ci:v9. Since this PR activates AGENTS.md as AI
instructions, an AI agent reading this could be misled about the CI image version.
However, AGENTS.md does note later that ":v7 reflects the previous Dockerfile state",
acknowledging it is stale. This is pre-existing and non-blocking, but worth updating
in a follow-up PR.

[VERIFIED] ci.yaml v9 image (from merged PR #25)
Analysis: Container bumped to fastsync-ci:v9 which includes lcov, valgrind, clang,
libclang-rt-18-dev. Follows the AGENTS.md rule: "never add apt-get/pip install to
CI workflows — use the custom Docker image." No apt-get/pip install steps added.

[VERIFIED] ctest integration (from merged PR #25)
Analysis: ./build/testsctest --test-dir build --output-on-failure -j$(nproc).
CMakeLists.txt on the PR branch includes enable_testing() and
add_test(NAME unit_all COMMAND tests) — both required by ctest.

[VERIFIED] pytest path change (from merged PR #25)
Analysis: tests/tests/integration/. Verified tests/integration/ exists on
origin/main and contains: __init__.py, common.py, test_features.py,
test_preflight.py, test_ssh.py, test_tcp.py, test_tls.py.

[VERIFIED] New jobs — fuzz-build, coverage, valgrind (from merged PR #25)
Analysis:

  • fuzz-build: Uses separate build-fuzz directory. No conflict.
  • coverage: Uses build/ but in isolated container. No conflict.
  • valgrind: Uses build/ in isolated container. FASTSYNC_UNDER_VALGRIND env var
    properly skips fork-based tests that fail under valgrind. No conflict.

[VERIFIED] Commit quality

  • 00b6f20 ci: only trigger push on main to avoid double CI runs — clear, conventional, focused
  • e7634f6 chore: load AGENTS.md as instructions and block direct pushes to main — clear, conventional, focused
  • Each commit changes exactly one concern (CI trigger vs. opencode config)
  • PR description explains the motivation for changes

[VERIFIED] No secrets, keys, or credentials committed
[VERIFIED] No C code changes in the 2 PR commits — no memory/thread/protocol/security concerns
[VERIFIED] Backward compatibility maintained (no protocol version changes)

=== VERDICT ===
[PASS] — APPROVE

All 2 commits in this PR are correct and focused. The CI trigger change eliminates
double CI runs. The opencode.json changes load useful instructions and enforce branch
strategy. All merged content from PRs #25-#28 is compatible. The only minor finding
(stale v7 reference in AGENTS.md) is pre-existing and non-blocking.

=== PR REVIEW SUMMARY === Branch: fix/ci-double-trigger → main PR: #75 Files reviewed: 2 (own commits) Dimensions checked: code, build, CI, docs, quality === COMMITS REVIEWED === [1/2] 00b6f20 — ci: only trigger push on main to avoid double CI runs [2/2] e7634f6 — chore: load AGENTS.md as instructions and block direct pushes to main === FINDINGS === [INFO] .gitea/workflows/ci.yaml — CI trigger change (commit 00b6f20) Change: `on: [push, pull_request]` → `on: push: { branches: [main] } + pull_request` Analysis: Correctly avoids double CI runs when pushing to a branch with an open PR. Edge cases verified: - Push to feature branch without PR → no CI triggered (push excluded), correct - Push to feature branch with open PR → only pull_request triggers, correct ✅ - Merge PR to main → both push (main branch) + pull_request (close) trigger, expected ✅ - Opening new PR → pull_request triggers, correct ✅ No edge cases missed. The Gitea Actions YAML syntax is valid. [INFO] opencode.json — AGENTS.md as instructions (commit e7634f6) Change: Added `"instructions": ["AGENTS.md"]` and changed `"git push main": "deny"` Analysis: - AGENTS.md exists on the PR branch and contains actionable instructions for AI agents: dependency installation rules, CI conventions, branch strategy, build/test commands. ✅ Correct and useful. The file is directly usable as agent instructions. - `"git push main": "ask"` → `"deny"` blocks direct pushes to main entirely. Combined with the existing `"git push origin main": "deny"`, both variants are now blocked. ✅ Aligns perfectly with branch strategy: "Never push directly to main." - The `"instructions"` key uses correct OpenCode JSON schema position (under `$schema`, before `permission`). [MINOR] AGENTS.md — Stale CI image version reference File: AGENTS.md (from merged PR #27, not this PR's own change) Detail: Line 7 says CI uses `gitea.tap-tap.win/taptap/fastsync-ci:v7`, but CI now uses `gitea.tap-tap.win/taptap/fastsync-ci:v9`. Since this PR activates AGENTS.md as AI instructions, an AI agent reading this could be misled about the CI image version. However, AGENTS.md does note later that ":v7 reflects the previous Dockerfile state", acknowledging it is stale. This is pre-existing and non-blocking, but worth updating in a follow-up PR. [VERIFIED] ci.yaml v9 image (from merged PR #25) Analysis: Container bumped to `fastsync-ci:v9` which includes lcov, valgrind, clang, libclang-rt-18-dev. ✅ Follows the AGENTS.md rule: "never add apt-get/pip install to CI workflows — use the custom Docker image." No apt-get/pip install steps added. [VERIFIED] ctest integration (from merged PR #25) Analysis: `./build/tests` → `ctest --test-dir build --output-on-failure -j$(nproc)`. CMakeLists.txt on the PR branch includes `enable_testing()` and `add_test(NAME unit_all COMMAND tests)` — both required by ctest. ✅ [VERIFIED] pytest path change (from merged PR #25) Analysis: `tests/` → `tests/integration/`. Verified `tests/integration/` exists on `origin/main` and contains: `__init__.py`, `common.py`, `test_features.py`, `test_preflight.py`, `test_ssh.py`, `test_tcp.py`, `test_tls.py`. ✅ [VERIFIED] New jobs — fuzz-build, coverage, valgrind (from merged PR #25) Analysis: - fuzz-build: Uses separate `build-fuzz` directory. No conflict. ✅ - coverage: Uses `build/` but in isolated container. No conflict. ✅ - valgrind: Uses `build/` in isolated container. `FASTSYNC_UNDER_VALGRIND` env var properly skips fork-based tests that fail under valgrind. No conflict. ✅ [VERIFIED] Commit quality - `00b6f20 ci: only trigger push on main to avoid double CI runs` — clear, conventional, focused ✅ - `e7634f6 chore: load AGENTS.md as instructions and block direct pushes to main` — clear, conventional, focused ✅ - Each commit changes exactly one concern (CI trigger vs. opencode config) ✅ - PR description explains the motivation for changes ✅ [VERIFIED] No secrets, keys, or credentials committed ✅ [VERIFIED] No C code changes in the 2 PR commits — no memory/thread/protocol/security concerns ✅ [VERIFIED] Backward compatibility maintained (no protocol version changes) ✅ === VERDICT === [PASS] — APPROVE All 2 commits in this PR are correct and focused. The CI trigger change eliminates double CI runs. The opencode.json changes load useful instructions and enforce branch strategy. All merged content from PRs #25-#28 is compatible. The only minor finding (stale v7 reference in AGENTS.md) is pre-existing and non-blocking.
TapTap merged commit b71d132b17 into main 2026-07-20 17:32:04 +02:00
TapTap deleted branch fix/ci-double-trigger 2026-07-20 17:32:09 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#75