Repository navigation
fix(catalog): decode Revert Transaction by treating Option as a hidden gate - #96
Open
marcoaperez wants to merge 1 commit into
Open
marcoaperez wants to merge 1 commit into
marcoaperez wants to merge 1 commit into
Conversation
…n gate The SaXML reader refused Revert Transaction (emitting a TODO placeholder): Option has no HR label and two unclaimed SaXML booleans (Condition, Error Code) were candidates, so the positional fallback correctly failed loud. Model it like Fine-Tune Model.Option instead: Option becomes an hrHidden boolean and Condition / ErrorCode / ErrorMessage declare visibleWhen Option=True. The reader skips the gate and the emitter derives its state from whether a gated calc carries a value (aa75b34), so no step-specific decoder is needed. - revert-transaction.xml moves from saxml_unsupported/ to saxml/ with a golden - XML -> HR no longer renders an "On" token: FileMaker's HR for this step has none, and the catalog hrSignature already omits it - Python and web viewer goldens updated for that one entry Verified: test_catalog_*, test_converter_conformance (Python) and vitest pass except Insert Text, which fails identically on an untouched upstream/main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
The SaXML → fmxmlsnippet reader refuses Revert Transaction and emits a TODO placeholder.
Optionhas no HR label and two unclaimed SaXML booleans (Condition,Error Code) are candidates for it, so the positional fallback correctly fails loud. The XML → HR direction also renders anOntoken that FileMaker never shows for this step.Fix (catalog only)
Model the step like
Fine-Tune Model'sOption:Optionbecomes anhrHiddenboolean.Condition,ErrorCodeandErrorMessagedeclarevisibleWhen: Option=True.The reader skips the hidden gate, and the emitter derives its state from whether a gated calculation carries a value (aa75b34), so no step-specific decoder is needed.
Why a hidden gate and not a flag in
<Options>11ba8a6 rightly stopped reading
Optionfrom<Boolean type="Condition">and noted that the real Option lives in the step's<Options>integer. Decoding that integer across 616 real Revert Transaction steps (SaXML from FileMaker Pro 26) shows it is a gate, not an independent setting:<Options>0x4000 is set exactly when Condition or Error Code is on, and never on its own. That matches the fmxmlsnippet behaviour: FileMaker drops
Condition/ErrorCodeon paste unless<Option state="True"/>is present. So Option can be derived from the gated calcs, with no dedicated decoder. (The meaning of the single 0x100000 bit is unknown; it appears alongside the normal gate bits.)Changes
agent/catalogs/step-catalog-en.json: theRevert Transactionentry.agent/fixtures/converter/saxml_unsupported/revert-transaction.xml→saxml/, with its golden insaxml-to-snippet.json.agent/fixtures/converter/xml-to-hr.json: HR withoutOn, matching the cataloghrSignature.Verification
Revert Transaction [ Condition: … ; Error Code: … ; Error Message: … ], with noOn, which is exactly what the converter now produces.test_catalog_grammar.pyandtest_catalog_grammar_engine.pypass.pytest agent/scripts/test_converter_conformance.py agent/scripts/test_catalog_emit.py: 11 passed, 2 failed. The same two tests fail identically on an untouchedmain(05e43a3); the conformance failure isinsert-text.xmldrifting, so neither is related to this change.🤖 Generated with Claude Code