Skip to content

fix(shadow-ai): close SQLite handles and read UTF-8 explicitly - #329

Open
dinakarjs wants to merge 1 commit into
agentrust-io:shadow-ai-cmcp-adapterfrom
dinakarjs:fix/shadow-ai-windows-io
Open

dinakarjs wants to merge 1 commit into
agentrust-io:shadow-ai-cmcp-adapterfrom
dinakarjs:fix/shadow-ai-windows-io

Conversation

@dinakarjs

Copy link
Copy Markdown
Contributor

Addresses Imran's Windows portability findings on #322. The producer's read connection now closes before TemporaryDirectory cleanup, and the scanner reads catalogs and JSONL as UTF-8. The Unicode-separator fixture also writes UTF-8 explicitly. Document the encoding contract.

This companion PR targets #322's feature branch so only the six-file portability correction is shown; it retains Carlos's adapter implementation and ownership. Integrate it into #322 before merge, or retarget/cherry-pick the correction onto main after #322 lands.

Validation on Linux/Python 3.12.14: 132 tests pass with each installed released cmcp-runtime 0.2.0 and 0.7.0. Added behavioral tests observe closure of every SQLite connection and correct non-ASCII identity handling under a simulated cp1252 default. Reverting each respective fix makes its regression fail. Repository CI Ruff scope (E4/E7/E9/F, target py39), compileall and diff checks pass. No native Windows execution claimed. No source-authentication, gateway, TEE or end-to-end execution claim. DCO signed off.

Address the Windows portability findings on upstream agentrust-io#322. Add behavioral regression controls for closed connections and non-UTF-8 platform defaults.

Signed-off-by: Srinivasa Dinakar <78673153+dinakarjs@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant