Skip to content

fix(pm-stack): quota exporters reject repeated value flags (#16724) - #16729

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
lane/0422e-16724-duplicate-flags
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
lane/0422e-16724-duplicate-flags

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #16724.

Problem

parseArgs in both quota exporters assigned values[token] = value unconditionally, so a repeated value flag silently retargeted the run to the last value: --out-dir a --out-dir b wrote the export (and its failure document) to b; --cdp-port 19222 --cdp-port 9222 silently probed the second port. Same defect class as #8899 (fixed for the sibling exporter by #8901); these two exporters were the inconsistent remainder of the #3352 strict-argument contract family.

Change

Verification

node --test pm-stack/cloudflare-export/cloudflare-quota-export.test.mjs pm-stack/meta-exporter/meta-quota-export.test.mjs on the laptop worktree: 93 pass, 0 fail. Previously valid single-use invocations (systemd/timer call sites pass each flag once) are unchanged.

Lane 0422-E, delta PRESS work loop 2026-11-29.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T10:40:34Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

parseArgs in cloudflare-quota-export.mjs and meta-quota-export.mjs assigned values[token] unconditionally, so a duplicated value flag silently retargeted the run to the last value (--out-dir a --out-dir b wrote to b). Both now raise a usage error (ExportError status usage, exit 2) naming the duplicated flag, before any directory creation, token resolution, API or CDP side effect -- the same contract the sibling strict parsers landed in PR #4475/#4476 and #8901.

Tests: repeated-flag unit tests in each exporter suite (repeated --out-dir with two distinct paths, plus each other flag), and the #3469 property tests updated to the new grammar -- valid streams use each flag at most once, and the malformed generators gained a duplicate-flag violation kind. node --test on both suites: 93 pass.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4e2bcff2-bcf6-40b0-a3eb-697383a25b6a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet
developing-today-fleet Bot merged commit f191f9c into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the lane/0422e-16724-duplicate-flags branch November 29, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pm-stack(quota-exporters): parseArgs in cloudflare/meta exporters silently accepts duplicate value flags — last value wins instead of a usage error

0 participants