Repository navigation
Compare two projects and promote differences (R1) - #95
Merged
Merged
Conversation
For teams that keep a tree per environment: tree.compare lines up two trees through the pair's map (promotions/<source>.properties) and sorts each differing file and value by the promotion record into pending, the target's own, both changed, known or unchanged. promote.plan/apply copy chosen files into the target, keep its values unless named, validate the result and refuse a file whose manifest wasn't promoted with it. promote.pair takes the first record; promote.accept/forget handle known differences. docs/promotion.md. 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.
Phase R1 of project-per-environment.md (DirXMLDevWeb #169, decided 2026-10-26): the core half, usable from the CLI. User reference:
docs/promotion.md.What's in it
tree.compare <target> --with <source>promotions/<source>.properties(the overrides file's form). The driver set's name and DN, and each driver's DN, are always the target's.EnvironmentCompare.valueslists is emptied on both sides), so a value that differs never makes its file look changed. Values are compared on their own, key by key.EnvironmentCompare.matches).promotions/<source>.json: per file and per value, a fingerprint of each side at the last promotion or pairing.promote.plan/promote.apply--objecttakes a file or a directory;--pending;--contentstakes a file merged line by line, which R2 will use.--value. A file's package baseline goes with it.driver.xmlwasn't promoted with it, or a removal whose manifest still lists it;--force).Promoted-from: <source>@<commit>.promote.pairtakes the first record.promote.acceptandpromote.forgethandlepromotions/<source>.known.json.DriverSet.nameis no longer final, so a source can take the target's identity.EnvironmentCompare.valuesandmatchesandModelDiff.textDiffare now public.textDiff's Javadoc also corrected: it returns every line, not only the changed ones.Not in R1
promote.applywrites the tree in place.cases/, MCP tools: R3.Testing
PromoteTest(8 tests): QA and production as separate trees, with a renamed driver, a mapped server, another driver-set DN and a value that differs. Covers:mvn -o clean installpasses, 963 tests (11 skipped).-Pidm.portable testandbin/ci-portable.shpass (71).bin/idm: the synthetic fixture imported asacme-prod/treeandacme-qa/tree, then pair, change both, compare, plan, apply, accept. The policy came over, production kept its own GCV value, and the accepted value then counted as known.🤖 Generated with Claude Code