fix: bug: generator emits invalid env var name FORGE_BOT_USER_<service>^^ when service name contains hyphen (#852) #873
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#873
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-852"
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 #852
Changes
AI Review
Summary
Bug-fix adds warn-and-skip identifier validation guards in the two
exportloops insidelib/load-project.sh. Targets the crash-loop path where an invalid shell identifier (e.g.MIRROR_BAD-NAME) causesexportto return non-zero and abort callers running underset -euo pipefail.Correctness
^[A-Za-z_][A-Za-z0-9_]*$is the correct POSIX shell identifier grammar. Placed beforeexportin both loops — placement is correct.IFS='=' read -r _key _val— two-variable form puts everything after the first=into_val, so URLs with colons and slashes are unaffected.set -euo pipefail, confirm non-zero status would occur pre-fix, and assert the warning names the offending key. The sibling-loaded assertion confirms survivors are unaffected.Non-blocking observation
The
[mirrors]Python emitter (line 73) doesname.upper()only — unlike the[agents]emitter which doesname.upper().replace('-', '_')(added in #862). A dashed mirror key warns-and-skips at load time rather than normalizing to a valid name. The guard is correct defense-in-depth behavior, but users who expectMIRROR_MY_MIRRORfrom[mirrors] my-mirror = ...will be surprised. A follow-on issue to align the mirrors emitter with the agents emitter would close this asymmetry.Verdict
APPROVE — Identifier guards are correctly placed, regex is valid, both tests verify the failure mode — fix addresses the crash-loop.
Reviewed at
564e89e| AGENTS.mdAI Review: APPROVE — Identifier guards are correctly placed, regex is valid, both tests verify the failure mode — fix addresses the crash-loop.