Repository navigation
Examine every IdfObject.update entry before applying any - #81
Merged
samuelduchesne merged 3 commits intoOct 21, 2026
Merged
samuelduchesne merged 3 commits into
samuelduchesne merged 3 commits into
Conversation
IdfObject.update applied entries in order through set and threw at the first unknown field, so a group with a misspelled name left the entries before it applied. It now examines the whole group first. An unknown field, name, or a non-array value for the extensible key refuses the group, nothing is written, and one Error lists every refused entry, one per line. An accepted group is applied through set as before, and the object is still returned. This is the shared contract of the Python IDFObject.update (idfkit/idfkit#235), registered as "apply several fields to an object" in the naming register.
The tag carries the register entry for "apply several fields to an object", which IdfObject.update now satisfies. The naming and parity gates pass against it.
update checked that the value for the extensible key was an array but not what it held, so [null] passed examination and reached the accessor after earlier entries had been written. Examination now asks extensibleValueProblem, the accessor's own validator, so a malformed list is refused with nothing written and the reference graph intact, and null still clears the list. update also refuses name in any letter case, opens its message with the heading the Python library uses, and writes through the accessor without checking each field name a second time. The changelog and TSDoc describe the behaviour rather than citing conformance cases that no tag contains yet.
This was referenced Oct 21, 2026
Merged
samuelduchesne
added a commit
that referenced
this pull request
Oct 21, 2026
The level adds the five update cases, the update operation and the post-operation-epjson assertion, and removes the six typescript divergence entries for those cases, which #80 and #81 close. conformance.ts and the EPW sentinel table are regenerated from the new tag; only their recorded level changes. The publication gate's attested level moves with the pin, with the evidence taken at the tag in both languages.
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.
Summary
IdfObject.updateapplied entries in order and threw at the first unknown field, so entries before it were already written. It now examines every entry before applying any, and follows the contract shared with the PythonIDFObject.update(idfkit/idfkit#235, feature 015).Stacked on #80. This pull request targets
fix-extensible-accessor-validation; review #80 first. Once #80 merges, this pull request is retargeted tomain.Behaviour
An entry is refused when:
name, in any letter case (assign thenameproperty instead, which also updates the objects that refer to this one);extensibleValueProblem.If any entry is refused, nothing is written and a plain
Errorlists every refused entry, under the heading the Python library uses:Otherwise every entry is applied in order through the accessor, so reference tracking and change notification are those of consecutive
setcalls. The signature and the returned object (this) are unchanged;nullorundefinedstill clears a field, including the extensible list.Changes
packages/core/src/object.ts:updateexamines, then applies.packages/core/tests/document.test.tsandpackages/core/tests/regressions.test.ts: refusal per reason with the object unchanged, a mixed group listing every entry, equivalence withsetincluding change notifications,[null]refused with the reference graph intact,nullclearing,Namerefused, and the exact heading.packages/core/package.json: governance level raised togovernance-2026.30, the naming-register tag that recordsupdateas an aligned concept, with the return value as the one stated divergence.CHANGELOG.md: entry under Unreleased, Changed.Conformance
The shared cases (
update-*) are in the idfkit-conformance branch015-update-operationand are not yet in a tag. Run against this branch, all update assertions pass, including a case for a malformed extensible list. The conformance pin is raised toconformance-2026.17in a follow-up commit on this pull request once that tag exists; until then, CI runs the corpus at the current pin.Verification
npm run typecheck: passes.npm run format:check: passes.npm test: 920 of 920 tests pass across 35 files.