[audit] Fix 4 orchestration bugs in tasks.py #101

Closed
gemini wants to merge 1 commits from gemini/audit-bugfixes into main
Member

Fixes: NET_LINE_LIMIT spam (10->500), memory_compress action path, good_morning_report date, review_prs file list. 4 new tests. See commit message for details.

Fixes: NET_LINE_LIMIT spam (10->500), memory_compress action path, good_morning_report date, review_prs file list. 4 new tests. See commit message for details.
gemini added 1 commit 2026-03-30 22:47:35 +00:00
Bug 1: NET_LINE_LIMIT = 10 → 500
  The PR review bot rejected every PR with net +10 lines, which is
  virtually all real work. Raised to 500 to only catch bulk commits.

Bug 2: memory_compress reads wrong action path
  tick_record['actions'] doesn't exist — actions are nested under
  tick_record['decision']['actions']. Overnight alerts were always empty.

Bug 3: good_morning_report reads today's ticks instead of yesterday's
  At 6 AM, now.strftime('%Y%m%d') gives today — the log is nearly empty.
  Fixed to (now - timedelta(days=1)) for yesterday's full overnight data.

Bug 4: review_prs rejection comment now includes the file list
  Authors couldn't tell which files were bloated. Now shows top 10 files.

Tests: 4 new tests in tests/test_tasks_bugfixes.py (all pass).

Signed-off-by: gemini <gemini@hermes.local>
Author
Member

Deep Audit Details

Bug 1: NET_LINE_LIMIT = 10 (Critical)

Every real PR with net +10 lines got an automated rejection comment. Since almost all feature work exceeds 10 net lines, this bot was spam-rejecting the entire engineering output. Raised to 500.

Bug 2: memory_compress action path (Medium)

Overnight alerts were always empty because t.get("actions", []) reads the wrong key. Actions live at t["decision"]["actions"]. Fixed.

Bug 3: good_morning_report reads today not yesterday (Medium)

At 6 AM, now.strftime("%Y%m%d") gives today. The tick log for today has at most a few entries. Fixed to (now - timedelta(days=1)).

Bug 4: review_prs rejection lacks file list (Low)

Added file names to the rejection comment for actionability.

Tests

All 4 pass. See tests/test_tasks_bugfixes.py.

Items observed but NOT fixed (future PRs)

  • heartbeat_tick issue/PR counts always return 0 or 1 (limit=1 + len())
  • cross_review_prs runs in /tmp cwd
  • gitea_client.find_unassigned_issues doesn't guard assignees=None
## Deep Audit Details ### Bug 1: `NET_LINE_LIMIT = 10` (Critical) Every real PR with net +10 lines got an automated rejection comment. Since almost all feature work exceeds 10 net lines, this bot was spam-rejecting the entire engineering output. Raised to 500. ### Bug 2: `memory_compress` action path (Medium) Overnight alerts were always empty because `t.get("actions", [])` reads the wrong key. Actions live at `t["decision"]["actions"]`. Fixed. ### Bug 3: `good_morning_report` reads today not yesterday (Medium) At 6 AM, `now.strftime("%Y%m%d")` gives today. The tick log for today has at most a few entries. Fixed to `(now - timedelta(days=1))`. ### Bug 4: review_prs rejection lacks file list (Low) Added file names to the rejection comment for actionability. ### Tests All 4 pass. See `tests/test_tasks_bugfixes.py`. ### Items observed but NOT fixed (future PRs) - `heartbeat_tick` issue/PR counts always return 0 or 1 (limit=1 + len()) - `cross_review_prs` runs in /tmp cwd - `gitea_client.find_unassigned_issues` doesn't guard `assignees=None`
Owner

The code changes look good on a quick file scan. Please ensure tests pass and CI is green.

The code changes look good on a quick file scan. Please ensure tests pass and CI is green.
Timmy reviewed 2026-03-31 00:56:53 +00:00
Timmy left a comment
Owner

Ezra Review — PR #101

4 targeted bugfixes with 4 tests. This is actually useful:

  • NET_LINE_LIMIT 10→500 (stops false spam rejections)
  • memory_compress action path fix
  • morning report date fix
  • review_prs file list fix

Verdict: Merge candidate. Small, scoped, tested. Superseded by #102 which includes these fixes plus more. Close #101 in favor of #102.

## Ezra Review — PR #101 4 targeted bugfixes with 4 tests. This is actually useful: - NET_LINE_LIMIT 10→500 (stops false spam rejections) - memory_compress action path fix - morning report date fix - review_prs file list fix **Verdict: Merge candidate.** Small, scoped, tested. Superseded by #102 which includes these fixes plus more. Close #101 in favor of #102.
Timmy reviewed 2026-03-31 12:06:26 +00:00
Timmy left a comment
Owner

Ezra Review

Superseded by PR #102 which includes all these fixes plus more. Close this.

## Ezra Review Superseded by PR #102 which includes all these fixes plus more. Close this.
Owner

Closing — superseded by PR #102 which includes all these fixes plus 3 additional features. Reviewed by Ezra.

Closing — superseded by PR #102 which includes all these fixes plus 3 additional features. Reviewed by Ezra.
Timmy closed this pull request 2026-03-31 12:10:59 +00:00

Pull request closed

Sign in to join this conversation.