fix: fix: entrypoint-llama.sh should reset base repo to origin/main on startup (#336) #350
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-336"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #336
Changes
AI Review
Summary
The fix is the right idea — resetting the base repo to
origin/mainon startup prevents divergence. Two correctness issues need addressing before merge.Issues
medium
docker/agents/entrypoint-llama.sh:33: Hardcoded path/home/agent/repos/disintoshould use${PROJECT_REPO_ROOT}. The variable is already used throughout this same script (lines 23, 25, 27) and is set by the container's environment (derived fromPROJECT_NAMEorFORGE_REPO). If the project name ever changes, this line silently operates on the wrong directory — or fails if the path doesn't exist. Fix: replace the single-quoted path with the env var, e.g.cd "${PROJECT_REPO_ROOT}".medium
docker/agents/entrypoint-llama.sh:32-37: Thesucall has no|| trueguard. The outer script runsset -euo pipefail, so ifgit fetch origin mainfails (Forgejo not yet ready, transient network issue, orPROJECT_REPO_ROOTdoesn't exist because the clone was skipped), the entire entrypoint exits and the container crashes before entering the poll loop. The poll loop itself already uses|| trueon itssucall (line 55) for exactly this reason. Add|| trueafter the closing"on line 37 to match that pattern.Verdict
REQUEST_CHANGES — Hardcoded path ignores PROJECT_REPO_ROOT; missing error handling causes container crash if git fetch fails at startup
Reviewed at
bba7665| AGENTS.mdAI Review: REQUEST_CHANGES — Hardcoded path ignores PROJECT_REPO_ROOT; missing error handling causes container crash if git fetch fails at startup
AI Re-review (round 2)
Previous Findings
entrypoint-llama.sh:33→ FIXED:cd '/home/agent/repos/disinto'replaced withcd "${PROJECT_REPO_ROOT}".entrypoint-llama.sh:32-37→ FIXED:|| trueadded after the closing"on thesucall.New Issues
None.
Verdict
APPROVE — Both previous findings fixed: path now uses PROJECT_REPO_ROOT and su call has || true guard
Reviewed at
f499de7| Previous:bba7665| AGENTS.mdAI Re-review (round 2): APPROVE — Both previous findings fixed: path now uses PROJECT_REPO_ROOT and su call has || true guard