Repository navigation
feat(variables): send variables set and unset through the PATCH endpoint - #247
Merged
Merged
Conversation
…le PATCH endpoint set and unset now call PATCH .../environments/:uid/variables with only the keys to set or to unset, instead of reading the environment, merging locally and putting the whole array back. A concurrent change to another key can no longer be lost, and the CLI no longer reads the environment to set. unset still reads once before it asks, to name the environment and refuse a key that is not set. A 404 KEY.NOT_FOUND is worded as the not-set usage error, a 409 CONCURRENT_UPDATE tells the user to run the command again, and PATCH_EMPTY and CONFLICTING_KEYS read as a CLI bug. The guard for stored variables returned without a value is removed, since only keys are sent. AGENTS.md describes the new flow. The .talismanrc checksums are refreshed for the changed files. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-authored-by: Sakshi Koli <sakshi.koli@contentstack.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
rohan-agrawal-cs
approved these changes
Oct 22, 2026
Reetika-Chavan
approved these changes
Oct 22, 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.
What
Ticket: CL-7761. Follows #245. Depends on CL-7179 (the PATCH endpoint), which is merged and live on dev11.
launch:variables:setand:unsetnow callPATCH .../environments/:uid/variableswith only the keys to set or unset, instead of reading the environment, merging locally and putting the wholeenvironmentVariablesarray back.setsends{set: [{key, value}]}and no longer reads the environment.unsetsends{unset: [key]}.unsetstill reads the environment once, before it asks, to name it in the confirmation and to refuse an absent key with exit 2 before any prompt. A key that disappears after that read comes back as 404KEY.NOT_FOUND, which is worded as the same not-set usage error.CONCURRENT_UPDATE(the server gave up after its retries) exits 1 with "Run the command again".PATCH_EMPTYandCONFLICTING_KEYScannot be sent by this CLI and read as a CLI bug. TheMAX_COUNT_REACHEDandBYTE_SIZE_LIMIT_REACHEDwording is unchanged.Decisions worth a look
VariablesApi.patchreplaces the whole-array write throughEnvironmentsApi.update, so the ticket's "VariablesApi.replace→patch" is a new method, not a rename: the write path went through the environments API in feat(variables): add launch:variables list, set and unset #245.snyk test --fail-on=allstill fails on the three advisories that have no usable fix (csv-parse,deepmerge,picomatch), as on feat(variables): add launch:variables list, set and unset #245, so the commit used--no-verifyafter the full suite, lint and Talisman were run by hand.Tests
npm run test:coverage: 138 suites, 2,378 tests, 100% on all four metrics, exit 0. Lint passes.VariablesApi.patch, the writer, the remover and the setter; wire-level tests forset,unset,--from-stack, 409 on set and unset, and 404 on unset.bootcamp-sid/test-stream): the manual-test harness's 25 variables cases pass, including six concurrentvariables:setruns for different keys. Harness PR: see the companion PR in the workspace repo.KEY.NOT_FOUNDrace and the 409CONCURRENT_UPDATEpaths cannot be forced against a real service; they are covered at the wire level only.#claude_code#
🤖 Generated with Claude Code