Repository navigation
feat(config-manager): agent files are written in the plain shape (record 0054) - #1358
Merged
Merged
Conversation
A property that is set on the object becomes its plain value; an unset, an inherited and a null property are left out; the input is not changed. The single read and the list read of AM give the same result. Not used yet. Refs #1355 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The shared agent-kind pull (issuers, CIMD profiles, software publishers), the generic pull oauth2-agents and the OAuth2 client file of an application write a property that is set as its value and leave out unset, inherited and null ones. An overrides file written for the wrapped files still works. The CIMD kind goes back to the one list request per realm. Push is not changed. Refs #1355 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The override examples of the three kinds show plain values, the help says an override in the wrapped form of the first 5.0.0 prereleases still works, and MIGRATION.md has one entry for the plain shape instead of three sentences that said the files stay wrapped. Refs #1355 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…of a wrapper Refs #1355 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…shape function The test replaces every relative import of the module under test with a spy, except pure helpers; the function that writes an agent in the plain shape is one, and the generic pull needs its result. Found by the whole suite. Refs #1355 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 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.
Part of #1355 (the live round trip on a tenant stays on the issue, and so does the question about groups below).
Summary
Implements rule 6 of record 0054: every writer of agent files writes a property that is set on the object as its plain value, and leaves out a property that is unset, inherited or
null. The committed example files are 4331 lines wrapped and 1748 plain. Push is not changed.toPlainShapeinsrc/ops/AgentFileShape.ts(no imports, so that the generic kind of the deprecatedsrc/configManagerOps/layer and the tests that mock the library can use it), re-exported fromsrc/ops/ConfigManagerAgentKind.ts, which is where the record puts it. It does not change its input, recognises a wrapper only by its exact shape (an object with onlyinheritedandvaluemembers and a booleaninherited), recurses into a value it keeps, and counts what it left out.oauth-issuers,oauth-cimd-profiles,oauth-software-publishers), the genericpull oauth2-agents, and the OAuth2 client file ofpull applications.git grep "realm-config/agents"found no other writer;config-manager migrate applicationsonly finds and removes files.nullfor what is not set, and after the function the list item equals the read by id (checked on the library's recordings of two real profiles, one with an unusual id; frodo-lib#1113 is closed as not needed). Record 0054 speaks of the single read; for this kind the list item gives the identical file.{ "value": ... }counts as a wrapper and anullthat a person wrote is kept), so an overrides file written for the wrapped files of the first 5.0.0 prereleases still works. The help examples now show plain values.MIGRATION.mdhas one entry for the plain shape (a tree written before changes once on the next pull) and the three sentences of config-manager: oauth2-agents leaves CIMD profiles and trusted JWT issuers to their own kinds #1348, fix: config-manager pull oauth-cimd-profiles writes the wrapped shape like the other agent kinds #1353 and feat(config-manager): a kind of its own for software publishers (oauth-software-publishers) #1354 that said the files stay wrapped are gone.Commits
feat: one function writes an agent object in the plain shape: the function and its 23 tests.feat: config-manager writes agent files in the plain shape: the four writers, the CIMD list read, the tests that changed with them, and the three e2e snapshot files.docs: the help examples and MIGRATION say that agent files are plain.refactor: one condition ...and 5.test: the failure contract of pull oauth2-agents ...(found by the whole suite: that test spies every import of the module under test except pure helpers).Decisions taken (maintainer: change on review)
{}(see the question below). Reversible: one line in the function.nullelement of an array stays (a position means something); a wrapper element is left out.nullcounts as unset for a pulled object and for the generic and kind pulls, but not in an overrides entry.pull oauth2-agentsrun), not one per object.test/e2e/exports/fr-config-manager/stay wrapped on purpose: they are inputs that show a push accepts both shapes.Verification
npm run check: exit 0, 0 errors, the same 8 warnings asmain.npx tsc --noEmit: exit 0.npm run test:guidance: 3 suites, 693 tests.ConnectionPageRealmRow.pty.test.js(a terminal test of the connection page, nothing to do with agent files), which passed alone on this tree (18 of 18); the same test failed under machine load for another branch's run. The first whole run, before the last commit, had found 2 failures inBulkConfigManagerRealmConfigFailures.test.js(it spies every import of the module under test except pure helpers); commit 5 fixes that, and its first run is the proof that the exception is needed.config-manager-pull-oauth2-agents,config-manager-pull-allandconfig-manager-pull-trusted-jwt-issuers, 1085 did not. I did not update them blindly: a script written for this (independent of the TypeScript function) checks that each changed entry equals the old entry with the wrappers removed and nothing else, and it reports 46 explained, 0 not explained; it fails on a copy that I changed by hand. No recording was edited.inherited; changes its input; reads a pulled{ value }as a wrapper; drops the null that a person wrote in overrides, or a null array element; does not count a null; the shared pull, the generic pull or the application kind forgets the function; overrides not read as values (shared and generic); push changes the shape of a file; the CIMD kind reads by id again; the verbose count not said, or taken for objects that were not written.What the maintainer must see
{}and not removed. Whether AM's replace-style write needs the group object, or accepts it missing, is not proven without a tenant. The round trip (pull, push to a clean realm, pull again, no diff) for each of the four kinds and one generic type, as config-manager: write agent files without the { inherited, value } wrapper (60 percent fewer lines in the committed samples) #1355 says, settles it.inherited: trueis not in any committed sample, so what a real agent-group member looks like is untested.nullalways means unset for the types of the generic route is known for CIMD profiles (recordings) and expected for the others.🤖 Generated with Claude Code