Repository navigation
Prepare v0.9.1: fix review gaps and stamp the changelog - #152
Merged
Merged
Conversation
resolveRefs shares one seen set across sibling keys, so only the first sibling to reach a shared $ref gets it expanded; later ones keep the bare $ref. Ranging over the map picked that sibling at random, so the same endpoint printed different schemas from run to run. Visit keys in sorted order so the same sibling wins every time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The OpenAPI cache tests set only HOME, but os.UserHomeDir reads USERPROFILE on Windows, so they could write to a developer's real cache. Set both. - The prune test's only subdirectory was non-empty, so dropping the IsDir check went unnoticed. Add an empty one and require it to survive. - The token sweep test now plants expired token-shaped files in the config root and the c1i dir, with the root at 0700 so the trust check doesn't mask a sweep that reaches above tokens/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With HOME unset, or set to a relative path, the docs openapi, endpoints and endpoint commands read and wrote the spec cache under ./.c1i/cache in the working directory. Without an absolute home dir they now fetch the spec and use it directly, touching no cache at all. The test that held the prune off a working-dir cache becomes a test that the working dir is left untouched: nothing read, written or pruned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 200 whose body isn't a spec, such as a captive portal's sign-in page, was written to the cache before anything parsed it, so every docs openapi/endpoints/endpoint call failed for the next 24 hours. The body is now cached only when it parses as YAML with a paths key; otherwise the existing cache is used, however old, or the command fails with an error naming the URL. A read that fails mid-body falls back the same way. The cache is written to a temp file in the same directory and renamed into place, so a reader never sees a partial file. The prune still runs after the rename, so it never removes this process's temp file, and it sweeps one a crash left behind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verified live: after delete, service-principals get still returns the principal with exit 0. No field marks it deleted; its embedded user.status stays ENABLED and only updatedAt changes. users get on the same id shows status DELETED and deletedAt. After revoke, credentials get returns the credential unchanged. Both lists omit them. Say so in the README and in the help for get and credentials get. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The bash completion example wrote to /etc/bash_completion.d, which needs root. Install to the per-user bash-completion directory instead. - docs endpoints --filter also matches an operation's description; its help now says so. - Rewrap an over-long line in agents.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stamp the unreleased entries as 0.9.1. Move the Go 1.27.2 entry under Security and say plainly that v0.9.0 users should upgrade, move the OpenAPI source change under Changed, add an Upgrading from 0.9.0 section for the cache path and the two sweeps, and add entries for this release's fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the fetch fails or returns something that isn't a spec, the docs commands fall back to the cached spec however old it is, which is the point offline, but did so silently. Print one line on stderr naming the cache's age and the failure; stdout is unchanged so pipes keep working. A fresh cache hit stays silent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores a direct test for pruneCacheDir's relative-dir guard, which the replaced test no longer reached. Capitalizes the warning like the rest of the CLI and clamps a future mtime to 0m. agents.md now notes the stale-cache warning and the soft service principal delete and revoke. 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.
Housekeeping before cutting v0.9.1. It fixes the gaps a pre-release review found across everything merged since v0.9.0 (#147–#151), and stamps the changelog.
Fixes
docs endpointoutput is now deterministic. The$refresolver shared one "seen" set across sibling nodes and walked maps in Go's random order, so whichever sibling came first got the expanded schema. 12 runs ofdocs endpoint /api/v1/usersgave 7 different outputs; it now gives 1. Keys are visited in sorted order, and nothing is dropped: a later sibling's bare$refpoints at an expansion earlier in the same output../.c1i/cache/in the working directory.paths. The write is atomic (temp file, then rename), and the leftover-file prune runs only after a successful rename. On an unparseable body or a failed read, c1i falls back to the existing cache.Warning: using cached OpenAPI spec from 3d ago (…). stdout is unchanged. A fresh cache hit stays silent.Docs and help
~/.local/share/bash-completion/completions/c1i. The old path needed root.deleteandcredentials revokeare soft.getandcredentials getstill return the record at exit 0, with no field marking it. Verified live on a lab tenant: the principal'suser.statusstaysENABLED, only the lists omit the record, andusers get <sp-id>shows"status": "DELETED". This is in the README, the help text, andcmd/agents.md.docs endpoints --filter: the help now says it also matches operation descriptions.Tests
c1idir alone;USERPROFILEas well asHOME.CHANGELOG
## [0.9.1] - 2026-10-09, with an empty[Unreleased]above and the link refs updated.~/.c1i/cache/, and the token-file sweep.Verification
go test -count=1 -shuffle=onwith 3 seeds;go mod tidyand gitleaks;docs endpointgive one hash;After merge
v0.9.1.🤖 Generated with Claude Code