Fix SignWell field placement; add --ordered, test-mode banner, coordinate docs#190
Merged
Conversation
…ntrol Two interlocking bugs dropped or rejected every custom --field placement on SignWell: #2 with_signature_page was hardcoded true, so SignWell discarded the supplied fields and auto-placed its own (silently). It is now off whenever custom fields are present. #3 fields were nested under files[].fields, but SignWell requires a top-level 2-D `fields` array (one inner array per file). They now go top-level. With both fixed, placements reach SignWell instead of being silently dropped (or, with only #2, rejected with `recipients.with_no_fields`). Also adds an optional applySigningOrder to the SignWell send/template inputs (consumed by the new --ordered CLI flag): when set it drives apply_signing_order directly, otherwise it defaults to sequential for 2+ signers as before. Adds a payload-level regression test (fetch intercept) asserting the 2-D shape, that fields are not nested under files[], and that with_signature_page toggles correctly with/without custom fields — the coverage gap that let this ship. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Carries the optional applySigningOrder from sendSigningRequest and sendEmbeddedSigningRequest down to the SignWell provider send / sendEmbedded / sendFromTemplate / sendFromTemplateEmbedded calls, so the new --ordered flag can request parallel/unordered signing. Undefined preserves the prior default (sequential when 2+ signers); other providers ignore it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
node:sqlite emits "ExperimentalWarning: SQLite is an experimental feature ..." to stderr on load, polluting otherwise machine-readable output. A static ESM import loads the builtin during module linking — before any user code can filter it — so db.ts now loads node:sqlite lazily via require(), and a new silence-warnings module (imported first in cli.ts) filters only ExperimentalWarning through process.emitWarning. Set SIGN_SHOW_WARNINGS=1 to restore the warning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- --ordered true|false on request send / run-email / send-embedded, wired to SignWell apply_signing_order (#5). Default unchanged (sequential for 2+ signers). - Loud stderr banner whenever a SignWell send runs in test mode (#4). Test mode stays the default (non-binding, watermarked) but is no longer silent; the banner points at --test-mode false. Suppressed when test mode is off. - `sign mcp --help` now lists subcommands (mcp serve / mcp tools) instead of erroring with "No help entry for mcp"; the prefix fallback applies to any parent command. - --field help now documents width/height, the full type: set, and the 0-based doc vs 1-based page/signer indexing, pointing at docs/field-coordinates.md. Send commands document --ordered and --test-mode. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…helper Adds docs/field-coordinates.md describing the --field grammar, the 1-based page/signer vs 0-based doc indexing, and the top-left origin every provider expects. Ships bottomLeftToTopLeft() to convert pdfjs/bottom-left detector coordinates to provider space (with a unit test), closing the undocumented mapping that landed signatures in body text (#6). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…anner Bumps package.json / SIGN_CLI_VERSION / server.json to 0.8.0 and records the 0.8.0 CHANGELOG section: SignWell custom-field placement fixes (#2/#3), --ordered signing control (#5), the test-mode safety banner (#4), the field coordinate contract + helper (#6), and polish (mcp --help, --field help, ExperimentalWarning suppression). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
291511e to
74f0930
Compare
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.
Addresses field feedback against
@drbaher/sign-cli(NDA send to 3 signers via SignWell, MCP + CLI). Each item was confirmed against the source.🔴 Critical — SignWell custom field placements
with_signature_pagewas hardcodedtrue, which makes SignWell discard supplied fields and auto-place its own. Nowfalsewhenever custom fields are present.files[].fields; SignWell requires a top-level 2-Dfieldsarray (one inner array per file). Now sent top-level. With both, placements reach SignWell instead of being dropped (or rejected withrecipients.with_no_fields).files[], and correctwith_signature_pagetoggling — the coverage gap that let this ship.🟡 Design
--test-mode false.--ordered true|falseonrequest send/run-email/send-embedded, wired to SignWellapply_signing_order. Default unchanged (sequential for 2+ signers).docs/field-coordinates.mddocuments per-provider coordinate space + the 0-baseddocvs 1-basedpage/signerindexing, plus a testedbottomLeftToTopLeft()helper to convert pdfjs/bottom-left detector output.🟢 Polish
sign mcp --helplists subcommands instead of erroring (generalizes to any parent command).--fieldhelp documentswidth/height, the fulltype:set, and the indexing quirk.ExperimentalWarning: SQLitefiltered from stderr (lazynode:sqliteload;SIGN_SHOW_WARNINGS=1restores it).Not included (different repo)
contract-ops-mcpbin won't start via symlink. Lives in thecontract-opsrepo; fix is a main-module guard that breaks through the npm bin symlink (resolve realpath before the guard / make the bin entry unconditional + a smoke test on the resolved bin).Tests
524 tests, 522 pass, 1 skipped, 1 fail. The single failure (Cannot find module 'pg'instorage.js) is a pre-existing local env gap (pgoptional dep not installed) — identical on the clean tree, and none of the postgres code was touched.Note for reviewer
Local package version is
0.5.0but the field report is against published0.7.1— worth confirming this branch is the right base, and a version bump before release.🤖 Generated with Claude Code