Repository navigation
Commit db4717e
authored
fix(plugin): consolidate local runtime hardening (#2286)
## Description
This PR consolidates the local-plugin reliability fixes developed and
validated on `fix-local-plugin-260824`.
### Highlights
- hardens Hermes bridge process detection, PID/status reconciliation,
installer rollback, Windows-native provider behavior, and UTF-8 tool
output;
- makes secret environment fallback explicit and wires first-class
`maxTokens` / `headers` configuration through the L3 and Skill Evolver
clients;
- moves idle-skill archival off the foreground path with bounded, atomic
lifecycle work;
- recovers useful crystallizer drafts when LLM output omits derivable
fields;
- bounds startup-recovery shutdown and adds the newest-trace index with
collision-safe migration handling;
- resolves DeepSeek Harness auxiliary reasoning capability from exact
model metadata, with per-route TTL caching, concurrent lookup
coalescing, adapter-update invalidation, and registration-bound race
fallback.
Contribution history is preserved from #2192, #2209, #2246, #2248,
#2252, #2253, #2256, and #2284. The capability-driven implementation
supersedes the negative probe cache proposed in #2285.
No new runtime dependencies are introduced.
Related Issue (Required): Fixes #2278
Reviewers: @hijzy @whipser030
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Refactor (does not change functionality, e.g. code style
improvements, linting)
- [x] Documentation update
## How Has This Been Tested?
- [x] Unit Test
- `npm run test:unit -- --reporter=dot`: 179 files passed; 1,549 tests
passed and 2 skipped.
- `npm exec vitest run tests/unit/adapters/deepseek-harness-*.test.ts --
--reporter=dot`: 65/65 passed.
- `python3
apps/memos-local-plugin/tests/python/test_hermes_provider_pipeline.py`:
36/36 passed.
- [x] Test Script Or Test Steps
- `npm run lint`
- `npm run build:package`
- `npm run check:hermes-version`
- Ruff 0.11.8 check and format verification for both changed Python
files.
- Packed commit `d76c78aa` and installed the identical tarball into DSH
`0.1.0-rc.6` `web` profiles on macOS and Windows.
- Verified SHA-256
`61e805f862acbe0873581e22cac4592ab0a9ff4d23d607a5f9fac5df93e80253` on
both hosts.
- Verified unsupported-reasoning routes issue zero rejected `off` probes
across repeated/concurrent calls, supported routes retain `off`, adapter
invalidation refreshes the capability, and both installed profiles start
with healthy Host LLM bridges.
- [x] Pipeline Automated API Test
- GitHub CI will run after PR creation.
> Note: `make format` could not start because Poetry is not installed on
the validation host. The equivalent Ruff 0.11.8 checks for the changed
Python files passed.
## Checklist
- [x] I have performed a self-review of my own code | 我已自行检查了自己的代码
- [x] I have commented my code in hard-to-understand areas |
我已在难以理解的地方对代码进行了注释
- [x] I have added tests that prove my fix is effective or that my
feature works | 我已添加测试以证明我的修复有效或功能正常
- [x] I have created related documentation issue/PR in
[MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) |
N/A: no external documentation change is required.
- [x] I have linked the issue to this PR (if applicable) | 我已将 issue
链接到此 PR
- [x] I have mentioned the person who will review this PR | 我已提及将审查此 PR
的人
## Reviewer Checklist
- [x] closes #2278
- [x] Made sure Checks passed locally; GitHub CI will run on creation
- [x] Tests have been provided53 files changed
Lines changed: 3757 additions & 417 deletions
File tree
- apps/memos-local-plugin
- adapters
- deepseek-harness
- hermes/memos_provider
- bridge
- core
- config
- pipeline
- skill
- storage
- migrations
- repos
- docs
- templates
- tests
- integration/adapters
- python
- unit
- adapters
- bridge
- config
- install
- logger
- pipeline
- skill
- storage
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
49 | 73 | | |
50 | 74 | | |
51 | 75 | | |
| |||
95 | 119 | | |
96 | 120 | | |
97 | 121 | | |
98 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
99 | 127 | | |
100 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
101 | 133 | | |
102 | 134 | | |
103 | 135 | | |
| |||
122 | 154 | | |
123 | 155 | | |
124 | 156 | | |
| 157 | + | |
125 | 158 | | |
126 | 159 | | |
127 | 160 | | |
| |||
217 | 250 | | |
218 | 251 | | |
219 | 252 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
226 | 258 | | |
227 | 259 | | |
228 | 260 | | |
229 | 261 | | |
230 | 262 | | |
231 | 263 | | |
| 264 | + | |
232 | 265 | | |
233 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
234 | 277 | | |
235 | 278 | | |
236 | 279 | | |
| |||
243 | 286 | | |
244 | 287 | | |
245 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
246 | 296 | | |
247 | 297 | | |
248 | 298 | | |
249 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
250 | 347 | | |
251 | 348 | | |
252 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
129 | 140 | | |
130 | 141 | | |
131 | 142 | | |
| |||
247 | 258 | | |
248 | 259 | | |
249 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
250 | 267 | | |
251 | 268 | | |
252 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1504 | 1504 | | |
1505 | 1505 | | |
1506 | 1506 | | |
1507 | | - | |
| 1507 | + | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
| 1512 | + | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
| |||
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | | - | |
| 1531 | + | |
1532 | 1532 | | |
1533 | 1533 | | |
1534 | 1534 | | |
1535 | | - | |
| 1535 | + | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | 1538 | | |
| |||
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | | - | |
| 1544 | + | |
1545 | 1545 | | |
1546 | 1546 | | |
1547 | 1547 | | |
1548 | 1548 | | |
1549 | | - | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
1550 | 1552 | | |
1551 | 1553 | | |
1552 | 1554 | | |
| |||
1584 | 1586 | | |
1585 | 1587 | | |
1586 | 1588 | | |
1587 | | - | |
| 1589 | + | |
| 1590 | + | |
1588 | 1591 | | |
1589 | 1592 | | |
1590 | 1593 | | |
| |||
1596 | 1599 | | |
1597 | 1600 | | |
1598 | 1601 | | |
1599 | | - | |
| 1602 | + | |
1600 | 1603 | | |
1601 | 1604 | | |
1602 | 1605 | | |
1603 | 1606 | | |
1604 | 1607 | | |
1605 | | - | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
1606 | 1612 | | |
1607 | 1613 | | |
1608 | 1614 | | |
| |||
1621 | 1627 | | |
1622 | 1628 | | |
1623 | 1629 | | |
1624 | | - | |
| 1630 | + | |
| 1631 | + | |
1625 | 1632 | | |
1626 | 1633 | | |
1627 | 1634 | | |
| |||
1651 | 1658 | | |
1652 | 1659 | | |
1653 | 1660 | | |
1654 | | - | |
| 1661 | + | |
| 1662 | + | |
1655 | 1663 | | |
1656 | 1664 | | |
1657 | 1665 | | |
1658 | 1666 | | |
1659 | | - | |
| 1667 | + | |
1660 | 1668 | | |
1661 | 1669 | | |
1662 | 1670 | | |
| |||
1667 | 1675 | | |
1668 | 1676 | | |
1669 | 1677 | | |
1670 | | - | |
| 1678 | + | |
1671 | 1679 | | |
1672 | | - | |
1673 | | - | |
| 1680 | + | |
| 1681 | + | |
1674 | 1682 | | |
1675 | 1683 | | |
1676 | 1684 | | |
| |||
0 commit comments