Repository navigation
fix(lifecycle): refuse lifecycle records with a repeated key at any depth - #99
Merged
Merged
Conversation
- Extend the role-shape product with repeated identity fields in both orders. - Require admission refusal for duplicate keys at each sampled nesting placement.
- Reject every repeated key through the recursive JSON object-pairs hook. - Document unreadable records and manual reconciliation, including equal repeated values.
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.
Rule
The lifecycle verdict reads a run or install record that contains a repeated JSON key at any depth as unreadable, so such a record cannot admit idle or quiescent operation.
Operators see the verdict name the unreadable run or install record and require reconciliation by hand;
start, install andidle_generationrefuse it at their verdict admission. The verdict's row isunreadable-record, unless the process table is unavailable or an active identity cannot be told, in which case the row isunreadable-tableand the record is still named. The runtime's own writer never produces a repeated key. Equal repeated values are refused too.Limit
This changes the verdict's record reader and therefore what consumes the verdict:
status,start,idle_generationand install. Other code still reads the run or install record with the plain JSON reader, which keeps a repeated key's last value:stop,serve,doctor, the start-up steps, the install's fast verification and the real-host gate scripts. They are unchanged here. Movingstoponto the verdict is the next change in this series.Tests
The role-shape model has 2,660 cells: five roles × seven states × two platform flags × nineteen forms × two survivor conditions. Its 840 added cells repeat
pid,createdorexein both orders, including inactive launcher identities; every added cell requires the unreadable verdict and all three consumer refusals.Twelve additional cells cross run/install records, top-level/object/array-object placements and equal/different repeated values, with the same refusal assertions. These three nesting placements sample recursion; they do not exhaust unbounded JSON trees.
Verification: all four focused modules pass (143 tests). The whole suite is green (1,349 discovered; 1,342 run; ten skips and four expected failures). All checks pass, including eleven document-reader tests, 166 profile/route validations and 164 release manifests. Eight reader mutations are killed by checked-in tests.
Closes #98