Skip to content

wr-risk-scorer bootstrap-catalog: ID allocation fails once R008+ exists; README hardcodes the suite name #273

@tompahoward

Description

@tompahoward

Found while running /wr-risk-scorer:bootstrap-catalog (re-run) in an adopter project. Plugin wr-risk-scorer@windyroad 0.13.4 (commit d45a142), macOS, bash 3.2. Two problems in scripts/extract-risks-from-reports.sh.

  1. ID allocation fails once R008+ exists. At line 216 LOCAL_MAX keeps the zero-padded id (e.g. 008); line 217 does NEXT_ID=$(( ${LOCAL_MAX:-0} + 1 )), and bash treats a leading-zero literal as octal, so 8/9 are invalid digits and it prints line 217: 008: value too great for base. Reproduce: have docs/risks/R008-*.active.md present and run the extractor. Effect: Phase 1 still appends source-evidence to existing slugs, but NEXT_ID is not computed, so the Phase 2 --derived-slugs path cannot allocate R009+. Suggested fix: force base-10, NEXT_ID=$(( 10#${LOCAL_MAX:-0} + 1 )).

  2. The generated README hardcodes the suite name. Line 350 of the heredoc emits This directory is the persistent risk register for the Windy Road Agent Plugins suite. In an adopter project the generated docs/risks/README.md should name the adopter, not the suite, and it is overwritten on every run (so a manual correction does not survive). Suggested fix: derive the project name from the repo-root basename, or use project-neutral phrasing.

Both surfaced together in the same bootstrap run; happy to split into two issues if preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions