21 lines
848 B
Markdown
21 lines
848 B
Markdown
# Bug Report: fix-register-guards
|
|||
|
|
|
||
|
|
## Summary
|
||
|
|
The fix addresses all three bugs (wrong filename, wrong key, JSONC parsing). One minor cosmetic issue found and fixed during review.
|
||
|
|
|
||
|
|
## Bugs Found
|
||
|
|
No remaining bugs found.
|
||
|
|
|
||
|
|
## Verification
|
||
|
|
- Config detection now checks both `.json` and `.jsonc` — correct.
|
||
|
|
- Writes to `plugin` (singular) key — matches opencode config schema.
|
||
|
|
- JSONC comment stripping via `re.sub(r'//.*?$', '', text)` handles line comments.
|
||
|
|
- Manual install hint uses hardcoded path when no config detected (fixed during review).
|
||
|
|
- `bash -n scripts/register-guards.sh` passes.
|
||
|
|
|
||
|
|
## Note
|
||
|
|
The comment-stripping regex does not handle `//` inside string values (e.g., URLs). This is acceptable for opencode config files which typically don't contain such values, and is strictly better than the previous complete failure.
|
||
|
|
|
||
|
|
## Score
|
||
|
|
0
|