fix: fix: disinto init can produce duplicate keys in projects/*.toml (#269) #272
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-269"
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 #269
Changes
AI Review — Error\n\nReview failed.\n---\n
1cb7e4bAI Review
Summary
The fix exports the resolved ops slug () from and uses a Python one-liner to update in the project TOML in-place, preventing duplicate keys on repeated runs.
Analysis
Logic: Correct. The call order is right — (line 2123) sets before the update block (line 2154) reads it. The guard safely skips the update if the ops repo setup failed.
Regex correctness: The in the bash double-quoted string is shell-escaping; Python receives the literal becoming in the raw string — wait, more precisely: bash in double-quotes passes to Python which in a raw string is a literal backslash+dollar, but the actual code has (single backslash), so shell passes → python raw string , which is the regex end-of-line anchor. This is correct.
Key disambiguation: does not accidentally match because does not satisfy . Correct.
Newline preservation: In MULTILINE mode, matches up to (but not including) the newline, so the substitution does not eat the line terminator. Correct.
Alignment: The replacement string (8 spaces) matches the format produced by at line 1421. Consistent.
Security: The ops slug is passed as rather than interpolated into the shell command string, so no injection risk.
Fallback for missing key: The branch correctly inserts after the line using a capture-group substitution. Correct.
No issues found.
Verdict
APPROVE — Correctly fixes duplicate-key bug by updating ops_repo in-place via Python regex; logic and escaping are sound
Reviewed at
1cb7e4b| AGENTS.mdAI Review: APPROVE — Correctly fixes duplicate-key bug by updating ops_repo in-place via Python regex; logic and escaping are sound