test: cover PR #377 preflight refactors and standards CI script#384
Draft
cursor[bot] wants to merge 4 commits into
Draft
test: cover PR #377 preflight refactors and standards CI script#384cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
…ctFn path Add regression tests for recent production fixes where coverage was thin: - GitOps supportedScopes: lock account/org/project declaration on the four scopeOptional resources fixed in #342 and verify account-scope list dispatch omits org/project params; contrast with gitops_application fallback behavior - hasRequiredDiscoveryScope: direct unit tests for account/org/project gating used by execution-summary and pipeline-yaml resources (#325) - HarnessClient: include config-service in x-tenant-id gRPC-proxy coverage (#361) - compactItems: test custom compactFn delegation and openInHarness merge Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
… pipeline-yaml edges Add regression tests for recently merged production paths with thin coverage: - HarnessClient: append API description field on /chaos/ and /loadTest/ errors for both request() and requestStream(); verify non-matching paths stay unchanged; extend requestStream x-tenant-id coverage to schema-service and config-service - templateV1BasePathFromScope: explicit account/org/project paths, legacy inference, validation errors, and URL encoding - pipeline-yaml resource: scopeOptional bypass and pipeline_v1 discovery when HARNESS_PIPELINE_VERSION is v1 Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
- Add docs/coding-standards.md as the canonical architecture guide - Add scripts/check-standards.js and tests/coding-standards/architecture.test.ts - Wire pnpm standards:check into CI alongside build/test/typecheck - Fix ToolsetName union missing knowledge-graph and semantic-layer - Remove HarnessClient imports from sto/ccm toolsets (use narrow interfaces) - Replace idp console.error with structured createLogger Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Add focused regression tests for production changes in the coding-standards PR that lacked direct coverage: - check-standards.js CI script smoke test - CCM cost_perspective.create settings merge preflight via HarnessClientInterface - IDP workflow execute secret redaction and auth token injection - STO exemption create/approve/reject getCurrentUserId() via structural client Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
7 tasks
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.
Summary
Adds focused regression tests for production changes in PR #377 (
chore: add automated coding standards enforcement) that lacked direct behavioral coverage.Risky behavior now covered
scripts/check-standards.jsstandards:checkcost_perspective.createpreflightidp_workflow.executebodyBuilder[REDACTED]in debug logsgetCurrentUserId()viaHarnessClientInterface(no HarnessClient cast)Test files added
tests/coding-standards/check-standards-script.test.ts— CI script smoke testtests/registry/ccm-perspective-preflight.test.ts— CCM settings merge preflighttests/registry/idp-workflow-execute.test.ts— IDP auth injection + log redactiontests/registry/sto-exemption-user-id.test.ts— STO user-ID derivation on create/approve/rejectWhy this reduces regression risk
PR #377 refactored preflight hooks to use the structural
HarnessClientInterfaceinstead of casting toHarnessClient, and moved IDP debug logging from rawconsole.errortocreateLoggerwith explicit redaction. These are high-blast-radius paths (cost perspective defaults, secret handling, exemption approvals) where a regression would either corrupt data or leak credentials. The new tests exercise the refactored code paths with minimal mocks that match the new interface contract.Validation