Skip to content

fix(cli): keep --slides value from eating input and validate it - #488

Merged
steipete merged 2 commits into
steipete:mainfrom
vincent-peng:fix/slides-flag-value-parsing
Sep 24, 2026
Merged

steipete merged 2 commits into
steipete:mainfrom
vincent-peng:fix/slides-flag-value-parsing

Conversation

@vincent-peng

@vincent-peng vincent-peng commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Bare --slides could consume the following URL or media filename as its optional value, leaving the CLI with no input. Invalid slide options could also be ignored or escape the daemon request parser instead of returning HTTP 400.

This shares positional-input normalization with --diarize, validates supplied slide options before deciding whether extraction is enabled, and maps invalid daemon options to HTTP 400. Validation also runs when OCR tooling is unavailable. Existing stored-config tolerance, explicit boolean words, negated flags, and the -- separator are preserved.

Validation: the built 0.23.0 CLI reproduced the missing-input failure; four daemon regressions failed before the original fix, and eight additional validation regressions failed before the completion changes. The corrected full Linux gate passed 3,609 tests with 92.07% statement coverage. Independent P0–P2 review passed after the findings were addressed.

Thanks @vincent-peng for the original fix and regression coverage.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 6:23 AM ET / 10:23 UTC (Revision 3).

ClawSweeper review

What this changes

The branch preserves URLs and video filenames after bare --slides, validates slide options, returns HTTP 400 for invalid daemon requests, and updates help, documentation, and regression tests.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix: current main and v0.23.0 still consume an input after bare --slides and ignore unsupported slide booleans. The earlier saved-configuration concern is resolved, and no actionable defect remains in the reviewed patch.

Priority: P2
Reviewed head: eb9b91324ca21b58ca1e6eaa9eda8aea9b074fb4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fix has relevant terminal proof and regression coverage, with no remaining concrete blocker found.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): A previously reviewed built-branch terminal transcript shows the changed CLI entrypoint preserving a URL, rejecting invalid slide values, accepting off, and starting with tolerated saved booleans. The later head extends validation with daemon and parser regressions; live daemon transport was not demonstrated. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): A previously reviewed built-branch terminal transcript shows the changed CLI entrypoint preserving a URL, rejecting invalid slide values, accepting off, and starting with tolerated saved booleans. The later head extends validation with daemon and parser regressions; live daemon transport was not demonstrated. No stored-data contract changes.
Evidence reviewed 7 items Introduced CLI fix: The introduced normalizer converts bare --slides to an explicit true value when a URL or direct media input follows, leaving that input positional.
Validation and daemon response: Slide option parsing now rejects unsupported supplied values before deciding whether extraction is enabled; the daemon parser maps those errors to HTTP 400.
Saved-setting compatibility: The unchanged config loader admits only boolean saved enabled and OCR values, so malformed saved booleans do not reach the new strict parser. Existing CLI precedence tests cover negated flags.
Findings None None.
Security None None.

How this fits together

Summarize turns CLI arguments or daemon requests into slide-extraction settings before processing a video. CLI runs also combine those arguments with saved settings; daemon callers receive validation errors over HTTP.

flowchart TD
  A[CLI arguments] --> B[Preserve video input]
  C[Saved settings] --> D[Resolve slide options]
  B --> D
  E[Daemon request] --> D
  D --> F[Video processing]
  D --> G[CLI error or HTTP 400]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production +45/-29; tests +113/-5 The bounded parsing changes have focused CLI and daemon regression coverage.

Technical review

Best possible solution:

Land the focused parsing and validation fix while keeping saved-setting tolerance and the daemon's confined slide output directory.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main offers --slides an optional value without normalizing a following URL, and its slide boolean parser ignores unsupported strings. This read-only review did not execute the CLI.

Is this the best way to solve the issue?

Yes. The patch extends an established argument-normalization pattern and validates per-run settings while the saved-config filter preserves existing tolerance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d7090d43841a.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The PR repairs a bounded CLI input failure and invalid daemon-request handling.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): A previously reviewed built-branch terminal transcript shows the changed CLI entrypoint preserving a URL, rejecting invalid slide values, accepting off, and starting with tolerated saved booleans. The later head extends validation with daemon and parser regressions; live daemon transport was not demonstrated. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. A previously reviewed built-branch terminal transcript shows the changed CLI entrypoint preserving a URL, rejecting invalid slide values, accepting off, and starting with tolerated saved booleans. The later head extends validation with daemon and parser regressions; live daemon transport was not demonstrated. No stored-data contract changes.

Evidence

What I checked:

  • Introduced CLI fix: The introduced normalizer converts bare --slides to an explicit true value when a URL or direct media input follows, leaving that input positional. (src/run/runner-setup.ts:55, eb9b91324ca2)
  • Validation and daemon response: Slide option parsing now rejects unsupported supplied values before deciding whether extraction is enabled; the daemon parser maps those errors to HTTP 400. (src/slides/settings.ts:84, eb9b91324ca2)
  • Saved-setting compatibility: The unchanged config loader admits only boolean saved enabled and OCR values, so malformed saved booleans do not reach the new strict parser. Existing CLI precedence tests cover negated flags. (src/config/sections.ts:202, d7090d43841a)
  • Main and release still need the fix: The pinned main and v0.23.0 retain the diarization-only normalizer and tolerant slide boolean parser. The changelog places this fix under unreleased 0.23.1. (src/run/runner-setup.ts:13, 7ce8f68b9daa)
  • Prior proof review: The completed review at fix(cli): keep --slides value from eating input and validate it #488 (comment) records a built-branch terminal transcript showing positional URL preservation, invalid-value errors, explicit off handling, and startup with previously tolerated saved booleans. That review covered an earlier head; the later commit extends validation and tests. (45bafb51920b)
  • Feature history: The slide settings and neighboring diarization normalization have prior merged history, including slide-threshold work and the merged direct-media diarization change at feat: diarize direct media inputs #260. (src/run/runner-setup.ts:55, ef48d8e5ec4b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Philipp Berner: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-23T11:51:32.351Z sha a54d181 :: needs real behavior proof before merge. :: [P1] Preserve startup compatibility for existing slide configuration
  • reviewed 2026-09-23T15:51:20.152Z sha 45bafb5 :: needs maintainer review before merge. :: none

@vincent-peng
vincent-peng force-pushed the fix/slides-flag-value-parsing branch from a54d181 to 45bafb5 Compare September 23, 2026 15:41
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 23, 2026
vincent-peng and others added 2 commits September 24, 2026 03:12
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@steipete
steipete force-pushed the fix/slides-flag-value-parsing branch from 45bafb5 to eb9b913 Compare September 24, 2026 10:17
@steipete
steipete merged commit 5e806e2 into steipete:main Sep 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants