Skip to content

Commit a3dea5b

Browse files
Merge branch 'main' into ship/gravity-sliders-fix
2 parents 361e7ec + a74edeb commit a3dea5b

4 files changed

Lines changed: 42 additions & 7 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
3030
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4
31+
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
3232
with:
3333
languages: ${{ matrix.language }}
3434
build-mode: none
3535
config-file: ./.github/codeql/codeql-config.yml
3636
- name: Analyze
3737
id: analyze
38-
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4
38+
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
3939
with:
4040
output: codeql-results
4141
- name: Require clean CodeQL results

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,14 +678,14 @@ jobs:
678678
with:
679679
python-version: "3.11"
680680
- name: Initialize CodeQL
681-
uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4
681+
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
682682
with:
683683
languages: ${{ matrix.language }}
684684
build-mode: none
685685
config-file: ./.github/codeql/codeql-config.yml
686686
- name: Analyze complete source tree
687687
id: analyze
688-
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4
688+
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
689689
with:
690690
output: codeql-results
691691
upload: never

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ mcp = [
9898
code = [
9999
"tree-sitter>=0.23; python_version >= '3.10'",
100100
"tree-sitter-language-pack==0.9.0; python_version < '3.10'",
101-
"tree-sitter-language-pack==1.14.3; python_version >= '3.10'",
101+
"tree-sitter-language-pack==1.15.8; python_version >= '3.10'",
102102
]
103103
# Local resource extraction. Text/code/HTML/DOCX remain stdlib-only; this adds PDF
104104
# extraction and image OCR bindings (the Tesseract executable is installed separately).
@@ -145,7 +145,7 @@ all = [
145145
"cryptography>=50.0.0; python_version >= '3.10'",
146146
"tree-sitter>=0.23; python_version >= '3.10'",
147147
"tree-sitter-language-pack==0.9.0; python_version < '3.10'",
148-
"tree-sitter-language-pack==1.14.3; python_version >= '3.10'",
148+
"tree-sitter-language-pack==1.15.8; python_version >= '3.10'",
149149
"pypdf>=6.15.0",
150150
"Pillow>=12.3.0; python_version >= '3.10'",
151151
"pytesseract>=0.3.10; python_version >= '3.10'",
@@ -188,7 +188,7 @@ test = [
188188
"cryptography>=50.0.0; python_version >= '3.10'",
189189
"tree-sitter>=0.23; python_version >= '3.10'",
190190
"tree-sitter-language-pack==0.9.0; python_version < '3.10'",
191-
"tree-sitter-language-pack==1.14.3; python_version >= '3.10'",
191+
"tree-sitter-language-pack==1.15.8; python_version >= '3.10'",
192192
"pypdf>=6.15.0",
193193
"Pillow>=12.3.0; python_version >= '3.10'",
194194
"pytesseract>=0.3.10; python_version >= '3.10'",

tests/test_mcp_server.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,3 +1231,38 @@ def test_smart_gateway_unknown_exception_never_leaks_internals(monkeypatch):
12311231
assert parsed["error"]["code"] == "E_INTERNAL"
12321232
assert "SECRET" not in parsed["error"]["message"]
12331233
assert "/home/user" not in parsed["error"]["message"]
1234+
1235+
1236+
def test_classic_remember_persists_subject_key_and_claim_kind_to_chain(monkeypatch):
1237+
"""Classic engraphis_remember must persist subject_key/claim_kind to the chain.
1238+
1239+
Regression guard for the class binding that powers every direct Command Code
1240+
caller: the SMART gateway now carries subject_key/claim_kind (PR #171) but the
1241+
classic binding had no end-to-end test that exercised these parameters. A
1242+
direct call must (a) return a memory id, not a delegation envelope, and
1243+
(b) round-trip the subject/claim metadata through the inspect chain.
1244+
"""
1245+
srv = _module_with_memory_db(monkeypatch)
1246+
1247+
response = srv.engraphis_remember(
1248+
content="The deployment timeout is 30 seconds.",
1249+
workspace="w",
1250+
subject_key="deploy.timeout",
1251+
claim_kind="configured_value",
1252+
)
1253+
assert not response.startswith("Error:"), response
1254+
payload = json.loads(response)
1255+
assert payload["op"] == "add"
1256+
assert isinstance(payload.get("id"), str) and payload["id"]
1257+
# The id must be a memory id, not a Smart gateway delegation envelope.
1258+
assert not payload["id"].startswith("del_"), payload["id"]
1259+
1260+
fetched = srv.engraphis_get_memory(memory_id=payload["id"], workspace="w")
1261+
assert not fetched.startswith("Error:"), fetched
1262+
fetched_payload = json.loads(fetched)
1263+
assert fetched_payload["id"] == payload["id"]
1264+
assert fetched_payload["chain"], "inspect must return a non-empty chain"
1265+
head = fetched_payload["chain"][0]
1266+
assert head["id"] == payload["id"]
1267+
assert head["subject_key"] == "deploy.timeout"
1268+
assert head["claim_kind"] == "configured_value"

0 commit comments

Comments
 (0)