feat(TE-22637): add threshold flags to upload-pdf - #562
Open
shrinishLT wants to merge 1 commit into
Open
Conversation
--approvalThreshold and --rejectionThreshold apply to every pdf in the
upload; --thresholds takes inline JSON or a path to a JSON file with
per-pdf overrides keyed by name, e.g.
{"invoice.pdf":{"approval":2,"rejection":5}}.
Values are forwarded as strings and left to the backend to validate
(range, band, unmatched names, use_default_thresholds), so the CLI
surfaces the server's message rather than a second copy of the rules.
A run with none of the flags sends nothing new.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbnKfTzhr64osinPevTmVG
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.
What
Three new options on
upload-pdf:The customer shape this serves: one
upload-pdfper tolerance group with the same--buildName, so every group lands in one project and one build and health stays aggregated in one place.Design
Values are forwarded as strings and the backend validates them (range, band, unmatched names,
use_default_thresholds), so the CLI surfaces the server's message rather than carrying a second copy of the rules."0"survives because it's a non-empty string — an explicit zero must not read as "not set".--thresholdsaccepts a file path as a convenience for a 50-PDF map;fs.existsSyncdecides, everything else is treated as inline JSON.A run with none of the flags appends nothing new to the form — byte-for-byte today's request.
Files
commander/uploadPdf.ts(options) ·types.ts·lib/ctx.ts(mapping) ·tasks/uploadPdfs.ts(file resolution) ·lib/httpClient.ts(form fields) — 19 insertions, no deletions.Verification
tsupbuild succeeds;dist/index.cjscontains the new flags. Notetsc --noEmitfails on the untouchedtsconfig.json(TS5110: module CommonJS vs moduleResolution NodeNext) — pre-existing onstage, unrelated to this change, and not what the project builds with.Server side: LambdatestIncPrivate/smartui-rendering-service#1264 · DES: LambdatestIncPrivate/dotlapse-event-service#2913 · RFC: LambdatestIncPrivate/internal-docs#2963 · Ticket: TE-22637
🤖 Generated with Claude Code
https://claude.ai/code/session_01QbnKfTzhr64osinPevTmVG