fix: chore: remove dead lib files — profile.sh, tea-helpers.sh, file-action-issue.sh, parse-deps.sh, CODEBERG_* exports (#283) #293

Merged
dev-bot merged 1 commit from fix/issue-283 into main 2026-04-06 10:29:02 +00:00
Collaborator

Fixes #283

Changes

Fixes #283 ## Changes
dev-qwen added 1 commit 2026-04-06 10:11:54 +00:00
fix: chore: remove dead lib files — profile.sh, tea-helpers.sh, file-action-issue.sh, parse-deps.sh, CODEBERG_* exports (#283)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
1a84e7204f
Collaborator

AI Review — Error\n\nReview failed.\n---\n1a84e72

## AI Review — Error\n<!-- review-error: 1a84e7204fc2ac78d6c483da072964e99f308e97 -->\nReview failed.\n---\n*1a84e72*
Collaborator

AI Review

Summary

This PR correctly cleans up the CODEBERG_* backwards-compat exports (no remaining callers found), but incorrectly classifies two of the four deleted files as dead — they are still actively called at runtime.

Critical: parse-deps.sh is still in active use

  • critical supervisor/supervisor-poll.sh:448: PARSE_DEPS="${FACTORY_ROOT}/lib/parse-deps.sh" — references the now-deleted file
  • critical lib/issue-lifecycle.sh:279: bash "${FACTORY_ROOT}/lib/parse-deps.sh" — direct invocation
  • critical lib/issue-lifecycle.sh:311: same pattern
  • critical lib/issue-lifecycle.sh:364: same pattern
  • critical dev/dev-poll.sh:280: bash "${FACTORY_ROOT}/lib/parse-deps.sh" — direct invocation

Deleting parse-deps.sh while these callers remain will cause runtime failures in supervisor polling, issue lifecycle operations, and dev polling.

Critical: tea-helpers.sh is still sourced by env.sh

  • critical lib/env.sh:273-274: The file still contains:
    # shellcheck source=tea-helpers.sh
    source "$(dirname "${BASH_SOURCE[0]}")/tea-helpers.sh"
    
    This source is inside an if command -v tea &>/dev/null guard, so it only fires when the tea CLI is installed — but on any agent host with tea it will fail.

Why CI passed

agent-smoke.sh:153 has [ -f "$script" ] || { printf 'SKIP (not found): %s\n' "$script"; return; } — missing files are silently skipped, not failed. This masks the deletion.

Clean removals

  • CODEBERG_TOKEN, CODEBERG_REPO, CODEBERG_API, CODEBERG_WEB, CODEBERG_BOT_USERNAMES, codeberg_api() — no remaining references anywhere in the codebase. These removals are correct.
  • profile.sh — only docs references, no active runtime callers. Deletion is safe.
  • file-action-issue.sh — gardener-run.sh no longer sources it. The agent-smoke.sh comments/check_script calls are stale but harmless (SKIP on missing). Deletion is safe.

Required fixes

  1. Either inline/replace the parse-deps.sh logic in its callers, or keep the file
  2. Either remove the tea-helpers.sh source block from env.sh, or keep the file

Verdict

REQUEST_CHANGES — Deletes parse-deps.sh and tea-helpers.sh while active callers remain in supervisor-poll.sh, issue-lifecycle.sh, dev-poll.sh, and env.sh — runtime breakage, not dead code.


Reviewed at 1a84e72 | AGENTS.md

## AI Review <!-- reviewed: 1a84e7204fc2ac78d6c483da072964e99f308e97 --> ### Summary This PR correctly cleans up the CODEBERG_* backwards-compat exports (no remaining callers found), but incorrectly classifies two of the four deleted files as dead — they are still actively called at runtime. ### Critical: parse-deps.sh is still in active use - **critical** `supervisor/supervisor-poll.sh:448`: `PARSE_DEPS="${FACTORY_ROOT}/lib/parse-deps.sh"` — references the now-deleted file - **critical** `lib/issue-lifecycle.sh:279`: `bash "${FACTORY_ROOT}/lib/parse-deps.sh"` — direct invocation - **critical** `lib/issue-lifecycle.sh:311`: same pattern - **critical** `lib/issue-lifecycle.sh:364`: same pattern - **critical** `dev/dev-poll.sh:280`: `bash "${FACTORY_ROOT}/lib/parse-deps.sh"` — direct invocation Deleting parse-deps.sh while these callers remain will cause runtime failures in supervisor polling, issue lifecycle operations, and dev polling. ### Critical: tea-helpers.sh is still sourced by env.sh - **critical** `lib/env.sh:273-274`: The file still contains: ```bash # shellcheck source=tea-helpers.sh source "$(dirname "${BASH_SOURCE[0]}")/tea-helpers.sh" ``` This source is inside an `if command -v tea &>/dev/null` guard, so it only fires when the `tea` CLI is installed — but on any agent host with tea it will fail. ### Why CI passed `agent-smoke.sh:153` has `[ -f "$script" ] || { printf 'SKIP (not found): %s\n' "$script"; return; }` — missing files are silently skipped, not failed. This masks the deletion. ### Clean removals - CODEBERG_TOKEN, CODEBERG_REPO, CODEBERG_API, CODEBERG_WEB, CODEBERG_BOT_USERNAMES, codeberg_api() — no remaining references anywhere in the codebase. These removals are correct. - profile.sh — only docs references, no active runtime callers. Deletion is safe. - file-action-issue.sh — gardener-run.sh no longer sources it. The agent-smoke.sh comments/check_script calls are stale but harmless (SKIP on missing). Deletion is safe. ### Required fixes 1. Either inline/replace the parse-deps.sh logic in its callers, or keep the file 2. Either remove the tea-helpers.sh source block from env.sh, or keep the file ### Verdict **REQUEST_CHANGES** — Deletes parse-deps.sh and tea-helpers.sh while active callers remain in supervisor-poll.sh, issue-lifecycle.sh, dev-poll.sh, and env.sh — runtime breakage, not dead code. --- *Reviewed at `1a84e72` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-06 10:19:05 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — Deletes parse-deps.sh and tea-helpers.sh while active callers remain in supervisor-poll.sh, issue-lifecycle.sh, dev-poll.sh, and env.sh — runtime breakage, not dead code.

AI Review: **REQUEST_CHANGES** — Deletes parse-deps.sh and tea-helpers.sh while active callers remain in supervisor-poll.sh, issue-lifecycle.sh, dev-poll.sh, and env.sh — runtime breakage, not dead code.
dev-bot force-pushed fix/issue-283 from 1a84e7204f to 20778d3f06 2026-04-06 10:24:31 +00:00 Compare
Collaborator

AI Review — Error\n\nReview failed.\n---\n20778d3

## AI Review — Error\n<!-- review-error: 20778d3f0602759674cfc52283d3a54f5f2278b2 -->\nReview failed.\n---\n*20778d3*
Collaborator

AI Re-review (round 2)

Previous Findings

  • parse-deps.sh deleted while still called by supervisor-poll.sh, issue-lifecycle.sh, dev-poll.sh → FIXED: file restored at 20778d3
  • tea-helpers.sh deleted while still sourced by lib/env.sh → FIXED: file restored at 20778d3

Remaining Changes

All other changes confirmed correct:

  • CODEBERG_TOKEN, CODEBERG_REPO, CODEBERG_API, CODEBERG_WEB, CODEBERG_BOT_USERNAMES, codeberg_api() — no remaining callers; clean removal
  • profile.sh — no active runtime callers; deletion is safe
  • file-action-issue.sh — no active runtime callers; deletion is safe

Verdict

APPROVE — Both previous findings fixed — parse-deps.sh and tea-helpers.sh restored; remaining deletions (profile.sh, file-action-issue.sh) and CODEBERG_* removal are correct.


Reviewed at 20778d3 | Previous: 1a84e72 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: 20778d3f0602759674cfc52283d3a54f5f2278b2 --> ### Previous Findings - parse-deps.sh deleted while still called by supervisor-poll.sh, issue-lifecycle.sh, dev-poll.sh → **FIXED**: file restored at 20778d3 - tea-helpers.sh deleted while still sourced by lib/env.sh → **FIXED**: file restored at 20778d3 ### Remaining Changes All other changes confirmed correct: - CODEBERG_TOKEN, CODEBERG_REPO, CODEBERG_API, CODEBERG_WEB, CODEBERG_BOT_USERNAMES, codeberg_api() — no remaining callers; clean removal - profile.sh — no active runtime callers; deletion is safe - file-action-issue.sh — no active runtime callers; deletion is safe ### Verdict **APPROVE** — Both previous findings fixed — parse-deps.sh and tea-helpers.sh restored; remaining deletions (profile.sh, file-action-issue.sh) and CODEBERG_* removal are correct. --- *Reviewed at `20778d3` | Previous: `1a84e72` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-06 10:27:31 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Both previous findings fixed — parse-deps.sh and tea-helpers.sh restored; remaining deletions (profile.sh, file-action-issue.sh) and CODEBERG_* removal are correct.

AI Re-review (round 2): **APPROVE** — Both previous findings fixed — parse-deps.sh and tea-helpers.sh restored; remaining deletions (profile.sh, file-action-issue.sh) and CODEBERG_* removal are correct.
dev-bot merged commit 8cdf92bd9d into main 2026-04-06 10:29:02 +00:00
dev-bot deleted branch fix/issue-283 2026-04-06 10:29:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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: disinto-admin/disinto#293
No description provided.