Repository navigation
v0.3.0 - #2
Merged
Merged
v0.3.0#2
Conversation
natalialuzuriaga
approved these changes
Oct 6, 2026
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.
v0.3.0
Problem
mergeWithpreviously used a shallow spread ({ ...baseline, ...existing, ...observed, ...derived }), which caused nested objects to be replaced wholesale. For example, an observedpermissions.usageTypecould overwrite a manually setpermissions.licenses. Observed values also always replaced manual edits, so fields likenamewere lost on subsequent runs (DSACMS/automated-codejson-generator#31). In addition, observed fields not defined by the active profile, such asrepositoryHoston neutral, could leak into the output.Solution
This release replaces the shallow merge with policy-based recursive merging.
mergeWithnow filters observed data throughfilterValidFields, dropping unknown fields, and a newmergeValuefunction applies rules based on each field's dotted path. Observed values take precedence for fields such asrepositoryURL,repositoryVisibility,laborHours,reuseFrequency.forks, and repository dates.tagsandreusedCodeare unioned, with reused-code entries deduplicated case-insensitively byURLorname. For all other fields, existing manual values are preserved and detected values only fill fields considered unset (undefined,null, or equal to the baseline default).Result
Manual edits now survive repeated runs at any nesting depth. Fields such as
nameanddescriptionretain manual values unless blank, while tags and dependencies are unioned instead of replaced. Deleted detected tags or dependencies are restored on the next run, and baseline values such asmaturityModelTier: 0are treated as unset so detection can update them.Test Plan
Testing includes
bun install && bun test && bun run typecheck && bun run lint && bun run build, with 73 tests passing.