Field-level drift — shares/users/groups (#57)#6
Merged
Conversation
The reconciler now diffs field values on existing resources, not just existence — emitting a Modify action when managed fields drift. - Reads current state via --get / --descget (GetFields parser handles both the dotted `synoshare` and colon `synouser` "label [value]" formats). - Managed fields: share/group Description, user FullName/Email. Setters: synoshare --setdesc, synogroup --descset, synouser --modify. expired is preserved (not modelled); empty/null spec fields are UNMANAGED (no clobber). - ActionKind.Modify (+ "~ modify" render). - 7 new reconciler tests (drift / no-drift / unmanaged / preserve-email). Verified live, read-only (2026-05-31): plan showed `users` group in-sync and `web` share desc drift with the exact --setdesc command — zero mutation. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
The reconciler now does existence + field reconciliation: on an existing+desired resource it diffs field values and emits a Modify action when managed fields drift (previously existence-only).
What
synoshare --get/synouser --get/synogroup --descget. NewGetFieldsparser handles both the dotted (Comment ....[x]) and colon (User Mail : [x])label [value]formats.Description, userFullName/Email. Setters:synoshare --setdesc,synogroup --descset,synouser --modify.expiredis preserved (not modelled in the spec).ActionKind.Modify(+~ modifyrender line showingold → new).Verified live (read-only, zero mutation)
Still parked
List-valued fields (share ACLs, group membership) and NFS (
synowebapi) — later phases.🤖 Generated with Claude Code