docs(buglog): bug-1856 wontfix (upstream OpenWolf defect, durably mitigated)

The duplicate-id numbering lives in OpenWolf's post-write hook, which
openwolf update overwrites; auto_detect=false survives updates and the
pre-commit stale-index check catches any stray hook write.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-02 08:47:03 +00:00
parent df2ea65495
commit d464115846
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
2 changed files with 18 additions and 11 deletions

View file

@ -15461,18 +15461,18 @@
},
{
"id": "bug-1856",
"status": "open",
"status_updated": "2026-09-24",
"status_note": "upstream OpenWolf defect; mitigated locally by openwolf.buglog.auto_detect=false; scripts/buglog.py add uses max id + 1; report upstream",
"status": "wontfix",
"status_updated": "2026-10-02",
"status_note": "upstream OpenWolf defect; mitigated durably by auto_detect=false (kept by openwolf update) and the pre-commit stale-index check; fix belongs in OpenWolf",
"component": "unknown",
"severity": "unknown",
"timestamp": "2026-09-24T09:39:50Z",
"last_seen": "2026-09-24T09:39:50Z",
"occurrences": 1,
"error_message": "OpenWolf 2.5.0 post-write hook would create a duplicate bug id: autoDetectBugFix numbers new…\n\nOpenWolf 2.5.0 post-write hook would create a duplicate bug id: autoDetectBugFix numbers new entries bug-<len(bugs)+1> (next: bug-1194), but ids run to bug-1854 and bug-1194 already exists",
"error_message": "OpenWolf post-write hook numbers auto-detected bugs bug-<count+1>, duplicating ids in a sparse buglog\n\nOpenWolf 2.5.0 post-write hook would create a duplicate bug id: autoDetectBugFix numbers new entries bug-<len(bugs)+1> (next: bug-1194), but ids run to bug-1854 and bug-1194 already exists",
"file": ".wolf/hooks/post-write.js, .wolf/config.json",
"root_cause": "Upstream OpenWolf hook (.wolf/hooks/post-write.js autoDetectBugFix, nextId = bugLog.bugs.length + 1) assumes ids are dense and never renumbered; this buglog's ids are sparse after renumbering/consolidation (see bug-1630). The hook also never sets the project's status field.",
"fix": "_Not recorded (migrated from buglog.json)._",
"fix": "Not fixed here -- upstream defect, closed wontfix 2026-10-02 (user decision). Reviewed against OpenWolf 2.5.0 (nix `openwolf-2.5.0`, built from the npm tarball): `.wolf/hooks/post-write.js` `autoDetectBugFix()` still numbers new entries `bug-<bugs.length + 1>` (line 337) and appends them straight to `buglog.json`. This repo's copy is the package's file unchanged (only a trailing source-map comment differs), and `openwolf update` (`dist/src/cli/update.js`, `copyHookScripts`) overwrites `.wolf/hooks` on every update, so a local patch would be silently reverted.\n\nMitigation, durable in this repo:\n- `.wolf/config.json` `openwolf.buglog.auto_detect: false` -- `autoDetectBugFix()` returns before touching the log (`bugAutoDetectEnabled()`); `openwolf update` only adds missing config keys (`mergeConfigDefaults`), never overwrites this one.\n- bug records are `.wolf/bugs/<id>.md`, created only by `scripts/buglog.py new`; `buglog.json` is a generated index, and the pre-commit hook rejects a stale index (\"buglog.json is stale: run `python3 scripts/buglog.py index`\", seen 2026-10-01), so any entry a hook did append would be caught before commit.\nThe fix belongs in OpenWolf: derive the next id from the highest existing id (or let the project own numbering) and leave status to the project.\n\nVerification:\n- Test: n/a (no code change); reviewed `post-write.js` lines 290-350 and `update.js` 2026-10-02 against the installed 2.5.0 package\n- Suites: n/a\n- Live: `auto_detect: false` present in `.wolf/config.json`; of the 537 records, 3 carry the `auto-detected` tag (bug-1462, bug-1463 from 2026-07-23; bug-1841 from 2026-09-22) -- all real, fixed records with unique ids, no duplicate id among them",
"tags": [
"openwolf",
"buglog",

View file

@ -1,8 +1,8 @@
---
id: "bug-1856"
status: "open"
status_updated: "2026-09-24"
status_note: "upstream OpenWolf defect; mitigated locally by openwolf.buglog.auto_detect=false; scripts/buglog.py add uses max id + 1; report upstream"
status: "wontfix"
status_updated: "2026-10-02"
status_note: "upstream OpenWolf defect; mitigated durably by auto_detect=false (kept by openwolf update) and the pre-commit stale-index check; fix belongs in OpenWolf"
component: "unknown"
severity: "unknown"
timestamp: "2026-09-24T09:39:50Z"
@ -16,7 +16,7 @@ gitea_issue: 89
gitea_synced_status: "open"
---
# bug-1856: OpenWolf 2.5.0 post-write hook would create a duplicate bug id: autoDetectBugFix numbers new…
# bug-1856: OpenWolf post-write hook numbers auto-detected bugs bug-<count+1>, duplicating ids in a sparse buglog
## Description
OpenWolf 2.5.0 post-write hook would create a duplicate bug id: autoDetectBugFix numbers new entries bug-<len(bugs)+1> (next: bug-1194), but ids run to bug-1854 and bug-1194 already exists
@ -31,10 +31,17 @@ _Not recorded (migrated from buglog.json)._
Upstream OpenWolf hook (.wolf/hooks/post-write.js autoDetectBugFix, nextId = bugLog.bugs.length + 1) assumes ids are dense and never renumbered; this buglog's ids are sparse after renumbering/consolidation (see bug-1630). The hook also never sets the project's status field.
## Fix
_Not recorded (migrated from buglog.json)._
Not fixed here -- upstream defect, closed wontfix 2026-10-02 (user decision). Reviewed against OpenWolf 2.5.0 (nix `openwolf-2.5.0`, built from the npm tarball): `.wolf/hooks/post-write.js` `autoDetectBugFix()` still numbers new entries `bug-<bugs.length + 1>` (line 337) and appends them straight to `buglog.json`. This repo's copy is the package's file unchanged (only a trailing source-map comment differs), and `openwolf update` (`dist/src/cli/update.js`, `copyHookScripts`) overwrites `.wolf/hooks` on every update, so a local patch would be silently reverted.
Mitigation, durable in this repo:
- `.wolf/config.json` `openwolf.buglog.auto_detect: false` -- `autoDetectBugFix()` returns before touching the log (`bugAutoDetectEnabled()`); `openwolf update` only adds missing config keys (`mergeConfigDefaults`), never overwrites this one.
- bug records are `.wolf/bugs/<id>.md`, created only by `scripts/buglog.py new`; `buglog.json` is a generated index, and the pre-commit hook rejects a stale index ("buglog.json is stale: run `python3 scripts/buglog.py index`", seen 2026-10-01), so any entry a hook did append would be caught before commit.
The fix belongs in OpenWolf: derive the next id from the highest existing id (or let the project own numbering) and leave status to the project.
## Verification
_Not recorded (migrated from buglog.json)._
- Test: n/a (no code change); reviewed `post-write.js` lines 290-350 and `update.js` 2026-10-02 against the installed 2.5.0 package
- Suites: n/a
- Live: `auto_detect: false` present in `.wolf/config.json`; of the 537 records, 3 carry the `auto-detected` tag (bug-1462, bug-1463 from 2026-07-23; bug-1841 from 2026-09-22) -- all real, fixed records with unique ids, no duplicate id among them
## References
- Related: bug-1630