Skip to content

Commit f4a3a81

Browse files
authored
Merge pull request #1057 from karrioapi/hotfix-2026.1.27
[patch] 2026.1.27
2 parents 96972ac + 6e8aba5 commit f4a3a81

230 files changed

Lines changed: 73470 additions & 59737 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/mcp-publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: mcp-publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version to publish (e.g. 1.0.1) — must match package.json'
10+
required: false
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
19+
defaults:
20+
run:
21+
working-directory: packages/mcp
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: false
27+
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 22.x
31+
registry-url: 'https://registry.npmjs.org'
32+
cache: 'npm'
33+
cache-dependency-path: package-lock.json
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Build
39+
run: npm run build
40+
41+
- name: Run unit tests before publish
42+
run: npm run test:unit
43+
44+
- name: Publish to npm
45+
run: npm publish --access public
46+
env:
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ name: karrio-tests
1717

1818
on: [push]
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
sdk-tests:
2225
runs-on: ubuntu-latest
@@ -189,3 +192,35 @@ jobs:
189192
run: |
190193
npm ci
191194
npm run build -w apps/dashboard
195+
196+
mcp-ci:
197+
runs-on: ubuntu-latest
198+
199+
steps:
200+
- uses: actions/checkout@v4
201+
with:
202+
submodules: false
203+
204+
- uses: actions/setup-node@v4
205+
with:
206+
node-version: 22.x
207+
cache: 'npm'
208+
cache-dependency-path: package-lock.json
209+
210+
- name: Install dependencies
211+
run: npm ci
212+
213+
- name: Typecheck
214+
working-directory: packages/mcp
215+
run: npx tsc --noEmit
216+
217+
- name: Run unit tests
218+
working-directory: packages/mcp
219+
run: npm run test:unit
220+
221+
# Integration tests are skipped in CI — they require a live Karrio API instance.
222+
# Run locally with: npm run test:integration -w packages/mcp
223+
224+
- name: Build
225+
working-directory: packages/mcp
226+
run: npm run build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ coverage.xml
4848
.pytest_cache/
4949

5050
# Translations
51-
*.mo
5251
*.pot
52+
!**/locale/**/*.mo
5353

5454
# Django stuff:
5555
*.log

AGENTS.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ try {
615615
- Reference issues: `refs #123` or `fixes #123`
616616
- Keep commits focused and atomic
617617
- Rebase on `main` before PR
618-
- Run lint/test before pushing
618+
- **Run tests locally before every push — no exceptions** (see pre-push checklist below)
619619
- Fill out PR template, link discussions, enable "Allow edits from maintainers"
620620

621621
---
@@ -629,6 +629,30 @@ try {
629629

630630
---
631631

632+
## 🚨 Pre-Push Checklist — Mandatory Before Every `git push`
633+
634+
**Never push without running tests first. CI runs are not a substitute for local testing.**
635+
636+
1. `source bin/activate` — ensure venv is active
637+
2. Run tests for every module you touched:
638+
```bash
639+
LOG_LEVEL=30 python -m karrio test karrio.server.<changed_module>.tests
640+
```
641+
3. Run the SDK test suite if you touched SDK or connector code:
642+
```bash
643+
LOG_LEVEL=30 python -m unittest discover -s modules/sdk/tests -p "test_*.py" -v
644+
```
645+
4. Zero failures, zero errors → then push
646+
5. If a test fails: fix it before pushing. "CI will catch it" is not acceptable.
647+
648+
**Common gotchas:**
649+
- New settings guards must be reflected in `@override_settings` in the relevant tests
650+
- Submodule pointers (`ee/platform`, `ee/insiders`, `community`) must match the expected SHAs — never leave them dirty or pointing to unreachable commits
651+
- Signal handlers: check for N+1 before committing (use `assertNumQueries`)
652+
- Carrier credentials: never hardcode — always from `settings`/env; tests must use `pending()`/`test.skip` when credentials absent
653+
654+
---
655+
632656
## Before Making Changes
633657

634658
1. **Search for existing code** that does what you need

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
# Karrio 2026.1.27
2+
3+
## Changes
4+
5+
### Feat
6+
7+
- feat: cancel by request_id + resource archiving (soft-delete)
8+
- feat(smartkargo): add partner tracking API support
9+
- feat(charts): add production Helm chart for Kubernetes deployment
10+
- feat(mcp): npm publish workflow, CI test job, and bin/dev up integration
11+
- feat(tracking): retire aged trackers (#1023)
12+
- fix(return): fix/return shipments (#1016)
13+
14+
### Fix
15+
16+
- fix(landmark): reclassify early fulfillment events as pending to allow cancellation
17+
- fix(smartkargo): extract validation errors from nested shipments[]
18+
- fix(smartkargo): ensure trace_as records for all proxy ops (#1019)
19+
- fix(dhl_express): remove LocalProductCode from XML API requests
20+
- fix(dhl_express): move SoftwareName to connection config
21+
- fix(sdk): redact API key headers (#1023)
22+
- fix: information exposure through an exception (code scanning alert #98)
23+
24+
### Security
25+
26+
- security: pin axios to 1.13.2 — block compromised 1.14.1 and 0.30.4
27+
28+
### Performance
29+
30+
- perf: eliminate N+1 queries in tenant middleware, rate sheets, and constance settings
31+
32+
### Chores
33+
34+
- chore(deps): bump next from 16.1.5 to 16.1.7 in /apps/web
35+
- chore(deps): bump next from 16.1.5 to 16.1.7 in /packages/core
36+
37+
### Docs
38+
39+
- docs(self-hosting): add Kubernetes deployment guide
40+
41+
---
42+
143
# Karrio 2026.1.26
244

345
## Changes

0 commit comments

Comments
 (0)