Fix backlog helper help routing #191

Closed
opened 2026-06-01 07:35:01 +00:00 by steve · 0 comments
Owner

Problem

pnpm backlog:new --help is interpreted as a request to create a new backlog
item titled New issue, because package-manager argument forwarding places
--help where the new command parser treats it as command input rather than a
help request.

Goal

Make backlog helper help behavior explicit and non-mutating for root and
subcommand help requests.

Scope

  • Route help, --help, and -h to help output without creating or mutating
    issue files.
  • Support subcommand help such as new --help, close --help, and
    sync --help.
  • Add focused tests or script validation covering the new --help regression.
  • Document the expected help invocation if the maintenance spec needs it.

Non-goals

  • Redesigning the backlog CLI.
  • Changing issue sync, Forgejo, duplicate detection, or closure semantics beyond
    help routing.

Acceptance Criteria

  • pnpm backlog:new --help exits successfully, prints help, and creates no
    .issues/open/Tmp* file.
  • node ./scripts/issue-sync.mjs new --help has the same non-mutating behavior.
  • Root help commands still work: pnpm backlog --help where available and
    node ./scripts/issue-sync.mjs --help.
  • Tests or targeted validation cover the regression.

Implementation Notes

  • Prefer handling help before command-specific mutation paths.
  • Keep the command usable through both pnpm package scripts and direct Node
    execution.

Suggested Files or Specs To Inspect

  • scripts/issue-sync.mjs
  • scripts/issue-sync-lib.mjs
  • scripts/issue-sync-lib.test.mjs
  • spec/src/80-maintenance/issues-backlog.md

Validation Commands

  • node ./scripts/issue-sync.mjs new --help
  • pnpm backlog:new --help
  • node --test scripts/issue-sync-lib.test.mjs scripts/issue-sync-progress.test.mjs
  • pnpm test:scripts

Follow-up Tasks

Implementation Summary

Added non-mutating root and subcommand help handling for issue-sync, exposed pnpm backlog --help, documented the help forms, and added regression coverage so new --help cannot create temporary issues.

## Problem `pnpm backlog:new --help` is interpreted as a request to create a new backlog item titled `New issue`, because package-manager argument forwarding places `--help` where the `new` command parser treats it as command input rather than a help request. ## Goal Make backlog helper help behavior explicit and non-mutating for root and subcommand help requests. ## Scope - Route `help`, `--help`, and `-h` to help output without creating or mutating issue files. - Support subcommand help such as `new --help`, `close --help`, and `sync --help`. - Add focused tests or script validation covering the `new --help` regression. - Document the expected help invocation if the maintenance spec needs it. ## Non-goals - Redesigning the backlog CLI. - Changing issue sync, Forgejo, duplicate detection, or closure semantics beyond help routing. ## Acceptance Criteria - `pnpm backlog:new --help` exits successfully, prints help, and creates no `.issues/open/Tmp*` file. - `node ./scripts/issue-sync.mjs new --help` has the same non-mutating behavior. - Root help commands still work: `pnpm backlog --help` where available and `node ./scripts/issue-sync.mjs --help`. - Tests or targeted validation cover the regression. ## Implementation Notes - Prefer handling help before command-specific mutation paths. - Keep the command usable through both pnpm package scripts and direct Node execution. ## Suggested Files or Specs To Inspect - `scripts/issue-sync.mjs` - `scripts/issue-sync-lib.mjs` - `scripts/issue-sync-lib.test.mjs` - `spec/src/80-maintenance/issues-backlog.md` ## Validation Commands - `node ./scripts/issue-sync.mjs new --help` - `pnpm backlog:new --help` - `node --test scripts/issue-sync-lib.test.mjs scripts/issue-sync-progress.test.mjs` - `pnpm test:scripts` ## Related Issues - Follow-up to #182 — [Fix backlog helper argument parsing and duplicate mirror diagnostics](../closed/182-fix-backlog-helper-argument-parsing-and-duplicate-mirror-diagnostics.md) ## Follow-up Tasks ## Implementation Summary Added non-mutating root and subcommand help handling for issue-sync, exposed pnpm backlog --help, documented the help forms, and added regression coverage so new --help cannot create temporary issues. <!-- backlog:task_id=TASK-BACKLOG-ISSUE-SYNC-HELP source_spec=spec/src/80-maintenance/issues-backlog.md related_issue=182 -->
steve added this to the Full Registry V1 milestone 2026-06-01 07:35:01 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
lapis-notes/lapis#191
No description provided.