fix(jobs): explain missing positional arguments (WBC-266) - #36
Merged
Merged
Conversation
Member
Author
|
@salty-hambot review |
There was a problem hiding this comment.
Reviewed by Salty Hambot 🤖🧂 — rubric mode
Verdict: ✅ pass
| Dimension | Verdict | Notes |
|---|---|---|
| correctness | ✅ pass | Arg validation refactor is sound; UseLine() correctly emits [flags], tests confirm behavior. |
| security | ✅ pass | No auth, injection, or secret-handling changes in the touched paths. |
| privacy | ✅ pass | No PII or data handling introduced; only CLI arg-validation error text. |
| reliability | ✅ pass | Validator handles missing, blank, and extra-arg cases deterministically. |
| scalability | ✅ pass | N/A — pure CLI argument parsing, no scaling surface. |
| observability | ✅ pass | Error messages are more actionable now (usage + example + help hint). |
| clarity/maintainability | ✅ pass | Consolidates three duplicated inline checks into one reusable helper — a net readability win. |
| test quality | ✅ pass | Table-driven TestJobsArgumentErrors covers all three commands x missing/blank/extra cases with usage-line assertions. |
Clean, well-tested refactor that swaps ad-hoc arg checks for a shared validator with actionable usage hints. Reviewer B's 'missing [flags]' scare is a false alarm — Cobra's UseLine() adds [flags] automatically when the command has flags, which all three do. Ship it.
0 finding(s) posted · 1 filtered as false positives.
💰 Review cost: $2.6400 · 794.1k in / 6.1k out tokens · ⏱️ 1m49.1s
💬 To request a re-review, comment @salty-hambot review
ClayMav
marked this pull request as ready for review
September 8, 2026 22:01
sfishel18
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Missing job-run arguments only reported a count, leaving users to guess what to supply. Create, logs, and metrics now name the required argument and show usage, an example, and a help command. Blank and extra arguments receive the same guidance.
Fixes WBC-266.
Verification
make fmt,make test,make build, andgit diff --checkpassed.job-runs logs run-123 --dry-runandjob-runs logs --helpexited 0. Only the local spec endpoint received a request.52045e4with no findings and reran the argument-error and successful-creation tests; both passed.Authored with GPT-6 in the Codex harness.