hermes-agent/tests/skills
solyanviktor-star adecb0d1a9 fix(skills): read OOXML parts as bytes and form JSON as UTF-8 in office skill scripts
The bundled office skills (#68595) read user documents and agent-authored
payloads with the locale-default codec:

- docx/powerpoint validators/base.py opened OOXML part XML in text mode
  before handing it to lxml. On Windows (cp1251/GBK) the bytes decode to
  mojibake that lxml then parses, so validation runs against silently
  corrupted document text; on locales where the UTF-8 bytes don't decode
  the validator crashes with UnicodeDecodeError instead of validating.
  Opening as bytes lets lxml honor the encoding declared in the XML prolog.

- The pdf form scripts (fill_fillable_fields, fill_pdf_form_with_annotations,
  create_validation_image, check_bounding_boxes) read the fields JSON the
  agent authors — UTF-8 by construction — with the locale codec, so
  non-ASCII form values (any Cyrillic/CJK/accented input) either crash or
  get written into the user's PDF as mojibake. The json.dump writers use
  ensure_ascii=True and were already safe; only the readers needed pinning.

Adds a contract test asserting every document/payload reader is
locale-independent, plus a live regression test that runs
check_bounding_boxes.py on a non-ASCII fields.json under a forced
non-UTF-8 locale — it fails without the fix on both POSIX (C locale)
and Windows (cp1251 chokes on the 0x98 byte of U+2018).
2026-07-24 17:10:39 -07:00
..
test_cloudflare_temporary_deploy_skill.py feat(skills): add cloudflare-temporary-deploy optional skill (#50849) 2026-06-22 12:14:30 -07:00
test_darwinian_evolver_skill.py feat(skill): darwinian-evolver optional skill 2026-05-15 21:56:07 -07:00
test_fetch_transcript.py fix(deps): declare youtube-transcript-api in pyproject.toml [youtube] extra 2026-05-09 13:36:01 -07:00
test_google_workspace_api.py fix(google-workspace): handle Gmail header casing case-insensitively 2026-05-30 02:38:18 -07:00
test_google_workspace_credential_files.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_hyperliquid_skill.py Add unit tests for hyperliquid skill functionality 2026-05-10 22:15:04 -07:00
test_mcp_oauth_remote_gateway_skill.py chore(skills/mcp-oauth-remote-gateway): move to optional-skills + modernize 2026-07-16 01:28:32 -07:00
test_memento_cards.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_office_document_skills.py fix(skills): read OOXML parts as bytes and form JSON as UTF-8 in office skill scripts 2026-07-24 17:10:39 -07:00
test_openclaw_migration.py fix: handle non-UTF-8 files in OpenClaw migration script 2026-07-24 17:10:39 -07:00
test_openclaw_migration_hardening.py
test_pinecone_research_skill.py fix(skills): rename pinecone-research, shorten descriptions, add scripts + tests 2026-07-23 21:06:33 -07:00
test_telephony_skill.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_tldraw_offline_skill.py feat(skills): add tldraw-offline agent scripting skill 2026-07-23 08:07:00 -07:00
test_unbroker_skill.py blocked-tail pass: blind opt-out default, email fallback, peopleconnect delete-wipes-suppression 2026-07-03 15:21:04 -04:00
test_xurl_article_ingestion_docs.py fix(skills): document xurl X Article ingestion 2026-06-03 15:11:57 -07:00
test_xurl_x_search_routing.py fix(skills): keep xurl SKILL self-contained; move x_search routing to gated surfaces 2026-07-23 21:06:47 -07:00
test_youtube_quiz.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00