Skip to content

feat(datastore,tree): mutate-on-write leaf handling - #567

Draft
steiler wants to merge 7 commits into
mainfrom
feat/schema-mutate-on-write
Draft

steiler wants to merge 7 commits into
mainfrom
feat/schema-mutate-on-write

Conversation

@steiler

@steiler steiler commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Implements the mutate-on-write leaf handling stack for #550, tickets 01 to 06 in .scratch/mutate-on-write-leaves/INDEX.md.

Summary

  • Schema: mutate_on_write YANG classification and schema flag (01).
  • Post-Set targeted readback and confirmed-baseline convergence for TransactionSet (02).
  • Out-of-band drift revert readback, multi-intent failover, and transaction rollback (03).
  • Causal passive sync fallback and slow-sync race guard (04).
  • Crypt/cipher prefix discovery for unannotated string secrets (05).
  • Cold-start and PreviouslyApplied baseline seeding for Non-revertive intents (06):
    • Immediate seeding when Running is already populated, deferred seeding via awaitingInitialSyncSeed otherwise.
    • One-shot cold-start seeding from pre-existing Non-revertive intents in cacheClient, without writing back.
    • ApplyInitialSync records initial-sync coverage atomically with the merge.
    • Rollback restores untouched Non-revertive baselines and reverts unconfirmed path learning.
    • Validation-scoped crypt overlay so PreviouslyApplied validation skips over-length Running hashes without mutating state.

Baselines are in-memory only (ADR 0004). Nothing is persisted in tree_persist.proto.

Testing

  • golangci-lint run ./... clean.
  • go vet ./... clean.
  • go test -race -count=1 ./... passing.

Draft: review and CI not yet run on this branch.

Dependencies

go.mod pins sibling commits instead of local ../ replaces, so the branch builds from a clean clone:

Merge order: sdc-protos#144, then schema-server#264, then this PR. The pseudo-versions in go.mod should be replaced with tagged releases before this PR leaves draft.

Wire updated sdc-protos and schema-server local module replacements and verify SchemaElem.IsMutateOnWrite() through the local schema client for #550.

Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
…or TransactionSet

Capture targeted post-Set CONFIG readbacks for schema-flagged mutate-on-write leaves strictly in memory as confirmed applied values keyed by canonical path, winning owner, and intended value, update Running with the target readback value, and evaluate tree running-equality diffing, NOT_APPLIED deviations, and BlameConfig against that baseline while preserving authored values on northbound reads and validation for #550.

Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
… cold start and recovery

Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
Drop the local ../sdc-protos and ../schema-server replaces so the module
builds from a clean clone. Require sdc-protos at fe084f2516a8 and
schema-server at 1476e1424a8b, the draft branch commits in
sdcio/sdc-protos#144 and sdcio/schema-server#264.

Signed-off-by: Markus Vahlenkamp <markus.vahlenkamp@nokia.com>
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant