Skip to content

fix(environments): one error line per failure, an org check on the project, and FileUpload-aware env output - #248

Merged
SakshiKoli-CS merged 1 commit into
v2-devfrom
cl-7168
Oct 22, 2026
Merged

SakshiKoli-CS merged 1 commit into
v2-devfrom
cl-7168

Conversation

@SakshiKoli-CS

Copy link
Copy Markdown
Contributor

What

Ticket: CL-7168

  • One error line per failure. Every failure prints a single error: <message> line on stderr, as V1 did, instead of oclif's Error: block (src/core/failure.ts). LaunchCommand, RetiredCommand and launch:functions:serve report through it, and bin/run.js / bin/dev.js use it as the last handler, so an unknown command gets the same line. reportFailure passes through an error it has already printed, which fixes the doubled line the manual harness caught on every failing env command.
  • Org check on the project. A project UID given by flag or config must belong to the selected organization: No project with UID "…" found in this organization. A project picked at the prompt is not looked up again.
  • FileUpload-aware env output. launch:env:list drops the BRANCH column, and launch:env:get the BRANCH row, for FileUpload projects.
  • Labels. ENVIRONMENT UID, ORGANIZATION UID and PROJECT UID (env get/list, project list); the env:update checklist asks "Select the fields to update:"; "No records found." is yellow on a terminal.
  • Housekeeping. eslint.config.mjs gives bin/*.js its Node globals so lint-staged accepts the bins. The .talismanrc checksums are refreshed for changed files whose flags are fake sequential test uids or generic patterns, not credentials.

Notes (low, not addressed here):

  • The error line's colour follows stdout's TTY rather than stderr's.
  • env:get / env:list fetch the project twice (once for the ownership check, once for its type).

Tests

  • npm test: 139 suites / 2404 tests pass, including new failure.test.ts cases for the already-reported pass-through. npm run lint is clean.
  • The manual acceptance harness ran live against dev11, with LAUNCH_LIFECYCLE and LAUNCH_INTERACTIVE on. env create/get/list/update/delete, password protection, the checklist and decline-delete all pass, and the error cases print exactly one line. The harness updates go to the workspace repo separately.

#claude_code#
🤖 Generated with Claude Code

@SakshiKoli-CS
SakshiKoli-CS requested a review from a team as a code owner October 22, 2026 09:02
@snyk-io

snyk-io Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 9 25 ✅ Passed
🟡 Medium Severity 0 3 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@SakshiKoli-CS SakshiKoli-CS changed the title fix(environments): one error line per failure, an org check on the project, and FileUpload-aware env output (+Claude) fix(environments): one error line per failure, an org check on the project, and FileUpload-aware env output Oct 22, 2026
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 9 25 ✅ Passed
🟡 Medium Severity 0 3 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

…oject, and FileUpload-aware env output

Errors
- Every failure prints a single `error: <message>` line on stderr, as V1 did, instead of
  oclif's `Error:` block (src/core/failure.ts). LaunchCommand, RetiredCommand and
  launch:functions:serve report through it, and bin/run.js and bin/dev.js use it as the
  last handler so an unknown command gets the same line.
- reportFailure passes through an error it has already printed (skipOclifErrorHandling),
  so the bin's handler no longer prints the line a second time. The manual harness caught
  the doubled line on every failing env command.
- eslint.config.mjs gives bin/*.js its Node globals, and the bins drop disable comments for
  rules this config does not load, so lint-staged accepts them.

Project resolution
- A project uid given by flag or config must belong to the selected organization;
  otherwise the command stops with `No project with UID "…" found in this organization.`
  A project picked at the prompt is already scoped, so it is not looked up again.

Environment and project output
- launch:env:list drops the BRANCH column, and launch:env:get the BRANCH row, for a
  FileUpload project (the project is fetched alongside the environment).
- env:get rows read ORGANIZATION UID and PROJECT UID; the project list column reads
  PROJECT UID.
- The env:update checklist asks "Select the fields to update:", and "No records found."
  is yellow on a terminal.

Tests
- test/support/project-ownership.ts mocks the ownership lookup; the integration suites,
  including the variables suites merged from v2-dev, register it.
- .talismanrc checksums refreshed for the test files Talisman flags by name (`env`) or by
  the word "pass" in a test title; none holds a credential.

#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Harshi Shah <harshi.shah@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 9 25 ✅ Passed
🟡 Medium Severity 0 3 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ 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:

  • Critical without fixes: 0
  • High without fixes: 9
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@SakshiKoli-CS
SakshiKoli-CS merged commit a39900d into v2-dev Oct 22, 2026
7 checks passed
@SakshiKoli-CS
SakshiKoli-CS deleted the cl-7168 branch October 22, 2026 09:36
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.

3 participants