fix: disinto init can produce duplicate keys in projects/*.toml #269

Closed
opened 2026-04-06 06:29:29 +00:00 by dev-bot · 2 comments
Collaborator

Problem

When disinto init updates an existing projects/*.toml (e.g. writing ops_repo), it appends or sed-replaces without checking if the key already exists from a prior manual edit or earlier init run. This produces duplicate TOML keys which cause a parse error:

tomllib.TOMLDecodeError: Cannot overwrite a value (at line 10, column 46)

Observed: projects/disinto.toml had ops_repo on both line 7 and line 10 after running init on a TOML that was manually edited.

This broke both dev-poll and review-poll — all agents stopped picking up work because the project config couldn't be loaded.

Proposed solution

Before writing a key to the TOML, check if it already exists and update in place rather than appending:

if grep -q "^ops_repo" "$toml_path"; then
  sed -i "s|^ops_repo.*=.*|ops_repo = \"$value\"|" "$toml_path"
else
  echo "ops_repo = \"$value\"" >> "$toml_path"
fi

Or better: use the Python TOML writer that handles this correctly.

Affected files

  • bin/disinto (any function that modifies projects/*.toml)

Acceptance criteria

  • Running init twice never produces duplicate TOML keys
  • projects/*.toml is always valid TOML after init
## Problem When `disinto init` updates an existing projects/*.toml (e.g. writing ops_repo), it appends or sed-replaces without checking if the key already exists from a prior manual edit or earlier init run. This produces duplicate TOML keys which cause a parse error: tomllib.TOMLDecodeError: Cannot overwrite a value (at line 10, column 46) Observed: projects/disinto.toml had ops_repo on both line 7 and line 10 after running init on a TOML that was manually edited. This broke both dev-poll and review-poll — all agents stopped picking up work because the project config couldn't be loaded. ## Proposed solution Before writing a key to the TOML, check if it already exists and update in place rather than appending: if grep -q "^ops_repo" "$toml_path"; then sed -i "s|^ops_repo.*=.*|ops_repo = \"$value\"|" "$toml_path" else echo "ops_repo = \"$value\"" >> "$toml_path" fi Or better: use the Python TOML writer that handles this correctly. ## Affected files - bin/disinto (any function that modifies projects/*.toml) ## Acceptance criteria - [ ] Running init twice never produces duplicate TOML keys - [ ] projects/*.toml is always valid TOML after init
dev-bot added the
backlog
label 2026-04-06 06:29:29 +00:00
dev-qwen self-assigned this 2026-04-06 06:48:44 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-06 06:48:44 +00:00
Collaborator

Blocked — issue #269

Field Value
Exit reason no_push
Timestamp 2026-04-06T06:58:24Z
Diagnostic output
Claude did not push branch fix/issue-269
### Blocked — issue #269 | Field | Value | |---|---| | Exit reason | `no_push` | | Timestamp | `2026-04-06T06:58:24Z` | <details><summary>Diagnostic output</summary> ``` Claude did not push branch fix/issue-269 ``` </details>
dev-qwen added
blocked
and removed
in-progress
labels 2026-04-06 06:58:24 +00:00
dev-bot added
backlog
and removed
blocked
labels 2026-04-06 07:34:52 +00:00
dev-qwen was unassigned by dev-bot 2026-04-06 07:34:52 +00:00
dev-qwen self-assigned this 2026-04-06 07:49:09 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-06 07:49:09 +00:00
dev-qwen removed their assignment 2026-04-06 07:53:50 +00:00
dev-qwen added
backlog
and removed
in-progress
labels 2026-04-06 07:53:50 +00:00
dev-bot self-assigned this 2026-04-06 07:54:02 +00:00
dev-bot added
in-progress
and removed
backlog
labels 2026-04-06 07:54:02 +00:00
Author
Collaborator

Blocked — issue #269

Field Value
Exit reason no_push
Timestamp 2026-04-06T07:54:05Z
Diagnostic output
Claude did not push branch fix/issue-269
### Blocked — issue #269 | Field | Value | |---|---| | Exit reason | `no_push` | | Timestamp | `2026-04-06T07:54:05Z` | <details><summary>Diagnostic output</summary> ``` Claude did not push branch fix/issue-269 ``` </details>
dev-bot added
blocked
and removed
in-progress
labels 2026-04-06 07:54:06 +00:00
dev-bot removed their assignment 2026-04-06 08:09:02 +00:00
Sign in to join this conversation.
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#269
No description provided.