Repository navigation
Check native adjustment ranges before dispatch, using measured bounds - #60
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generator fails when the table's build differs from the sdef build, names a field that is not a writable real or integer field in its scope, or gives an integer field non-integral bounds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
native_set rejects a value outside a field's measured range with invalidRequest before any read, dispatch or journal entry, and the patch schema publishes the same minimum and maximum. This replaces the hard-coded opacity and distortion map and the tonal registry loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live probe on the qualification fixture accepts layer opacity 0 and lens distortion 120, and rejects -1, 101 and 120.01. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/probe-native-bounds.py writes each bound and just past it through guarded direct AppleScript on an owned Session's variant, restores the original, classifies each bound, and keeps JSON evidence. The offline test covers the classification and runs in make check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #47.
native_setnow rejects an out-of-range numeric value withinvalidRequestnaming the range, for exampleNative level highlight rgb must be within 0...255., before any read, dispatch or journal entry. Before this change onlyopacity,distortionand the tonal FieldSpec fields were checked; everything else reached Capture One, whose own messages name the wrong limit (256fails with "above 1") and which silently clamps color balance hue 361 to 360.What changed
sdef/16.8.5.30.native-bounds.jsonholds 70 bounds with their source and build: 68adjustmentsfields from byjustinjones/capture-one-mcp's bisection (cfb4e42, MIT), rounded to the intended limits, pluslayer.opacityandlens.distortion.scripts/generate-native-editing.pycopies them intoNativeEditing.jsonasminimum/maximum. It fails on a build mismatch, a name that is not a writable real/integer field, non-integral integer bounds, or an empty range.NativeEditing.validatereads the field's own bounds. The hard-codedopacity/distortionmap and theFieldRegistryloop are gone.patchSchemapublishesminimum/maximum.scripts/probe-native-bounds.pyconfirms the table live on an owned disposable Session through direct AppleScript, at each bound and one step past it.docs/reference/native-editing.mdhas a "Numeric bounds" table.Behavior changes to review
opacitywidens from 1...100 to 0...100, anddistortionfrom 0...100 to 0...120. Both were measured live: 0 opacity and 120 distortion read back exactly, while 101 / -1 and 121 / -1 are rejected. The old ranges had no recorded rationale.patchSchema, so an out-of-range recipe value now fails schema validation with the generic "Expected number" message.RecipeFakenow reports each field's minimum instead of 0, since 0 is out of range forsharpening radiusandmoire pattern.Live verification (Capture One 16.8.5.30, owned disposable fixtures)
probe-native-bounds.pyon the final table: 0 mismatched of 70. Every past-bound write errors and leaves the bound in place, except the fourcolor balance * huefields, which accept -1 and 361 silently and read back 360 (confirmed-clamped). c1 now rejects those values before dispatch. Temperature reads back 13999.999 at 14000 and tint 49.99999 at 50, inside the 0.1 / 0.01 readback tolerances. The first probe run found the table's originalopacity[1, 100] anddistortion[0, 100] wrong; both were corrected and reconfirmed.make qualify QUALIFY_SUITES=native: passed (1267 s).make check: passed.Fault cases were not run: the check runs before the journal write and dispatch, so recovery behavior is unchanged.
🤖 Generated with Claude Code