fix: bug: edge entrypoint defaults FORGE_REPO to disinto-admin/disinto — footgun for non-disinto deployments (#543) #562

Merged
dev-bot merged 2 commits from fix/issue-543 into main 2026-04-10 08:07:05 +00:00
Collaborator

Fixes #543

Changes

Fixes #543 ## Changes
dev-bot added 1 commit 2026-04-10 07:58:22 +00:00
fix: bug: edge entrypoint defaults FORGE_REPO to disinto-admin/disinto — footgun for non-disinto deployments (#543)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
fe043f4368
Collaborator

AI Review

Summary

The primary fix for #543 is correct — removing the hardcoded :-disinto-admin/disinto default and requiring explicit FORGE_REPO is the right call, and the fail-fast error message is clear and actionable.

However, the bonus TOML auto-derivation path contains a bug that silently makes it a no-op in normal deployments.

Findings

  • bug entrypoint-edge.sh:29: Wrong path to load-project.sh. The expression ${SCRIPT_ROOT:-$(dirname "${BASH_SOURCE[0]}")}/../lib/load-project.sh resolves to docker/edge/../lib/load-project.sh = docker/lib/load-project.sh — which doesn't exist. SCRIPT_ROOT is not set in the entrypoint context (only dispatcher.sh sets it, to docker/; the entrypoint starts fresh). The actual file lives at lib/load-project.sh under FACTORY_ROOT. The source ... 2>/dev/null silently swallows the ENOENT, so TOML parsing always silently fails, FORGE_REPO is never auto-derived, and the entrypoint always exits with the FATAL error unless FORGE_REPO is set explicitly. The fix should use ${FACTORY_ROOT:-/opt/disinto}/lib/load-project.sh (consistent with how the projects directory is already referenced on line 15 and 19).

What works correctly

  • Removing the hardcoded default ✓
  • Fail-fast with actionable error message ✓
  • Glob fallback for finding a TOML file ✓
  • Guard against the glob literal when no .toml files exist ([ -f "$toml" ]) ✓
  • No secret leakage in log output ✓

Verdict

REQUEST_CHANGES — TOML-based FORGE_REPO auto-derivation is broken due to wrong path resolution for load-project.sh


Reviewed at fe043f4 | AGENTS.md

## AI Review <!-- reviewed: fe043f4368b7d40e12aa46a54ae6963781cbffca --> ### Summary The primary fix for #543 is correct — removing the hardcoded `:-disinto-admin/disinto` default and requiring explicit `FORGE_REPO` is the right call, and the fail-fast error message is clear and actionable. However, the bonus TOML auto-derivation path contains a bug that silently makes it a no-op in normal deployments. ### Findings - **bug** `entrypoint-edge.sh:29`: Wrong path to `load-project.sh`. The expression `${SCRIPT_ROOT:-$(dirname "${BASH_SOURCE[0]}")}/../lib/load-project.sh` resolves to `docker/edge/../lib/load-project.sh` = `docker/lib/load-project.sh` — which doesn't exist. `SCRIPT_ROOT` is not set in the entrypoint context (only `dispatcher.sh` sets it, to `docker/`; the entrypoint starts fresh). The actual file lives at `lib/load-project.sh` under `FACTORY_ROOT`. The `source ... 2>/dev/null` silently swallows the ENOENT, so TOML parsing always silently fails, FORGE_REPO is never auto-derived, and the entrypoint always exits with the FATAL error unless `FORGE_REPO` is set explicitly. The fix should use `${FACTORY_ROOT:-/opt/disinto}/lib/load-project.sh` (consistent with how the projects directory is already referenced on line 15 and 19). ### What works correctly - Removing the hardcoded default ✓ - Fail-fast with actionable error message ✓ - Glob fallback for finding a TOML file ✓ - Guard against the glob literal when no `.toml` files exist (`[ -f "$toml" ]`) ✓ - No secret leakage in log output ✓ ### Verdict **REQUEST_CHANGES** — TOML-based FORGE_REPO auto-derivation is broken due to wrong path resolution for load-project.sh --- *Reviewed at `fe043f4` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-10 08:01:09 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — TOML-based FORGE_REPO auto-derivation is broken due to wrong path resolution for load-project.sh

AI Review: **REQUEST_CHANGES** — TOML-based FORGE_REPO auto-derivation is broken due to wrong path resolution for load-project.sh
dev-bot added 1 commit 2026-04-10 08:04:03 +00:00
fix: remove disinto-specific TOML fallback and fix load-project.sh path in edge entrypoint
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
58fd3cbde1
- Remove hardcoded `disinto.toml` as default TOML search path; scan
  projects/ directory for any .toml instead
- Fix load-project.sh path: use FACTORY_ROOT (consistent with the rest
  of the block) instead of SCRIPT_ROOT/BASH_SOURCE which resolves to
  /usr/local/bin in the container — wrong for /opt/disinto/lib/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

AI Re-review (round 2)

Previous Findings\n- bug entrypoint-edge.sh:29: Wrong path to load-project.sh (used SCRIPT_ROOT derivation pointing to docker/lib/ instead of lib/) → FIXED: Line 24 now correctly uses ${FACTORY_ROOT:-/opt/disinto}/lib/load-project.sh, consistent with how the projects directory is referenced throughout the block.\n\n### New Issues\n\nNone. The disinto-specific projects/disinto.toml TOML fallback was also removed as part of this commit, which is correct per the fix scope. The remaining PROJECT_TOML default on line 49 (supervisor loop) is pre-existing and out of scope for this PR.

Verdict

APPROVE — Previous finding addressed: load-project.sh path corrected to use FACTORY_ROOT


Reviewed at 58fd3cb | Previous: fe043f4 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: 58fd3cbde15296946c8fd11987c551d92c454451 --> ### Previous Findings\n- **bug** `entrypoint-edge.sh:29`: Wrong path to `load-project.sh` (used SCRIPT_ROOT derivation pointing to `docker/lib/` instead of `lib/`) → **FIXED**: Line 24 now correctly uses `${FACTORY_ROOT:-/opt/disinto}/lib/load-project.sh`, consistent with how the projects directory is referenced throughout the block.\n\n### New Issues\n\nNone. The disinto-specific `projects/disinto.toml` TOML fallback was also removed as part of this commit, which is correct per the fix scope. The remaining `PROJECT_TOML` default on line 49 (supervisor loop) is pre-existing and out of scope for this PR. ### Verdict **APPROVE** — Previous finding addressed: load-project.sh path corrected to use FACTORY_ROOT --- *Reviewed at `58fd3cb` | Previous: `fe043f4` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-10 08:06:52 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Previous finding addressed: load-project.sh path corrected to use FACTORY_ROOT

AI Re-review (round 2): **APPROVE** — Previous finding addressed: load-project.sh path corrected to use FACTORY_ROOT
dev-bot merged commit be5957f127 into main 2026-04-10 08:07:05 +00:00
dev-bot deleted branch fix/issue-543 2026-04-10 08:07:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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#562
No description provided.