Skip to content

[TT-16966][TT-16971] fix: backport #7995 — fix tslib and policies schema#8064

Merged
buger merged 1 commit intorelease-5.12.1from
backport/7995-to-5.12.1
Apr 17, 2026
Merged

[TT-16966][TT-16971] fix: backport #7995 — fix tslib and policies schema#8064
buger merged 1 commit intorelease-5.12.1from
backport/7995-to-5.12.1

Conversation

@buger
Copy link
Copy Markdown
Member

@buger buger commented Apr 17, 2026

Summary

Full backport of #7995 to release-5.12.1.

Fixes:

  • Cannot find module 'tslib' error in portman contract tests
  • Policies schema issues

Changes backported:

  • .gitignore: stop ignoring package-lock.json in ci/tests/specs/
  • ci/tests/specs/Taskfile.yml: use npm ci instead of npm install
  • ci/tests/specs/package.json: add tslib as explicit dependency
  • ci/tests/specs/package-lock.json: add lockfile for reproducible builds

Note: user/policy.go changes from #7995 (PostExpiryAction omitzero tag) were intentionally excluded as the PostExpiryAction type does not exist in release-5.12.1.

Test plan

  • CI Tests job passes on this PR

🤖 Generated with Claude Code

Backport of [TT-16966][TT-16971] from master to release-5.12.1.
Fixes `Cannot find module 'tslib'` error in portman contract tests
and policies schema issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@buger buger requested a review from a team as a code owner April 17, 2026 05:01
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 17, 2026

This PR backports a fix from #7995 to resolve a CI failure in the Portman contract tests caused by a missing tslib module.

The changes improve the reliability and reproducibility of the Node.js testing environment located in ci/tests/specs/.

Files Changed Analysis

  • .gitignore: The package-lock.json file for the specs is no longer ignored, allowing it to be committed to ensure reproducible builds.
  • ci/tests/specs/Taskfile.yml: The test execution command was changed from npm install to npm ci. This enforces the use of the lockfile for faster and more reliable dependency installation in the CI environment.
  • ci/tests/specs/package.json: The missing tslib module is added as an explicit dependency, fixing the root cause of the test failure.
  • ci/tests/specs/package-lock.json: A new lockfile was added, which constitutes the majority of the changes in this PR. This file locks the versions of all dependencies to prevent unexpected breakages.

Architecture & Impact Assessment

  • What this PR accomplishes: It fixes a failing CI job related to contract testing and makes the testing environment more robust and deterministic.
  • Key technical changes introduced:
    1. Adds tslib as a dependency to resolve a Cannot find module error.
    2. Introduces package-lock.json into version control for the testing suite.
    3. Switches to npm ci in the test runner to enforce lockfile-based installs.
  • Affected system components: The changes are strictly confined to the CI/CD pipeline, specifically the contract testing stage that uses Portman. There is no impact on the core application's runtime behavior or architecture.

Scope Discovery & Context Expansion

  • The scope of this PR is limited to the test setup within the ci/tests/specs/ directory. It addresses a tooling and dependency issue rather than a bug in the application logic.
  • The PR description notes that changes to user/policy.go from the original PR [TT-16966][TT-16971] Fix ci/tests/specs Error: Cannot find module 'tslib' and policies schema #7995 were intentionally excluded, as the PostExpiryAction type does not exist in the release-5.12.1 branch. This demonstrates a careful backporting process, adapting the changes for the target release branch.
  • To fully understand the context, a reviewer could inspect the CI configuration files (e.g., in .github/workflows/) to see where the ci/tests/specs/Taskfile.yml is invoked, confirming which workflows benefit from this fix.
Metadata
  • Review Effort: 1 / 5
  • Primary Label: bug

Powered by Visor from Probelabs

Last updated: 2026-04-17T05:02:30.911Z | Triggered by: pr_opened | Commit: 784f3f0

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Apr 17, 2026

✅ Security Check Passed

No security issues found – changes LGTM.

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

✅ Performance Check Passed

No performance issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2026-04-17T05:02:27.148Z | Triggered by: pr_opened | Commit: 784f3f0

💡 TIP: You can chat with Visor using /visor ask <your question>

@github-actions
Copy link
Copy Markdown
Contributor

API Changes

no api changes detected

@buger buger changed the title fix: backport #7995 — fix tslib and policies schema [TT-16966][TT-16971] fix: backport #7995 — fix tslib and policies schema Apr 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: 784f3f0
Failed at: 2026-04-17 05:07:58 UTC

The Jira linter failed to validate your PR. Please check the error details below:

🔍 Click to view error details
failed to validate branch and PR title rules: neither branch name 'backport/7995-to-5.12.1' nor PR title 'fix: backport #7995 — fix tslib and policies schema' contains a valid Jira ticket ID (e.g., ABC-123)

Next Steps

  • Ensure your branch name contains a valid Jira ticket ID (e.g., ABC-123)
  • Verify your PR title matches the branch's Jira ticket ID
  • Check that the Jira ticket exists and is accessible

This comment will be automatically deleted once the linter passes.

@buger buger merged commit 481a9a4 into release-5.12.1 Apr 17, 2026
13 of 17 checks passed
@buger buger deleted the backport/7995-to-5.12.1 branch April 17, 2026 05:11
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.

1 participant