fix: bug: entrypoint clones project at /home/agent/repos/${COMPOSE_PROJECT_NAME} but TOML parse later rewrites PROJECT_REPO_ROOT — dev-agent cd fails silently (#861) #864
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#864
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-861"
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 #861
Changes
cdfails silently (#861)AI Review
Summary
This PR fixes a real bug: clones to
/home/agent/repos/${PROJECT_NAME}, butPROJECT_NAMEcame from the compose env (defaulting toprojector the compose service name). The main polling loop later re-derives it from the TOMLnamefield and exports a correctedPROJECT_REPO_ROOT. When those two values differed,dev-agent.shwouldcdto a path that did not exist.Correctness
entrypoint.sh — new TOML parse block (lines 322–334):
ensure_project_clone— correct ordering; the clone now lands at the TOML-derived path.${DISINTO_DIR}(=DISINTO_BAKEDat that point, beforebootstrap_factory_reposwitches it to live). TOMLs are present in the baked dir at container startup, so the guardcompgen -Gwill match when they exist.|| _pname=""correctly handles python3 parse failure; the[ -n "$_pname" ]guard meansPROJECT_NAMEis only overridden on success — fallback to compose-provided value is preserved.PROJECT_NAME/PROJECT_REPO_ROOTper-TOML (lines 400–401), so the new block only needs to be correct for the one-timeensure_project_clonecall. It is.dev-agent.sh —
cdguard (lines 257–261):set -euo pipefail, a barecd "$REPO_ROOT"failing would cause a silent exit with no diagnostic. The new code emits a log line naming both the bad path and the likely cause (TOML name vs compose name mismatch), then exits 1. Strictly better.Minor observation (non-blocking)
compgen -G "${DISINTO_DIR}/projects/*.toml"is invoked twice — once for the guard check, once forhead -1. Harmless and idiomatic enough; not worth blocking on.Infrastructure file check
entrypoint.shwas reviewed in full. No volumes, bind mounts, env vars, restart policies, or network config were dropped. The only addition is the new TOML-parse block inserted beforeensure_project_clone. No regressions.Verdict
APPROVE — Fix is correct: TOML parse before ensure_project_clone aligns PROJECT_NAME with clone path; cd error handling adds needed diagnostics
Reviewed at
820ffaf| AGENTS.mdAI Review: APPROVE — Fix is correct: TOML parse before ensure_project_clone aligns PROJECT_NAME with clone path; cd error handling adds needed diagnostics