diff --git a/ROADMAP.md b/ROADMAP.md index c760d15a..e68f0ac1 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -7611,3 +7611,5 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed) 721. **`claw config mcp|sandbox|permissions|skills|agents` returned `{status:"error", error_kind:"unsupported_config_section"}` with error message "Use env, hooks, model, or plugins" — 5 valid config sections were not mapped in the JSON path** — dogfooded 2026-05-26 on `02d1f6a0`. `claw config agents --output-format json` → `{status:"error", error_kind:"unsupported_config_section", error:"...Use env, hooks, model, or plugins."}`. The `match section` arms in both text and JSON paths only handled `env/hooks/model/plugins`; all others fell to the error arm. Fix: added `mcp|mcp_servers|mcpServers`, `sandbox`, `permissions`, `skills`, `agents` arms to both text and JSON config section handlers. `unsupported_config_section` error envelope now includes `supported_sections:[]` array. Source: Jobdori dogfood on `02d1f6a0`, 2026-05-26. 722. **ROADMAP #721 re-entry after rebase conflict: `claw config mcp|sandbox|permissions|skills|agents` returned `unsupported_config_section` — code fix is in `6e44da10`** (main.rs changes preserved through rebase, only ROADMAP.md was conflict-resolved to Gaebal's version). Both text and JSON config section handlers now support `mcp`, `sandbox`, `permissions`, `skills`, `agents`; error envelope includes `supported_sections:[]`. Source: Jobdori dogfood on `02d1f6a0`, 2026-05-26. + +723. **Concurrent dogfood claws allocate ROADMAP ids manually and collide — same id reused by two contributors simultaneously, causing PR ROADMAP.md conflicts and lost entries** — observed live 2026-05-26 during Jobdori+Gaebal parallel dogfood session: Gaebal filed stale-local-probe as #719; Jobdori landed `plugins list ` as #719 on main first; Gaebal shifted to #720; Jobdori landed `claw help ` as #720; stale-local-probe eventually landed as #721 after two forced rebase cycles. The ROADMAP append workflow has no reservation or conflict-aware id allocation. **Required fix shape:** (a) add `scripts/roadmap-next-id.sh` that reads the highest id from ROADMAP.md and prints `highest+1` — claws should call this immediately before appending any new entry; (b) document in CONTRIBUTING.md that id allocation is optimistic-append: call `roadmap-next-id.sh` immediately before the append, git-pull first, resolve collisions at push time by re-numbering the appended entry; (c) long-term: a GitHub Action that validates no duplicate ROADMAP ids on PR would catch this before merge. Added `scripts/roadmap-next-id.sh` (this commit). Source: Gaebal Gajae live observation, 2026-05-26. diff --git a/scripts/roadmap-next-id.sh b/scripts/roadmap-next-id.sh new file mode 100755 index 00000000..07f139bb --- /dev/null +++ b/scripts/roadmap-next-id.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# roadmap-next-id.sh — print the next available ROADMAP item id. +# Usage: scripts/roadmap-next-id.sh [path/to/ROADMAP.md] +# +# Designed to be used before appending a new entry so that concurrent +# dogfood claws do not accidentally reuse the same id: +# +# NEXT=$(scripts/roadmap-next-id.sh) +# cat >> ROADMAP.md << EOF +# ${NEXT}. **...description...** +# EOF +# +# The script reads the highest numeric id prefix from ROADMAP.md and +# prints highest+1. It does not lock the file; callers working in +# parallel should git-pull immediately before appending and resolve +# any append collision at git-push time. +set -euo pipefail + +ROADMAP="${1:-ROADMAP.md}" + +if [[ ! -f "$ROADMAP" ]]; then + echo "error: ROADMAP not found at $ROADMAP" >&2 + exit 1 +fi + +# Find the highest leading integer from lines that start with a number + '.'. +highest=$(grep -E '^[0-9]+\.' "$ROADMAP" | grep -Eo '^[0-9]+' | sort -n | tail -1) + +if [[ -z "$highest" ]]; then + echo 1 +else + echo $(( highest + 1 )) +fi