Skip to content

Vault reads take in other Libraries (#115) - #146

Merged
jcombs-pointblue merged 2 commits into
masterfrom
vault-other-libraries
Nov 25, 2026
Merged

jcombs-pointblue merged 2 commits into
masterfrom
vault-other-libraries

Conversation

@jcombs-pointblue

@jcombs-pointblue jcombs-pointblue commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #115.

What changes

  • Vault reads take in other Libraries. After the driver set's subtree, VaultDiff.fromVault reads what the set's links name outside it. This covers import-live, Compare, Plan, deploy's own read and capture.
    • A Library outside every driver set: read whole, one level down, with its container entry, as the LDIF import takes it.
    • Another driver set's Library, or any other container: only the linked objects.
    • Objects land in libraries/<alias>/ as read-only references. Compare and deploy still leave them alone (D4).
    • An object that's missing or unreadable is a note naming its DN; the read goes on and that link stays unresolved. An object with one value the server can't return (-325) is read attribute by attribute, as elsewhere.
  • Folder names kept. A read sees only the Libraries its links name, so it could alias one Library where the LDIF import said Library@services. Libraries.adoptAliases gives the read the existing tree's alias per DN, and rewrites artifacts and links to match. import-live over an existing tree and capture use it.
  • LDIF import: a linked object outside the set is taken from any container, not only a Library.
  • Fix (since 0.64.0): deploy's verify now leaves the trace size limit alone without --trace-size-limit, as the plan does. Before, a tree whose limit differed from the vault's made every deploy of that driver end verify: MISMATCH / FAILED. The live check below hit this.
  • Simulator 1.10.0 (DirXMLSimulator#9): the pom, bin/idm, bin/idm.cmd, bin/require-engine.sh, Doctor and docs/install.md now pin 1.10.0. All 1081 tests pass with it.

Tests

  • VaultOtherLibrariesTest (7), against a fake vault:
    • a linked Library outside the set is read whole, with no left-outs and no unresolved links, and deploy writes the link's DN;
    • the read equals an LDIF import of the same objects (ModelDiff empty);
    • an ou container, or another set's Library: only the linked objects;
    • missing and unreadable objects become notes;
    • folder names are adopted from the tree, and a new DN never takes a folder the tree uses for another.
  • DeployerTest.aTraceSizeLimitLeftAloneIsNoVerifyMismatch: fails without the fix.
  • Full suite: 1081 run, 0 failures, 11 skipped.

Live check on idm254 (scratch objects, cleaned up)

  1. Created ou=scratch115,o=system, holding a Library with a policy and an unlinked ECMAScript, and deployed a scratch Loopback driver. Then added the link by LDAP, as a Designer deploy would.
  2. vault.diff showed the drift as libraries/Library/Scratch115-P.
  3. import-live wrote libraries/Library/ with both objects; validate gave no link-unresolved, and vault.diff of that tree gave no differences.
  4. capture-only wrote the as-found branch with libraries/Library/ and the link; validate was clean.
  5. Deploys from the captured tree (link the ECMAScript too, then unlink it) wrote DirXML-Policies with both outside DNs. The outside objects were unchanged, and the second deploy reported verify: vault matches the tree with the fix.
  6. Re-import over a tree whose folder was renamed Lib115: the folder kept its name; git status was clean.
  7. Cleanup: scratch driver removed with --delete-driver, scratch objects deleted. idm254 vs the pre-test import: no differences.

eDirectory refuses a DirXML-Rule directly in an ou (-611 illegal containment), so on a real vault the "other container" case is a Library. The ou case is covered by the unit test only.

Follow-up (web)

Update this branch for some drivers combines the tree's model with the vault's drivers. It should adopt the tree's aliases and bring in Libraries the tree doesn't have yet. That is a small web PR pinning this release.

🤖 Generated with Claude Code

jcombs-pointblue and others added 2 commits November 23, 2026 17:32
A read of the vault (import-live, Compare, Plan, deploy's own read, capture) now
reads the objects the driver set's links name outside it: a Library outside every
driver set whole, another driver set's Library or any other container only what is
linked. They land in libraries/<alias>/ as read-only references, as the LDIF and
Designer imports have them, so a captured tree no longer has unresolved links. An
object that can't be read is a note naming its DN.

A read written over an existing tree keeps the tree's folder name per Library
(Libraries.adoptAliases). The LDIF import takes a linked object from any container.

Also: deploy's verify leaves the trace size limit alone without --trace-size-limit,
as the plan does (a differing limit made the deploy end FAILED since 0.64.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jcombs-pointblue
jcombs-pointblue merged commit 88a76c4 into master Nov 25, 2026
4 checks passed
@jcombs-pointblue
jcombs-pointblue deleted the vault-other-libraries branch November 25, 2026 14:10
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.

Vault reads don't take in objects from Libraries outside the driver set (#111 follow-up)

1 participant